diff --git a/CleanMachineHMI/Utils/frmUtil.cs b/CleanMachineHMI/Utils/frmUtil.cs index 16c1964..327cf6a 100644 --- a/CleanMachineHMI/Utils/frmUtil.cs +++ b/CleanMachineHMI/Utils/frmUtil.cs @@ -265,9 +265,10 @@ namespace CleanMachineHMI.Utils } else { - var control = (KryptonComboBox)form.Controls.Find(controlCode,true)[0]; + var control = (KryptonComboBox)form.Controls.Find(controlCode, true)[0]; var str = ""; - foreach (var item in control.Items) { + foreach (var item in control.Items) + { str += $"{item},"; } @@ -324,7 +325,8 @@ namespace CleanMachineHMI.Utils /// private static void WriteLangFile(string fileName, string txt) { - var fileDir = System.Windows.Forms.Application.StartupPath.Split(new string[] { @"bin\Debug" }, StringSplitOptions.RemoveEmptyEntries)[0] + "Lang\\"; + // var fileDir = System.Windows.Forms.Application.StartupPath.Split(new string[] { @"bin\Debug" }, StringSplitOptions.RemoveEmptyEntries)[0] + "Lang\\"; + var fileDir = "Lang\\"; try { if (!Directory.Exists(fileDir))//如果文件夹不存在,就新建一个文件夹。 @@ -341,8 +343,9 @@ namespace CleanMachineHMI.Utils private static void AddzhCN(string key, string name, string options) { - if (string.IsNullOrEmpty(name) && string.IsNullOrEmpty(options)) { - Console.WriteLine(key+"空"); + if (string.IsNullOrEmpty(name) && string.IsNullOrEmpty(options)) + { + Console.WriteLine(key + "空"); return; } var codes = key.Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries);