Skip to content

Commit

Permalink
2.5发布
Browse files Browse the repository at this point in the history
修复人工翻译设置界面在没有游戏数据库的情况下崩溃的bug
  • Loading branch information
hanmin0822 committed Jul 7, 2020
1 parent 0600dd3 commit cc5b522
Showing 1 changed file with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,25 @@ public ArtificialTransSettingsPage()
ATonCheckBox.IsChecked = Common.appSettings.ATon;
PathBox.Text = Common.appSettings.ArtificialPatchPath;

strNames = Directory.GetFiles(Environment.CurrentDirectory + "\\ArtificialTranslation");
if (Directory.Exists(Environment.CurrentDirectory + "\\ArtificialTranslation")) {
strNames = Directory.GetFiles(Environment.CurrentDirectory + "\\ArtificialTranslation");

List<string> fileList = new List<string>();
List<string> fileList = new List<string>();

for (int i = 0;i < strNames.Length;i++) {
fileList.Add(System.IO.Path.GetFileName(strNames[i]));
for (int i = 0; i < strNames.Length; i++)
{
fileList.Add(System.IO.Path.GetFileName(strNames[i]));
}

PatchFileCombox.ItemsSource = fileList;

if (fileList.Count > 0)
{
PatchFileCombox.SelectedIndex = 0;
}
}

PatchFileCombox.ItemsSource = fileList;
PatchFileCombox.SelectedIndex = 0;

}

private void ChoosePathBtn_Click(object sender, RoutedEventArgs e)
Expand Down

0 comments on commit cc5b522

Please sign in to comment.