增加弹框给中控时选择语言显示

master
lhiven 1 year ago
parent 2cb613f388
commit 2792f0393e

@ -774,5 +774,39 @@ namespace Rs.Framework
return SysConfigParam.GetValue<bool>(nameof(GRR));
}
}
/// <summary>
/// 中文
/// </summary>
public static bool MsgShowCn
{
get
{
return SysConfigParam.GetValue<bool>(nameof(MsgShowCn));
}
}
/// <summary>
/// 英文
///
/// </summary>
public static bool MsgShowEn
{
get
{
return SysConfigParam.GetValue<bool>(nameof(MsgShowEn));
}
}
/// <summary>
/// 韩文
/// </summary>
public static bool MsgShowKo
{
get
{
return SysConfigParam.GetValue<bool>(nameof(MsgShowKo));
}
}
}
}

@ -58,6 +58,7 @@
this.label6 = new System.Windows.Forms.Label();
this.cboxVirtualAxis = new System.Windows.Forms.CheckBox();
this.cboxCheckSafeEnable = new System.Windows.Forms.CheckBox();
this.cboxGRR = new System.Windows.Forms.CheckBox();
this.cboxEnableTestFixtureFiberCheck = new System.Windows.Forms.CheckBox();
this.cboxEnableTwoSpeed = new System.Windows.Forms.CheckBox();
this.cboxEnableScanBarCodeByDownCamera = new System.Windows.Forms.CheckBox();
@ -83,7 +84,10 @@
this.label27 = new System.Windows.Forms.Label();
this.txtControlCenterIP = new System.Windows.Forms.TextBox();
this.label26 = new System.Windows.Forms.Label();
this.cboxGRR = new System.Windows.Forms.CheckBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.cboxMsgShowCn = new System.Windows.Forms.CheckBox();
this.cboxMsgShowEn = new System.Windows.Forms.CheckBox();
this.cboxMsgShowKo = new System.Windows.Forms.CheckBox();
this.tableLayoutPanel1.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox10.SuspendLayout();
@ -95,6 +99,7 @@
((System.ComponentModel.ISupportInitialize)(this.tbarTakeTraySpeed)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbarFlyCameraSpeed)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbarWholeSpeed)).BeginInit();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
@ -324,6 +329,7 @@
//
// groupBox1
//
this.groupBox1.Controls.Add(this.groupBox2);
this.groupBox1.Controls.Add(this.txtQifuValue);
this.groupBox1.Controls.Add(this.label9);
this.groupBox1.Controls.Add(this.comboBox1);
@ -475,6 +481,16 @@
this.cboxCheckSafeEnable.Text = "安全检查";
this.cboxCheckSafeEnable.UseVisualStyleBackColor = true;
//
// cboxGRR
//
this.cboxGRR.AutoSize = true;
this.cboxGRR.Location = new System.Drawing.Point(391, 277);
this.cboxGRR.Name = "cboxGRR";
this.cboxGRR.Size = new System.Drawing.Size(42, 16);
this.cboxGRR.TabIndex = 8;
this.cboxGRR.Text = "GRR";
this.cboxGRR.UseVisualStyleBackColor = true;
//
// cboxEnableTestFixtureFiberCheck
//
this.cboxEnableTestFixtureFiberCheck.AutoSize = true;
@ -740,15 +756,48 @@
this.label26.TabIndex = 0;
this.label26.Text = "中控IP:";
//
// cboxGRR
//
this.cboxGRR.AutoSize = true;
this.cboxGRR.Location = new System.Drawing.Point(391, 277);
this.cboxGRR.Name = "cboxGRR";
this.cboxGRR.Size = new System.Drawing.Size(42, 16);
this.cboxGRR.TabIndex = 8;
this.cboxGRR.Text = "GRR";
this.cboxGRR.UseVisualStyleBackColor = true;
// groupBox2
//
this.groupBox2.Controls.Add(this.cboxMsgShowKo);
this.groupBox2.Controls.Add(this.cboxMsgShowEn);
this.groupBox2.Controls.Add(this.cboxMsgShowCn);
this.groupBox2.ForeColor = System.Drawing.Color.White;
this.groupBox2.Location = new System.Drawing.Point(507, 28);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(265, 82);
this.groupBox2.TabIndex = 52;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "弹框语言";
//
// cboxMsgShowCn
//
this.cboxMsgShowCn.AutoSize = true;
this.cboxMsgShowCn.Location = new System.Drawing.Point(28, 30);
this.cboxMsgShowCn.Name = "cboxMsgShowCn";
this.cboxMsgShowCn.Size = new System.Drawing.Size(48, 16);
this.cboxMsgShowCn.TabIndex = 8;
this.cboxMsgShowCn.Text = "中文";
this.cboxMsgShowCn.UseVisualStyleBackColor = true;
//
// cboxMsgShowEn
//
this.cboxMsgShowEn.AutoSize = true;
this.cboxMsgShowEn.Location = new System.Drawing.Point(92, 30);
this.cboxMsgShowEn.Name = "cboxMsgShowEn";
this.cboxMsgShowEn.Size = new System.Drawing.Size(48, 16);
this.cboxMsgShowEn.TabIndex = 8;
this.cboxMsgShowEn.Text = "英文";
this.cboxMsgShowEn.UseVisualStyleBackColor = true;
//
// cboxMsgShowKo
//
this.cboxMsgShowKo.AutoSize = true;
this.cboxMsgShowKo.Location = new System.Drawing.Point(146, 30);
this.cboxMsgShowKo.Name = "cboxMsgShowKo";
this.cboxMsgShowKo.Size = new System.Drawing.Size(48, 16);
this.cboxMsgShowKo.TabIndex = 8;
this.cboxMsgShowKo.Text = "韩文";
this.cboxMsgShowKo.UseVisualStyleBackColor = true;
//
// CommonConfig
//
@ -775,6 +824,8 @@
((System.ComponentModel.ISupportInitialize)(this.tbarTakeTraySpeed)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbarFlyCameraSpeed)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbarWholeSpeed)).EndInit();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false);
}
@ -837,5 +888,9 @@
private System.Windows.Forms.CheckBox cboxEnableTwoSpeed;
private System.Windows.Forms.CheckBox cboxEnableTestFixtureFiberCheck;
private System.Windows.Forms.CheckBox cboxGRR;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.CheckBox cboxMsgShowKo;
private System.Windows.Forms.CheckBox cboxMsgShowEn;
private System.Windows.Forms.CheckBox cboxMsgShowCn;
}
}

