启动 加载语言配置文件

This commit is contained in:
ehkang
2022-03-18 19:06:26 +08:00
parent 0a4fe0907b
commit 2b39fb593c
48 changed files with 4487 additions and 393 deletions

View File

@@ -26,7 +26,7 @@ namespace CleanMachineHMI.frmChild
{
try
{
this.SetFormControlText(GlobalHelper.LanguageCode);
this.SetFormControlText();
int directNum = Convert.ToInt32(PlcOperationHelper.Instance.ReadPlcItem("DischargeDirectionSelection", PlcItemTypeDesc.D));
if (GlobalHelper.LanguageCode == "English")
{
@@ -70,7 +70,7 @@ namespace CleanMachineHMI.frmChild
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("加载出料运行方向切换界面发生异常", "LoadSwitchRunDirectionExp") + $":【{ex.Message}】!");
KryptonMessageBox.Show(this.GetInfoText("加载出料运行方向切换界面发生异常", "LoadSwitchRunDirectionExp") + $":【{ex.Message}】!");
}
}
@@ -80,7 +80,7 @@ namespace CleanMachineHMI.frmChild
{
if (kcmb_SwitchRunDirection.SelectedIndex == 0)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择切换方向!", "SelectSwitchDirectionInfo"));
KryptonMessageBox.Show(this.GetInfoText("请选择切换方向!", "SelectSwitchDirectionInfo"));
return;
}
if (!PlcOperationHelper.Instance.isConn)
@@ -90,17 +90,17 @@ namespace CleanMachineHMI.frmChild
}
if (PlcOperationHelper.Instance.WritePlcItem("DischargeDirectionSelection", (kcmb_SwitchRunDirection.SelectedIndex - 1).ToString(), PlcItemTypeDesc.D))
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("切换出料运行方向成功!", "SwitchDirectionSuccessInfo"));
KryptonMessageBox.Show(this.GetInfoText("切换出料运行方向成功!", "SwitchDirectionSuccessInfo"));
this.Close();
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("切换出料运行方向失败!", "SwitchDirectionFailInfo"));
KryptonMessageBox.Show(this.GetInfoText("切换出料运行方向失败!", "SwitchDirectionFailInfo"));
}
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("切换出料运行方向的函数发生异常", "SwitchRunDirectionExp") + $":【{ex.Message}】!");
KryptonMessageBox.Show(this.GetInfoText("切换出料运行方向的函数发生异常", "SwitchRunDirectionExp") + $":【{ex.Message}】!");
}
}