启动 加载语言配置文件
This commit is contained in:
@@ -52,7 +52,7 @@ namespace CleanMachineHMI.frmChild
|
||||
private void frmAddUser_Load(object sender, EventArgs e)
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText(GlobalHelper.LanguageCode);
|
||||
this.SetFormControlText();
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
{
|
||||
cmbGender.Items.Clear();
|
||||
@@ -93,42 +93,42 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
if (string.IsNullOrEmpty(txtAccount.Text))
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入用户编码!", "EnterUserCodeInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入用户编码!", "EnterUserCodeInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtName.Text))
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入用户名称!", "EnterUserNameInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入用户名称!", "EnterUserNameInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtPS.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请输入用户密码!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请输入用户密码!", "EnterUserPasswordInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请输入用户密码!", "EnterUserPasswordInfo"));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(txtPS1.Text))
|
||||
{
|
||||
//KryptonMessageBox.Show("请确认用户密码!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请确认用户密码!", "ConfirmUserPasswordInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请确认用户密码!", "ConfirmUserPasswordInfo"));
|
||||
return;
|
||||
}
|
||||
if (cmbGender.SelectedIndex == 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("请选择性别!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择性别!", "SelectUserGenderInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择性别!", "SelectUserGenderInfo"));
|
||||
return;
|
||||
}
|
||||
if (kcmb_Role.SelectedIndex == 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("请选择所属角色!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("请选择所属角色!", "SelectUserRoleInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("请选择所属角色!", "SelectUserRoleInfo"));
|
||||
return;
|
||||
}
|
||||
if (txtPS1.Text != txtPS.Text)
|
||||
{
|
||||
//KryptonMessageBox.Show("两次输入的密码不同,请重新输入!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("两次输入的密码不同,请重新输入!", "ConfirmUserPasswordErrInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("两次输入的密码不同,请重新输入!", "ConfirmUserPasswordErrInfo"));
|
||||
return;
|
||||
}
|
||||
string sqlIsExistCode = $@"SELECT 1 FROM SYS_USER WHERE USER_CODE = '{txtAccount.Text}'";
|
||||
@@ -187,19 +187,19 @@ namespace CleanMachineHMI.frmChild
|
||||
if (row > 0)
|
||||
{
|
||||
//KryptonMessageBox.Show("新增用户数据成功!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增用户数据成功!", "AddSuccessInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增用户数据成功!", "AddSuccessInfo"));
|
||||
frmUser.RefreshFrmHost();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
//KryptonMessageBox.Show("新增用户数据失败!");
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增用户数据失败!", "AddFailInfo"));
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增用户数据失败!", "AddFailInfo"));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
KryptonMessageBox.Show(_InfoLanguageTextList.GetInfoText("新增用户数据发生异常", "AddUserDataExp") + $":【{ex.Message}】!");
|
||||
KryptonMessageBox.Show(this.GetInfoText("新增用户数据发生异常", "AddUserDataExp") + $":【{ex.Message}】!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user