标签页 标题汉化
This commit is contained in:
@@ -80,7 +80,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
|
|
||||||
{
|
{
|
||||||
kcmb_roleGrade.Items.Clear();
|
kcmb_roleGrade.Items.Clear();
|
||||||
foreach (string item in this.GetComBoboxItemArr(kcmb_roleGrade.Name, "KryptonComboBox"))
|
foreach (string item in this.GetComBoboxItemArr(kcmb_roleGrade.Name))
|
||||||
{
|
{
|
||||||
kcmb_roleGrade.Items.Add(item);
|
kcmb_roleGrade.Items.Add(item);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
|
|
||||||
{
|
{
|
||||||
kcmb_gender.Items.Clear();
|
kcmb_gender.Items.Clear();
|
||||||
foreach (string item in this.GetComBoboxItemArr(kcmb_gender.Name, "KryptonComboBox"))
|
foreach (string item in this.GetComBoboxItemArr(kcmb_gender.Name))
|
||||||
{
|
{
|
||||||
kcmb_gender.Items.Add(item);
|
kcmb_gender.Items.Add(item);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
|
|
||||||
{
|
{
|
||||||
kcmb_WarningType.Items.Clear();
|
kcmb_WarningType.Items.Clear();
|
||||||
foreach (string item in this.GetComBoboxItemArr(kcmb_WarningType.Name, "KryptonComboBox"))
|
foreach (string item in this.GetComBoboxItemArr(kcmb_WarningType.Name))
|
||||||
{
|
{
|
||||||
kcmb_WarningType.Items.Add(item);
|
kcmb_WarningType.Items.Add(item);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,12 +64,12 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
this.SetFormControlText();
|
this.SetFormControlText();
|
||||||
kcmb_plcAlarmStatus.Items.Clear();
|
kcmb_plcAlarmStatus.Items.Clear();
|
||||||
|
|
||||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcAlarmStatus.Name, "KryptonComboBox"))
|
foreach (string item in this.GetComBoboxItemArr(kcmb_plcAlarmStatus.Name))
|
||||||
{
|
{
|
||||||
kcmb_plcAlarmStatus.Items.Add(item);
|
kcmb_plcAlarmStatus.Items.Add(item);
|
||||||
}
|
}
|
||||||
kcmb_plcAlarmHandleResult.Items.Clear();
|
kcmb_plcAlarmHandleResult.Items.Clear();
|
||||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcAlarmHandleResult.Name, "KryptonComboBox"))
|
foreach (string item in this.GetComBoboxItemArr(kcmb_plcAlarmHandleResult.Name))
|
||||||
{
|
{
|
||||||
kcmb_plcAlarmHandleResult.Items.Add(item);
|
kcmb_plcAlarmHandleResult.Items.Add(item);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,12 +51,12 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
|
|
||||||
{
|
{
|
||||||
kcmb_plcItemType.Items.Clear();
|
kcmb_plcItemType.Items.Clear();
|
||||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemType.Name, "KryptonComboBox"))
|
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemType.Name))
|
||||||
{
|
{
|
||||||
kcmb_plcItemType.Items.Add(item);
|
kcmb_plcItemType.Items.Add(item);
|
||||||
}
|
}
|
||||||
kcmb_plcItemDateType.Items.Clear();
|
kcmb_plcItemDateType.Items.Clear();
|
||||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemDateType.Name, "KryptonComboBox"))
|
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemDateType.Name))
|
||||||
{
|
{
|
||||||
kcmb_plcItemDateType.Items.Add(item);
|
kcmb_plcItemDateType.Items.Add(item);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1828,5 +1828,45 @@
|
|||||||
"formCode": "frmPrinterMain",
|
"formCode": "frmPrinterMain",
|
||||||
"controlCode": "SelectWantToPrintRow",
|
"controlCode": "SelectWantToPrintRow",
|
||||||
"controlName": "请勾选要打印的托盘数据行!"
|
"controlName": "请勾选要打印的托盘数据行!"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"formCode": "frmMainNew",
|
||||||
|
"controlCode": "MechineCheck",
|
||||||
|
"controlName": "机器检测"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"formCode": "frmMainNew",
|
||||||
|
"controlCode": "MainDetail",
|
||||||
|
"controlName": "主界面"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"formCode": "frmMainNew",
|
||||||
|
"controlCode": "Base",
|
||||||
|
"controlName": "基础配置"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"formCode": "frmMainNew",
|
||||||
|
"controlCode": "Parameter",
|
||||||
|
"controlName": "参数配置"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"formCode": "frmMainNew",
|
||||||
|
"controlCode": "PlcItemConfig",
|
||||||
|
"controlName": "PLC变量配置"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"formCode": "frmMainNew",
|
||||||
|
"controlCode": "IoMonitor",
|
||||||
|
"controlName": "I/O点位"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"formCode": "frmMainNew",
|
||||||
|
"controlCode": "PlcAlarmLog",
|
||||||
|
"controlName": "报警情况"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"formCode": "frmMainNew",
|
||||||
|
"controlCode": "WorkingDataRecord",
|
||||||
|
"controlName": "作业数据记录"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -178,6 +178,26 @@ namespace CleanMachineHMI.Utils
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void SetSingleControlText(this Control form, Control control)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var key = form.Name + "|" + control.Name;
|
||||||
|
if (!GlobalHelper.ThemeLanguage.ContainsKey(key))
|
||||||
|
{
|
||||||
|
control.Text = control.Name;
|
||||||
|
}
|
||||||
|
AddzhCN(key, control.Text, "");
|
||||||
|
|
||||||
|
control.Text = GlobalHelper.ThemeLanguage[key];
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLog(ex.Message, LogTypeEum.Err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设定数据视图列文本
|
/// 设定数据视图列文本
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -234,7 +254,7 @@ namespace CleanMachineHMI.Utils
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<string> GetComBoboxItemArr(this Control form, string controlCode, string controlType)
|
public static List<string> GetComBoboxItemArr(this Control form, string controlCode)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -51,12 +51,12 @@ namespace CleanMachineHMI.frmChild
|
|||||||
|
|
||||||
{
|
{
|
||||||
kcmb_plcItemType.Items.Clear();
|
kcmb_plcItemType.Items.Clear();
|
||||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemType.Name, "KryptonComboBox"))
|
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemType.Name))
|
||||||
{
|
{
|
||||||
kcmb_plcItemType.Items.Add(item);
|
kcmb_plcItemType.Items.Add(item);
|
||||||
}
|
}
|
||||||
kcmb_plcItemDataType.Items.Clear();
|
kcmb_plcItemDataType.Items.Clear();
|
||||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemDataType.Name, "KryptonComboBox"))
|
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemDataType.Name))
|
||||||
{
|
{
|
||||||
kcmb_plcItemDataType.Items.Add(item);
|
kcmb_plcItemDataType.Items.Add(item);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
|
|
||||||
{
|
{
|
||||||
kcmb_roleGrade.Items.Clear();
|
kcmb_roleGrade.Items.Clear();
|
||||||
foreach (string item in this.GetComBoboxItemArr(kcmb_roleGrade.Name, "KryptonComboBox"))
|
foreach (string item in this.GetComBoboxItemArr(kcmb_roleGrade.Name))
|
||||||
{
|
{
|
||||||
kcmb_roleGrade.Items.Add(item);
|
kcmb_roleGrade.Items.Add(item);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
|
|
||||||
{
|
{
|
||||||
cmbGender.Items.Clear();
|
cmbGender.Items.Clear();
|
||||||
foreach (string item in this.GetComBoboxItemArr(cmbGender.Name, "KryptonComboBox"))
|
foreach (string item in this.GetComBoboxItemArr(cmbGender.Name))
|
||||||
{
|
{
|
||||||
cmbGender.Items.Add(item);
|
cmbGender.Items.Add(item);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
|
|
||||||
{
|
{
|
||||||
kcmb_WarningType.Items.Clear();
|
kcmb_WarningType.Items.Clear();
|
||||||
foreach (string item in this.GetComBoboxItemArr(kcmb_WarningType.Name, "KryptonComboBox"))
|
foreach (string item in this.GetComBoboxItemArr(kcmb_WarningType.Name))
|
||||||
{
|
{
|
||||||
kcmb_WarningType.Items.Add(item);
|
kcmb_WarningType.Items.Add(item);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,12 +53,12 @@ namespace CleanMachineHMI.frmChild
|
|||||||
|
|
||||||
{
|
{
|
||||||
kcmb_plcItemType.Items.Clear();
|
kcmb_plcItemType.Items.Clear();
|
||||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemType.Name, "KryptonComboBox"))
|
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemType.Name))
|
||||||
{
|
{
|
||||||
kcmb_plcItemType.Items.Add(item);
|
kcmb_plcItemType.Items.Add(item);
|
||||||
}
|
}
|
||||||
kcmb_plcItemDataType.Items.Clear();
|
kcmb_plcItemDataType.Items.Clear();
|
||||||
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemDataType.Name, "KryptonComboBox"))
|
foreach (string item in this.GetComBoboxItemArr(kcmb_plcItemDataType.Name))
|
||||||
{
|
{
|
||||||
kcmb_plcItemDataType.Items.Add(item);
|
kcmb_plcItemDataType.Items.Add(item);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
|
|
||||||
{
|
{
|
||||||
kcmb_roleGrade.Items.Clear();
|
kcmb_roleGrade.Items.Clear();
|
||||||
foreach (string item in this.GetComBoboxItemArr(kcmb_roleGrade.Name, "KryptonComboBox"))
|
foreach (string item in this.GetComBoboxItemArr(kcmb_roleGrade.Name))
|
||||||
{
|
{
|
||||||
kcmb_roleGrade.Items.Add(item);
|
kcmb_roleGrade.Items.Add(item);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
|
|
||||||
{
|
{
|
||||||
cmbGender.Items.Clear();
|
cmbGender.Items.Clear();
|
||||||
foreach (string item in this.GetComBoboxItemArr(cmbGender.Name, "KryptonComboBox"))
|
foreach (string item in this.GetComBoboxItemArr(cmbGender.Name))
|
||||||
{
|
{
|
||||||
cmbGender.Items.Add(item);
|
cmbGender.Items.Add(item);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ namespace CleanMachineHMI.frmChild
|
|||||||
|
|
||||||
{
|
{
|
||||||
kcmb_WarningType.Items.Clear();
|
kcmb_WarningType.Items.Clear();
|
||||||
foreach (string item in this.GetComBoboxItemArr(kcmb_WarningType.Name, "KryptonComboBox"))
|
foreach (string item in this.GetComBoboxItemArr(kcmb_WarningType.Name))
|
||||||
{
|
{
|
||||||
kcmb_WarningType.Items.Add(item);
|
kcmb_WarningType.Items.Add(item);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,8 +61,9 @@ namespace CleanMachineHMI
|
|||||||
if (isDefaultPage)
|
if (isDefaultPage)
|
||||||
{
|
{
|
||||||
kryptonNavigator1.Pages[0].Controls.Clear();
|
kryptonNavigator1.Pages[0].Controls.Clear();
|
||||||
kryptonNavigator1.Pages[0].Text = enumFormType.ToString();
|
//kryptonNavigator1.Pages[0].Text = enumFormType.ToString();
|
||||||
kryptonNavigator1.Pages[0].Name = enumFormType.ToString();
|
kryptonNavigator1.Pages[0].Name = enumFormType.ToString();
|
||||||
|
this.SetSingleControlText(kryptonNavigator1.Pages[0]);
|
||||||
kryptonNavigator1.SelectedPage = kryptonNavigator1.Pages[0];
|
kryptonNavigator1.SelectedPage = kryptonNavigator1.Pages[0];
|
||||||
if (frmType.BaseType.Name == "UserControl")
|
if (frmType.BaseType.Name == "UserControl")
|
||||||
{
|
{
|
||||||
@@ -92,6 +93,7 @@ namespace CleanMachineHMI
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonPage tmpPage1 = new KryptonPage { Text = enumFormType.ToString(), Name = enumFormType.ToString() };
|
KryptonPage tmpPage1 = new KryptonPage { Text = enumFormType.ToString(), Name = enumFormType.ToString() };
|
||||||
|
this.SetSingleControlText(tmpPage1);
|
||||||
ButtonSpecAny bsa = new ButtonSpecAny();
|
ButtonSpecAny bsa = new ButtonSpecAny();
|
||||||
bsa.Style = PaletteButtonStyle.FormClose;
|
bsa.Style = PaletteButtonStyle.FormClose;
|
||||||
bsa.Type = PaletteButtonSpecStyle.FormClose;
|
bsa.Type = PaletteButtonSpecStyle.FormClose;
|
||||||
|
|||||||
Reference in New Issue
Block a user