diff --git "a/SuperCom.Test/\346\265\213\350\257\225\347\224\250\344\276\213/SuperCom-3.5.xlsx" "b/SuperCom.Test/\346\265\213\350\257\225\347\224\250\344\276\213/SuperCom-3.5.xlsx" index bb711d2..66c4917 100644 Binary files "a/SuperCom.Test/\346\265\213\350\257\225\347\224\250\344\276\213/SuperCom-3.5.xlsx" and "b/SuperCom.Test/\346\265\213\350\257\225\347\224\250\344\276\213/SuperCom-3.5.xlsx" differ diff --git "a/SuperCom.Test/\346\265\213\350\257\225\347\224\250\344\276\213/SuperCom-3.6.xlsx" "b/SuperCom.Test/\346\265\213\350\257\225\347\224\250\344\276\213/SuperCom-3.6.xlsx" new file mode 100644 index 0000000..faf15f9 Binary files /dev/null and "b/SuperCom.Test/\346\265\213\350\257\225\347\224\250\344\276\213/SuperCom-3.6.xlsx" differ diff --git a/SuperCom/App.xaml.cs b/SuperCom/App.xaml.cs index e82c153..926a53e 100644 --- a/SuperCom/App.xaml.cs +++ b/SuperCom/App.xaml.cs @@ -4,7 +4,9 @@ using SuperUtils.Framework.Logger; using SuperUtils.IO; using System; +using System.Threading.Tasks; using System.Windows; +using System.Windows.Threading; namespace SuperCom { diff --git a/SuperCom/Config/ConfigManager.cs b/SuperCom/Config/ConfigManager.cs index 93ad696..7e90209 100644 --- a/SuperCom/Config/ConfigManager.cs +++ b/SuperCom/Config/ConfigManager.cs @@ -6,9 +6,9 @@ namespace SuperCom.Config { public static class ConfigManager { - public const string SQLITE_DATA_PATH = "user_data.sqlite"; + public const string RELEASE_DATE = "2023-05-03"; - public const string RELEASE_DATE = "2023-04-23"; + public const string SQLITE_DATA_PATH = "user_data.sqlite"; public const string LICENSE = "GPL-3.0"; public const string AUTHOR = "chao"; public const string APP_NAME = "SuperCom"; diff --git a/SuperCom/Entity/SerialPortEx.cs b/SuperCom/Entity/SerialPortEx.cs index b866c11..0de43a8 100644 --- a/SuperCom/Entity/SerialPortEx.cs +++ b/SuperCom/Entity/SerialPortEx.cs @@ -43,7 +43,7 @@ public PortSetting Setting public SerialPortEx() { - + Init(); } public SerialPortEx(string portName, int baudRate, Parity parity, int dataBits, StopBits stopBits) @@ -249,8 +249,8 @@ public static string GetRemark(string json) Dictionary dict = JsonUtils.TryDeserializeObject>(json); if (dict != null) { - if (dict.ContainsKey("Remark")) - return dict["Remark"].ToString(); + if (dict.ContainsKey("Remark") && dict.Get("Remark", "") is object remark) + return remark.ToString(); } return ""; } diff --git a/SuperCom/Logger/Logger.cs b/SuperCom/Logger/Logger.cs index 6e97b30..1241e6a 100644 --- a/SuperCom/Logger/Logger.cs +++ b/SuperCom/Logger/Logger.cs @@ -20,7 +20,11 @@ private Logger() static Logger() { Instance = new Logger(); +#if DEBUG Instance.LogLevel = Level.Debug; +#else + Instance.LogLevel = Level.Info; +#endif } public override void LogPrint(string str) diff --git a/SuperCom/MainWindow.xaml.cs b/SuperCom/MainWindow.xaml.cs index 3e8fbed..0c5a944 100644 --- a/SuperCom/MainWindow.xaml.cs +++ b/SuperCom/MainWindow.xaml.cs @@ -138,7 +138,8 @@ public void ReadConfig() // 设置配置 foreach (var item in vieModel.SideComPorts) { - ComSettings comSettings = vieModel.ComSettingList.Where(arg => arg.PortName.Equals(item.Name)).FirstOrDefault(); + ComSettings comSettings = vieModel.ComSettingList.Where(arg => arg.PortName.Equals(item.Name)) + .FirstOrDefault(); if (comSettings != null && !string.IsNullOrEmpty(comSettings.PortSetting)) { item.Remark = SerialPortEx.GetRemark(comSettings.PortSetting); diff --git a/SuperCom/Properties/AssemblyInfo.cs b/SuperCom/Properties/AssemblyInfo.cs index 33bc5f7..dbdb358 100644 --- a/SuperCom/Properties/AssemblyInfo.cs +++ b/SuperCom/Properties/AssemblyInfo.cs @@ -12,7 +12,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("SuperSutdio")] [assembly: AssemblyProduct("SuperCom")] -[assembly: AssemblyCopyright("Copyright © 2022")] +[assembly: AssemblyCopyright("© 2022 SuperSutdio")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -51,5 +51,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.5.0.0")] -[assembly: AssemblyFileVersion("3.5.0.0")] +[assembly: AssemblyVersion("3.6.0.0")] +[assembly: AssemblyFileVersion("3.6.0.0")]