diff --git a/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/Properties/Resource-CN.Designer.cs b/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/Properties/Resource-CN.Designer.cs new file mode 100644 index 0000000..6bcacc8 --- /dev/null +++ b/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/Properties/Resource-CN.Designer.cs @@ -0,0 +1,99 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace WinISP.Properties { + using System; + + + /// + /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resource_CN { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resource_CN() { + } + + /// + /// 返回此类使用的缓存的 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WinISP.Properties.Resource-CN", typeof(Resource_CN).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 重写当前线程的 CurrentUICulture 属性,对 + /// 使用此强类型资源类的所有资源查找执行重写。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// 查找类似 版本号错误 的本地化字符串。 + /// + internal static string BoardNameErr { + get { + return ResourceManager.GetString("BoardNameErr", resourceCulture); + } + } + + /// + /// 查找类似 芯片型号错误 的本地化字符串。 + /// + internal static string ChipNameErr { + get { + return ResourceManager.GetString("ChipNameErr", resourceCulture); + } + } + + /// + /// 查找类似 对比ModelName 失败! 的本地化字符串。 + /// + internal static string ModelNameErr { + get { + return ResourceManager.GetString("ModelNameErr", resourceCulture); + } + } + + /// + /// 查找类似 屏型号错误 的本地化字符串。 + /// + internal static string PanelNameErr { + get { + return ResourceManager.GetString("PanelNameErr", resourceCulture); + } + } + } +} diff --git a/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/Properties/Resource-CN.resx b/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/Properties/Resource-CN.resx new file mode 100644 index 0000000..b2eb192 --- /dev/null +++ b/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/Properties/Resource-CN.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 对比ModelName 失败! + + \ No newline at end of file diff --git a/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/Properties/Resources.Designer.cs b/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/Properties/Resources.Designer.cs index 53a8476..1811494 100644 --- a/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/Properties/Resources.Designer.cs +++ b/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/Properties/Resources.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 // //------------------------------------------------------------------------------ @@ -13,13 +13,13 @@ namespace WinISP.Properties { /// - /// A strongly-typed resource class, for looking up localized strings, etc. + /// 一个强类型的资源类,用于查找本地化的字符串等。 /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { @@ -33,7 +33,7 @@ namespace WinISP.Properties { } /// - /// Returns the cached ResourceManager instance used by this class. + /// 返回此类使用的缓存的 ResourceManager 实例。 /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { @@ -47,8 +47,8 @@ namespace WinISP.Properties { } /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. + /// 重写当前线程的 CurrentUICulture 属性,对 + /// 使用此强类型资源类的所有资源查找执行重写。 /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { @@ -59,5 +59,41 @@ namespace WinISP.Properties { resourceCulture = value; } } + + /// + /// 查找类似 Compare BoardName Fail! 的本地化字符串。 + /// + internal static string BoardNameErr { + get { + return ResourceManager.GetString("BoardNameErr", resourceCulture); + } + } + + /// + /// 查找类似 Compare ChipName Fail! 的本地化字符串。 + /// + internal static string ChipNameErr { + get { + return ResourceManager.GetString("ChipNameErr", resourceCulture); + } + } + + /// + /// 查找类似 Compare ModelName Fail! 的本地化字符串。 + /// + internal static string ModelNameErr { + get { + return ResourceManager.GetString("ModelNameErr", resourceCulture); + } + } + + /// + /// 查找类似 Compare PanelName Fail! 的本地化字符串。 + /// + internal static string PanelNameErr { + get { + return ResourceManager.GetString("PanelNameErr", resourceCulture); + } + } } } diff --git a/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/Properties/Resources.resx b/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/Properties/Resources.resx index 2f96abe..8c04edc 100644 --- a/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/Properties/Resources.resx +++ b/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/Properties/Resources.resx @@ -117,5 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + Compare ModelName Fail! + \ No newline at end of file diff --git a/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/frmISP.cs b/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/frmISP.cs index 2f0763c..e0cda38 100644 --- a/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/frmISP.cs +++ b/WIN10_WinISP_SrcCode_For_MOKA_20250416_1/WinISP/frmISP.cs @@ -213,8 +213,12 @@ namespace WinISP Application.DoEvents(); } - private void SetISPStatus(bool isRunning) + private void SetISPStatus(bool isRunning,string err = "") { + if (!string.IsNullOrEmpty(err)) + { + MessageBox.Show(err, "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information); + } _IsRunISP = isRunning; btnRunISP.Enabled = !isRunning; btnOpenBin.Enabled = !isRunning; @@ -1212,25 +1216,25 @@ namespace WinISP if (!IsModelNameMatch(_u8ModelName)) { - SetStatusMsg("modelname错误"); + SetStatusMsg(Properties.Resources.ModelNameErr); SetISPStatus(false); return; } if (!IsChipNameMatch(_u8ChipName)) { - SetStatusMsg("芯片型号错误"); + SetStatusMsg(Properties.Resources.ChipNameErr); SetISPStatus(false); return; } if (!IsPanelNameMatch(_u8PanelName)) { - SetStatusMsg("屏型号错误"); + SetStatusMsg(Properties.Resources.PanelNameErr); SetISPStatus(false); return; } if (!IsBoardNameMatch(_u8BoardName)) { - SetStatusMsg("版本号错误"); + SetStatusMsg(Properties.Resources.BoardNameErr); SetISPStatus(false); return; }