启动 加载语言配置文件

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

@@ -53,7 +53,7 @@ namespace CleanMachineHMI.frmChild
try
{
InitControlEvent();
this.SetFormControlText(GlobalHelper.LanguageCode);
this.SetFormControlText();
if (GlobalHelper.LanguageCode == "English")
{
kcmb_plcItemType.Items.Clear();
@@ -86,7 +86,7 @@ namespace CleanMachineHMI.frmChild
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑PLC变量数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
KryptonMessageBox.Show(this.GetInfoText("编辑PLC变量数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
}
}
/// <summary>
@@ -106,25 +106,25 @@ namespace CleanMachineHMI.frmChild
if (string.IsNullOrEmpty(ktb_plcItemCode.Text))
{
//KryptonMessageBox.Show("请输入PLC编码");
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入PLC变量编码!", "EnterPlcItemCodeInfo"));
KryptonMessageBox.Show(this.GetInfoText("请输入PLC变量编码!", "EnterPlcItemCodeInfo"));
return;
}
if (string.IsNullOrEmpty(ktb_plcItemName.Text))
{
//KryptonMessageBox.Show("请输入PLC名称");
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入PLC变量名称!", "EnterPlcItemNameInfo"));
KryptonMessageBox.Show(this.GetInfoText("请输入PLC变量名称!", "EnterPlcItemNameInfo"));
return;
}
if (string.IsNullOrEmpty(kcmb_plcItemType.Text))
{
//KryptonMessageBox.Show("请选择PLC类型");
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择PLC变量类型!", "SelectPlcItemTypeInfo"));
KryptonMessageBox.Show(this.GetInfoText("请选择PLC变量类型!", "SelectPlcItemTypeInfo"));
return;
}
if (string.IsNullOrEmpty(kcmb_plcItemDataType.Text))
{
//KryptonMessageBox.Show("请选择PLC数据类型");
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择PLC变量数据类型!", "SelectPlcItemDataTypeInfo"));
KryptonMessageBox.Show(this.GetInfoText("请选择PLC变量数据类型!", "SelectPlcItemDataTypeInfo"));
return;
}
int addPriIndex = Convert.ToInt32(knud_plcItemPriAddress.Value);
@@ -182,19 +182,19 @@ namespace CleanMachineHMI.frmChild
if (row > 0)
{
//KryptonMessageBox.Show("编辑PLC变量数据成功!");
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑PLC变量数据成功!", "EditSuccessInfo"));
KryptonMessageBox.Show(this.GetInfoText("编辑PLC变量数据成功!", "EditSuccessInfo"));
frmPlcItemConfig.RefreshFrmHost();
this.Close();
}
else
{
//KryptonMessageBox.Show("编辑PLC变量数据失败!");
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑PLC变量数据失败!", "EditFailInfo"));
KryptonMessageBox.Show(this.GetInfoText("编辑PLC变量数据失败!", "EditFailInfo"));
}
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑PLC变量数据发生异常", "EditPlcItemDataExp") + $":【{ex.Message}】!");
KryptonMessageBox.Show(this.GetInfoText("编辑PLC变量数据发生异常", "EditPlcItemDataExp") + $":【{ex.Message}】!");
}
}