去除每个页面的 语言datatable

This commit is contained in:
Kangkang
2022-03-18 21:25:34 +08:00
parent 2b39fb593c
commit 0fc04d5b52
44 changed files with 112 additions and 321 deletions

View File

@@ -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;