启动 加载语言配置文件

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

@@ -46,7 +46,7 @@ namespace CleanMachineHMI.frmChild
try
{
InitControlEvent();
this.SetFormControlText(GlobalHelper.LanguageCode);
this.SetFormControlText();
string sql = $@"select CONTAMINATION_TYPE_CODE,CONTAMINATION_TYPE_NAME from BAS_CONTAMINATION_TYPE where DEL_FLAG=0";
DataTable dt = LeadDbHelperSQLite.Query(sql).Tables[0];
if (dt != null && dt.Rows.Count > 0)
@@ -80,7 +80,7 @@ namespace CleanMachineHMI.frmChild
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑污染明细数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
KryptonMessageBox.Show(this.GetInfoText("编辑污染明细数据界面加载异常", "LoadEditFrmExp") + $":【{ex.Message}】!");
}
}
@@ -91,19 +91,19 @@ namespace CleanMachineHMI.frmChild
if (cmbContaminationType.SelectedIndex == 0)
{
//KryptonMessageBox.Show("请选择污染类型!");
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择污染类型!", "SelectContaminationTypeInfo"));
KryptonMessageBox.Show(this.GetInfoText("请选择污染类型!", "SelectContaminationTypeInfo"));
return;
}
if (string.IsNullOrEmpty(txtContaminationDTLCode.Text))
{
//KryptonMessageBox.Show("请输入污染明细编码!");
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入污染明细编码!", "EnterContaminationDtlCodeInfo"));
KryptonMessageBox.Show(this.GetInfoText("请输入污染明细编码!", "EnterContaminationDtlCodeInfo"));
return;
}
if (string.IsNullOrEmpty(txtContaminationDTLName.Text))
{
//KryptonMessageBox.Show("请输入污染明细名称!");
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入污染明细名称!", "EnterContaminationDtlNameInfo"));
KryptonMessageBox.Show(this.GetInfoText("请输入污染明细名称!", "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}'";
@@ -111,19 +111,19 @@ namespace CleanMachineHMI.frmChild
if (row > 0)
{
//KryptonMessageBox.Show("修改污染明细数据成功!");
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染明细数据成功!", "EditSuccessInfo"));
KryptonMessageBox.Show(this.GetInfoText("新增污染明细数据成功!", "EditSuccessInfo"));
frmContaminationDTL.RefreshFrmHost();
this.Close();
}
else
{
//KryptonMessageBox.Show("修改污染明细数据失败!");
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增污染明细数据失败!", "EditFailInfo"));
KryptonMessageBox.Show(this.GetInfoText("新增污染明细数据失败!", "EditFailInfo"));
}
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("编辑污染明细数据发生异常", "EditContaminationDtlDataExp") + $":【{ex.Message}】!");
KryptonMessageBox.Show(this.GetInfoText("编辑污染明细数据发生异常", "EditContaminationDtlDataExp") + $":【{ex.Message}】!");
}
}