From 7e9c7ca86f59a4059b2978ac57cf80a4f8545964 Mon Sep 17 00:00:00 2001 From: gongxh Date: Fri, 6 May 2022 08:45:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CleanMachine.Control.csproj | 4 +- CleanMachine.Model/EnumFormType.cs | 38 +++++++++++++++++++ CleanMachine.Model/EnumOperateType.cs | 19 ++++++++++ CleanMachine.Model/FormModel.cs | 20 ++++++++++ CleanMachine.Model/UserInfo.cs | 32 ++++++++++++++++ CleanMachineHMI.sln | 22 ++--------- CleanMachineHMI/CleanMachineHMI.csproj | 1 - .../FrmUserControl/Base/frmCleanMode.cs | 16 ++++---- .../Base/frmContaminationDTL.cs | 16 ++++---- .../Base/frmContaminationType.cs | 16 ++++---- .../FrmUserControl/Base/frmRole.cs | 20 +++++----- .../FrmUserControl/Base/frmSheetType.cs | 16 ++++---- .../FrmUserControl/Base/frmUser.cs | 16 ++++---- .../FrmUserControl/Base/frmWarning.cs | 16 ++++---- .../FrmUserControl/frmIOMonitor.cs | 4 +- .../FrmUserControl/frmMainDetail.cs | 12 +++--- .../FrmUserControl/frmMechineCheck.cs | 2 +- .../FrmUserControl/frmParamater.cs | 6 +-- .../FrmUserControl/frmPlcAlarmLog.cs | 2 +- .../FrmUserControl/frmPlcItemConfig.cs | 14 +++---- .../FrmUserControl/frmPrinterMain.cs | 10 ++--- CleanMachineHMI/Utils/GlobalHelper.cs | 3 ++ CleanMachineHMI/Utils/frmUtil.cs | 2 +- CleanMachineHMI/frmBase.cs | 2 +- CleanMachineHMI/frmChild/frmAddCleanCode.cs | 10 ++--- .../frmChild/frmAddContaminationDtl.cs | 14 +++---- .../frmChild/frmAddContaminationType.cs | 14 +++---- CleanMachineHMI/frmChild/frmAddPlcItem.cs | 14 +++---- CleanMachineHMI/frmChild/frmAddRole.cs | 14 +++---- CleanMachineHMI/frmChild/frmAddSheetType.cs | 10 ++--- CleanMachineHMI/frmChild/frmAddUser.cs | 20 +++++----- CleanMachineHMI/frmChild/frmAddWaringMsg.cs | 12 +++--- CleanMachineHMI/frmChild/frmEditCleanCode.cs | 10 ++--- .../frmChild/frmEditContaminationDtl.cs | 14 +++---- .../frmChild/frmEditContaminationType.cs | 14 +++---- CleanMachineHMI/frmChild/frmEditParamater.cs | 10 ++--- CleanMachineHMI/frmChild/frmEditPlcItem.cs | 16 ++++---- CleanMachineHMI/frmChild/frmEditRole.cs | 12 +++--- CleanMachineHMI/frmChild/frmEditSheetType.cs | 10 ++--- CleanMachineHMI/frmChild/frmEditUser.cs | 20 +++++----- CleanMachineHMI/frmChild/frmEditWaringMsg.cs | 14 +++---- .../frmChild/frmEditWorkingPalletData.cs | 4 +- .../frmChild/frmSetRoleMenuPermission.cs | 10 ++--- .../frmChild/frmSwitchRunDirection.cs | 10 ++--- CleanMachineHMI/frmIOMonitor_Old.cs | 8 ++-- CleanMachineHMI/frmIoMonitorNew.cs | 4 +- CleanMachineHMI/frmLogin.cs | 12 +++--- CleanMachineHMI/frmMainNew.cs | 4 +- .../LeadDataBaseUtility.csproj | 10 +++-- NX_LogUtility/NX_LogUtility.csproj | 4 +- 50 files changed, 352 insertions(+), 251 deletions(-) create mode 100644 CleanMachine.Model/EnumFormType.cs create mode 100644 CleanMachine.Model/EnumOperateType.cs create mode 100644 CleanMachine.Model/FormModel.cs create mode 100644 CleanMachine.Model/UserInfo.cs diff --git a/CleanMachine.Control/CleanMachine.Control.csproj b/CleanMachine.Control/CleanMachine.Control.csproj index 9dcfa6a..fc7db52 100644 --- a/CleanMachine.Control/CleanMachine.Control.csproj +++ b/CleanMachine.Control/CleanMachine.Control.csproj @@ -6,7 +6,9 @@ - + + + diff --git a/CleanMachine.Model/EnumFormType.cs b/CleanMachine.Model/EnumFormType.cs new file mode 100644 index 0000000..5c229ee --- /dev/null +++ b/CleanMachine.Model/EnumFormType.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace CleanMachineHMI.Domain.Enums +{ + /// + /// 窗体类别 + /// + public enum EnumFormType + { + Main, + MainDetail, + MechineCheck, + Login, + Manual, + Parameter, + WorkingDataRecord, + PlcItemConfig, + PlcAlarmLog, + IoMonitor, + CurrWorkingIR, + CleanMode, + ContaminationDTL, + ContaminationType, + Role, + User, + SheetType, + Warning, + WorkingPallet, + Log, + Base, + DataSearch, + WarningLog, + Maintenance + } +} diff --git a/CleanMachine.Model/EnumOperateType.cs b/CleanMachine.Model/EnumOperateType.cs new file mode 100644 index 0000000..fc80287 --- /dev/null +++ b/CleanMachine.Model/EnumOperateType.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CleanMachineHMI.Domain.Enums +{ + /// + /// 操作类型 + /// + public enum EnumOperateType + { + Add, + Edit, + Deleted, + Select, + } +} diff --git a/CleanMachine.Model/FormModel.cs b/CleanMachine.Model/FormModel.cs new file mode 100644 index 0000000..00bc5ab --- /dev/null +++ b/CleanMachine.Model/FormModel.cs @@ -0,0 +1,20 @@ +using CleanMachineHMI.Domain.Enums; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + +namespace CleanMachineHMI.Domain.Models.ViewModels +{ + /// + /// 窗体模型 + /// + public class FormModel where T : Type + { + public T Form { get; set; } + + public EnumFormType FormType { get; set; } + } +} diff --git a/CleanMachine.Model/UserInfo.cs b/CleanMachine.Model/UserInfo.cs new file mode 100644 index 0000000..125cfcc --- /dev/null +++ b/CleanMachine.Model/UserInfo.cs @@ -0,0 +1,32 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CleanMachineHMI.Domain.Models.ViewModels +{ + /// + /// 用户信息 + /// + public class UserInfo + { + public int UserId { get; set; } + + public string UserCode { get; set; } + + public string UserName { get; set; } + + /// + /// 性别.0:男;1:女。 + /// + public int Gender { get; set; } + + public string ScheduleCode { get; set; } + public int RoleId { get; set; } + + public int RoleGrade { get; set; } + + } +} diff --git a/CleanMachineHMI.sln b/CleanMachineHMI.sln index f7fab19..a8d6588 100644 --- a/CleanMachineHMI.sln +++ b/CleanMachineHMI.sln @@ -5,21 +5,17 @@ VisualStudioVersion = 17.0.32014.148 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CleanMachineHMI", "CleanMachineHMI\CleanMachineHMI.csproj", "{9CF77369-B471-4476-9F42-779945113EA5}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CleanMachineHMI.Domain", "CleanMachineHMI.Model\CleanMachineHMI.Domain.csproj", "{F7AF907B-5DDC-469F-956C-08C5FD110448}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LeadDataBaseUtility", "LeadDataBaseUtility\LeadDataBaseUtility.csproj", "{824348A6-FFFF-4C1B-BBF5-8B507A8C8CE5}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NX_LogUtility", "NX_LogUtility\NX_LogUtility.csproj", "{925057D8-7EE8-42ED-8AA0-628AF82F10B2}" EndProject -Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "CleanMachineSoftware_Setup", "CleanMachineSoftware_Setup\CleanMachineSoftware_Setup.vdproj", "{497A7E73-E2E8-4134-93CA-8F6A5B72D992}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CleanMachine.Control", "CleanMachine.Control\CleanMachine.Control.csproj", "{6891D010-F826-49C9-A087-2717A264BC16}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CleanMachine.Model", "CleanMachine.Model\CleanMachine.Model.csproj", "{BC0DA19C-0C89-4D3D-9DEE-1673D465A688}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CleanMachine.DAL", "CleanMachine.DAL\CleanMachine.DAL.csproj", "{E3E4D285-F91B-4370-91F2-83E6036610FC}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CleanMachine.DAL", "CleanMachine.DAL\CleanMachine.DAL.csproj", "{E3E4D285-F91B-4370-91F2-83E6036610FC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CleanMachine.BLL", "CleanMachine.BLL\CleanMachine.BLL.csproj", "{951A4D28-2428-40C6-8A4D-6E694AF5539A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CleanMachine.BLL", "CleanMachine.BLL\CleanMachine.BLL.csproj", "{951A4D28-2428-40C6-8A4D-6E694AF5539A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -43,18 +39,6 @@ Global {9CF77369-B471-4476-9F42-779945113EA5}.Release|x64.Build.0 = Release|Any CPU {9CF77369-B471-4476-9F42-779945113EA5}.Release|x86.ActiveCfg = Release|Any CPU {9CF77369-B471-4476-9F42-779945113EA5}.Release|x86.Build.0 = Release|Any CPU - {F7AF907B-5DDC-469F-956C-08C5FD110448}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F7AF907B-5DDC-469F-956C-08C5FD110448}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F7AF907B-5DDC-469F-956C-08C5FD110448}.Debug|x64.ActiveCfg = Debug|Any CPU - {F7AF907B-5DDC-469F-956C-08C5FD110448}.Debug|x64.Build.0 = Debug|Any CPU - {F7AF907B-5DDC-469F-956C-08C5FD110448}.Debug|x86.ActiveCfg = Debug|Any CPU - {F7AF907B-5DDC-469F-956C-08C5FD110448}.Debug|x86.Build.0 = Debug|Any CPU - {F7AF907B-5DDC-469F-956C-08C5FD110448}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F7AF907B-5DDC-469F-956C-08C5FD110448}.Release|Any CPU.Build.0 = Release|Any CPU - {F7AF907B-5DDC-469F-956C-08C5FD110448}.Release|x64.ActiveCfg = Release|Any CPU - {F7AF907B-5DDC-469F-956C-08C5FD110448}.Release|x64.Build.0 = Release|Any CPU - {F7AF907B-5DDC-469F-956C-08C5FD110448}.Release|x86.ActiveCfg = Release|Any CPU - {F7AF907B-5DDC-469F-956C-08C5FD110448}.Release|x86.Build.0 = Release|Any CPU {824348A6-FFFF-4C1B-BBF5-8B507A8C8CE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {824348A6-FFFF-4C1B-BBF5-8B507A8C8CE5}.Debug|Any CPU.Build.0 = Debug|Any CPU {824348A6-FFFF-4C1B-BBF5-8B507A8C8CE5}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -132,7 +116,7 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - VisualSVNWorkingCopyRoot = . SolutionGuid = {09FA6A17-2C18-418A-81E3-612D52950830} + VisualSVNWorkingCopyRoot = . EndGlobalSection EndGlobal diff --git a/CleanMachineHMI/CleanMachineHMI.csproj b/CleanMachineHMI/CleanMachineHMI.csproj index be7b037..e42446e 100644 --- a/CleanMachineHMI/CleanMachineHMI.csproj +++ b/CleanMachineHMI/CleanMachineHMI.csproj @@ -31,7 +31,6 @@ - diff --git a/CleanMachineHMI/FrmUserControl/Base/frmCleanMode.cs b/CleanMachineHMI/FrmUserControl/Base/frmCleanMode.cs index 9719f71..610ae3e 100644 --- a/CleanMachineHMI/FrmUserControl/Base/frmCleanMode.cs +++ b/CleanMachineHMI/FrmUserControl/Base/frmCleanMode.cs @@ -114,7 +114,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("加载清洁方式界面发生异常", "LoadFrmCleanModeExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("加载清洁方式界面发生异常", "LoadFrmCleanModeExp") + $":【{ex.Message}】!"); } } @@ -126,7 +126,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("查询清洁方式数据发生异常", "QueryCleanModeData") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("查询清洁方式数据发生异常", "QueryCleanModeData") + $":【{ex.Message}】!"); } } @@ -156,7 +156,7 @@ namespace CleanMachineHMI.FrmUserControl } else { - KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的清洗方式数据行!", "SelectWantToEditRow")); + KryptonMessageBox.Show(this.T("请选择要编辑的清洗方式数据行!", "SelectWantToEditRow")); } } @@ -166,7 +166,7 @@ namespace CleanMachineHMI.FrmUserControl { if (dataGridView.SelectedRows.Count > 0) { - DialogResult dr = KryptonMessageBox.Show(this.GetInfoText("确定要删除所选的清洗方式数据吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); + DialogResult dr = KryptonMessageBox.Show(this.T("确定要删除所选的清洗方式数据吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (dr == DialogResult.OK) { string CleanModeId = dataGridView.SelectedRows[0].Cells[0].Value.ToString(); @@ -174,23 +174,23 @@ namespace CleanMachineHMI.FrmUserControl int row = LeadDbHelperSQLite.ExecuteSql(sql); if (row > 0) { - KryptonMessageBox.Show(this.GetInfoText("删除清洗方式数据成功!", "DeleteSuccessInfo")); + KryptonMessageBox.Show(this.T("删除清洗方式数据成功!", "DeleteSuccessInfo")); RefreshFrmHost(); } else { - KryptonMessageBox.Show(this.GetInfoText("删除清洗方式数据失败!", "DeleteFailInfo")); + KryptonMessageBox.Show(this.T("删除清洗方式数据失败!", "DeleteFailInfo")); } } } else { - KryptonMessageBox.Show(this.GetInfoText("请选择要删除的清洗方式数据行!", "SelectWantToDeleteRow")); + KryptonMessageBox.Show(this.T("请选择要删除的清洗方式数据行!", "SelectWantToDeleteRow")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("删除清洁方式数据发生异常", "DeleteCleanModeDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("删除清洁方式数据发生异常", "DeleteCleanModeDataExp") + $":【{ex.Message}】!"); } } } diff --git a/CleanMachineHMI/FrmUserControl/Base/frmContaminationDTL.cs b/CleanMachineHMI/FrmUserControl/Base/frmContaminationDTL.cs index 520142b..ba603dd 100644 --- a/CleanMachineHMI/FrmUserControl/Base/frmContaminationDTL.cs +++ b/CleanMachineHMI/FrmUserControl/Base/frmContaminationDTL.cs @@ -121,7 +121,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("加载污染明细界面发生异常", "LoadContaminationDTLExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("加载污染明细界面发生异常", "LoadContaminationDTLExp") + $":【{ex.Message}】!"); } } @@ -133,7 +133,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("查询污染明细数据发生异常", "QueryContaminationDTLData") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("查询污染明细数据发生异常", "QueryContaminationDTLData") + $":【{ex.Message}】!"); } } @@ -163,7 +163,7 @@ namespace CleanMachineHMI.FrmUserControl } else { - KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的污染明细数据行!", "SelectWantToEditRow")); + KryptonMessageBox.Show(this.T("请选择要编辑的污染明细数据行!", "SelectWantToEditRow")); } } @@ -173,7 +173,7 @@ namespace CleanMachineHMI.FrmUserControl { if (dataGridView.SelectedRows.Count > 0) { - DialogResult dr = KryptonMessageBox.Show(this.GetInfoText("确定要删除所选的污染明细数据吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); + DialogResult dr = KryptonMessageBox.Show(this.T("确定要删除所选的污染明细数据吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (dr == DialogResult.OK) { string ContaminationDtlId = dataGridView.SelectedRows[0].Cells[0].Value.ToString(); @@ -181,23 +181,23 @@ namespace CleanMachineHMI.FrmUserControl int row = LeadDbHelperSQLite.ExecuteSql(sql); if (row > 0) { - KryptonMessageBox.Show(this.GetInfoText("删除污染明细数据成功!", "DeleteSuccessInfo")); + KryptonMessageBox.Show(this.T("删除污染明细数据成功!", "DeleteSuccessInfo")); RefreshFrmHost(); } else { - KryptonMessageBox.Show(this.GetInfoText("删除污染明细数据失败!", "DeleteFailInfo")); + KryptonMessageBox.Show(this.T("删除污染明细数据失败!", "DeleteFailInfo")); } } } else { - KryptonMessageBox.Show(this.GetInfoText("请选择要删除的污染明细数据行!", "SelectWantToDeleteRow")); + KryptonMessageBox.Show(this.T("请选择要删除的污染明细数据行!", "SelectWantToDeleteRow")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("删除污染明细数据发生异常", "DeleteContaminationDTLDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("删除污染明细数据发生异常", "DeleteContaminationDTLDataExp") + $":【{ex.Message}】!"); } } } diff --git a/CleanMachineHMI/FrmUserControl/Base/frmContaminationType.cs b/CleanMachineHMI/FrmUserControl/Base/frmContaminationType.cs index a009189..feec0a3 100644 --- a/CleanMachineHMI/FrmUserControl/Base/frmContaminationType.cs +++ b/CleanMachineHMI/FrmUserControl/Base/frmContaminationType.cs @@ -131,7 +131,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("加载污染类型界面发生异常", "LoadContaminationTypeExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("加载污染类型界面发生异常", "LoadContaminationTypeExp") + $":【{ex.Message}】!"); } } @@ -143,7 +143,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("查询污染类型数据发生异常", "QueryContaminationTypeData") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("查询污染类型数据发生异常", "QueryContaminationTypeData") + $":【{ex.Message}】!"); } } @@ -173,7 +173,7 @@ namespace CleanMachineHMI.FrmUserControl } else { - KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的污染类型数据行!", "SelectWantToEditRow")); + KryptonMessageBox.Show(this.T("请选择要编辑的污染类型数据行!", "SelectWantToEditRow")); } } @@ -183,7 +183,7 @@ namespace CleanMachineHMI.FrmUserControl { if (dataGridView.SelectedRows.Count > 0) { - DialogResult dr = KryptonMessageBox.Show(this.GetInfoText("确定要删除所选的污染类型数据吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); + DialogResult dr = KryptonMessageBox.Show(this.T("确定要删除所选的污染类型数据吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (dr == DialogResult.OK) { string ContaminationId = dataGridView.SelectedRows[0].Cells[0].Value.ToString(); @@ -191,23 +191,23 @@ namespace CleanMachineHMI.FrmUserControl int row = LeadDbHelperSQLite.ExecuteSql(sql); if (row > 0) { - KryptonMessageBox.Show(this.GetInfoText("删除污染类型数据成功!", "DeleteSuccessInfo")); + KryptonMessageBox.Show(this.T("删除污染类型数据成功!", "DeleteSuccessInfo")); RefreshFrmHost(); } else { - KryptonMessageBox.Show(this.GetInfoText("删除污染类型数据失败!", "DeleteFailInfo")); + KryptonMessageBox.Show(this.T("删除污染类型数据失败!", "DeleteFailInfo")); } } } else { - KryptonMessageBox.Show(this.GetInfoText("请选择要删除的污染类型数据行!", "SelectWantToDeleteRow")); + KryptonMessageBox.Show(this.T("请选择要删除的污染类型数据行!", "SelectWantToDeleteRow")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("删除污染类型数据发生异常", "DeleteContaminationTypeDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("删除污染类型数据发生异常", "DeleteContaminationTypeDataExp") + $":【{ex.Message}】!"); } } } diff --git a/CleanMachineHMI/FrmUserControl/Base/frmRole.cs b/CleanMachineHMI/FrmUserControl/Base/frmRole.cs index e9eee69..f2108ec 100644 --- a/CleanMachineHMI/FrmUserControl/Base/frmRole.cs +++ b/CleanMachineHMI/FrmUserControl/Base/frmRole.cs @@ -112,7 +112,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("加载角色信息界面发生异常", "LoadRoleMsgExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("加载角色信息界面发生异常", "LoadRoleMsgExp") + $":【{ex.Message}】!"); } } @@ -132,7 +132,7 @@ namespace CleanMachineHMI.FrmUserControl } else { - KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的角色数据行!", "SelectWantToEditRow")); + KryptonMessageBox.Show(this.T("请选择要编辑的角色数据行!", "SelectWantToEditRow")); } } @@ -142,7 +142,7 @@ namespace CleanMachineHMI.FrmUserControl { if (dataGridView.SelectedRows.Count > 0) { - DialogResult dr = KryptonMessageBox.Show(this.GetInfoText("确定要删除所选的角色信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); + DialogResult dr = KryptonMessageBox.Show(this.T("确定要删除所选的角色信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (dr == DialogResult.OK) { string UserId = dataGridView.SelectedRows[0].Cells[0].Value.ToString(); @@ -150,30 +150,30 @@ namespace CleanMachineHMI.FrmUserControl DataTable dtIsExistAdmin = LeadDbHelperSQLite.Query(sqlIsExistAdmin).Tables[0]; if (dtIsExistAdmin != null && dtIsExistAdmin.Rows.Count > 0) { - KryptonMessageBox.Show(this.GetInfoText("管理员角色不允许删除!", "DeleteAdminRoleInfo")); + KryptonMessageBox.Show(this.T("管理员角色不允许删除!", "DeleteAdminRoleInfo")); return; } string sql = $@"DELETE FROM SYS_ROLE WHERE ROLE_ID = '{UserId}'"; int row = LeadDbHelperSQLite.ExecuteSql(sql); if (row > 0) { - KryptonMessageBox.Show(this.GetInfoText("删除角色数据成功!", "DeleteSuccessInfo")); + KryptonMessageBox.Show(this.T("删除角色数据成功!", "DeleteSuccessInfo")); RefreshFrmHost(); } else { - KryptonMessageBox.Show(this.GetInfoText("删除角色数据失败!", "DeleteFailInfo")); + KryptonMessageBox.Show(this.T("删除角色数据失败!", "DeleteFailInfo")); } } } else { - KryptonMessageBox.Show(this.GetInfoText("请选择要删除的角色数据行!", "SelectWantToDeleteRow")); + KryptonMessageBox.Show(this.T("请选择要删除的角色数据行!", "SelectWantToDeleteRow")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("删除角色数据发生异常", "DeleteRoleDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("删除角色数据发生异常", "DeleteRoleDataExp") + $":【{ex.Message}】!"); } } @@ -185,7 +185,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("查询角色信息数据发生异常", "QueryRoleMsgData") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("查询角色信息数据发生异常", "QueryRoleMsgData") + $":【{ex.Message}】!"); } } @@ -209,7 +209,7 @@ namespace CleanMachineHMI.FrmUserControl } else { - KryptonMessageBox.Show(this.GetInfoText("请选择要授权菜单权限的角色数据行!", "SelectWantToPermissionRow")); + KryptonMessageBox.Show(this.T("请选择要授权菜单权限的角色数据行!", "SelectWantToPermissionRow")); } } } diff --git a/CleanMachineHMI/FrmUserControl/Base/frmSheetType.cs b/CleanMachineHMI/FrmUserControl/Base/frmSheetType.cs index 5a07a72..5093411 100644 --- a/CleanMachineHMI/FrmUserControl/Base/frmSheetType.cs +++ b/CleanMachineHMI/FrmUserControl/Base/frmSheetType.cs @@ -111,7 +111,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("加载板材类型界面发生异常", "LoadSheetTypeExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("加载板材类型界面发生异常", "LoadSheetTypeExp") + $":【{ex.Message}】!"); } } @@ -123,7 +123,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("查询板材类型数据发生异常", "QuerySheetTypeData") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("查询板材类型数据发生异常", "QuerySheetTypeData") + $":【{ex.Message}】!"); } } @@ -153,7 +153,7 @@ namespace CleanMachineHMI.FrmUserControl } else { - KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的板材类型数据行!", "SelectWantToEditRow")); + KryptonMessageBox.Show(this.T("请选择要编辑的板材类型数据行!", "SelectWantToEditRow")); } } @@ -163,7 +163,7 @@ namespace CleanMachineHMI.FrmUserControl { if (dataGridView.SelectedRows.Count > 0) { - DialogResult dr = KryptonMessageBox.Show(this.GetInfoText("确定要删除所选的板材类型数据吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); + DialogResult dr = KryptonMessageBox.Show(this.T("确定要删除所选的板材类型数据吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (dr == DialogResult.OK) { string SheetTypeId = dataGridView.SelectedRows[0].Cells[0].Value.ToString(); @@ -171,23 +171,23 @@ namespace CleanMachineHMI.FrmUserControl int row = LeadDbHelperSQLite.ExecuteSql(sql); if (row > 0) { - KryptonMessageBox.Show(this.GetInfoText("删除板材类型数据成功!", "DeleteSuccessInfo")); + KryptonMessageBox.Show(this.T("删除板材类型数据成功!", "DeleteSuccessInfo")); RefreshFrmHost(); } else { - KryptonMessageBox.Show(this.GetInfoText("删除板材类型数据失败!", "DeleteFailInfo")); + KryptonMessageBox.Show(this.T("删除板材类型数据失败!", "DeleteFailInfo")); } } } else { - KryptonMessageBox.Show(this.GetInfoText("请选择要删除的板材类型数据行!", "SelectWantToDeleteRow")); + KryptonMessageBox.Show(this.T("请选择要删除的板材类型数据行!", "SelectWantToDeleteRow")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("删除污染板材类型数据发生异常", "DeleteSheetTypeDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("删除污染板材类型数据发生异常", "DeleteSheetTypeDataExp") + $":【{ex.Message}】!"); } } } diff --git a/CleanMachineHMI/FrmUserControl/Base/frmUser.cs b/CleanMachineHMI/FrmUserControl/Base/frmUser.cs index 53c28ad..63fa470 100644 --- a/CleanMachineHMI/FrmUserControl/Base/frmUser.cs +++ b/CleanMachineHMI/FrmUserControl/Base/frmUser.cs @@ -113,7 +113,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("加载用户信息界面发生异常", "LoadUserMsgExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("加载用户信息界面发生异常", "LoadUserMsgExp") + $":【{ex.Message}】!"); } } @@ -125,7 +125,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("查询用户信息数据发生异常", "QueryUserMsgData") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("查询用户信息数据发生异常", "QueryUserMsgData") + $":【{ex.Message}】!"); } } @@ -155,7 +155,7 @@ namespace CleanMachineHMI.FrmUserControl } else { - KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的用户信息数据行!", "SelectWantToEditRow")); + KryptonMessageBox.Show(this.T("请选择要编辑的用户信息数据行!", "SelectWantToEditRow")); } } @@ -165,7 +165,7 @@ namespace CleanMachineHMI.FrmUserControl { if (dataGridView.SelectedRows.Count > 0) { - DialogResult dr = KryptonMessageBox.Show(this.GetInfoText("确定要删除所选的用户信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); + DialogResult dr = KryptonMessageBox.Show(this.T("确定要删除所选的用户信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (dr == DialogResult.OK) { string UserId = dataGridView.SelectedRows[0].Cells[0].Value.ToString(); @@ -173,23 +173,23 @@ namespace CleanMachineHMI.FrmUserControl int row = LeadDbHelperSQLite.ExecuteSql(sql); if (row > 0) { - KryptonMessageBox.Show(this.GetInfoText("删除用户数据成功!", "DeleteSuccessInfo")); + KryptonMessageBox.Show(this.T("删除用户数据成功!", "DeleteSuccessInfo")); RefreshFrmHost(); } else { - KryptonMessageBox.Show(this.GetInfoText("删除用户数据失败!", "DeleteFailInfo")); + KryptonMessageBox.Show(this.T("删除用户数据失败!", "DeleteFailInfo")); } } } else { - KryptonMessageBox.Show(this.GetInfoText("请选择要删除的用户数据行!", "SelectWantToDeleteRow")); + KryptonMessageBox.Show(this.T("请选择要删除的用户数据行!", "SelectWantToDeleteRow")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("删除用户信息数据发生异常", "DeleteUserMsgDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("删除用户信息数据发生异常", "DeleteUserMsgDataExp") + $":【{ex.Message}】!"); } } } diff --git a/CleanMachineHMI/FrmUserControl/Base/frmWarning.cs b/CleanMachineHMI/FrmUserControl/Base/frmWarning.cs index e3cb86c..d007d06 100644 --- a/CleanMachineHMI/FrmUserControl/Base/frmWarning.cs +++ b/CleanMachineHMI/FrmUserControl/Base/frmWarning.cs @@ -121,7 +121,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("加载报警信息界面发生异常", "LoadWarningMsgExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("加载报警信息界面发生异常", "LoadWarningMsgExp") + $":【{ex.Message}】!"); } } @@ -133,7 +133,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("查询报警信息数据发生异常", "QueryWarningMsgDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("查询报警信息数据发生异常", "QueryWarningMsgDataExp") + $":【{ex.Message}】!"); } } @@ -163,7 +163,7 @@ namespace CleanMachineHMI.FrmUserControl } else { - KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的报警信息数据行!", "SelectWantToEditRow")); + KryptonMessageBox.Show(this.T("请选择要编辑的报警信息数据行!", "SelectWantToEditRow")); } } @@ -173,7 +173,7 @@ namespace CleanMachineHMI.FrmUserControl { if (dataGridView.SelectedRows.Count > 0) { - DialogResult dr = KryptonMessageBox.Show(this.GetInfoText("确定要删除所选的报警信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); + DialogResult dr = KryptonMessageBox.Show(this.T("确定要删除所选的报警信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (dr == DialogResult.OK) { string WarningId = dataGridView.SelectedRows[0].Cells[0].Value.ToString(); @@ -181,23 +181,23 @@ namespace CleanMachineHMI.FrmUserControl int row = LeadDbHelperSQLite.ExecuteSql(sql); if (row > 0) { - KryptonMessageBox.Show(this.GetInfoText("删除报警数据成功!", "DeleteSuccessInfo")); + KryptonMessageBox.Show(this.T("删除报警数据成功!", "DeleteSuccessInfo")); RefreshFrmHost(); } else { - KryptonMessageBox.Show(this.GetInfoText("删除报警数据失败!", "DeleteFailInfo")); + KryptonMessageBox.Show(this.T("删除报警数据失败!", "DeleteFailInfo")); } } } else { - KryptonMessageBox.Show(this.GetInfoText("请选择要删除的报警数据行!", "SelectWantToDeleteRow")); + KryptonMessageBox.Show(this.T("请选择要删除的报警数据行!", "SelectWantToDeleteRow")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("删除报警信息数据发生异常", "DeleteWarningMsgDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("删除报警信息数据发生异常", "DeleteWarningMsgDataExp") + $":【{ex.Message}】!"); } } } diff --git a/CleanMachineHMI/FrmUserControl/frmIOMonitor.cs b/CleanMachineHMI/FrmUserControl/frmIOMonitor.cs index ad6989d..612ae91 100644 --- a/CleanMachineHMI/FrmUserControl/frmIOMonitor.cs +++ b/CleanMachineHMI/FrmUserControl/frmIOMonitor.cs @@ -89,7 +89,7 @@ namespace CleanMachineHMI.FrmUserControl { KryptonLabel label1 = this.Controls.Find("klb_X" + Convert.ToString(Convert.ToInt32(item.PlcItemPriAddress), 8).PadLeft(2, '0'), true)[0] as KryptonLabel; - label1.Text = this.GetInfoText(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode); + label1.Text = this.T(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode); } })); } @@ -106,7 +106,7 @@ namespace CleanMachineHMI.FrmUserControl { KryptonLabel label1 = this.Controls.Find("klb_Y" + Convert.ToString(Convert.ToInt32(item.PlcItemPriAddress), 8).PadLeft(2, '0'), true)[0] as KryptonLabel; - label1.Text = this.GetInfoText(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode); + label1.Text = this.T(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode); } })); } diff --git a/CleanMachineHMI/FrmUserControl/frmMainDetail.cs b/CleanMachineHMI/FrmUserControl/frmMainDetail.cs index 9dbbd3d..362c173 100644 --- a/CleanMachineHMI/FrmUserControl/frmMainDetail.cs +++ b/CleanMachineHMI/FrmUserControl/frmMainDetail.cs @@ -289,7 +289,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("主业务界面加载发生异常", "LoadMainDetailFrmExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("主业务界面加载发生异常", "LoadMainDetailFrmExp") + $":【{ex.Message}】!"); LogHelper.WriteLog($"1111【{ex.Message}】", LogTypeEum.Err); } } @@ -1584,19 +1584,19 @@ namespace CleanMachineHMI.FrmUserControl if (string.IsNullOrEmpty(kcmb_SheetType.Text.Trim())) { //KryptonMessageBox.Show("请输入板材类型信息!!"); - KryptonMessageBox.Show(this.GetInfoText("请输入板材类型信息!", "EnterSheetTypeInfo")); + KryptonMessageBox.Show(this.T("请输入板材类型信息!", "EnterSheetTypeInfo")); return; } if (string.IsNullOrEmpty(ktb_IR.Text.Trim())) { //KryptonMessageBox.Show("请输入IR收货编号信息!!"); - KryptonMessageBox.Show(this.GetInfoText("请输入IR收货编号信息!", "EnterIRMsgInfo")); + KryptonMessageBox.Show(this.T("请输入IR收货编号信息!", "EnterIRMsgInfo")); return; } if (!kdtp_RecordDate.Checked) { //KryptonMessageBox.Show("请选择录入时间!!"); - KryptonMessageBox.Show(this.GetInfoText("请选择录入时间!", "EnterInputTimeInfo")); + KryptonMessageBox.Show(this.T("请选择录入时间!", "EnterInputTimeInfo")); return; } //string sqlWorkPallet = $@"SELECT * FROM CM_WORKING_PALLET WHERE WORKING_STATUS = 0"; @@ -1873,7 +1873,7 @@ namespace CleanMachineHMI.FrmUserControl catch (Exception ex) { //KryptonMessageBox.Show("保存IR数据发生异常!" + ex.Message); - KryptonMessageBox.Show(this.GetInfoText("保存作业板材和IR数据发生异常", "SaveSheetIRDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("保存作业板材和IR数据发生异常", "SaveSheetIRDataExp") + $":【{ex.Message}】!"); } } @@ -2320,7 +2320,7 @@ namespace CleanMachineHMI.FrmUserControl { if (ktb_IR.Enabled) { - KryptonMessageBox.Show(this.GetInfoText("当前没有作业中的IR信息!", "CurrWorkingIsNoIrMsg")); + KryptonMessageBox.Show(this.T("当前没有作业中的IR信息!", "CurrWorkingIsNoIrMsg")); } else { diff --git a/CleanMachineHMI/FrmUserControl/frmMechineCheck.cs b/CleanMachineHMI/FrmUserControl/frmMechineCheck.cs index 6d88e38..41aba29 100644 --- a/CleanMachineHMI/FrmUserControl/frmMechineCheck.cs +++ b/CleanMachineHMI/FrmUserControl/frmMechineCheck.cs @@ -241,7 +241,7 @@ namespace CleanMachineHMI.FrmUserControl PlcOperationHelper.Instance.WritePlcItem("SelfCheckPassFlag", "False", PlcItemTypeDesc.M); //测试未通过,请检查并重新测试 GlobalHelper.CanOperate = false; - KryptonMessageBox.Show(this.GetInfoText("测试未通过,请检查设备并重新测试!!", "NoPassShowMsg")); + KryptonMessageBox.Show(this.T("测试未通过,请检查设备并重新测试!!", "NoPassShowMsg")); } catch (Exception ex) { diff --git a/CleanMachineHMI/FrmUserControl/frmParamater.cs b/CleanMachineHMI/FrmUserControl/frmParamater.cs index da6ee82..30a0d3e 100644 --- a/CleanMachineHMI/FrmUserControl/frmParamater.cs +++ b/CleanMachineHMI/FrmUserControl/frmParamater.cs @@ -105,7 +105,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("加载系统参数界面发生异常", "LoadSysParamaterExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("加载系统参数界面发生异常", "LoadSysParamaterExp") + $":【{ex.Message}】!"); } } @@ -118,7 +118,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("查询系统参数数据发生异常", "QuerySysParamaterData") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("查询系统参数数据发生异常", "QuerySysParamaterData") + $":【{ex.Message}】!"); } } @@ -142,7 +142,7 @@ namespace CleanMachineHMI.FrmUserControl } else { - KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的参数信息数据行!", "SelectWantToEditRow")); + KryptonMessageBox.Show(this.T("请选择要编辑的参数信息数据行!", "SelectWantToEditRow")); } } diff --git a/CleanMachineHMI/FrmUserControl/frmPlcAlarmLog.cs b/CleanMachineHMI/FrmUserControl/frmPlcAlarmLog.cs index ae153c3..db3ce9a 100644 --- a/CleanMachineHMI/FrmUserControl/frmPlcAlarmLog.cs +++ b/CleanMachineHMI/FrmUserControl/frmPlcAlarmLog.cs @@ -35,7 +35,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("加载报警数据界面发生异常", "LoadFrmPlcAlarmExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("加载报警数据界面发生异常", "LoadFrmPlcAlarmExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/FrmUserControl/frmPlcItemConfig.cs b/CleanMachineHMI/FrmUserControl/frmPlcItemConfig.cs index f41af41..c0bf5f9 100644 --- a/CleanMachineHMI/FrmUserControl/frmPlcItemConfig.cs +++ b/CleanMachineHMI/FrmUserControl/frmPlcItemConfig.cs @@ -255,7 +255,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("加载PLC变量数据界面发生异常", "LoadFrmPlcItemExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("加载PLC变量数据界面发生异常", "LoadFrmPlcItemExp") + $":【{ex.Message}】!"); } } private void kbt_Query_Click(object sender, EventArgs e) @@ -289,7 +289,7 @@ namespace CleanMachineHMI.FrmUserControl else { //KryptonMessageBox.Show("请选择要编辑的PLC变量数据行!"); - KryptonMessageBox.Show(this.GetInfoText("请选择要编辑的PLC变量数据行!", "SelectWantToEditRow")); + KryptonMessageBox.Show(this.T("请选择要编辑的PLC变量数据行!", "SelectWantToEditRow")); } } @@ -299,7 +299,7 @@ namespace CleanMachineHMI.FrmUserControl { if (kryptonDataGridView1.SelectedRows.Count > 0) { - DialogResult dr = KryptonMessageBox.Show(this.GetInfoText("确定要删除所选的PLC变量信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); + DialogResult dr = KryptonMessageBox.Show(this.T("确定要删除所选的PLC变量信息吗?", "DeleteInfo"), "Prompt", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (dr == DialogResult.OK) { string PlcItemId = kryptonDataGridView1.SelectedRows[0].Cells[0].Value.ToString(); @@ -308,25 +308,25 @@ namespace CleanMachineHMI.FrmUserControl if (row > 0) { //KryptonMessageBox.Show("删除PLC变量数据成功!"); - KryptonMessageBox.Show(this.GetInfoText("删除PLC变量数据成功!", "DeleteSuccessInfo")); + KryptonMessageBox.Show(this.T("删除PLC变量数据成功!", "DeleteSuccessInfo")); RefreshFrmHost(); } else { //KryptonMessageBox.Show("删除PLC变量数据失败!"); - KryptonMessageBox.Show(this.GetInfoText("删除PLC变量数据失败!", "DeleteFailInfo")); + KryptonMessageBox.Show(this.T("删除PLC变量数据失败!", "DeleteFailInfo")); } } } else { //KryptonMessageBox.Show("请选择要删除的PLC变量数据行!"); - KryptonMessageBox.Show(this.GetInfoText("请选择要删除的PLC变量数据行!", "SelectWantToDeleteRow")); + KryptonMessageBox.Show(this.T("请选择要删除的PLC变量数据行!", "SelectWantToDeleteRow")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("删除PLC变量数据发生异常", "DeletePlcItemDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("删除PLC变量数据发生异常", "DeletePlcItemDataExp") + $":【{ex.Message}】!"); } } } diff --git a/CleanMachineHMI/FrmUserControl/frmPrinterMain.cs b/CleanMachineHMI/FrmUserControl/frmPrinterMain.cs index 2a7e869..1218926 100644 --- a/CleanMachineHMI/FrmUserControl/frmPrinterMain.cs +++ b/CleanMachineHMI/FrmUserControl/frmPrinterMain.cs @@ -179,7 +179,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("加载作业数据查询界面发生异常", "LoadQueryWorkingDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("加载作业数据查询界面发生异常", "LoadQueryWorkingDataExp") + $":【{ex.Message}】!"); } } #region 打印测试代码 @@ -333,7 +333,7 @@ namespace CleanMachineHMI.FrmUserControl } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("查询作业托盘数据发生异常", "QueryWorkingPalletDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("查询作业托盘数据发生异常", "QueryWorkingPalletDataExp") + $":【{ex.Message}】!"); } } @@ -408,12 +408,12 @@ namespace CleanMachineHMI.FrmUserControl else { //KryptonMessageBox.Show("请勾选要打印的托盘数据行!!"); - KryptonMessageBox.Show(this.GetInfoText("请勾选要打印的托盘数据行!", "SelectWantToPrintRow")); + KryptonMessageBox.Show(this.T("请勾选要打印的托盘数据行!", "SelectWantToPrintRow")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("打印作业托盘数据发生异常", "PrintWorkingPalletDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("打印作业托盘数据发生异常", "PrintWorkingPalletDataExp") + $":【{ex.Message}】!"); } } private void PrintWorkedIrMsg(string workingIrCodeMsg) @@ -696,7 +696,7 @@ namespace CleanMachineHMI.FrmUserControl else { //KryptonMessageBox.Show("请勾选要编辑的作业托盘数据行!!"); - KryptonMessageBox.Show(this.GetInfoText("请勾选要编辑的作业托盘数据行!", "SelectWantToEditRow")); + KryptonMessageBox.Show(this.T("请勾选要编辑的作业托盘数据行!", "SelectWantToEditRow")); } } } diff --git a/CleanMachineHMI/Utils/GlobalHelper.cs b/CleanMachineHMI/Utils/GlobalHelper.cs index 9473146..8119308 100644 --- a/CleanMachineHMI/Utils/GlobalHelper.cs +++ b/CleanMachineHMI/Utils/GlobalHelper.cs @@ -184,6 +184,9 @@ namespace CleanMachineHMI CanOperate = false; } + + + /// /// 加载主题 /// diff --git a/CleanMachineHMI/Utils/frmUtil.cs b/CleanMachineHMI/Utils/frmUtil.cs index 327cf6a..7f56a21 100644 --- a/CleanMachineHMI/Utils/frmUtil.cs +++ b/CleanMachineHMI/Utils/frmUtil.cs @@ -232,7 +232,7 @@ namespace CleanMachineHMI.Utils /// /// /// - public static string GetInfoText(this Control form, string defaultValue, string infoCode) + public static string T(this Control form, string defaultValue, string infoCode) { try { diff --git a/CleanMachineHMI/frmBase.cs b/CleanMachineHMI/frmBase.cs index 179757d..51ebbd9 100644 --- a/CleanMachineHMI/frmBase.cs +++ b/CleanMachineHMI/frmBase.cs @@ -86,7 +86,7 @@ namespace CleanMachineHMI.forms } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("加载基础配置界面发生异常", "LoadFrmBaseExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("加载基础配置界面发生异常", "LoadFrmBaseExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/frmChild/frmAddCleanCode.cs b/CleanMachineHMI/frmChild/frmAddCleanCode.cs index 43e5e61..2912d87 100644 --- a/CleanMachineHMI/frmChild/frmAddCleanCode.cs +++ b/CleanMachineHMI/frmChild/frmAddCleanCode.cs @@ -50,12 +50,12 @@ namespace CleanMachineHMI.frmChild { if (string.IsNullOrEmpty(txtCleanModeCode.Text)) { - KryptonMessageBox.Show(this.GetInfoText("请输入清洗方式编码!", "EnterCleanCodeInfo")); + KryptonMessageBox.Show(this.T("请输入清洗方式编码!", "EnterCleanCodeInfo")); return; } if (string.IsNullOrEmpty(txtCleanModeName.Text)) { - KryptonMessageBox.Show(this.GetInfoText("请输入清洗方式名称!", "EnterCleanNameInfo")); + KryptonMessageBox.Show(this.T("请输入清洗方式名称!", "EnterCleanNameInfo")); return; } string sqlIsExistCode = $@"SELECT 1 FROM BAS_CLEAN_MODE WHERE CLEAN_MODE_CODE = '{txtCleanModeCode.Text}'"; @@ -104,18 +104,18 @@ namespace CleanMachineHMI.frmChild int row = LeadDbHelperSQLite.ExecuteSql(sql); if (row > 0) { - KryptonMessageBox.Show(this.GetInfoText("新增清洗方式数据成功!", "AddSuccessInfo")); + KryptonMessageBox.Show(this.T("新增清洗方式数据成功!", "AddSuccessInfo")); frmCleanMode.RefreshFrmHost(); this.Close(); } else { - KryptonMessageBox.Show(this.GetInfoText("新增清洗方式数据失败!", "AddFailInfo")); + KryptonMessageBox.Show(this.T("新增清洗方式数据失败!", "AddFailInfo")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("新增清洗方式数据发生异常", "AddCleanModeDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("新增清洗方式数据发生异常", "AddCleanModeDataExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/frmChild/frmAddContaminationDtl.cs b/CleanMachineHMI/frmChild/frmAddContaminationDtl.cs index 1684694..33ed013 100644 --- a/CleanMachineHMI/frmChild/frmAddContaminationDtl.cs +++ b/CleanMachineHMI/frmChild/frmAddContaminationDtl.cs @@ -70,7 +70,7 @@ namespace CleanMachineHMI.frmChild } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("新增污染明细界面加载异常", "LoadAddFrmExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("新增污染明细界面加载异常", "LoadAddFrmExp") + $":【{ex.Message}】!"); } } @@ -80,17 +80,17 @@ namespace CleanMachineHMI.frmChild { if (cmbContaminationType.SelectedIndex == 0) { - KryptonMessageBox.Show(this.GetInfoText("请选择污染类型!", "SelectContaminationTypeInfo")); + KryptonMessageBox.Show(this.T("请选择污染类型!", "SelectContaminationTypeInfo")); return; } if (string.IsNullOrEmpty(txtContaminationDTLCode.Text)) { - KryptonMessageBox.Show(this.GetInfoText("请输入污染明细编码!", "EnterContaminationDtlCodeInfo")); + KryptonMessageBox.Show(this.T("请输入污染明细编码!", "EnterContaminationDtlCodeInfo")); return; } if (string.IsNullOrEmpty(txtContaminationDTLName.Text)) { - KryptonMessageBox.Show(this.GetInfoText("请输入污染明细名称!", "EnterContaminationDtlNameInfo")); + KryptonMessageBox.Show(this.T("请输入污染明细名称!", "EnterContaminationDtlNameInfo")); return; } string sqlIsExistCode = $@"SELECT 1 FROM BAS_CONTAMINATION_DTL WHERE CONTAMINATION_TYPE_CODE = '{((ListItem)cmbContaminationType.SelectedItem).Value}' AND CONTAMINATION_DTL_CODE = '{txtContaminationDTLCode.Text}'"; @@ -141,18 +141,18 @@ namespace CleanMachineHMI.frmChild int row = LeadDbHelperSQLite.ExecuteSql(sql); if (row > 0) { - KryptonMessageBox.Show(this.GetInfoText("新增污染明细数据成功!", "AddSuccessInfo")); + KryptonMessageBox.Show(this.T("新增污染明细数据成功!", "AddSuccessInfo")); frmContaminationDTL.RefreshFrmHost(); this.Close(); } else { - KryptonMessageBox.Show(this.GetInfoText("新增污染明细数据失败!", "AddFailInfo")); + KryptonMessageBox.Show(this.T("新增污染明细数据失败!", "AddFailInfo")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("新增污染明细数据发生异常", "AddContaminationDtlDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("新增污染明细数据发生异常", "AddContaminationDtlDataExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/frmChild/frmAddContaminationType.cs b/CleanMachineHMI/frmChild/frmAddContaminationType.cs index fe74764..041b65a 100644 --- a/CleanMachineHMI/frmChild/frmAddContaminationType.cs +++ b/CleanMachineHMI/frmChild/frmAddContaminationType.cs @@ -70,7 +70,7 @@ namespace CleanMachineHMI.frmChild } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("新增污染类型界面加载异常", "LoadAddFrmExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("新增污染类型界面加载异常", "LoadAddFrmExp") + $":【{ex.Message}】!"); } } @@ -80,19 +80,19 @@ namespace CleanMachineHMI.frmChild { if (cmbCleanMode.SelectedIndex == 0) { - KryptonMessageBox.Show(this.GetInfoText("请选择清洗方式!", "SelectCleanModeInfo")); + KryptonMessageBox.Show(this.T("请选择清洗方式!", "SelectCleanModeInfo")); return; } if (string.IsNullOrEmpty(txtContaminationTypeCode.Text)) { //KryptonMessageBox.Show("请输入污染类型编码!"); - KryptonMessageBox.Show(this.GetInfoText("请输入污染类型编码!", "EnterContaminationTypeCodeInfo")); + KryptonMessageBox.Show(this.T("请输入污染类型编码!", "EnterContaminationTypeCodeInfo")); return; } if (string.IsNullOrEmpty(txtContaminationTypeName.Text)) { //KryptonMessageBox.Show("请输入污染类型名称!"); - KryptonMessageBox.Show(this.GetInfoText("请输入污染类型名称!", "EnterContaminationTypeNameInfo")); + KryptonMessageBox.Show(this.T("请输入污染类型名称!", "EnterContaminationTypeNameInfo")); return; } string sqlIsExistCode = $@"SELECT 1 FROM BAS_CONTAMINATION_TYPE WHERE CLEAN_MODE_CODE = '{((ListItem)cmbCleanMode.SelectedItem).Value}' AND CONTAMINATION_TYPE_CODE = '{txtContaminationTypeCode.Text}'"; @@ -143,18 +143,18 @@ namespace CleanMachineHMI.frmChild int row = LeadDbHelperSQLite.ExecuteSql(sql); if (row > 0) { - KryptonMessageBox.Show(this.GetInfoText("新增污染类型数据成功!", "AddSuccessInfo")); + KryptonMessageBox.Show(this.T("新增污染类型数据成功!", "AddSuccessInfo")); frmContaminationType.RefreshFrmHost(); this.Close(); } else { - KryptonMessageBox.Show(this.GetInfoText("新增污染类型数据失败!", "AddFailInfo")); + KryptonMessageBox.Show(this.T("新增污染类型数据失败!", "AddFailInfo")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("新增污染类型数据发生异常", "AddContaminationTypeDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("新增污染类型数据发生异常", "AddContaminationTypeDataExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/frmChild/frmAddPlcItem.cs b/CleanMachineHMI/frmChild/frmAddPlcItem.cs index 9fa56ea..bfd6a11 100644 --- a/CleanMachineHMI/frmChild/frmAddPlcItem.cs +++ b/CleanMachineHMI/frmChild/frmAddPlcItem.cs @@ -83,25 +83,25 @@ namespace CleanMachineHMI.frmChild if (string.IsNullOrEmpty(ktb_plcItemCode.Text)) { //KryptonMessageBox.Show("请输入PLC编码"); - KryptonMessageBox.Show(this.GetInfoText("请输入PLC变量编码!", "EnterPlcItemCodeInfo")); + KryptonMessageBox.Show(this.T("请输入PLC变量编码!", "EnterPlcItemCodeInfo")); return; } if (string.IsNullOrEmpty(ktb_plcItemName.Text)) { //KryptonMessageBox.Show("请输入PLC名称"); - KryptonMessageBox.Show(this.GetInfoText("请输入PLC变量名称!", "EnterPlcItemNameInfo")); + KryptonMessageBox.Show(this.T("请输入PLC变量名称!", "EnterPlcItemNameInfo")); return; } if (string.IsNullOrEmpty(kcmb_plcItemType.Text)) { //KryptonMessageBox.Show("请选择PLC类型"); - KryptonMessageBox.Show(this.GetInfoText("请选择PLC变量类型!", "SelectPlcItemTypeInfo")); + KryptonMessageBox.Show(this.T("请选择PLC变量类型!", "SelectPlcItemTypeInfo")); return; } if (string.IsNullOrEmpty(kcmb_plcItemDataType.Text)) { //KryptonMessageBox.Show("请选择PLC数据类型"); - KryptonMessageBox.Show(this.GetInfoText("请选择PLC变量数据类型!", "SelectPlcItemDataTypeInfo")); + KryptonMessageBox.Show(this.T("请选择PLC变量数据类型!", "SelectPlcItemDataTypeInfo")); return; } int addPriIndex = Convert.ToInt32(knud_plcItemPriAddress.Value); @@ -202,19 +202,19 @@ namespace CleanMachineHMI.frmChild if (row > 0) { //KryptonMessageBox.Show("添加PLC变量数据成功!"); - KryptonMessageBox.Show(this.GetInfoText("新增PLC变量数据成功!", "AddSuccessInfo")); + KryptonMessageBox.Show(this.T("新增PLC变量数据成功!", "AddSuccessInfo")); frmPlcItemConfig.RefreshFrmHost(); this.Close(); } else { //KryptonMessageBox.Show("添加PLC变量数据失败!"); - KryptonMessageBox.Show(this.GetInfoText("新增PLC变量数据失败!", "AddFailInfo")); + KryptonMessageBox.Show(this.T("新增PLC变量数据失败!", "AddFailInfo")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("新增PLC变量数据发生异常", "AddPlcItemDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("新增PLC变量数据发生异常", "AddPlcItemDataExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/frmChild/frmAddRole.cs b/CleanMachineHMI/frmChild/frmAddRole.cs index 00d00b3..d5c3595 100644 --- a/CleanMachineHMI/frmChild/frmAddRole.cs +++ b/CleanMachineHMI/frmChild/frmAddRole.cs @@ -61,18 +61,18 @@ namespace CleanMachineHMI.frmChild { if (string.IsNullOrEmpty(txtRoleCode.Text)) { - KryptonMessageBox.Show(this.GetInfoText("请输入角色编码!", "EnterRoleCodeInfo")); + KryptonMessageBox.Show(this.T("请输入角色编码!", "EnterRoleCodeInfo")); return; } if (string.IsNullOrEmpty(txtRoleName.Text)) { - KryptonMessageBox.Show(this.GetInfoText("请输入角色名称!", "EnterRoleNameInfo")); + KryptonMessageBox.Show(this.T("请输入角色名称!", "EnterRoleNameInfo")); return; } int roleGrade = 0; if (kcmb_roleGrade.SelectedIndex == 0) { - KryptonMessageBox.Show(this.GetInfoText("请选择角色级别!", "SelectRoleGradeInfo")); + KryptonMessageBox.Show(this.T("请选择角色级别!", "SelectRoleGradeInfo")); return; } else if (kcmb_roleGrade.SelectedIndex == 1) @@ -81,7 +81,7 @@ namespace CleanMachineHMI.frmChild DataTable dtIsExistAdmin = LeadDbHelperSQLite.Query(sqlIsExistAdmin).Tables[0]; if (dtIsExistAdmin != null && dtIsExistAdmin.Rows.Count > 0) { - KryptonMessageBox.Show(this.GetInfoText("管理员角色只能存在一个,请重新选择!", "AdminOnlyInfo")); + KryptonMessageBox.Show(this.T("管理员角色只能存在一个,请重新选择!", "AdminOnlyInfo")); return; } roleGrade = 100; @@ -139,18 +139,18 @@ namespace CleanMachineHMI.frmChild int row = LeadDbHelperSQLite.ExecuteSql(sql); if (row > 0) { - KryptonMessageBox.Show(this.GetInfoText("新增角色数据成功!", "AddSuccessInfo")); + KryptonMessageBox.Show(this.T("新增角色数据成功!", "AddSuccessInfo")); frmRole.RefreshFrmHost(); this.Close(); } else { - KryptonMessageBox.Show(this.GetInfoText("新增角色数据失败!", "AddFailInfo")); + KryptonMessageBox.Show(this.T("新增角色数据失败!", "AddFailInfo")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("新增角色数据发生异常", "AddRoleDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("新增角色数据发生异常", "AddRoleDataExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/frmChild/frmAddSheetType.cs b/CleanMachineHMI/frmChild/frmAddSheetType.cs index 69d58d4..f58202a 100644 --- a/CleanMachineHMI/frmChild/frmAddSheetType.cs +++ b/CleanMachineHMI/frmChild/frmAddSheetType.cs @@ -29,13 +29,13 @@ namespace CleanMachineHMI.frmChild if (string.IsNullOrEmpty(txtSheetTypeCode.Text)) { //KryptonMessageBox.Show("请输入板材编码!"); - KryptonMessageBox.Show(this.GetInfoText("请输入板材编码!", "EnterSheetTypeCodeInfo")); + KryptonMessageBox.Show(this.T("请输入板材编码!", "EnterSheetTypeCodeInfo")); return; } if (string.IsNullOrEmpty(txtSheetTypeName.Text)) { //KryptonMessageBox.Show("请输入板材名称!"); - KryptonMessageBox.Show(this.GetInfoText("请输入板材名称!", "EnterSheetTypeNameInfo")); + KryptonMessageBox.Show(this.T("请输入板材名称!", "EnterSheetTypeNameInfo")); return; } string sqlIsExistCode = $@"SELECT 1 FROM BAS_SHEET_TYPE WHERE SHEET_TYPE_CODE = '{txtSheetTypeCode.Text}'"; @@ -85,19 +85,19 @@ namespace CleanMachineHMI.frmChild if (row > 0) { //KryptonMessageBox.Show("新增板材数据成功!"); - KryptonMessageBox.Show(this.GetInfoText("新增板材数据成功!", "AddSuccessInfo")); + KryptonMessageBox.Show(this.T("新增板材数据成功!", "AddSuccessInfo")); frmSheetType.RefreshFrmHost(); this.Close(); } else { //KryptonMessageBox.Show("新增板材数据失败!"); - KryptonMessageBox.Show(this.GetInfoText("新增板材数据失败!", "AddFailInfo")); + KryptonMessageBox.Show(this.T("新增板材数据失败!", "AddFailInfo")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("新增板材类型数据发生异常", "AddSheetTypeDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("新增板材类型数据发生异常", "AddSheetTypeDataExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/frmChild/frmAddUser.cs b/CleanMachineHMI/frmChild/frmAddUser.cs index d124304..cf026b5 100644 --- a/CleanMachineHMI/frmChild/frmAddUser.cs +++ b/CleanMachineHMI/frmChild/frmAddUser.cs @@ -90,42 +90,42 @@ namespace CleanMachineHMI.frmChild { if (string.IsNullOrEmpty(txtAccount.Text)) { - KryptonMessageBox.Show(this.GetInfoText("请输入用户编码!", "EnterUserCodeInfo")); + KryptonMessageBox.Show(this.T("请输入用户编码!", "EnterUserCodeInfo")); return; } if (string.IsNullOrEmpty(txtName.Text)) { - KryptonMessageBox.Show(this.GetInfoText("请输入用户名称!", "EnterUserNameInfo")); + KryptonMessageBox.Show(this.T("请输入用户名称!", "EnterUserNameInfo")); return; } if (string.IsNullOrEmpty(txtPS.Text)) { //KryptonMessageBox.Show("请输入用户密码!"); - KryptonMessageBox.Show(this.GetInfoText("请输入用户密码!", "EnterUserPasswordInfo")); + KryptonMessageBox.Show(this.T("请输入用户密码!", "EnterUserPasswordInfo")); return; } if (string.IsNullOrEmpty(txtPS1.Text)) { //KryptonMessageBox.Show("请确认用户密码!"); - KryptonMessageBox.Show(this.GetInfoText("请确认用户密码!", "ConfirmUserPasswordInfo")); + KryptonMessageBox.Show(this.T("请确认用户密码!", "ConfirmUserPasswordInfo")); return; } if (cmbGender.SelectedIndex == 0) { //KryptonMessageBox.Show("请选择性别!"); - KryptonMessageBox.Show(this.GetInfoText("请选择性别!", "SelectUserGenderInfo")); + KryptonMessageBox.Show(this.T("请选择性别!", "SelectUserGenderInfo")); return; } if (kcmb_Role.SelectedIndex == 0) { //KryptonMessageBox.Show("请选择所属角色!"); - KryptonMessageBox.Show(this.GetInfoText("请选择所属角色!", "SelectUserRoleInfo")); + KryptonMessageBox.Show(this.T("请选择所属角色!", "SelectUserRoleInfo")); return; } if (txtPS1.Text != txtPS.Text) { //KryptonMessageBox.Show("两次输入的密码不同,请重新输入!"); - KryptonMessageBox.Show(this.GetInfoText("两次输入的密码不同,请重新输入!", "ConfirmUserPasswordErrInfo")); + KryptonMessageBox.Show(this.T("两次输入的密码不同,请重新输入!", "ConfirmUserPasswordErrInfo")); return; } string sqlIsExistCode = $@"SELECT 1 FROM SYS_USER WHERE USER_CODE = '{txtAccount.Text}'"; @@ -184,19 +184,19 @@ namespace CleanMachineHMI.frmChild if (row > 0) { //KryptonMessageBox.Show("新增用户数据成功!"); - KryptonMessageBox.Show(this.GetInfoText("新增用户数据成功!", "AddSuccessInfo")); + KryptonMessageBox.Show(this.T("新增用户数据成功!", "AddSuccessInfo")); frmUser.RefreshFrmHost(); this.Close(); } else { //KryptonMessageBox.Show("新增用户数据失败!"); - KryptonMessageBox.Show(this.GetInfoText("新增用户数据失败!", "AddFailInfo")); + KryptonMessageBox.Show(this.T("新增用户数据失败!", "AddFailInfo")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("新增用户数据发生异常", "AddUserDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("新增用户数据发生异常", "AddUserDataExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/frmChild/frmAddWaringMsg.cs b/CleanMachineHMI/frmChild/frmAddWaringMsg.cs index 9935d38..e56d58d 100644 --- a/CleanMachineHMI/frmChild/frmAddWaringMsg.cs +++ b/CleanMachineHMI/frmChild/frmAddWaringMsg.cs @@ -67,19 +67,19 @@ namespace CleanMachineHMI.frmChild if (string.IsNullOrEmpty(txtWarningCode.Text)) { //KryptonMessageBox.Show("请输入报警条码!"); - KryptonMessageBox.Show(this.GetInfoText("请输入报警条码!", "EnterWarningCodeInfo")); + KryptonMessageBox.Show(this.T("请输入报警条码!", "EnterWarningCodeInfo")); return; } if (string.IsNullOrEmpty(txtWarningName.Text)) { //KryptonMessageBox.Show("请输入报警名称!"); - KryptonMessageBox.Show(this.GetInfoText("请输入报警名称!", "EnterWarningNameInfo")); + KryptonMessageBox.Show(this.T("请输入报警名称!", "EnterWarningNameInfo")); return; } if (kcmb_WarningType.SelectedIndex == 0) { //KryptonMessageBox.Show("请选择报警类型!"); - KryptonMessageBox.Show(this.GetInfoText("请选择报警类型!", "SelectWarningTypeInfo")); + KryptonMessageBox.Show(this.T("请选择报警类型!", "SelectWarningTypeInfo")); return; } string sqlIsExistCode = $@"SELECT 1 FROM BAS_WARNING WHERE WARNING_TYPE = '{kcmb_WarningType.SelectedIndex}' AND PLC_ITEM_CODE = '{ktb_PlcCode.Text}' AND WARNING_CODE = '{txtWarningCode.Text}'"; @@ -135,20 +135,20 @@ namespace CleanMachineHMI.frmChild if (row > 0) { //KryptonMessageBox.Show("新增基础报警数据成功!"); - KryptonMessageBox.Show(this.GetInfoText("新增基础报警数据成功!", "AddSuccessInfo")); + KryptonMessageBox.Show(this.T("新增基础报警数据成功!", "AddSuccessInfo")); // frmWarning.RefreshFrmHost(); this.Close(); } else { //KryptonMessageBox.Show("新增基础报警数据失败!"); - KryptonMessageBox.Show(this.GetInfoText("新增基础报警数据失败!", "AddFailInfo")); + KryptonMessageBox.Show(this.T("新增基础报警数据失败!", "AddFailInfo")); } } catch (Exception ex) { //KryptonMessageBox.Show(ex.Message); - KryptonMessageBox.Show(this.GetInfoText("新增基础报警数据发生异常", "AddWarningDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("新增基础报警数据发生异常", "AddWarningDataExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/frmChild/frmEditCleanCode.cs b/CleanMachineHMI/frmChild/frmEditCleanCode.cs index 32a340d..f1b250f 100644 --- a/CleanMachineHMI/frmChild/frmEditCleanCode.cs +++ b/CleanMachineHMI/frmChild/frmEditCleanCode.cs @@ -63,7 +63,7 @@ namespace CleanMachineHMI.frmChild } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("修改清洁方式数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("修改清洁方式数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); } } @@ -74,7 +74,7 @@ namespace CleanMachineHMI.frmChild if (string.IsNullOrEmpty(txtCleanModeName.Text)) { //KryptonMessageBox.Show("请输入板材名称!"); - KryptonMessageBox.Show(this.GetInfoText("请输入清洗方式名称!", "EnterCleanNameInfo")); + KryptonMessageBox.Show(this.T("请输入清洗方式名称!", "EnterCleanNameInfo")); return; } string sql = $@"update BAS_CLEAN_MODE set CLEAN_MODE_NAME = '{txtCleanModeName.Text}',UPDATE_BY = '{GlobalHelper.UserInfo.UserId}',UPDATE_TIME = datetime('now', 'localtime') where CLEAN_MODE_ID = '{CleanModeId}'"; @@ -82,7 +82,7 @@ namespace CleanMachineHMI.frmChild if (row > 0) { //KryptonMessageBox.Show("修改清洗方式数据成功!"); - KryptonMessageBox.Show(this.GetInfoText("编辑清洗方式数据成功!", "EditSuccessInfo")); + KryptonMessageBox.Show(this.T("编辑清洗方式数据成功!", "EditSuccessInfo")); frmCleanMode.RefreshFrmHost(); this.Close(); @@ -90,12 +90,12 @@ namespace CleanMachineHMI.frmChild else { //KryptonMessageBox.Show("修改清洗方式数据失败!"); - KryptonMessageBox.Show(this.GetInfoText("编辑清洗方式数据失败!", "EditFailInfo")); + KryptonMessageBox.Show(this.T("编辑清洗方式数据失败!", "EditFailInfo")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("编辑清洗方式数据发生异常", "EditCleanModeDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("编辑清洗方式数据发生异常", "EditCleanModeDataExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/frmChild/frmEditContaminationDtl.cs b/CleanMachineHMI/frmChild/frmEditContaminationDtl.cs index 22a43e0..7d786b2 100644 --- a/CleanMachineHMI/frmChild/frmEditContaminationDtl.cs +++ b/CleanMachineHMI/frmChild/frmEditContaminationDtl.cs @@ -78,7 +78,7 @@ namespace CleanMachineHMI.frmChild } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("编辑污染明细数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("编辑污染明细数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); } } @@ -89,19 +89,19 @@ namespace CleanMachineHMI.frmChild if (cmbContaminationType.SelectedIndex == 0) { //KryptonMessageBox.Show("请选择污染类型!"); - KryptonMessageBox.Show(this.GetInfoText("请选择污染类型!", "SelectContaminationTypeInfo")); + KryptonMessageBox.Show(this.T("请选择污染类型!", "SelectContaminationTypeInfo")); return; } if (string.IsNullOrEmpty(txtContaminationDTLCode.Text)) { //KryptonMessageBox.Show("请输入污染明细编码!"); - KryptonMessageBox.Show(this.GetInfoText("请输入污染明细编码!", "EnterContaminationDtlCodeInfo")); + KryptonMessageBox.Show(this.T("请输入污染明细编码!", "EnterContaminationDtlCodeInfo")); return; } if (string.IsNullOrEmpty(txtContaminationDTLName.Text)) { //KryptonMessageBox.Show("请输入污染明细名称!"); - KryptonMessageBox.Show(this.GetInfoText("请输入污染明细名称!", "EnterContaminationDtlNameInfo")); + KryptonMessageBox.Show(this.T("请输入污染明细名称!", "EnterContaminationDtlNameInfo")); return; } string sql = $@"update BAS_CONTAMINATION_DTL set CONTAMINATION_DTL_NAME = '{txtContaminationDTLName.Text}',UPDATE_BY = '{GlobalHelper.UserInfo.UserId}',UPDATE_TIME = datetime('now', 'localtime') where CONTAMINATION_DTL_ID = '{ContaminationDtlId}'"; @@ -109,19 +109,19 @@ namespace CleanMachineHMI.frmChild if (row > 0) { //KryptonMessageBox.Show("修改污染明细数据成功!"); - KryptonMessageBox.Show(this.GetInfoText("新增污染明细数据成功!", "EditSuccessInfo")); + KryptonMessageBox.Show(this.T("新增污染明细数据成功!", "EditSuccessInfo")); frmContaminationDTL.RefreshFrmHost(); this.Close(); } else { //KryptonMessageBox.Show("修改污染明细数据失败!"); - KryptonMessageBox.Show(this.GetInfoText("新增污染明细数据失败!", "EditFailInfo")); + KryptonMessageBox.Show(this.T("新增污染明细数据失败!", "EditFailInfo")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("编辑污染明细数据发生异常", "EditContaminationDtlDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("编辑污染明细数据发生异常", "EditContaminationDtlDataExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/frmChild/frmEditContaminationType.cs b/CleanMachineHMI/frmChild/frmEditContaminationType.cs index 33b5e6b..74728f9 100644 --- a/CleanMachineHMI/frmChild/frmEditContaminationType.cs +++ b/CleanMachineHMI/frmChild/frmEditContaminationType.cs @@ -80,7 +80,7 @@ namespace CleanMachineHMI.frmChild } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("编辑污染类型界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("编辑污染类型界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); } } @@ -90,35 +90,35 @@ namespace CleanMachineHMI.frmChild { if (cmbCleanMode.SelectedIndex == 0) { - KryptonMessageBox.Show(this.GetInfoText("请选择清洗方式!", "SelectCleanModeInfo")); + KryptonMessageBox.Show(this.T("请选择清洗方式!", "SelectCleanModeInfo")); return; } if (string.IsNullOrEmpty(txtContaminationTypeCode.Text)) { - KryptonMessageBox.Show(this.GetInfoText("请输入污染类型编码!", "EnterContaminationTypeCodeInfo")); + KryptonMessageBox.Show(this.T("请输入污染类型编码!", "EnterContaminationTypeCodeInfo")); return; } if (string.IsNullOrEmpty(txtContaminationTypeName.Text)) { - KryptonMessageBox.Show(this.GetInfoText("请输入污染类型名称!", "EnterContaminationTypeNameInfo")); + KryptonMessageBox.Show(this.T("请输入污染类型名称!", "EnterContaminationTypeNameInfo")); return; } string sql = $@"update BAS_CONTAMINATION_TYPE set CONTAMINATION_TYPE_NAME = '{txtContaminationTypeName.Text}',UPDATE_BY = '{GlobalHelper.UserInfo.UserId}',UPDATE_TIME = datetime('now', 'localtime') where CONTAMINATION_TYPE_ID = '{ContaminationId}'"; int row = LeadDbHelperSQLite.ExecuteSql(sql); if (row > 0) { - KryptonMessageBox.Show(this.GetInfoText("编辑污染类型数据成功!", "EditSuccessInfo")); + KryptonMessageBox.Show(this.T("编辑污染类型数据成功!", "EditSuccessInfo")); frmContaminationType.RefreshFrmHost(); this.Close(); } else { - KryptonMessageBox.Show(this.GetInfoText("编辑污染类型数据失败!", "EditFailInfo")); + KryptonMessageBox.Show(this.T("编辑污染类型数据失败!", "EditFailInfo")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("编辑污染类型数据发生异常", "EditContaminationTypeDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("编辑污染类型数据发生异常", "EditContaminationTypeDataExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/frmChild/frmEditParamater.cs b/CleanMachineHMI/frmChild/frmEditParamater.cs index 55172ed..a6e5b15 100644 --- a/CleanMachineHMI/frmChild/frmEditParamater.cs +++ b/CleanMachineHMI/frmChild/frmEditParamater.cs @@ -55,7 +55,7 @@ namespace CleanMachineHMI.frmChild } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("编辑参数数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("编辑参数数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); } } @@ -66,7 +66,7 @@ namespace CleanMachineHMI.frmChild if (string.IsNullOrEmpty(txtValue.Text)) { //KryptonMessageBox.Show("请输入参数值!"); - KryptonMessageBox.Show(this.GetInfoText("请输入参数值!", "EnterparamaterVlaueInfo")); + KryptonMessageBox.Show(this.T("请输入参数值!", "EnterparamaterVlaueInfo")); return; } string sql = $@"update SYS_PARAMETER set PARAMETER_VALUE = '{txtValue.Text}',UPDATE_BY = '{GlobalHelper.UserInfo.UserId}',UPDATE_TIME = datetime('now', 'localtime') where PARAMETER_ID = '{ParamaterId}'"; @@ -74,19 +74,19 @@ namespace CleanMachineHMI.frmChild if (row > 0) { //KryptonMessageBox.Show("修改参数信息数据成功!"); - KryptonMessageBox.Show(this.GetInfoText("编辑参数数据成功!", "EditSuccessInfo")); + KryptonMessageBox.Show(this.T("编辑参数数据成功!", "EditSuccessInfo")); frmParamater.RefreshFrmHost(); this.Close(); } else { //KryptonMessageBox.Show("修改参数信息数据失败!"); - KryptonMessageBox.Show(this.GetInfoText("编辑参数数据失败!", "EditFailInfo")); + KryptonMessageBox.Show(this.T("编辑参数数据失败!", "EditFailInfo")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("编辑参数数据发生异常", "EditParamaterDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("编辑参数数据发生异常", "EditParamaterDataExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/frmChild/frmEditPlcItem.cs b/CleanMachineHMI/frmChild/frmEditPlcItem.cs index cd2f226..4ab0678 100644 --- a/CleanMachineHMI/frmChild/frmEditPlcItem.cs +++ b/CleanMachineHMI/frmChild/frmEditPlcItem.cs @@ -82,7 +82,7 @@ namespace CleanMachineHMI.frmChild } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("编辑PLC变量数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("编辑PLC变量数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); } } /// @@ -102,25 +102,25 @@ namespace CleanMachineHMI.frmChild if (string.IsNullOrEmpty(ktb_plcItemCode.Text)) { //KryptonMessageBox.Show("请输入PLC编码"); - KryptonMessageBox.Show(this.GetInfoText("请输入PLC变量编码!", "EnterPlcItemCodeInfo")); + KryptonMessageBox.Show(this.T("请输入PLC变量编码!", "EnterPlcItemCodeInfo")); return; } if (string.IsNullOrEmpty(ktb_plcItemName.Text)) { //KryptonMessageBox.Show("请输入PLC名称"); - KryptonMessageBox.Show(this.GetInfoText("请输入PLC变量名称!", "EnterPlcItemNameInfo")); + KryptonMessageBox.Show(this.T("请输入PLC变量名称!", "EnterPlcItemNameInfo")); return; } if (string.IsNullOrEmpty(kcmb_plcItemType.Text)) { //KryptonMessageBox.Show("请选择PLC类型"); - KryptonMessageBox.Show(this.GetInfoText("请选择PLC变量类型!", "SelectPlcItemTypeInfo")); + KryptonMessageBox.Show(this.T("请选择PLC变量类型!", "SelectPlcItemTypeInfo")); return; } if (string.IsNullOrEmpty(kcmb_plcItemDataType.Text)) { //KryptonMessageBox.Show("请选择PLC数据类型"); - KryptonMessageBox.Show(this.GetInfoText("请选择PLC变量数据类型!", "SelectPlcItemDataTypeInfo")); + KryptonMessageBox.Show(this.T("请选择PLC变量数据类型!", "SelectPlcItemDataTypeInfo")); return; } int addPriIndex = Convert.ToInt32(knud_plcItemPriAddress.Value); @@ -178,19 +178,19 @@ namespace CleanMachineHMI.frmChild if (row > 0) { //KryptonMessageBox.Show("编辑PLC变量数据成功!"); - KryptonMessageBox.Show(this.GetInfoText("编辑PLC变量数据成功!", "EditSuccessInfo")); + KryptonMessageBox.Show(this.T("编辑PLC变量数据成功!", "EditSuccessInfo")); frmPlcItemConfig.RefreshFrmHost(); this.Close(); } else { //KryptonMessageBox.Show("编辑PLC变量数据失败!"); - KryptonMessageBox.Show(this.GetInfoText("编辑PLC变量数据失败!", "EditFailInfo")); + KryptonMessageBox.Show(this.T("编辑PLC变量数据失败!", "EditFailInfo")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("编辑PLC变量数据发生异常", "EditPlcItemDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("编辑PLC变量数据发生异常", "EditPlcItemDataExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/frmChild/frmEditRole.cs b/CleanMachineHMI/frmChild/frmEditRole.cs index 82ac749..a8e45ae 100644 --- a/CleanMachineHMI/frmChild/frmEditRole.cs +++ b/CleanMachineHMI/frmChild/frmEditRole.cs @@ -74,7 +74,7 @@ namespace CleanMachineHMI.frmChild } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("编辑角色数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("编辑角色数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); } } @@ -85,14 +85,14 @@ namespace CleanMachineHMI.frmChild if (string.IsNullOrEmpty(txtRoleName.Text)) { //KryptonMessageBox.Show("请输入角色名称!"); - KryptonMessageBox.Show(this.GetInfoText("请输入角色名称!", "EnterRoleNameInfo")); + KryptonMessageBox.Show(this.T("请输入角色名称!", "EnterRoleNameInfo")); return; } int roleGrade = 0; if (kcmb_roleGrade.SelectedIndex == 0) { //KryptonMessageBox.Show("请选择角色级别!"); - KryptonMessageBox.Show(this.GetInfoText("请选择角色级别!", "SelectRoleGradeInfo")); + KryptonMessageBox.Show(this.T("请选择角色级别!", "SelectRoleGradeInfo")); return; } else if (kcmb_roleGrade.SelectedIndex == 1) @@ -115,19 +115,19 @@ namespace CleanMachineHMI.frmChild if (row > 0) { //KryptonMessageBox.Show("修改角色数据成功!"); - KryptonMessageBox.Show(this.GetInfoText("修改角色数据成功!", "EditSuccessInfo")); + KryptonMessageBox.Show(this.T("修改角色数据成功!", "EditSuccessInfo")); frmRole.RefreshFrmHost(); this.Close(); } else { //KryptonMessageBox.Show("修改角色数据失败!"); - KryptonMessageBox.Show(this.GetInfoText("修改角色数据失败!", "EditFailInfo")); + KryptonMessageBox.Show(this.T("修改角色数据失败!", "EditFailInfo")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("编辑角色数据发生异常", "EditRoleDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("编辑角色数据发生异常", "EditRoleDataExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/frmChild/frmEditSheetType.cs b/CleanMachineHMI/frmChild/frmEditSheetType.cs index cbe76ce..7a9be9e 100644 --- a/CleanMachineHMI/frmChild/frmEditSheetType.cs +++ b/CleanMachineHMI/frmChild/frmEditSheetType.cs @@ -57,7 +57,7 @@ namespace CleanMachineHMI.frmChild } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("编辑板材数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("编辑板材数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); } } @@ -68,7 +68,7 @@ namespace CleanMachineHMI.frmChild if (string.IsNullOrEmpty(txtSheetTypeName.Text)) { //KryptonMessageBox.Show("请输入板材名称!"); - KryptonMessageBox.Show(this.GetInfoText("请输入板材名称!", "EnterSheetTypeNameInfo")); + KryptonMessageBox.Show(this.T("请输入板材名称!", "EnterSheetTypeNameInfo")); return; } string sql = $@"update BAS_SHEET_TYPE set SHEET_TYPE_NAME = '{txtSheetTypeName.Text}',UPDATE_BY = '{GlobalHelper.UserInfo.UserId}',UPDATE_TIME = datetime('now', 'localtime') where SHEET_TYPE_ID = '{SheetTypeId}'"; @@ -76,19 +76,19 @@ namespace CleanMachineHMI.frmChild if (row > 0) { //KryptonMessageBox.Show("修改板材数据成功!"); - KryptonMessageBox.Show(this.GetInfoText("编辑板材数据成功!", "EditSuccessInfo")); + KryptonMessageBox.Show(this.T("编辑板材数据成功!", "EditSuccessInfo")); frmSheetType.RefreshFrmHost(); this.Close(); } else { //KryptonMessageBox.Show("修改板材数据失败!"); - KryptonMessageBox.Show(this.GetInfoText("编辑板材数据失败!", "EditFailInfo")); + KryptonMessageBox.Show(this.T("编辑板材数据失败!", "EditFailInfo")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("编辑板材类型数据发生异常", "EditSheetTypeDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("编辑板材类型数据发生异常", "EditSheetTypeDataExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/frmChild/frmEditUser.cs b/CleanMachineHMI/frmChild/frmEditUser.cs index 38bf60e..3df20e0 100644 --- a/CleanMachineHMI/frmChild/frmEditUser.cs +++ b/CleanMachineHMI/frmChild/frmEditUser.cs @@ -93,7 +93,7 @@ namespace CleanMachineHMI.frmChild } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("编辑用户数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("编辑用户数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); } } @@ -103,36 +103,36 @@ namespace CleanMachineHMI.frmChild { if (string.IsNullOrEmpty(txtAccount.Text)) { - KryptonMessageBox.Show(this.GetInfoText("请输入用户编码!", "EnterUserCodeInfo")); + KryptonMessageBox.Show(this.T("请输入用户编码!", "EnterUserCodeInfo")); return; } if (string.IsNullOrEmpty(txtName.Text)) { - KryptonMessageBox.Show(this.GetInfoText("请输入用户名称!", "EnterUserNameInfo")); + KryptonMessageBox.Show(this.T("请输入用户名称!", "EnterUserNameInfo")); return; } if (string.IsNullOrEmpty(txtPS.Text)) { //KryptonMessageBox.Show("请输入用户密码!"); - KryptonMessageBox.Show(this.GetInfoText("请输入用户密码!", "EnterUserPasswordInfo")); + KryptonMessageBox.Show(this.T("请输入用户密码!", "EnterUserPasswordInfo")); return; } if (string.IsNullOrEmpty(txtPS1.Text)) { //KryptonMessageBox.Show("请确认用户密码!"); - KryptonMessageBox.Show(this.GetInfoText("请确认用户密码!", "ConfirmUserPasswordInfo")); + KryptonMessageBox.Show(this.T("请确认用户密码!", "ConfirmUserPasswordInfo")); return; } if (cmbGender.SelectedIndex == 0) { //KryptonMessageBox.Show("请选择性别!"); - KryptonMessageBox.Show(this.GetInfoText("请选择性别!", "SelectUserGenderInfo")); + KryptonMessageBox.Show(this.T("请选择性别!", "SelectUserGenderInfo")); return; } if (txtPS1.Text != txtPS.Text) { //KryptonMessageBox.Show("两次输入的密码不同,请重新输入!"); - KryptonMessageBox.Show(this.GetInfoText("两次输入的密码不同,请重新输入!", "ConfirmUserPasswordErrInfo")); + KryptonMessageBox.Show(this.T("两次输入的密码不同,请重新输入!", "ConfirmUserPasswordErrInfo")); return; } string sql = $@"update SYS_USER set USER_CODE = '{txtAccount.Text}',USER_NAME = '{txtName.Text}',PASSWORD = '{txtPS1.Text}',GENDER = '{cmbGender.SelectedIndex}',ROLE_ID = '{((ListItem)kcmb_Role.SelectedItem).Value}',UPDATE_BY = '{GlobalHelper.UserInfo.UserId}',UPDATE_TIME = datetime('now', 'localtime') where USER_ID = '{UserId}'"; @@ -140,19 +140,19 @@ namespace CleanMachineHMI.frmChild if (row > 0) { //KryptonMessageBox.Show("修改用户数据成功!"); - KryptonMessageBox.Show(this.GetInfoText("修改用户数据成功!", "EditSuccessInfo")); + KryptonMessageBox.Show(this.T("修改用户数据成功!", "EditSuccessInfo")); frmUser.RefreshFrmHost(); this.Close(); } else { //KryptonMessageBox.Show("修改用户数据失败!"); - KryptonMessageBox.Show(this.GetInfoText("修改用户数据失败!", "EditFailInfo")); + KryptonMessageBox.Show(this.T("修改用户数据失败!", "EditFailInfo")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("编辑用户数据发生异常", "EditUserDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("编辑用户数据发生异常", "EditUserDataExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/frmChild/frmEditWaringMsg.cs b/CleanMachineHMI/frmChild/frmEditWaringMsg.cs index 95c0fbc..1a1b692 100644 --- a/CleanMachineHMI/frmChild/frmEditWaringMsg.cs +++ b/CleanMachineHMI/frmChild/frmEditWaringMsg.cs @@ -75,7 +75,7 @@ namespace CleanMachineHMI.frmChild } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("编辑基础报警数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("编辑基础报警数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); } } @@ -86,19 +86,19 @@ namespace CleanMachineHMI.frmChild if (string.IsNullOrEmpty(txtWarningCode.Text)) { //KryptonMessageBox.Show("请输入报警条码!"); - KryptonMessageBox.Show(this.GetInfoText("请输入报警条码!", "EnterWarningCodeInfo")); + KryptonMessageBox.Show(this.T("请输入报警条码!", "EnterWarningCodeInfo")); return; } if (string.IsNullOrEmpty(txtWarningName.Text)) { //KryptonMessageBox.Show("请输入报警名称!"); - KryptonMessageBox.Show(this.GetInfoText("请输入报警名称!", "EnterWarningNameInfo")); + KryptonMessageBox.Show(this.T("请输入报警名称!", "EnterWarningNameInfo")); return; } if (kcmb_WarningType.SelectedIndex == 0) { //KryptonMessageBox.Show("请选择报警类型!"); - KryptonMessageBox.Show(this.GetInfoText("请选择报警类型!", "SelectWarningTypeInfo")); + KryptonMessageBox.Show(this.T("请选择报警类型!", "SelectWarningTypeInfo")); return; } string sqlIsExistCode = $@"SELECT 1 FROM BAS_WARNING WHERE WARNING_TYPE = '{kcmb_WarningType.SelectedIndex}' AND PLC_ITEM_CODE = '{ktb_PlcCode.Text}' AND WARNING_CODE = '{txtWarningCode.Text}'"; @@ -114,19 +114,19 @@ namespace CleanMachineHMI.frmChild if (row > 0) { //KryptonMessageBox.Show("修改基础报警数据成功!"); - KryptonMessageBox.Show(this.GetInfoText("修改基础报警数据成功!", "EditSuccessInfo")); + KryptonMessageBox.Show(this.T("修改基础报警数据成功!", "EditSuccessInfo")); //frmWarning.RefreshFrmHost(); this.Close(); } else { //KryptonMessageBox.Show("修改基础报警数据失败!"); - KryptonMessageBox.Show(this.GetInfoText("修改基础报警数据失败!", "EditFailInfo")); + KryptonMessageBox.Show(this.T("修改基础报警数据失败!", "EditFailInfo")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("编辑基础报警数据发生异常", "EditWarningDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("编辑基础报警数据发生异常", "EditWarningDataExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/frmChild/frmEditWorkingPalletData.cs b/CleanMachineHMI/frmChild/frmEditWorkingPalletData.cs index 26a6839..328ceeb 100644 --- a/CleanMachineHMI/frmChild/frmEditWorkingPalletData.cs +++ b/CleanMachineHMI/frmChild/frmEditWorkingPalletData.cs @@ -52,7 +52,7 @@ namespace CleanMachineHMI.frmChild } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("编辑作业托盘数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("编辑作业托盘数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); } } @@ -87,7 +87,7 @@ namespace CleanMachineHMI.frmChild } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("编辑作业托盘数据异常", "EditWorkingPalletDataExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("编辑作业托盘数据异常", "EditWorkingPalletDataExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/frmChild/frmSetRoleMenuPermission.cs b/CleanMachineHMI/frmChild/frmSetRoleMenuPermission.cs index 7a3ab52..d948707 100644 --- a/CleanMachineHMI/frmChild/frmSetRoleMenuPermission.cs +++ b/CleanMachineHMI/frmChild/frmSetRoleMenuPermission.cs @@ -76,7 +76,7 @@ namespace CleanMachineHMI.frmChild } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("角色菜单权限配置界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("角色菜单权限配置界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!"); } } @@ -207,24 +207,24 @@ namespace CleanMachineHMI.frmChild if (rowSum > 0) { //KryptonMessageBox.Show("该角色菜单授权成功!"); - KryptonMessageBox.Show(this.GetInfoText("该角色的菜单权限授权成功!", "EditSuccessInfo")); + KryptonMessageBox.Show(this.T("该角色的菜单权限授权成功!", "EditSuccessInfo")); this.Close(); } else { //KryptonMessageBox.Show("该角色菜单授权失败!"); - KryptonMessageBox.Show(this.GetInfoText("该角色的菜单权限授权失败!", "EditFailInfo")); + KryptonMessageBox.Show(this.T("该角色的菜单权限授权失败!", "EditFailInfo")); } } else { //KryptonMessageBox.Show("未选择任何菜单项,无法配置权限。"); - KryptonMessageBox.Show(this.GetInfoText("未选择任何菜单项,无法配置权限!", "EmptyMenuDataInfo")); + KryptonMessageBox.Show(this.T("未选择任何菜单项,无法配置权限!", "EmptyMenuDataInfo")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("编辑角色的菜单权限授权异常", "EditRoleMenuPermissionExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("编辑角色的菜单权限授权异常", "EditRoleMenuPermissionExp") + $":【{ex.Message}】!"); } } } diff --git a/CleanMachineHMI/frmChild/frmSwitchRunDirection.cs b/CleanMachineHMI/frmChild/frmSwitchRunDirection.cs index b341fd3..1b19765 100644 --- a/CleanMachineHMI/frmChild/frmSwitchRunDirection.cs +++ b/CleanMachineHMI/frmChild/frmSwitchRunDirection.cs @@ -68,7 +68,7 @@ namespace CleanMachineHMI.frmChild } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("加载出料运行方向切换界面发生异常", "LoadSwitchRunDirectionExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("加载出料运行方向切换界面发生异常", "LoadSwitchRunDirectionExp") + $":【{ex.Message}】!"); } } @@ -78,7 +78,7 @@ namespace CleanMachineHMI.frmChild { if (kcmb_SwitchRunDirection.SelectedIndex == 0) { - KryptonMessageBox.Show(this.GetInfoText("请选择切换方向!", "SelectSwitchDirectionInfo")); + KryptonMessageBox.Show(this.T("请选择切换方向!", "SelectSwitchDirectionInfo")); return; } if (!PlcOperationHelper.Instance.isConn) @@ -88,17 +88,17 @@ namespace CleanMachineHMI.frmChild } if (PlcOperationHelper.Instance.WritePlcItem("DischargeDirectionSelection", (kcmb_SwitchRunDirection.SelectedIndex - 1).ToString(), PlcItemTypeDesc.D)) { - KryptonMessageBox.Show(this.GetInfoText("切换出料运行方向成功!", "SwitchDirectionSuccessInfo")); + KryptonMessageBox.Show(this.T("切换出料运行方向成功!", "SwitchDirectionSuccessInfo")); this.Close(); } else { - KryptonMessageBox.Show(this.GetInfoText("切换出料运行方向失败!", "SwitchDirectionFailInfo")); + KryptonMessageBox.Show(this.T("切换出料运行方向失败!", "SwitchDirectionFailInfo")); } } catch (Exception ex) { - KryptonMessageBox.Show(this.GetInfoText("切换出料运行方向的函数发生异常", "SwitchRunDirectionExp") + $":【{ex.Message}】!"); + KryptonMessageBox.Show(this.T("切换出料运行方向的函数发生异常", "SwitchRunDirectionExp") + $":【{ex.Message}】!"); } } diff --git a/CleanMachineHMI/frmIOMonitor_Old.cs b/CleanMachineHMI/frmIOMonitor_Old.cs index e1f84fc..17bebd7 100644 --- a/CleanMachineHMI/frmIOMonitor_Old.cs +++ b/CleanMachineHMI/frmIOMonitor_Old.cs @@ -203,7 +203,7 @@ namespace CleanMachineHMI KryptonLabel label1 = new KryptonLabel(); label1.StateCommon.ShortText.Font = new Font("宋体", (float)8.5, FontStyle.Regular); label1.Location = new Point(44, 6); - label1.Text = this.GetInfoText(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode); + label1.Text = this.T(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode); panel.Controls.Add(label); panel.Controls.Add(button); @@ -238,7 +238,7 @@ namespace CleanMachineHMI label1.StateCommon.ShortText.Font = new Font("宋体", (float)8.5, FontStyle.Regular); label1.Location = new Point(44, 6); //label1.Text = item.PlcItemName.Replace("(I/O监控)", ""); - label1.Text = this.GetInfoText(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode); + label1.Text = this.T(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode); panel.Controls.Add(label); panel.Controls.Add(button); @@ -321,7 +321,7 @@ namespace CleanMachineHMI KryptonLabel label1 = new KryptonLabel(); label1.StateCommon.ShortText.Font = new Font("宋体", (float)8.5, FontStyle.Regular); label1.Location = new Point(44, 6); - label1.Text = this.GetInfoText(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode); + label1.Text = this.T(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode); panel.Controls.Add(label); panel.Controls.Add(button); @@ -355,7 +355,7 @@ namespace CleanMachineHMI KryptonLabel label1 = new KryptonLabel(); label1.StateCommon.ShortText.Font = new Font("宋体", (float)8.5, FontStyle.Regular); label1.Location = new Point(44, 6); - label1.Text = this.GetInfoText(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode); + label1.Text = this.T(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode); panel.Controls.Add(label); panel.Controls.Add(button); diff --git a/CleanMachineHMI/frmIoMonitorNew.cs b/CleanMachineHMI/frmIoMonitorNew.cs index fc8f02a..9681b1b 100644 --- a/CleanMachineHMI/frmIoMonitorNew.cs +++ b/CleanMachineHMI/frmIoMonitorNew.cs @@ -177,7 +177,7 @@ namespace CleanMachineHMI { KryptonLabel label1 = this.Controls.Find("klb_X" + Convert.ToString(Convert.ToInt32(item.PlcItemPriAddress), 8).PadLeft(2, '0'), true)[0] as KryptonLabel; - label1.Text = this.GetInfoText(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode); + label1.Text = this.T(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode); } })); } @@ -194,7 +194,7 @@ namespace CleanMachineHMI { KryptonLabel label1 = this.Controls.Find("klb_Y" + Convert.ToString(Convert.ToInt32(item.PlcItemPriAddress), 8).PadLeft(2, '0'), true)[0] as KryptonLabel; - label1.Text = this.GetInfoText(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode); + label1.Text = this.T(item.PlcItemName.Replace("(I/O监控)", ""), item.PlcItemCode); } })); } diff --git a/CleanMachineHMI/frmLogin.cs b/CleanMachineHMI/frmLogin.cs index f4fd811..e0eba51 100644 --- a/CleanMachineHMI/frmLogin.cs +++ b/CleanMachineHMI/frmLogin.cs @@ -42,12 +42,12 @@ namespace CleanMachineHMI { if (string.IsNullOrWhiteSpace(txtAccount.Text)) { - KryptonMessageBox.Show(this.GetInfoText("请输入登陆账号!", "PleaseInputAccount"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); + KryptonMessageBox.Show(this.T("请输入登陆账号!", "PleaseInputAccount"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (string.IsNullOrWhiteSpace(txtPs.Text)) { - KryptonMessageBox.Show(this.GetInfoText("请输入登陆密码!", "PleaseInputPassword"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); + KryptonMessageBox.Show(this.T("请输入登陆密码!", "PleaseInputPassword"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } @@ -59,17 +59,17 @@ namespace CleanMachineHMI var data = dt.Rows[0]; if (data["USED_FLAG"].ToString() == "0") { - KryptonMessageBox.Show(this.GetInfoText("用户已被停用!", "UserStop"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); + KryptonMessageBox.Show(this.T("用户已被停用!", "UserStop"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (data["DEL_FLAG"].ToString() == "1") { - KryptonMessageBox.Show(this.GetInfoText("用户已被删除!", "UserDeleted"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); + KryptonMessageBox.Show(this.T("用户已被删除!", "UserDeleted"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (data["PASSWORD"].ToString().ToLower() != txtPs.Text.ToLower()) { - KryptonMessageBox.Show(this.GetInfoText("输入密码错误!", "PasswordFail"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); + KryptonMessageBox.Show(this.T("输入密码错误!", "PasswordFail"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } AppConfigHelper.Update("LastTimeUserCode",txtAccount.Text.Trim()); @@ -102,7 +102,7 @@ namespace CleanMachineHMI } else { - KryptonMessageBox.Show(this.GetInfoText("请输入正确的登陆账号!", "PleaseCorrectAccount"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); + KryptonMessageBox.Show(this.T("请输入正确的登陆账号!", "PleaseCorrectAccount"), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } diff --git a/CleanMachineHMI/frmMainNew.cs b/CleanMachineHMI/frmMainNew.cs index 5d4a991..cd4ecb2 100644 --- a/CleanMachineHMI/frmMainNew.cs +++ b/CleanMachineHMI/frmMainNew.cs @@ -189,7 +189,7 @@ namespace CleanMachineHMI bool isInitStatus = PlcOperationHelper.Instance.PlcInit(); if (isInitStatus) { - label3Professional.Text = this.GetInfoText("串口打开成功,PLC连接成功!", "label3Professional_Success"); + label3Professional.Text = this.T("串口打开成功,PLC连接成功!", "label3Professional_Success"); label3Professional.BackColor = Color.Lime; isPlcConnStatus = true; @@ -236,7 +236,7 @@ namespace CleanMachineHMI else { //label3Professional.Text = "串口打开失败,PLC连接失败!"; - label3Professional.Text = this.GetInfoText("串口打开失败,PLC连接失败!", "label3Professional_Failed"); + label3Professional.Text = this.T("串口打开失败,PLC连接失败!", "label3Professional_Failed"); label3Professional.BackColor = Color.Red; isPlcConnStatus = false; diff --git a/LeadDataBaseUtility/LeadDataBaseUtility.csproj b/LeadDataBaseUtility/LeadDataBaseUtility.csproj index da1018c..5e27163 100644 --- a/LeadDataBaseUtility/LeadDataBaseUtility.csproj +++ b/LeadDataBaseUtility/LeadDataBaseUtility.csproj @@ -4,6 +4,12 @@ netstandard2.0 + + + + + + @@ -20,8 +26,4 @@ - - - - diff --git a/NX_LogUtility/NX_LogUtility.csproj b/NX_LogUtility/NX_LogUtility.csproj index 62e8ee6..16f695b 100644 --- a/NX_LogUtility/NX_LogUtility.csproj +++ b/NX_LogUtility/NX_LogUtility.csproj @@ -5,7 +5,9 @@ - + + +