修复因语言字典缺失导致的界面报错
This commit is contained in:
@@ -77,10 +77,11 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText();
|
||||
|
||||
var items = this.GetComBoboxItemArr(kcmb_roleGrade.Name);
|
||||
if (items != null && items.Count > 0)
|
||||
{
|
||||
kcmb_roleGrade.Items.Clear();
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_roleGrade.Name))
|
||||
foreach (string item in items)
|
||||
{
|
||||
kcmb_roleGrade.Items.Add(item);
|
||||
}
|
||||
|
||||
@@ -82,10 +82,11 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
kdtp_CreateStartTime.Checked = false;
|
||||
kdtp_CreateEndTime.Checked = false;
|
||||
|
||||
|
||||
var items = this.GetComBoboxItemArr(kcmb_gender.Name);
|
||||
if (items != null && items.Count > 0)
|
||||
{
|
||||
kcmb_gender.Items.Clear();
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_gender.Name))
|
||||
foreach (string item in items)
|
||||
{
|
||||
kcmb_gender.Items.Add(item);
|
||||
}
|
||||
|
||||
@@ -89,10 +89,11 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
kdtp_CreateStartTime.Checked = false;
|
||||
kdtp_CreateEndTime.Checked = false;
|
||||
|
||||
|
||||
var items = this.GetComBoboxItemArr(kcmb_WarningType.Name);
|
||||
if (items != null && items.Count > 0)
|
||||
{
|
||||
kcmb_WarningType.Items.Clear();
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_WarningType.Name))
|
||||
foreach (string item in items)
|
||||
{
|
||||
kcmb_WarningType.Items.Add(item);
|
||||
}
|
||||
|
||||
@@ -64,16 +64,25 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText();
|
||||
kcmb_plcAlarmStatus.Items.Clear();
|
||||
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcAlarmStatus.Name))
|
||||
var items = this.GetComBoboxItemArr(kcmb_plcAlarmStatus.Name);
|
||||
if (items != null && items.Count > 0)
|
||||
{
|
||||
kcmb_plcAlarmStatus.Items.Add(item);
|
||||
kcmb_plcAlarmStatus.Items.Clear();
|
||||
|
||||
foreach (string item in items)
|
||||
{
|
||||
kcmb_plcAlarmStatus.Items.Add(item);
|
||||
}
|
||||
}
|
||||
kcmb_plcAlarmHandleResult.Items.Clear();
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcAlarmHandleResult.Name))
|
||||
items = this.GetComBoboxItemArr(kcmb_plcAlarmHandleResult.Name);
|
||||
if (items != null && items.Count > 0)
|
||||
{
|
||||
kcmb_plcAlarmHandleResult.Items.Add(item);
|
||||
kcmb_plcAlarmHandleResult.Items.Clear();
|
||||
foreach (string item in items)
|
||||
{
|
||||
kcmb_plcAlarmHandleResult.Items.Add(item);
|
||||
}
|
||||
}
|
||||
kcmb_plcAlarmStatus.SelectedIndex = 0;
|
||||
kcmb_plcAlarmHandleResult.SelectedIndex = 0;
|
||||
|
||||
@@ -50,19 +50,25 @@ namespace CleanMachineHMI.FrmUserControl
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText();
|
||||
|
||||
var items = this.GetComBoboxItemArr(kcmb_plcItemType.Name);
|
||||
if (items != null && items.Count > 0)
|
||||
{
|
||||
kcmb_plcItemType.Items.Clear();
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemType.Name))
|
||||
foreach (string item in items)
|
||||
{
|
||||
kcmb_plcItemType.Items.Add(item);
|
||||
}
|
||||
}
|
||||
items = this.GetComBoboxItemArr(kcmb_plcItemDateType.Name);
|
||||
if (items != null && items.Count > 0)
|
||||
{
|
||||
kcmb_plcItemDateType.Items.Clear();
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemDateType.Name))
|
||||
foreach (string item in items)
|
||||
{
|
||||
kcmb_plcItemDateType.Items.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
kcmb_plcItemType.SelectedIndex = 0;
|
||||
kcmb_plcItemDateType.SelectedIndex = 0;
|
||||
RefreshFrmHost = new dlgRefreshFrmHost(RefreshPlcData);
|
||||
|
||||
@@ -48,15 +48,20 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText();
|
||||
|
||||
var items = this.GetComBoboxItemArr(kcmb_plcItemType.Name);
|
||||
if (items != null && items.Count > 0)
|
||||
{
|
||||
kcmb_plcItemType.Items.Clear();
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemType.Name))
|
||||
foreach (string item in items)
|
||||
{
|
||||
kcmb_plcItemType.Items.Add(item);
|
||||
}
|
||||
}
|
||||
items = this.GetComBoboxItemArr(kcmb_plcItemDataType.Name);
|
||||
if (items != null && items.Count > 0)
|
||||
{
|
||||
kcmb_plcItemDataType.Items.Clear();
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemDataType.Name))
|
||||
foreach (string item in items)
|
||||
{
|
||||
kcmb_plcItemDataType.Items.Add(item);
|
||||
}
|
||||
|
||||
@@ -43,10 +43,11 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText();
|
||||
|
||||
var items = this.GetComBoboxItemArr(kcmb_roleGrade.Name);
|
||||
if (items != null && items.Count > 0)
|
||||
{
|
||||
kcmb_roleGrade.Items.Clear();
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_roleGrade.Name))
|
||||
foreach (string item in items)
|
||||
{
|
||||
kcmb_roleGrade.Items.Add(item);
|
||||
}
|
||||
|
||||
@@ -50,10 +50,11 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText();
|
||||
|
||||
var items = this.GetComBoboxItemArr(cmbGender.Name);
|
||||
if (items != null && items.Count > 0)
|
||||
{
|
||||
cmbGender.Items.Clear();
|
||||
foreach (string item in this.GetComBoboxItemArr(cmbGender.Name))
|
||||
foreach (string item in items)
|
||||
{
|
||||
cmbGender.Items.Add(item);
|
||||
}
|
||||
|
||||
@@ -48,10 +48,11 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText();
|
||||
|
||||
var items = this.GetComBoboxItemArr(kcmb_WarningType.Name);
|
||||
if (items != null && items.Count > 0)
|
||||
{
|
||||
kcmb_WarningType.Items.Clear();
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_WarningType.Name))
|
||||
foreach (string item in items)
|
||||
{
|
||||
kcmb_WarningType.Items.Add(item);
|
||||
}
|
||||
|
||||
@@ -50,15 +50,20 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText();
|
||||
|
||||
var items = this.GetComBoboxItemArr(kcmb_plcItemType.Name);
|
||||
if (items != null && items.Count > 0)
|
||||
{
|
||||
kcmb_plcItemType.Items.Clear();
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemType.Name))
|
||||
foreach (string item in items)
|
||||
{
|
||||
kcmb_plcItemType.Items.Add(item);
|
||||
}
|
||||
}
|
||||
items = this.GetComBoboxItemArr(kcmb_plcItemDataType.Name);
|
||||
if (items != null && items.Count > 0)
|
||||
{
|
||||
kcmb_plcItemDataType.Items.Clear();
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemDataType.Name))
|
||||
foreach (string item in items)
|
||||
{
|
||||
kcmb_plcItemDataType.Items.Add(item);
|
||||
}
|
||||
|
||||
@@ -44,10 +44,11 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText();
|
||||
|
||||
var items = this.GetComBoboxItemArr(kcmb_roleGrade.Name);
|
||||
if (items != null && items.Count > 0)
|
||||
{
|
||||
kcmb_roleGrade.Items.Clear();
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_roleGrade.Name))
|
||||
foreach (string item in items)
|
||||
{
|
||||
kcmb_roleGrade.Items.Add(item);
|
||||
}
|
||||
|
||||
@@ -53,10 +53,11 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText();
|
||||
|
||||
var items = this.GetComBoboxItemArr(cmbGender.Name);
|
||||
if (items != null && items.Count > 0)
|
||||
{
|
||||
cmbGender.Items.Clear();
|
||||
foreach (string item in this.GetComBoboxItemArr(cmbGender.Name))
|
||||
foreach (string item in items)
|
||||
{
|
||||
cmbGender.Items.Add(item);
|
||||
}
|
||||
|
||||
@@ -51,10 +51,11 @@ namespace CleanMachineHMI.frmChild
|
||||
{
|
||||
InitControlEvent();
|
||||
this.SetFormControlText();
|
||||
|
||||
var items = this.GetComBoboxItemArr(kcmb_WarningType.Name);
|
||||
if (items != null && items.Count > 0)
|
||||
{
|
||||
kcmb_WarningType.Items.Clear();
|
||||
foreach (string item in this.GetComBoboxItemArr(kcmb_WarningType.Name))
|
||||
foreach (string item in items)
|
||||
{
|
||||
kcmb_WarningType.Items.Add(item);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user