From 06d506d370ab4dcc68d0540fbaf3583829adc049 Mon Sep 17 00:00:00 2001 From: Takym Date: Tue, 24 Mar 2020 16:44:06 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A2=E3=83=97=E3=83=AA=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AupLauncher/AupLauncher.csproj | 6 + AupLauncher/ExecutionKind.cs | 39 ++ AupLauncher/FormMain.Designer.cs | 190 +++--- AupLauncher/FormMain.cs | 130 +++++ AupLauncher/FormMain.en.resx | 190 ++++++ AupLauncher/FormMain.ja.resx | 196 +++++++ AupLauncher/FormMain.resx | 584 +++++++++++++++++++ AupLauncher/Properties/Resources.Designer.cs | 90 +++ AupLauncher/Properties/Resources.en.resx | 30 + AupLauncher/Properties/Resources.ja.resx | 30 + AupLauncher/Properties/Resources.resx | 30 + AupLauncher/SettingProfile.cs | 21 +- AupLauncher/Settings.cs | 4 +- README.md | 59 ++ 14 files changed, 1512 insertions(+), 87 deletions(-) create mode 100644 AupLauncher/FormMain.en.resx create mode 100644 AupLauncher/FormMain.ja.resx diff --git a/AupLauncher/AupLauncher.csproj b/AupLauncher/AupLauncher.csproj index 073ab4e..4bdf032 100644 --- a/AupLauncher/AupLauncher.csproj +++ b/AupLauncher/AupLauncher.csproj @@ -84,6 +84,12 @@ + + FormMain.cs + + + FormMain.cs + FormMain.cs diff --git a/AupLauncher/ExecutionKind.cs b/AupLauncher/ExecutionKind.cs index d1d42c6..f27ac94 100644 --- a/AupLauncher/ExecutionKind.cs +++ b/AupLauncher/ExecutionKind.cs @@ -1,4 +1,5 @@ using System; +using AupLauncher.Properties; namespace AupLauncher { @@ -66,5 +67,43 @@ public static ExecutionKind ToExecutionKind(this object obj) return ExecutionKind.InvalidValue; } } + + public static LocalizedExecutionKind Localized(this ExecutionKind value) + { + return new LocalizedExecutionKind(value); + } + } + + public struct LocalizedExecutionKind + { + public ExecutionKind Value { get; } + + public LocalizedExecutionKind(ExecutionKind value) + { + this.Value = value; + } + + public override bool Equals(object obj) + { + if (obj is null) { + return false; + } else if (obj is LocalizedExecutionKind lek) { + return this.Value == lek.Value; + } else if (obj is ExecutionKind ek) { + return this.Value == ek; + } else { + return false; + } + } + + public override int GetHashCode() + { + return this.Value.GetHashCode(); + } + + public override string ToString() + { + return Resources.ResourceManager.GetString("EK_" + this.Value.ToString()); + } } } diff --git a/AupLauncher/FormMain.Designer.cs b/AupLauncher/FormMain.Designer.cs index ab6c07f..6c5acc3 100644 --- a/AupLauncher/FormMain.Designer.cs +++ b/AupLauncher/FormMain.Designer.cs @@ -28,6 +28,7 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMain)); this.labelDesc = new System.Windows.Forms.Label(); this.labelAviUtlPath = new System.Windows.Forms.Label(); this.labelAudacityPath = new System.Windows.Forms.Label(); @@ -41,139 +42,169 @@ private void InitializeComponent() this.tbox_aud_args = new System.Windows.Forms.TextBox(); this.tbox_cus_path = new System.Windows.Forms.TextBox(); this.tbox_cus_args = new System.Windows.Forms.TextBox(); - this.comboBox1 = new System.Windows.Forms.ComboBox(); - this.label1 = new System.Windows.Forms.Label(); + this.cbox_invfile = new System.Windows.Forms.ComboBox(); + this.labelInvfile = new System.Windows.Forms.Label(); + this.btn_avi_path = new System.Windows.Forms.Button(); + this.ofd = new System.Windows.Forms.OpenFileDialog(); + this.btn_aud_path = new System.Windows.Forms.Button(); + this.btn_cus_path = new System.Windows.Forms.Button(); + this.btnReset = new System.Windows.Forms.Button(); + this.btnUninstall = new System.Windows.Forms.Button(); + this.btnReload = new System.Windows.Forms.Button(); + this.btnSave = new System.Windows.Forms.Button(); this.SuspendLayout(); // // labelDesc // - this.labelDesc.AutoSize = true; - this.labelDesc.Location = new System.Drawing.Point(8, 8); + resources.ApplyResources(this.labelDesc, "labelDesc"); this.labelDesc.Name = "labelDesc"; - this.labelDesc.Size = new System.Drawing.Size(55, 12); - this.labelDesc.TabIndex = 0; - this.labelDesc.Text = "labelDesc"; // // labelAviUtlPath // - this.labelAviUtlPath.AutoSize = true; - this.labelAviUtlPath.Location = new System.Drawing.Point(8, 60); + resources.ApplyResources(this.labelAviUtlPath, "labelAviUtlPath"); this.labelAviUtlPath.Name = "labelAviUtlPath"; - this.labelAviUtlPath.Size = new System.Drawing.Size(84, 12); - this.labelAviUtlPath.TabIndex = 1; - this.labelAviUtlPath.Text = "labelAviUtlPath"; // // labelAudacityPath // - this.labelAudacityPath.AutoSize = true; - this.labelAudacityPath.Location = new System.Drawing.Point(8, 124); + resources.ApplyResources(this.labelAudacityPath, "labelAudacityPath"); this.labelAudacityPath.Name = "labelAudacityPath"; - this.labelAudacityPath.Size = new System.Drawing.Size(97, 12); - this.labelAudacityPath.TabIndex = 2; - this.labelAudacityPath.Text = "labelAudacityPath"; // // labelCustomPath // - this.labelCustomPath.AutoSize = true; - this.labelCustomPath.Location = new System.Drawing.Point(8, 188); + resources.ApplyResources(this.labelCustomPath, "labelCustomPath"); this.labelCustomPath.Name = "labelCustomPath"; - this.labelCustomPath.Size = new System.Drawing.Size(91, 12); - this.labelCustomPath.TabIndex = 3; - this.labelCustomPath.Text = "labelCustomPath"; // // labelAviUtlArgs // - this.labelAviUtlArgs.AutoSize = true; - this.labelAviUtlArgs.Location = new System.Drawing.Point(8, 92); + resources.ApplyResources(this.labelAviUtlArgs, "labelAviUtlArgs"); this.labelAviUtlArgs.Name = "labelAviUtlArgs"; - this.labelAviUtlArgs.Size = new System.Drawing.Size(85, 12); - this.labelAviUtlArgs.TabIndex = 4; - this.labelAviUtlArgs.Text = "labelAviUtlArgs"; // // labelAudacityArgs // - this.labelAudacityArgs.AutoSize = true; - this.labelAudacityArgs.Location = new System.Drawing.Point(8, 156); + resources.ApplyResources(this.labelAudacityArgs, "labelAudacityArgs"); this.labelAudacityArgs.Name = "labelAudacityArgs"; - this.labelAudacityArgs.Size = new System.Drawing.Size(98, 12); - this.labelAudacityArgs.TabIndex = 5; - this.labelAudacityArgs.Text = "labelAudacityArgs"; // // labelCustomArgs // - this.labelCustomArgs.AutoSize = true; - this.labelCustomArgs.Location = new System.Drawing.Point(8, 220); + resources.ApplyResources(this.labelCustomArgs, "labelCustomArgs"); this.labelCustomArgs.Name = "labelCustomArgs"; - this.labelCustomArgs.Size = new System.Drawing.Size(92, 12); - this.labelCustomArgs.TabIndex = 6; - this.labelCustomArgs.Text = "labelCustomArgs"; // // tbox_avi_path // - this.tbox_avi_path.Location = new System.Drawing.Point(112, 56); + resources.ApplyResources(this.tbox_avi_path, "tbox_avi_path"); this.tbox_avi_path.Name = "tbox_avi_path"; - this.tbox_avi_path.Size = new System.Drawing.Size(520, 19); - this.tbox_avi_path.TabIndex = 7; + this.tbox_avi_path.TextChanged += new System.EventHandler(this.tbox_TextChanged); // // tbox_avi_args // - this.tbox_avi_args.Location = new System.Drawing.Point(112, 88); + resources.ApplyResources(this.tbox_avi_args, "tbox_avi_args"); this.tbox_avi_args.Name = "tbox_avi_args"; - this.tbox_avi_args.Size = new System.Drawing.Size(520, 19); - this.tbox_avi_args.TabIndex = 8; + this.tbox_avi_args.TextChanged += new System.EventHandler(this.tbox_TextChanged); // // tbox_aud_path // - this.tbox_aud_path.Location = new System.Drawing.Point(112, 120); + resources.ApplyResources(this.tbox_aud_path, "tbox_aud_path"); this.tbox_aud_path.Name = "tbox_aud_path"; - this.tbox_aud_path.Size = new System.Drawing.Size(520, 19); - this.tbox_aud_path.TabIndex = 9; + this.tbox_aud_path.TextChanged += new System.EventHandler(this.tbox_TextChanged); // // tbox_aud_args // - this.tbox_aud_args.Location = new System.Drawing.Point(112, 152); + resources.ApplyResources(this.tbox_aud_args, "tbox_aud_args"); this.tbox_aud_args.Name = "tbox_aud_args"; - this.tbox_aud_args.Size = new System.Drawing.Size(520, 19); - this.tbox_aud_args.TabIndex = 10; + this.tbox_aud_args.TextChanged += new System.EventHandler(this.tbox_TextChanged); // // tbox_cus_path // - this.tbox_cus_path.Location = new System.Drawing.Point(112, 184); + resources.ApplyResources(this.tbox_cus_path, "tbox_cus_path"); this.tbox_cus_path.Name = "tbox_cus_path"; - this.tbox_cus_path.Size = new System.Drawing.Size(520, 19); - this.tbox_cus_path.TabIndex = 11; + this.tbox_cus_path.TextChanged += new System.EventHandler(this.tbox_TextChanged); // // tbox_cus_args // - this.tbox_cus_args.Location = new System.Drawing.Point(112, 216); + resources.ApplyResources(this.tbox_cus_args, "tbox_cus_args"); this.tbox_cus_args.Name = "tbox_cus_args"; - this.tbox_cus_args.Size = new System.Drawing.Size(520, 19); - this.tbox_cus_args.TabIndex = 12; + this.tbox_cus_args.TextChanged += new System.EventHandler(this.tbox_TextChanged); // - // comboBox1 + // cbox_invfile // - this.comboBox1.FormattingEnabled = true; - this.comboBox1.Location = new System.Drawing.Point(152, 304); - this.comboBox1.Name = "comboBox1"; - this.comboBox1.Size = new System.Drawing.Size(121, 20); - this.comboBox1.TabIndex = 13; + resources.ApplyResources(this.cbox_invfile, "cbox_invfile"); + this.cbox_invfile.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbox_invfile.FormattingEnabled = true; + this.cbox_invfile.Name = "cbox_invfile"; + this.cbox_invfile.SelectedIndexChanged += new System.EventHandler(this.cbox_invfile_SelectedIndexChanged); // - // label1 + // labelInvfile // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(8, 248); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(35, 12); - this.label1.TabIndex = 14; - this.label1.Text = "label1"; + resources.ApplyResources(this.labelInvfile, "labelInvfile"); + this.labelInvfile.Name = "labelInvfile"; + // + // btn_avi_path + // + resources.ApplyResources(this.btn_avi_path, "btn_avi_path"); + this.btn_avi_path.Name = "btn_avi_path"; + this.btn_avi_path.UseVisualStyleBackColor = true; + this.btn_avi_path.Click += new System.EventHandler(this.btn_avi_path_Click); + // + // ofd + // + resources.ApplyResources(this.ofd, "ofd"); + this.ofd.ReadOnlyChecked = true; + // + // btn_aud_path + // + resources.ApplyResources(this.btn_aud_path, "btn_aud_path"); + this.btn_aud_path.Name = "btn_aud_path"; + this.btn_aud_path.UseVisualStyleBackColor = true; + this.btn_aud_path.Click += new System.EventHandler(this.btn_aud_path_Click); + // + // btn_cus_path + // + resources.ApplyResources(this.btn_cus_path, "btn_cus_path"); + this.btn_cus_path.Name = "btn_cus_path"; + this.btn_cus_path.UseVisualStyleBackColor = true; + this.btn_cus_path.Click += new System.EventHandler(this.btn_cus_path_Click); + // + // btnReset + // + resources.ApplyResources(this.btnReset, "btnReset"); + this.btnReset.Name = "btnReset"; + this.btnReset.UseVisualStyleBackColor = true; + this.btnReset.Click += new System.EventHandler(this.btnReset_Click); + // + // btnUninstall + // + resources.ApplyResources(this.btnUninstall, "btnUninstall"); + this.btnUninstall.Name = "btnUninstall"; + this.btnUninstall.UseVisualStyleBackColor = true; + this.btnUninstall.Click += new System.EventHandler(this.btnUninstall_Click); + // + // btnReload + // + resources.ApplyResources(this.btnReload, "btnReload"); + this.btnReload.Name = "btnReload"; + this.btnReload.UseVisualStyleBackColor = true; + this.btnReload.Click += new System.EventHandler(this.btnReload_Click); + // + // btnSave + // + resources.ApplyResources(this.btnSave, "btnSave"); + this.btnSave.Name = "btnSave"; + this.btnSave.UseVisualStyleBackColor = true; + this.btnSave.Click += new System.EventHandler(this.btnSave_Click); // // FormMain // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(640, 480); - this.Controls.Add(this.label1); - this.Controls.Add(this.comboBox1); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.btnReload); + this.Controls.Add(this.btnUninstall); + this.Controls.Add(this.btnReset); + this.Controls.Add(this.btn_cus_path); + this.Controls.Add(this.btn_aud_path); + this.Controls.Add(this.btn_avi_path); + this.Controls.Add(this.labelInvfile); + this.Controls.Add(this.cbox_invfile); this.Controls.Add(this.tbox_cus_args); this.Controls.Add(this.tbox_cus_path); this.Controls.Add(this.tbox_aud_args); @@ -190,10 +221,7 @@ private void InitializeComponent() this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Icon = global::AupLauncher.Properties.Resources.AupFile; this.MaximizeBox = false; - this.MaximumSize = new System.Drawing.Size(656, 519); - this.MinimumSize = new System.Drawing.Size(656, 519); this.Name = "FormMain"; - this.Text = "FormMain"; this.Load += new System.EventHandler(this.FormMain_Load); this.ResumeLayout(false); this.PerformLayout(); @@ -215,8 +243,16 @@ private void InitializeComponent() private System.Windows.Forms.TextBox tbox_aud_args; private System.Windows.Forms.TextBox tbox_cus_path; private System.Windows.Forms.TextBox tbox_cus_args; - private System.Windows.Forms.ComboBox comboBox1; - private System.Windows.Forms.Label label1; + private System.Windows.Forms.ComboBox cbox_invfile; + private System.Windows.Forms.Label labelInvfile; + private System.Windows.Forms.Button btn_avi_path; + private System.Windows.Forms.OpenFileDialog ofd; + private System.Windows.Forms.Button btn_aud_path; + private System.Windows.Forms.Button btn_cus_path; + private System.Windows.Forms.Button btnReset; + private System.Windows.Forms.Button btnUninstall; + private System.Windows.Forms.Button btnReload; + private System.Windows.Forms.Button btnSave; } } diff --git a/AupLauncher/FormMain.cs b/AupLauncher/FormMain.cs index 688c58c..bec4fc0 100644 --- a/AupLauncher/FormMain.cs +++ b/AupLauncher/FormMain.cs @@ -1,5 +1,6 @@ using System; using System.Windows.Forms; +using AupLauncher.Properties; namespace AupLauncher { @@ -16,6 +17,135 @@ private void FormMain_Load(object sender, EventArgs e) if (!Program.Settings.IsInstalled) { Program.Settings.Install(); } + cbox_invfile.Items.Add(ExecutionKind.ShowError .Localized()); + cbox_invfile.Items.Add(ExecutionKind.Nothing .Localized()); + cbox_invfile.Items.Add(ExecutionKind.AviUtl .Localized()); + cbox_invfile.Items.Add(ExecutionKind.Audacity .Localized()); + cbox_invfile.Items.Add(ExecutionKind.RunCustomProgram.Localized()); + this.btnReload_Click(sender, e); + } + + private void btn_avi_path_Click(object sender, EventArgs e) + { + ofd.Reset(); + ofd.ReadOnlyChecked = true; + ofd.Filter = Resources.UI_avi_path_filter; + if (ofd.ShowDialog() == DialogResult.OK) { + tbox_avi_path.Text = ofd.FileName; + } + + btnReload.Enabled = true; + btnSave .Enabled = true; + } + + private void btn_aud_path_Click(object sender, EventArgs e) + { + ofd.Reset(); + ofd.ReadOnlyChecked = true; + ofd.Filter = Resources.UI_aud_path_filter; + if (ofd.ShowDialog() == DialogResult.OK) { + tbox_aud_path.Text = ofd.FileName; + } + + btnReload.Enabled = true; + btnSave .Enabled = true; + } + + private void btn_cus_path_Click(object sender, EventArgs e) + { + ofd.Reset(); + ofd.ReadOnlyChecked = true; + ofd.Filter = Resources.UI_cus_path_filter; + if (ofd.ShowDialog() == DialogResult.OK) { + tbox_cus_path.Text = ofd.FileName; + } + + btnReload.Enabled = true; + btnSave .Enabled = true; + } + + private void tbox_TextChanged(object sender, EventArgs e) + { + btnReload.Enabled = true; + btnSave .Enabled = true; + } + + private void cbox_invfile_SelectedIndexChanged(object sender, EventArgs e) + { + this.SetCustomProgramEnabled(); + + btnReload.Enabled = true; + btnSave .Enabled = true; + } + + private void btnReset_Click(object sender, EventArgs e) + { + Program.Settings.Default.Reset(); + + btnReload.Enabled = true; + btnSave .Enabled = true; + } + + private void btnReload_Click(object sender, EventArgs e) + { + Program.Settings.LoadFromRegistry(); + 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(); + + this.SetCustomProgramEnabled(); + + btnReload.Enabled = false; + btnSave .Enabled = false; + } + + private void btnSave_Click(object sender, EventArgs e) + { + Program.Settings.Default.AviUtlPath = tbox_avi_path.Text; + Program.Settings.Default.AviUtlArgs = tbox_avi_args.Text; + Program.Settings.Default.AudacityPath = tbox_aud_path.Text; + Program.Settings.Default.AudacityArgs = tbox_aud_args.Text; + Program.Settings.Default.CustomProgramPath = tbox_cus_path.Text; + Program.Settings.Default.CustomProgramArgs = tbox_cus_args.Text; + Program.Settings.Default.HandleForInvalidFile = ((LocalizedExecutionKind)(cbox_invfile.SelectedItem)).Value; + Program.Settings.SaveToRegistry(); + + btnReload.Enabled = false; + btnSave .Enabled = false; + } + + private void btnUninstall_Click(object sender, EventArgs e) + { + var dr = MessageBox.Show( + Resources.Message_ConfirmUninstalling, + Program.Caption, + MessageBoxButtons.YesNo, + MessageBoxIcon.Question); + if (dr == DialogResult.Yes) { + Program.Settings.Uninstall(); + this.Close(); + } + } + + private void SetCustomProgramEnabled() + { + if (((LocalizedExecutionKind)(cbox_invfile.SelectedItem)).Value == ExecutionKind.RunCustomProgram) { + labelCustomPath.Enabled = true; + labelCustomArgs.Enabled = true; + tbox_cus_path .Enabled = true; + tbox_cus_args .Enabled = true; + btn_cus_path .Enabled = true; + } else { + labelCustomPath.Enabled = false; + labelCustomArgs.Enabled = false; + tbox_cus_path .Enabled = false; + tbox_cus_args .Enabled = false; + btn_cus_path .Enabled = false; + } } } } diff --git a/AupLauncher/FormMain.en.resx b/AupLauncher/FormMain.en.resx new file mode 100644 index 0000000..43efae4 --- /dev/null +++ b/AupLauncher/FormMain.en.resx @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + 185, 12 + + + You can change start-up programs. + + + 80, 12 + + + Path to AviUtl: + + + 93, 12 + + + Path to Audacity: + + + 140, 12 + + + Path to a custom program: + + + Args for AviUtl: + + + Args for Audacity: + + + 145, 12 + + + Args for a custom program: + + + 160, 184 + + + 448, 19 + + + 160, 216 + + + 472, 19 + + + 192, 248 + + + 179, 12 + + + What should do for an invalid file? + + + Reset + + + Uninstall + + + Reload + + + Save + + \ No newline at end of file diff --git a/AupLauncher/FormMain.ja.resx b/AupLauncher/FormMain.ja.resx new file mode 100644 index 0000000..cd12b47 --- /dev/null +++ b/AupLauncher/FormMain.ja.resx @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + 162, 12 + + + 起動するプログラムを設定します。 + + + 81, 12 + + + AviUtl の場所: + + + 94, 12 + + + Audacity の場所: + + + 126, 12 + + + カスタムプログラムの場所: + + + 81, 12 + + + AviUtl の引数: + + + 94, 12 + + + Audacity の引数: + + + 126, 12 + + + カスタムプログラムの引数: + + + 136, 184 + + + 472, 19 + + + 136, 216 + + + 496, 19 + + + 136, 248 + + + 113, 12 + + + 無効なファイルの処理: + + + 初期設定 + + + アンインストール + + + 再読み込み + + + 保存 + + \ No newline at end of file diff --git a/AupLauncher/FormMain.resx b/AupLauncher/FormMain.resx index 1af7de1..793e663 100644 --- a/AupLauncher/FormMain.resx +++ b/AupLauncher/FormMain.resx @@ -117,4 +117,588 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + 112, 88 + + + 8, 220 + + + $this + + + $this + + + labelAviUtlPath + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + $this + + + tbox_cus_path + + + btn_cus_path + + + btnSave + + + 55, 12 + + + + 9 + + + btn_aud_path + + + labelInvfile + + + 0 + + + 100, 23 + + + 260, 20 + + + 5 + + + 18 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + $this + + + 8 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + btn_avi_path + + + 520, 19 + + + $this + + + FormMain + + + 8, 188 + + + 520, 19 + + + 12 + + + 11 + + + 84, 12 + + + tbox_aud_path + + + $this + + + cbox_invfile + + + $this + + + 6, 12 + + + 112, 248 + + + 0 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbox_cus_args + + + 8, 92 + + + 27, 23 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + labelAviUtlPath + + + 14 + + + 85, 12 + + + 8, 156 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbox_aud_args + + + 608, 182 + + + labelInvfile + + + btnReload + + + 10 + + + 656, 359 + + + tbox_aud_args + + + 8, 124 + + + 100, 23 + + + 7 + + + tbox_cus_args + + + 21 + + + 112, 56 + + + 5 + + + 15 + + + 97, 12 + + + 4 + + + True + + + btnUninstall + + + btnReset + + + 0 + + + FormMain + + + True + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbox_avi_args + + + 8, 288 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 16 + + + 608, 54 + + + 98, 12 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 608, 118 + + + labelAviUtlArgs + + + 13 + + + 8 + + + 8, 252 + + + ofd + + + True + + + $this + + + 1 + + + 20 + + + $this + + + 216, 288 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + ... + + + 656, 359 + + + 17 + + + 27, 23 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + tbox_aud_path + + + 60, 12 + + + 496, 19 + + + 496, 19 + + + 3 + + + True + + + labelDesc + + + tbox_avi_args + + + $this + + + 520, 19 + + + 0 + + + 1 + + + 6 + + + 2 + + + labelCustomArgs + + + labelDesc + + + 8, 8 + + + labelAviUtlArgs + + + True + + + labelCustomPath + + + 496, 19 + + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 112, 120 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 92, 12 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + labelAudacityPath + + + $this + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 6 + + + 0 + + + labelCustomArgs + + + $this + + + 3 + + + $this + + + $this + + + 536, 288 + + + btnSave + + + labelAudacityArgs + + + $this + + + 112, 216 + + + 11 + + + 13 + + + $this + + + btnUninstall + + + 2 + + + 27, 23 + + + 4 + + + 8, 60 + + + System.Windows.Forms.OpenFileDialog, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + labelCustomPath + + + 112, 288 + + + 91, 12 + + + 640, 320 + + + True + + + 10 + + + 0 + + + 112, 152 + + + $this + + + 14 + + + 12 + + + 9 + + + 112, 184 + + + 0 + + + 19 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + btnReset + + + labelAudacityArgs + + + ... + + + tbox_avi_path + + + ... + + + True + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 100, 23 + + + 100, 23 + + + btnReload + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 7 + + + labelAudacityPath + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbox_avi_path + + + 0 + + + tbox_cus_path + + + 17, 17 + + + True + \ No newline at end of file diff --git a/AupLauncher/Properties/Resources.Designer.cs b/AupLauncher/Properties/Resources.Designer.cs index e7b55a4..7328b2b 100644 --- a/AupLauncher/Properties/Resources.Designer.cs +++ b/AupLauncher/Properties/Resources.Designer.cs @@ -79,6 +79,60 @@ internal class Resources { } } + /// + /// EK_Audacity に類似しているローカライズされた文字列を検索します。 + /// + internal static string EK_Audacity { + get { + return ResourceManager.GetString("EK_Audacity", resourceCulture); + } + } + + /// + /// EK_AviUtl に類似しているローカライズされた文字列を検索します。 + /// + internal static string EK_AviUtl { + get { + return ResourceManager.GetString("EK_AviUtl", resourceCulture); + } + } + + /// + /// EK_InvalidValue に類似しているローカライズされた文字列を検索します。 + /// + internal static string EK_InvalidValue { + get { + return ResourceManager.GetString("EK_InvalidValue", resourceCulture); + } + } + + /// + /// EK_Nothing に類似しているローカライズされた文字列を検索します。 + /// + internal static string EK_Nothing { + get { + return ResourceManager.GetString("EK_Nothing", resourceCulture); + } + } + + /// + /// EK_RunCustomProgram に類似しているローカライズされた文字列を検索します。 + /// + internal static string EK_RunCustomProgram { + get { + return ResourceManager.GetString("EK_RunCustomProgram", resourceCulture); + } + } + + /// + /// EK_ShowError に類似しているローカライズされた文字列を検索します。 + /// + internal static string EK_ShowError { + get { + return ResourceManager.GetString("EK_ShowError", resourceCulture); + } + } + /// /// ER_Line1 {0} に類似しているローカライズされた文字列を検索します。 /// @@ -214,6 +268,15 @@ internal class Resources { } } + /// + /// Message_ConfirmUninstalling に類似しているローカライズされた文字列を検索します。 + /// + internal static string Message_ConfirmUninstalling { + get { + return ResourceManager.GetString("Message_ConfirmUninstalling", resourceCulture); + } + } + /// /// Message_ErrorReport {0} {1} に類似しているローカライズされた文字列を検索します。 /// @@ -276,5 +339,32 @@ internal class Resources { return ResourceManager.GetString("ShellMenu_Open", resourceCulture); } } + + /// + /// UI_aud_path_filter に類似しているローカライズされた文字列を検索します。 + /// + internal static string UI_aud_path_filter { + get { + return ResourceManager.GetString("UI_aud_path_filter", resourceCulture); + } + } + + /// + /// UI_avi_path_filter に類似しているローカライズされた文字列を検索します。 + /// + internal static string UI_avi_path_filter { + get { + return ResourceManager.GetString("UI_avi_path_filter", resourceCulture); + } + } + + /// + /// UI_cus_path_filter に類似しているローカライズされた文字列を検索します。 + /// + internal static string UI_cus_path_filter { + get { + return ResourceManager.GetString("UI_cus_path_filter", resourceCulture); + } + } } } diff --git a/AupLauncher/Properties/Resources.en.resx b/AupLauncher/Properties/Resources.en.resx index 3743985..b43722f 100644 --- a/AupLauncher/Properties/Resources.en.resx +++ b/AupLauncher/Properties/Resources.en.resx @@ -124,6 +124,24 @@ Default Profile + + Run Audacity + + + Run AviUtl + + + This is an invalid value + + + Do nothing + + + Run a custom program + + + Show an error dialog + # {0} Error Report @@ -169,6 +187,9 @@ ## Exception Information ({0}) + + The registry of the extension will be uninstalled and the application will terminate. Please push [Yes] to continue, otherwise [No]. + The unexpected error occurred. {0} Please refer "{1}" for more details. @@ -190,4 +211,13 @@ &Open with AupLauncher + + The Audacity Executable Program + + + The AviUtl Executable Program + + + All Executable Programs + \ No newline at end of file diff --git a/AupLauncher/Properties/Resources.ja.resx b/AupLauncher/Properties/Resources.ja.resx index 9efcda5..9203bc3 100644 --- a/AupLauncher/Properties/Resources.ja.resx +++ b/AupLauncher/Properties/Resources.ja.resx @@ -124,6 +124,24 @@ 既定のプロファイル + + Audacity を起動する + + + AviUtl を起動する + + + 無効な値です + + + 何もしない + + + カスタムプログラムを起動する + + + エラーを表示する + ■{0}のエラーレポート @@ -169,6 +187,9 @@ □例外の情報 ({0}) + + 拡張子の登録情報をアンインストールし、終了します。続行する場合は [はい] を停止する場合は [いいえ] を押してください。 + 予期せぬエラーが発生しました。{0}詳細は「{1}」をご覧ください。 @@ -190,4 +211,13 @@ AupLauncher で開く(&O) + + Audacity 実行可能プログラム + + + AviUtl 実行可能プログラム + + + 全ての実行可能プログラム + \ No newline at end of file diff --git a/AupLauncher/Properties/Resources.resx b/AupLauncher/Properties/Resources.resx index 4f95a47..c3c10a8 100644 --- a/AupLauncher/Properties/Resources.resx +++ b/AupLauncher/Properties/Resources.resx @@ -124,6 +124,24 @@ DefaultProfileDisplayName + + EK_Audacity + + + EK_AviUtl + + + EK_InvalidValue + + + EK_Nothing + + + EK_RunCustomProgram + + + EK_ShowError + ER_Line1 {0} @@ -169,6 +187,9 @@ ER_Line8_Title {0} + + Message_ConfirmUninstalling + Message_ErrorReport {0} {1} @@ -190,4 +211,13 @@ ShellMenu_Open + + UI_aud_path_filter + + + UI_avi_path_filter + + + UI_cus_path_filter + \ No newline at end of file diff --git a/AupLauncher/SettingProfile.cs b/AupLauncher/SettingProfile.cs index b5faa50..2b45f2c 100644 --- a/AupLauncher/SettingProfile.cs +++ b/AupLauncher/SettingProfile.cs @@ -19,14 +19,7 @@ public class SettingProfile public SettingProfile() { - this.DisplayName = Resources.NewProfileDisplayName; - this.AviUtlPath = "C:\\AviUtl\\aviutl.exe"; - this.AviUtlArgs = "%1"; - this.AudacityPath = "‪%ProgramFiles(x86)%\\Audacity\\audacity.exe"; - this.AudacityArgs = "%1"; - this.CustomProgramPath = "%SystemRoot%\\notepad.exe"; - this.CustomProgramArgs = "%1"; - this.HandleForInvalidFile = ExecutionKind.ShowError; + this.Reset(); } public virtual void LoadFromRegistry(RegistryKey reg) @@ -52,5 +45,17 @@ public virtual void SaveToRegistry(RegistryKey reg) reg.SetValue(nameof(this.CustomProgramArgs), this.CustomProgramArgs, RegistryValueKind.String); reg.SetValue(nameof(this.HandleForInvalidFile), this.HandleForInvalidFile); } + + public virtual void Reset() + { + this.DisplayName = Resources.NewProfileDisplayName; + this.AviUtlPath = "C:\\AviUtl\\aviutl.exe"; + this.AviUtlArgs = "%1"; + this.AudacityPath = "‪%ProgramFiles(x86)%\\Audacity\\audacity.exe"; + this.AudacityArgs = "%1"; + this.CustomProgramPath = "%SystemRoot%\\notepad.exe"; + this.CustomProgramArgs = "%1"; + this.HandleForInvalidFile = ExecutionKind.ShowError; + } } } diff --git a/AupLauncher/Settings.cs b/AupLauncher/Settings.cs index 89dfe24..4cee97b 100644 --- a/AupLauncher/Settings.cs +++ b/AupLauncher/Settings.cs @@ -9,8 +9,8 @@ namespace AupLauncher { public sealed class Settings : IDisposable { - private readonly RegistryKey _reg; - private string _defkey; + private readonly RegistryKey _reg; + private string _defkey; public Dictionary Profiles { get; private set; } public bool IsDisposed { get; private set; } diff --git a/README.md b/README.md index fbd51f6..771c65f 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ Copyright (C) 2020 Takym. [English](#en) + ## Tv AviUtl Audacity ̃vWFNgt@CFK؂ȃAvP[VN܂B @@ -10,6 +11,35 @@ AviUtl ̃\tgEFAMITCZX̉Ŕzz܂B ڂ[LICENSE.txt](LICENSE.txt)B +## CXg[@ +0. ܂ŏ AviUtl Audacity CXg[ĂB +1. KȏꏊɉL̃tH_ƃt@CRs[܂B + * en + * AupLauncher.resources.dll + * ja + * AupLauncher.resources.dll + * AupLauncher.exe + * AupLauncher.exe.config +2. AupLauncher.exe ENbNǗ҂ƂĎs܂BƁAgq񂪎IɊ֘At܂B +3. ݒ荀ڂ‹ɍ킹ďC܂B +4. ύXۑ܂B +5. CXg[łB + +## ACXg[@ +1. ݒʂJ܂B +2. [ACXg[] {^܂B +3. bZ[W\ꂽ [͂] I܂B +4. ֘AtH_ƃt@C蓮ō폜܂B + +## g +* L̎wɏ]ĐCXg[ꍇAu.aupvt@CJƎI AviUtl ܂ Audacity N܂B +* AupLauncher.exe ɉ^ɋNꍇAݒʂJ܂B + +## o[W +|o[W|JR[h|XV |e | +|:--------:|:----------:|:---------|:-------------------| +|v0.0.0.0 |aupl00a0 |2020/03/24|ŏ̃[XłB| + ## Summary This tool recognizes a project file of AviUtl and Audacity to start a proper application for editing. @@ -17,3 +47,32 @@ This tool recognizes a project file of AviUtl and Audacity to start a proper app ## Terms of Use This software is distributed and licensed under the MIT License. Please refer [LICENSE.txt](LICENSE.txt) for more information. + +## How to Install +0. First, please install both AviUtl and Audacity. +1. Copy below the application folders and files to some location: + * en + * AupLauncher.resources.dll + * ja + * AupLauncher.resources.dll + * AupLauncher.exe + * AupLauncher.exe.config +2. Right-click AupLauncher.exe and run as administrator. Then, the extension information will be registered automatically. +3. Fix settings for your environment. +4. Save changes. +5. Finish! + +## How to Uninstall +1. Open the settings window. +2. Click the [Uninstall] button. +3. Click the [Yes] button after the message box shown. +4. Remove related folders and files manually. + +## How to Use +* When you followed above direction and installed successfully, the launcher will open ".aup" file with AviUtl or Audacity. +* When you executed AupLauncher.exe without any arguments, the launcher will open the settings window. + +## Change Log +|Version |Code Name |Update |Changes | +|:--------:|:----------:|:---------|:-----------------| +|v0.0.0.0 |aupl00a0 |2020/03/24|The first release.|