From 2792f0393edde20d13395e557a62c525179f15f0 Mon Sep 17 00:00:00 2001 From: lhiven <236881222@qq.com> Date: Sat, 30 Dec 2023 11:48:00 +0900 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BC=B9=E6=A1=86=E7=BB=99?= =?UTF-8?q?=E4=B8=AD=E6=8E=A7=E6=97=B6=E9=80=89=E6=8B=A9=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.SkyLine/Commom/GlobalVar.cs | 34 +++++++++ Rs.SkyLine/SysConfig/CommonConfig.Designer.cs | 75 ++++++++++++++++--- Rs.SkyLine/SysConfig/CommonConfig.cs | 39 ++++++++++ 3 files changed, 138 insertions(+), 10 deletions(-) diff --git a/Rs.SkyLine/Commom/GlobalVar.cs b/Rs.SkyLine/Commom/GlobalVar.cs index 57c478b..3572891 100644 --- a/Rs.SkyLine/Commom/GlobalVar.cs +++ b/Rs.SkyLine/Commom/GlobalVar.cs @@ -774,5 +774,39 @@ namespace Rs.Framework return SysConfigParam.GetValue(nameof(GRR)); } } + + /// + /// 中文 + /// + public static bool MsgShowCn + { + get + { + return SysConfigParam.GetValue(nameof(MsgShowCn)); + } + } + + /// + /// 英文 + /// + /// + public static bool MsgShowEn + { + get + { + return SysConfigParam.GetValue(nameof(MsgShowEn)); + } + } + + /// + /// 韩文 + /// + public static bool MsgShowKo + { + get + { + return SysConfigParam.GetValue(nameof(MsgShowKo)); + } + } } } diff --git a/Rs.SkyLine/SysConfig/CommonConfig.Designer.cs b/Rs.SkyLine/SysConfig/CommonConfig.Designer.cs index 48eb6ea..fecb5c8 100644 --- a/Rs.SkyLine/SysConfig/CommonConfig.Designer.cs +++ b/Rs.SkyLine/SysConfig/CommonConfig.Designer.cs @@ -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; } } \ No newline at end of file diff --git a/Rs.SkyLine/SysConfig/CommonConfig.cs b/Rs.SkyLine/SysConfig/CommonConfig.cs index b9776e9..358285e 100644 --- a/Rs.SkyLine/SysConfig/CommonConfig.cs +++ b/Rs.SkyLine/SysConfig/CommonConfig.cs @@ -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(txt.Name.Replace("txt", "")); + } + else if (con is CheckBox) + { + CheckBox cbox = (CheckBox)con; + + cbox.Checked = SysConfigParam.GetValue(cbox.Name.Replace("cbox", "")); + } + } + + foreach (var con in groupBox3.Controls) + { + if (con is ComboBox) + { + ComboBox cbox = (ComboBox)con; + cbox.SelectedItem = SysConfigParam.GetValue(cbox.Name.Replace("cbox", "")); + } + } + txtQifuValue.Text = SysConfigParam.GetValue(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!"); }