Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ChineseSubtitleConversionTool/FormMain.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 17 additions & 2 deletions ChineseSubtitleConversionTool/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ private void AddFileListView(ListView listView, params FileInfo[] arrPath)
case ".srt":
case ".lrc":
case ".txt":
case ".yaml":
try
{
ListViewItem listViewItem = listView.Items.Cast<ListViewItem>().First(x => x.SubItems[2].Text == file.FullName);
Expand Down Expand Up @@ -816,9 +817,23 @@ public bool SaveFile(string path, string text, string encode = "UTF-8")
return false;
}
}
#endregion


/// <summary>
/// auto load whenever textpath has changed
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void txtPath_TextChanged(object sender, EventArgs e)
{
string path = ((TextBox)sender).Text;
if (Directory.Exists(path))
{
txtPath.Text = path;
LoadDirectoryFile(txtPath.Text.Trim(), listViewFile);
UpdataListViewFileName(listViewFile, txtFileName.Text.Trim());
}
}
#endregion
}

/// <summary>
Expand Down