去除每个页面的 语言datatable
This commit is contained in:
@@ -20,9 +20,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmAddCleanCode()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
private void frmAddCleanCode_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -21,7 +21,6 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmAddContaminationDtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
|
||||
@@ -21,9 +21,8 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmAddContaminationType()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
KeyboardAutoPopUp.ShowInputPanel();
|
||||
|
||||
@@ -19,11 +19,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmAddPlcItem()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
@@ -51,18 +47,18 @@ namespace CleanMachineHMI.frmChild
|
||||
private void frmAddPlcItem_Load(object sender, EventArgs e)
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText();
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
this.SetFormControlText();
|
||||
|
||||
{
|
||||
kcmb_plcItemType.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_plcItemType.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemType.Name, "KryptonComboBox"))
|
||||
{
|
||||
kcmb_plcItemType.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_plcItemType.Items.Add(item);
|
||||
}
|
||||
kcmb_plcItemDataType.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_plcItemDataType.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemDataType.Name, "KryptonComboBox"))
|
||||
{
|
||||
kcmb_plcItemDataType.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_plcItemDataType.Items.Add(item);
|
||||
}
|
||||
}
|
||||
kcmb_plcItemType.SelectedIndex = 0;
|
||||
|
||||
@@ -20,11 +20,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmAddRole()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
@@ -47,12 +43,12 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText();
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
|
||||
{
|
||||
kcmb_roleGrade.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_roleGrade.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_roleGrade.Name, "KryptonComboBox"))
|
||||
{
|
||||
kcmb_roleGrade.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_roleGrade.Items.Add(item);
|
||||
}
|
||||
}
|
||||
kcmb_roleGrade.SelectedIndex = 0;
|
||||
|
||||
@@ -20,9 +20,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmAddSheetType()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
private void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -21,11 +21,8 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmAddUser()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
KeyboardAutoPopUp.ShowInputPanel();
|
||||
@@ -53,12 +50,12 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText();
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
|
||||
{
|
||||
cmbGender.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(cmbGender.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(cmbGender.Name, "KryptonComboBox"))
|
||||
{
|
||||
cmbGender.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
cmbGender.Items.Add(item);
|
||||
}
|
||||
}
|
||||
string sql = $"SELECT ROLE_ID,ROLE_CODE,ROLE_NAME FROM SYS_ROLE ";
|
||||
|
||||
@@ -20,11 +20,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmAddWaringMsg()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
KeyboardAutoPopUp.ShowInputPanel();
|
||||
@@ -52,12 +48,12 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText();
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
|
||||
{
|
||||
kcmb_WarningType.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_WarningType.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_WarningType.Name, "KryptonComboBox"))
|
||||
{
|
||||
kcmb_WarningType.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_WarningType.Items.Add(item);
|
||||
}
|
||||
}
|
||||
kcmb_WarningType.SelectedIndex = 0;
|
||||
|
||||
@@ -20,9 +20,8 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmEditCleanCode()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
public string CleanModeId { get; set; }
|
||||
private void frmAddCleanCode_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -21,9 +21,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmEditContaminationDtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
public string ContaminationDtlId { get; set; }
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -21,9 +21,8 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmEditContaminationType()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
KeyboardAutoPopUp.ShowInputPanel();
|
||||
|
||||
@@ -20,9 +20,8 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmEditParamater()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
public string ParamaterId { get; set; }
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -19,11 +19,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmEditPlcItem()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
public string PlcItemId { get; set; }
|
||||
int modbusMinIndex = 0;
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
@@ -54,17 +50,17 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText();
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
|
||||
{
|
||||
kcmb_plcItemType.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_plcItemType.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemType.Name, "KryptonComboBox"))
|
||||
{
|
||||
kcmb_plcItemType.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_plcItemType.Items.Add(item);
|
||||
}
|
||||
kcmb_plcItemDataType.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_plcItemDataType.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemDataType.Name, "KryptonComboBox"))
|
||||
{
|
||||
kcmb_plcItemDataType.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_plcItemDataType.Items.Add(item);
|
||||
}
|
||||
}
|
||||
kcmb_plcItemType.SelectedIndex = 0;
|
||||
|
||||
@@ -20,11 +20,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmEditRole()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
public string RoleId { get; set; }
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
@@ -48,12 +44,12 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText();
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
|
||||
{
|
||||
kcmb_roleGrade.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_roleGrade.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_roleGrade.Name, "KryptonComboBox"))
|
||||
{
|
||||
kcmb_roleGrade.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_roleGrade.Items.Add(item);
|
||||
}
|
||||
}
|
||||
kcmb_roleGrade.SelectedIndex = 0;
|
||||
|
||||
@@ -20,9 +20,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmEditSheetType()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
public string SheetTypeId { get; set; }
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -21,11 +21,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmEditUser()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
public string UserId { get; set; }
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
@@ -57,12 +53,12 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText();
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
|
||||
{
|
||||
cmbGender.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(cmbGender.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(cmbGender.Name, "KryptonComboBox"))
|
||||
{
|
||||
cmbGender.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
cmbGender.Items.Add(item);
|
||||
}
|
||||
}
|
||||
string sql1 = $"SELECT ROLE_ID,ROLE_CODE,ROLE_NAME FROM SYS_ROLE ";
|
||||
|
||||
@@ -20,11 +20,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmEditWaringMsg()
|
||||
{
|
||||
InitializeComponent();
|
||||
_ComboBoxLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode, "KryptonComboBox");
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _ComboBoxLanguageTextList;
|
||||
private DataTable _InfoLanguageTextList;
|
||||
public string WarningId { get; set; }
|
||||
private void txt_GotFocus(object sender, EventArgs e)
|
||||
{
|
||||
@@ -55,12 +51,12 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText();
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
|
||||
{
|
||||
kcmb_WarningType.Items.Clear();
|
||||
foreach (DataRow item in _ComboBoxLanguageTextList.GetComBoboxItemArr(kcmb_WarningType.Name, "KryptonComboBox"))
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_WarningType.Name, "KryptonComboBox"))
|
||||
{
|
||||
kcmb_WarningType.Items.Add(item["CONTROL_NAME"].ToString());
|
||||
kcmb_WarningType.Items.Add(item);
|
||||
}
|
||||
}
|
||||
kcmb_WarningType.SelectedIndex = 0;
|
||||
|
||||
@@ -20,9 +20,8 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmEditWorkingPalletData()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
public string PalletCode { get; set; }
|
||||
private void frmEditWorkingPalletData_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -18,9 +18,8 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmSetRoleMenuPermission()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
public string RoleId { get; set; }
|
||||
DataTable allMenuData = new DataTable();
|
||||
private void frmSetRoleMenuPermission_Load(object sender, EventArgs e)
|
||||
|
||||
@@ -18,9 +18,7 @@ namespace CleanMachineHMI.frmChild
|
||||
public frmSwitchRunDirection()
|
||||
{
|
||||
InitializeComponent();
|
||||
_InfoLanguageTextList = this.GetInfoLanguageText(GlobalHelper.LanguageCode);
|
||||
}
|
||||
private DataTable _InfoLanguageTextList;
|
||||
|
||||
private void frmSwitchRunDirection_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -28,7 +26,7 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
this.SetFormControlText();
|
||||
int directNum = Convert.ToInt32(PlcOperationHelper.Instance.ReadPlcItem("DischargeDirectionSelection", PlcItemTypeDesc.D));
|
||||
if (GlobalHelper.LanguageCode == "English")
|
||||
if (GlobalHelper.LanguageCode != "zh-CN")
|
||||
{
|
||||
if (directNum == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user