启动 加载语言配置文件
This commit is contained in:
@@ -51,7 +51,7 @@ namespace CleanMachineHMI.frmChild
|
||||
private void frmAddPlcItem_Load(object sender, EventArgs e)
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
{
|
||||
kcmb_plcItemType.Items.Clear();
|
||||
@@ -87,25 +87,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);
|
||||
@@ -206,19 +206,19 @@ namespace CleanMachineHMI.frmChild
|
||||
if (row > 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("添加PLC变量数据成功!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增PLC变量数据成功!", "AddSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增PLC变量数据成功!", "AddSuccessInfo"));
|
||||
frmPlcItemConfig.RefreshFrmHost();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("添加PLC变量数据失败!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增PLC变量数据失败!", "AddFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增PLC变量数据失败!", "AddFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增PLC变量数据发生异常", "AddPlcItemDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增PLC变量数据发生异常", "AddPlcItemDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user