@ -68,6 +68,30 @@ namespace Rs.MotionPlat.SysConfig
}
}
foreach (var con in groupBox2.Controls)
{
if (con is TextBox)
{
TextBox txt = (TextBox)con;
txt.Text = SysConfigParam.GetValue<string>(txt.Name.Replace("txt", ""));
}
else if (con is CheckBox)
{
CheckBox cbox = (CheckBox)con;
cbox.Checked = SysConfigParam.GetValue<bool>(cbox.Name.Replace("cbox", ""));
}
}
foreach (var con in groupBox3.Controls)
{
if (con is ComboBox)
{
ComboBox cbox = (ComboBox)con;
cbox.SelectedItem = SysConfigParam.GetValue<string>(cbox.Name.Replace("cbox", ""));
}
}
txtQifuValue.Text = SysConfigParam.GetValue<string>(txtQifuValue.Name.Replace("txt", ""));
PositionHelper.BindPosition(groupBox9,"int");
PositionHelper.BindPosition(groupBox10, "int");
@ -103,6 +127,21 @@ namespace Rs.MotionPlat.SysConfig
}
}
foreach (var con in groupBox2.Controls)
{
if (con is TextBox)
{
TextBox txt = (TextBox)con;
SysConfigParam.Update(txt.Name.Replace("txt", ""), txt.Text);
}
else if (con is CheckBox)
{
CheckBox cbox = (CheckBox)con;
SysConfigParam.Update(cbox.Name.Replace("cbox", ""), cbox.Checked.ToString());
}
}
Msg.ShowInfo("Save success!");
}

Loading…
Cancel
Save