启动 加载语言配置文件

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

@@ -27,7 +27,7 @@ namespace CleanMachineHMI.frmChild
private void frmAddCleanCode_Load(object sender, EventArgs e)
{
InitControlEvent();
this.SetFormControlText(GlobalHelper.LanguageCode);
this.SetFormControlText();
}
private void txt_GotFocus(object sender, EventArgs e)
{
@@ -52,12 +52,12 @@ namespace CleanMachineHMI.frmChild
{
if (string.IsNullOrEmpty(txtCleanModeCode.Text))
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入清洗方式编码!", "EnterCleanCodeInfo"));
KryptonMessageBox.Show(this.GetInfoText("请输入清洗方式编码!", "EnterCleanCodeInfo"));
return;
}
if (string.IsNullOrEmpty(txtCleanModeName.Text))
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入清洗方式名称!", "EnterCleanNameInfo"));
KryptonMessageBox.Show(this.GetInfoText("请输入清洗方式名称!", "EnterCleanNameInfo"));
return;
}
string sqlIsExistCode = $@"SELECT 1 FROM BAS_CLEAN_MODE WHERE CLEAN_MODE_CODE = '{txtCleanModeCode.Text}'";
@@ -106,18 +106,18 @@ namespace CleanMachineHMI.frmChild
int row = LeadDbHelperSQLite.ExecuteSql(sql);
if (row > 0)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增清洗方式数据成功!", "AddSuccessInfo"));
KryptonMessageBox.Show(this.GetInfoText("新增清洗方式数据成功!", "AddSuccessInfo"));
frmCleanMode.RefreshFrmHost();
this.Close();
}
else
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增清洗方式数据失败!", "AddFailInfo"));
KryptonMessageBox.Show(this.GetInfoText("新增清洗方式数据失败!", "AddFailInfo"));
}
}
catch (Exception ex)
{
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增清洗方式数据发生异常", "AddCleanModeDataExp") + $":【{ex.Message}】!");
KryptonMessageBox.Show(this.GetInfoText("新增清洗方式数据发生异常", "AddCleanModeDataExp") + $":【{ex.Message}】!");
}
}