From 14ffdfc2ed98930dfd9aa2af796234510b4eb23c Mon Sep 17 00:00:00 2001 From: CjangCjengh <101577701+CjangCjengh@users.noreply.github.com> Date: Sun, 7 Aug 2022 21:19:17 +0800 Subject: [PATCH] fix --- MoeGoe_GUI/MainWin.cs | 21 ++++++--------------- MoeGoe_GUI/Program.cs | 5 +---- MoeGoe_GUI/Properties/AssemblyInfo.cs | 1 - 3 files changed, 7 insertions(+), 20 deletions(-) diff --git a/MoeGoe_GUI/MainWin.cs b/MoeGoe_GUI/MainWin.cs index da4cf09..8ceb119 100644 --- a/MoeGoe_GUI/MainWin.cs +++ b/MoeGoe_GUI/MainWin.cs @@ -1,16 +1,7 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; +using System.IO; using System.Text.RegularExpressions; -using System.Threading.Tasks; using System.Windows.Forms; -using System.IO; -using System.Diagnostics; -using System.Threading; namespace MoeGoe_GUI { @@ -150,7 +141,7 @@ private void Initialize_mode() { MatchCollection matches = Regex.Matches(match.Groups[1].Value, "\"((?:(?:\\\\.)|[^\\\\\"])*)\""); - if(matches.Count > 0) + if (matches.Count > 0) { for (int i = 0; i < matches.Count; i++) { @@ -171,7 +162,7 @@ private void GetStart() { cmd = new CommandLine(); cmd.OutputHandler += Cmd_OutputHandler; - cmd.Write(EXEPATH); + cmd.Write("\"" + EXEPATH + "\""); cmd.Write(MODELPATH); cmd.Write(CONFIGPATH); modeControl.Enabled = true; @@ -180,7 +171,7 @@ private void GetStart() private void Cmd_OutputHandler(CommandLine sender, string e) { - Invoke(new Action(()=> consoleBox.Text += e)); + Invoke(new Action(() => consoleBox.Text += e)); } private void OpenOrigin_Click(object sender, EventArgs e) @@ -208,7 +199,7 @@ private bool IsFilled() { if (modeControl.SelectedIndex == 0) { - if(textBox.Text.Length == 0) + if (textBox.Text.Length == 0) { MessageBox.Show("请输入文本!", "", MessageBoxButtons.OK, MessageBoxIcon.Warning); @@ -230,7 +221,7 @@ private bool IsFilled() MessageBoxButtons.OK, MessageBoxIcon.Warning); return false; } - if(originBox.SelectedIndex == -1) + if (originBox.SelectedIndex == -1) { MessageBox.Show("请选择原说话人!", "", MessageBoxButtons.OK, MessageBoxIcon.Warning); diff --git a/MoeGoe_GUI/Program.cs b/MoeGoe_GUI/Program.cs index 2cbdfe0..c112cb1 100644 --- a/MoeGoe_GUI/Program.cs +++ b/MoeGoe_GUI/Program.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using System.Windows.Forms; using System.Diagnostics; +using System.Windows.Forms; namespace MoeGoe_GUI { diff --git a/MoeGoe_GUI/Properties/AssemblyInfo.cs b/MoeGoe_GUI/Properties/AssemblyInfo.cs index 77c7964..9d142d5 100644 --- a/MoeGoe_GUI/Properties/AssemblyInfo.cs +++ b/MoeGoe_GUI/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // 有关程序集的一般信息由以下