diff --git a/AupLauncher/FormMain.cs b/AupLauncher/FormMain.cs index a9067b8..a553add 100644 --- a/AupLauncher/FormMain.cs +++ b/AupLauncher/FormMain.cs @@ -7,6 +7,8 @@ namespace AupLauncher { public partial class FormMain : Form { + private readonly LocalizedExecutionKind _ek_invalid_value = ExecutionKind.InvalidValue.Localized(); + public FormMain() { this.InitializeComponent(); @@ -18,7 +20,6 @@ private void FormMain_Load(object sender, EventArgs e) if (!Program.Settings.IsInstalled) { Program.Settings.Install(); } - cbox_invfile.Items.Add(ExecutionKind.InvalidValue .Localized()); cbox_invfile.Items.Add(ExecutionKind.ShowError .Localized()); cbox_invfile.Items.Add(ExecutionKind.Nothing .Localized()); cbox_invfile.Items.Add(ExecutionKind.AviUtl .Localized()); @@ -120,6 +121,10 @@ private void btnReload_Click(object sender, EventArgs e) private void btnSave_Click(object sender, EventArgs e) { + if (!_ek_invalid_value.Equals(cbox_invfile.SelectedItem)) { + cbox_invfile.Items.Remove(_ek_invalid_value); + } + Program.Settings.Default.AviUtlPath = tbox_avi_path.Text; Program.Settings.Default.AviUtlArgs = tbox_avi_args.Text; Program.Settings.Default.AudacityPath = tbox_aud_path.Text; @@ -148,13 +153,21 @@ private void btnUninstall_Click(object sender, EventArgs e) private void RefreshControls() { + var hfif = Program.Settings.Default.HandleForInvalidFile; + if (cbox_invfile.Items.Contains(_ek_invalid_value)) { + cbox_invfile.Items.Remove(_ek_invalid_value); + } + if (hfif == ExecutionKind.InvalidValue) { + cbox_invfile.Items.Add(_ek_invalid_value); + } + tbox_avi_path.Text = Program.Settings.Default.AviUtlPath; tbox_avi_args.Text = Program.Settings.Default.AviUtlArgs; tbox_aud_path.Text = Program.Settings.Default.AudacityPath; tbox_aud_args.Text = Program.Settings.Default.AudacityArgs; tbox_cus_path.Text = Program.Settings.Default.CustomProgramPath; tbox_cus_args.Text = Program.Settings.Default.CustomProgramArgs; - cbox_invfile.SelectedItem = Program.Settings.Default.HandleForInvalidFile.Localized(); + cbox_invfile.SelectedItem = hfif.Localized(); this.SetCustomProgramEnabled(); diff --git a/AupLauncher/Program.cs b/AupLauncher/Program.cs index 227c3e9..1bf8d75 100644 --- a/AupLauncher/Program.cs +++ b/AupLauncher/Program.cs @@ -14,8 +14,8 @@ public static class Program public const string Description = "Launcher for AviUtl & Audacity Project Files"; public const string Author = "Takym"; public const string Copyright = "Copyright (C) 2020 Takym."; - public const string Version = "0.0.0.5"; - public const string CodeName = "aupl00a5"; + public const string Version = "0.0.0.6"; + public const string CodeName = "aupl00a6"; public static Settings Settings { get; private set; } diff --git a/README.md b/README.md index 761d5d4..a28504c 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ Windows 10 (1909) ## バージョン履歴 |バージョン|開発コード名|更新日 |内容 | |:--------:|:----------:|:---------|:----------------------------------------------------------------------------------------------| +|v0.0.0.6 |aupl00a6 |2020/04/04|無効なファイルの処理の「無効な値」を非表示にした。 | |v0.0.0.5 |aupl00a5 |2020/04/03|説明書きを分かり易く修正。 | |v0.0.0.4 |aupl00a4 |2020/03/31|ファイル名の空白を正しく処理する様にした。 | |v0.0.0.3 |aupl00a3 |2020/03/29|[?]ボタンが表示されない現象を修正した。無効なファイルを開いた時、設定画面を表示できる様にした。| @@ -99,6 +100,7 @@ Please refer [LICENSE.txt](LICENSE.txt) for more information. ## Change Log |Version |Code Name |Update |Changes | |:--------:|:----------:|:---------|:----------------------------------------------------------------------------------------| +|v0.0.0.6 |aupl00a6 |2020/04/04|Invisibled the "invalid value" item of handles for an invalid file. | |v0.0.0.5 |aupl00a5 |2020/04/03|Fixed this manual friendly only. | |v0.0.0.4 |aupl00a4 |2020/03/31|Fixed to process for blanks in a file name. | |v0.0.0.3 |aupl00a3 |2020/03/29|Fixed to show [?] button. Added a handle to show the settings window for an invalid file.|