Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
「無効な値」を非表示に
Browse files Browse the repository at this point in the history
  • Loading branch information
Takym committed Apr 4, 2020
1 parent 63b757d commit a5161ff
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
17 changes: 15 additions & 2 deletions AupLauncher/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ namespace AupLauncher
{
public partial class FormMain : Form
{
private readonly LocalizedExecutionKind _ek_invalid_value = ExecutionKind.InvalidValue.Localized();

public FormMain()
{
this.InitializeComponent();
Expand All @@ -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());
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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();

Expand Down
4 changes: 2 additions & 2 deletions AupLauncher/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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|[?]ボタンが表示されない現象を修正した。無効なファイルを開いた時、設定画面を表示できる様にした。|
Expand Down Expand Up @@ -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.|
Expand Down

0 comments on commit a5161ff

Please sign in to comment.