From 2c4041b52e3ca698e756ab3156ff0f874cbd84ca Mon Sep 17 00:00:00 2001 From: lhiven Date: Tue, 21 May 2024 21:07:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=92=8C=E6=B5=8B=E8=AF=95=E8=BD=AF=E4=BB=B6?= =?UTF-8?q?=E9=80=9A=E4=BF=A1=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.DeweyTester/Commom/GlobalVar.cs | 13 ++ Rs.DeweyTester/Commom/Msgbox.cs | 46 +++-- Rs.DeweyTester/Entitys/TestFixtureManager.cs | 162 +++++++++++++++--- Rs.DeweyTester/Flow/HomeFlow.cs | 17 ++ Rs.DeweyTester/FormMain.cs | 2 +- Rs.DeweyTester/FormMain.designer.cs | 40 +++-- Rs.DeweyTester/FormMain.resx | 6 - Rs.DeweyTester/FrmDialog.Designer.cs | 3 +- .../SysConfig/CommonConfig.Designer.cs | 10 ++ Rs.DeweyTester/SysConfig/CommonConfig.resx | 60 +++++-- Rs.DeweyTester/TestFrm.cs | 2 +- Rs.DeweyTester/UserForm.cs | 8 +- 12 files changed, 288 insertions(+), 81 deletions(-) diff --git a/Rs.DeweyTester/Commom/GlobalVar.cs b/Rs.DeweyTester/Commom/GlobalVar.cs index d6abd77..02b9236 100644 --- a/Rs.DeweyTester/Commom/GlobalVar.cs +++ b/Rs.DeweyTester/Commom/GlobalVar.cs @@ -17,6 +17,19 @@ namespace Rs.Framework { #region newpro + /// + /// 检测视觉软件是否打开 + /// + [ParameterInit("bool", "true", "system", "测试模式(A,AAB,ABC)")] + public static bool CheckVisionSwOpened + { + get + { + return SysConfigParam.GetValue(nameof(CheckVisionSwOpened)); + } + } + + /// /// 测试模式(A,AAB,ABC) /// diff --git a/Rs.DeweyTester/Commom/Msgbox.cs b/Rs.DeweyTester/Commom/Msgbox.cs index fe7ecbb..fbcc2be 100644 --- a/Rs.DeweyTester/Commom/Msgbox.cs +++ b/Rs.DeweyTester/Commom/Msgbox.cs @@ -11,20 +11,23 @@ namespace Rs.MotionPlat.Commom public static class Msgbox { static Dictionary boxList = new Dictionary(); - public static EButtonType ShowDialog(int msgID,EButtonType buttons,string content,string title="") + /// + /// 显示模态弹框 + /// + public static EButtonType ShowDialog(EButtonType buttons,string content,string title="") { EButtonType ret = EButtonType.None; - if (!boxList.ContainsKey(msgID)) - { - FrmDialog fd = new FrmDialog(); - boxList.Add(msgID, fd); - ret = fd.ShowMessage(buttons, content, title); - boxList.Remove(msgID); - - } + FrmDialog fd = new FrmDialog(); + ret = fd.ShowMessage(buttons, content, "",title); return ret; } + /// + /// 显示模态弹框 + /// + /// + /// + /// public static EButtonType ShowDialog(AlarmEntity alarmInfo, EButtonType buttons) { EButtonType ret = EButtonType.None; @@ -34,23 +37,40 @@ namespace Rs.MotionPlat.Commom boxList.Add(alarmInfo.AlarmID, fd); ret = fd.ShowMessage(buttons, alarmInfo.CN,alarmInfo.EN); boxList.Remove(alarmInfo.AlarmID); - } return ret; } + /// + /// 显示非模态弹框 + /// + /// + /// + public static void Show(string content ,EButtonType buttons) + { + FrmDialog fd = new FrmDialog(); + fd.ShowMessage(buttons, content,"","",false); + } + + /// + /// 显示非模态对话框 + /// + /// + /// public static void Show(AlarmEntity alarmInfo, EButtonType buttons) { if (!boxList.ContainsKey(alarmInfo.AlarmID)) { FrmDialog fd = new FrmDialog(); boxList.Add(alarmInfo.AlarmID, fd); - fd.ShowMessage(buttons, alarmInfo.CN, alarmInfo.EN,"",false); - - + fd.ShowMessage(buttons, alarmInfo.CN, alarmInfo.EN, "", false); } } + /// + /// 关闭弹框 + /// + /// public static void CloseBox(int msgID) { if(boxList.ContainsKey(msgID)) diff --git a/Rs.DeweyTester/Entitys/TestFixtureManager.cs b/Rs.DeweyTester/Entitys/TestFixtureManager.cs index 6644f9a..61222c5 100644 --- a/Rs.DeweyTester/Entitys/TestFixtureManager.cs +++ b/Rs.DeweyTester/Entitys/TestFixtureManager.cs @@ -1,6 +1,7 @@ using NPOI.SS.Format; using NPOI.SS.Formula.Functions; using Rs.Framework; +using Rs.MotionPlat.Commom; using Rs.MotionPlat.Flow.NormalFlow; using System; using System.Collections.Concurrent; @@ -283,6 +284,11 @@ namespace Rs.MotionPlat.Entitys } } + public void SetEvent() + { + dataEvent.Set(); + } + public void QueryStatus() { Task.Run(() => { @@ -315,6 +321,55 @@ namespace Rs.MotionPlat.Entitys }); } + /// + /// 通知治具回原 + /// + public void Home() + { + while (true) + { + if (dataEvent.WaitOne(10)) + { + break; + } + else + { + Thread.Sleep(10); + } + } + Send($"Home$"); + if (CheckPrintLog()) + { + logs.Enqueue($"<<< TC{Index} Home$"); + } + } + + /// + /// 通知治具暂停 + /// + public void Pause() + { + while (true) + { + if (dataEvent.WaitOne(10)) + { + break; + } + else + { + Thread.Sleep(10); + } + } + Send($"Pause#1$"); + if (CheckPrintLog()) + { + logs.Enqueue($"<<< TC{Index} Pause#1$"); + } + } + + /// + /// 通知治具启动测试 + /// public void StartTest() { while (true) @@ -332,12 +387,7 @@ namespace Rs.MotionPlat.Entitys Send($"StartTest#{Product.SN}$"); if(CheckPrintLog()) { - //lock(this) - //{ - // File.AppendAllText($"d:\\1\\{Index}.txt", $"<<< 治具{Index} starttest\r\n"); - //} - - logs.Enqueue($"<<< 治具{Index} starttest"); + logs.Enqueue($"<<< TC{Index} starttest"); } } private ConcurrentQueue logs = new ConcurrentQueue(); @@ -369,13 +419,15 @@ namespace Rs.MotionPlat.Entitys } else { - MessageQueue.Instance.Warn("disconned!"); + MessageQueue.Instance.Warn($"TC{Index} disconned!"); + Status = ETestFixtureStatus.NoConnect; Connected = false; } } catch (SocketException ex) { - MessageQueue.Instance.Warn("disconned!"); + Status = ETestFixtureStatus.NoConnect; + MessageQueue.Instance.Warn($"TC{Index} disconned!"); Connected = false; } @@ -390,7 +442,7 @@ namespace Rs.MotionPlat.Entitys string content = Encoding.ASCII.GetString(data.ToArray()); if (CheckPrintLog()) { - logs.Enqueue($">>> 治具{Index},{content}"); + logs.Enqueue($">>> TC{Index},{content}"); } string[] items = content.Split('#'); string command = items[0]; @@ -410,7 +462,7 @@ namespace Rs.MotionPlat.Entitys // File.AppendAllText($"d:\\1\\{Index}.txt", $"<<< 治具{Index} ErrorCode$\r\n"); //} - logs.Enqueue($"<<< 治具{Index} ErrorCode$"); + logs.Enqueue($"<<< TC{Index} ErrorCode$"); } break; case "1": @@ -425,7 +477,7 @@ namespace Rs.MotionPlat.Entitys // File.AppendAllText($"d:\\1\\{Index}.txt", $"<<< 治具{Index} Result$\r\n"); //} - logs.Enqueue($"<<< 治具{Index} Result$"); + logs.Enqueue($"<<< TC{Index} Result$"); } } else @@ -476,6 +528,19 @@ namespace Rs.MotionPlat.Entitys //{ // LogHelper.Info($">>> 治具{Index} ErrorCode"); //} + string code = items[1]; + if(code!="0") + { + if(Status != ETestFixtureStatus.Warning) + { + MessageQueue.Instance.Warn($"code:{items[1]},desc:{items[2]}"); + Status = ETestFixtureStatus.Warning; + } + } + else + { + Status = ETestFixtureStatus.Testing; + } dataEvent.Set(); break; case "Grip": @@ -504,6 +569,10 @@ namespace Rs.MotionPlat.Entitys } } + public void AddLog(string log) + { + logs.Enqueue(log); + } private void PrintCommunitionLog() { Task.Run(() => { @@ -604,46 +673,87 @@ namespace Rs.MotionPlat.Entitys { Socket clientSocket = serverSocket.Accept(); clientSockets.Add(clientSocket); - MessageQueue.Instance.Insert($"ip:{((IPEndPoint)clientSocket.RemoteEndPoint).Address.ToString()},port:{((IPEndPoint)clientSocket.RemoteEndPoint).Port.ToString()}"); + IPEndPoint endPoint = ((IPEndPoint)clientSocket.RemoteEndPoint); + MessageQueue.Instance.Insert($"ip:{endPoint.Address.ToString()},port:{endPoint.Port.ToString()} connected!"); ThreadPool.QueueUserWorkItem((obj) => { + List registData=new List(); Socket soct=(Socket)obj; byte[] buffer = new byte[1024 * 10]; - while (true) + bool stop = false; + while (!stop) { int len = soct.Receive(buffer); if (len > 0) { - string content = Encoding.ASCII.GetString(buffer, 0, len); - if (content.IndexOf("Register") >= 0) + for(int i=0;i>> {content}\r\n"); + + string reg = "Register#1$"; + int sendLen = clientSocket.Send(Encoding.ASCII.GetBytes(reg)); + + //打印日志 + //logDir = $"d:\\Communition\\{DateTime.Now.ToString("yyyyMMdd")}"; + //if (!Directory.Exists(logDir)) + //{ + // Directory.CreateDirectory(logDir); + //} + //logFileName = $"{logDir}\\{items[2]}.txt"; + //File.AppendAllText(logFileName, $"{DateTime.Now.ToString("HH:mm:ss fff")} <<< {reg},{sendLen}\r\n"); + + TestFixture tf = GetTestFixture(int.Parse(items[2])); + tf.AddLog(" <<< " + content); + tf.AddLog(" >>> " + reg); tf.MachineID = items[1]; tf.Connected = true; tf.Status = ETestFixtureStatus.IDLE; + tf.CsvTitle = items[3]; tf.SetSocket(soct); tf.QueryStatus(); tf.StartRecive(); + tf.SetEvent(); + stop = true; break; } - catch (Exception ex) - { - LogHelper.Error(ex.Message + ex.StackTrace); - break; - } - } + //string content = Encoding.ASCII.GetString(buffer, 0, len); + //if (content.IndexOf("Register") >= 0) + //{ + // try + // { + + // break; + // } + // catch (Exception ex) + // { + // LogHelper.Error(ex.Message + ex.StackTrace); + // break; + // } + + //} } } }, clientSocket); - Task.Run(() => - { - - }); } }); } diff --git a/Rs.DeweyTester/Flow/HomeFlow.cs b/Rs.DeweyTester/Flow/HomeFlow.cs index 53d6563..0a0c072 100644 --- a/Rs.DeweyTester/Flow/HomeFlow.cs +++ b/Rs.DeweyTester/Flow/HomeFlow.cs @@ -74,6 +74,23 @@ namespace Rs.MotionPlat.Flow switch (step) { case EHomeFlowStep.回原环境检测: + if(GlobalVar.CheckVisionSwOpened) + { + while (true) + { + string vname = "KImage"; + Process[] progresses = Process.GetProcesses(); + if( progresses.Where(p => p.ProcessName == vname).Count() ==0) + { + Msgbox.ShowDialog(EButtonType.Retry,"Vision software hasn't open,please open vision software!"); + } + else + { + break; + } + } + + } MessageQueue.Instance.Insert("气缸复位"); if(false) { diff --git a/Rs.DeweyTester/FormMain.cs b/Rs.DeweyTester/FormMain.cs index a7a9554..e597534 100644 --- a/Rs.DeweyTester/FormMain.cs +++ b/Rs.DeweyTester/FormMain.cs @@ -158,7 +158,7 @@ namespace Rs.MotionPlat VisionHelper.Init(); TestFixtureManager.Instance.StartLister(); - SimulateTesterManager.Instance.Init(); + //SimulateTesterManager.Instance.Init(); uTestCell1.BindEntity(TestFixtureManager.Instance.GetTestFixture(1)); uTestCell2.BindEntity(TestFixtureManager.Instance.GetTestFixture(2)); diff --git a/Rs.DeweyTester/FormMain.designer.cs b/Rs.DeweyTester/FormMain.designer.cs index 2e1f62c..1bde2a5 100644 --- a/Rs.DeweyTester/FormMain.designer.cs +++ b/Rs.DeweyTester/FormMain.designer.cs @@ -32,8 +32,8 @@ namespace Rs.MotionPlat private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.timer1 = new System.Windows.Forms.Timer(this.components); this.panel1 = new System.Windows.Forms.Panel(); this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); @@ -294,14 +294,14 @@ namespace Rs.MotionPlat this.dgv_errinfo.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dgv_errinfo.BackgroundColor = System.Drawing.SystemColors.ActiveCaptionText; this.dgv_errinfo.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.Red; - dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dgv_errinfo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.Red; + dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgv_errinfo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; this.dgv_errinfo.ColumnHeadersHeight = 30; this.dgv_errinfo.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, @@ -379,8 +379,8 @@ namespace Rs.MotionPlat // Time // this.Time.DataPropertyName = "Time"; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.Red; - this.Time.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.Red; + this.Time.DefaultCellStyle = dataGridViewCellStyle2; this.Time.FillWeight = 25F; this.Time.HeaderText = "Time"; this.Time.MinimumWidth = 6; @@ -914,12 +914,15 @@ namespace Rs.MotionPlat // cboxMtcp // this.cboxMtcp.AutoSize = true; + this.cboxMtcp.BackColor = System.Drawing.Color.Transparent; + this.cboxMtcp.Enabled = false; + this.cboxMtcp.ForeColor = System.Drawing.Color.White; this.cboxMtcp.Location = new System.Drawing.Point(14, 10); this.cboxMtcp.Name = "cboxMtcp"; this.cboxMtcp.Size = new System.Drawing.Size(48, 16); this.cboxMtcp.TabIndex = 0; this.cboxMtcp.Text = "MTCP"; - this.cboxMtcp.UseVisualStyleBackColor = true; + this.cboxMtcp.UseVisualStyleBackColor = false; // // panel9 // @@ -933,12 +936,15 @@ namespace Rs.MotionPlat // cboxNoise // this.cboxNoise.AutoSize = true; + this.cboxNoise.BackColor = System.Drawing.Color.Transparent; + this.cboxNoise.Enabled = false; + this.cboxNoise.ForeColor = System.Drawing.Color.White; this.cboxNoise.Location = new System.Drawing.Point(35, 10); this.cboxNoise.Name = "cboxNoise"; this.cboxNoise.Size = new System.Drawing.Size(54, 16); this.cboxNoise.TabIndex = 0; this.cboxNoise.Text = "Noise"; - this.cboxNoise.UseVisualStyleBackColor = true; + this.cboxNoise.UseVisualStyleBackColor = false; // // panel10 // @@ -953,6 +959,7 @@ namespace Rs.MotionPlat // this.txtLotName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.txtLotName.Enabled = false; this.txtLotName.Location = new System.Drawing.Point(3, 9); this.txtLotName.Name = "txtLotName"; this.txtLotName.Size = new System.Drawing.Size(113, 21); @@ -972,6 +979,7 @@ namespace Rs.MotionPlat // this.txtConfig.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.txtConfig.Enabled = false; this.txtConfig.Location = new System.Drawing.Point(3, 9); this.txtConfig.Name = "txtConfig"; this.txtConfig.Size = new System.Drawing.Size(113, 21); @@ -990,6 +998,7 @@ namespace Rs.MotionPlat // this.txtSubLotName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.txtSubLotName.Enabled = false; this.txtSubLotName.Location = new System.Drawing.Point(3, 9); this.txtSubLotName.Name = "txtSubLotName"; this.txtSubLotName.Size = new System.Drawing.Size(113, 21); @@ -1008,6 +1017,7 @@ namespace Rs.MotionPlat // this.txtSiteID.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.txtSiteID.Enabled = false; this.txtSiteID.Location = new System.Drawing.Point(3, 12); this.txtSiteID.Name = "txtSiteID"; this.txtSiteID.Size = new System.Drawing.Size(113, 21); @@ -1026,6 +1036,7 @@ namespace Rs.MotionPlat // this.txtProjectID.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.txtProjectID.Enabled = false; this.txtProjectID.Location = new System.Drawing.Point(3, 10); this.txtProjectID.Name = "txtProjectID"; this.txtProjectID.Size = new System.Drawing.Size(113, 21); @@ -1045,6 +1056,7 @@ namespace Rs.MotionPlat this.cboxConfigName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.cboxConfigName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cboxConfigName.Enabled = false; this.cboxConfigName.FormattingEnabled = true; this.cboxConfigName.Items.AddRange(new object[] { "SnCoating", diff --git a/Rs.DeweyTester/FormMain.resx b/Rs.DeweyTester/FormMain.resx index aa69ac7..0f9c58e 100644 --- a/Rs.DeweyTester/FormMain.resx +++ b/Rs.DeweyTester/FormMain.resx @@ -132,12 +132,6 @@ True - - True - - - True - 107, 17 diff --git a/Rs.DeweyTester/FrmDialog.Designer.cs b/Rs.DeweyTester/FrmDialog.Designer.cs index 60f60c6..8d8c9a4 100644 --- a/Rs.DeweyTester/FrmDialog.Designer.cs +++ b/Rs.DeweyTester/FrmDialog.Designer.cs @@ -50,10 +50,11 @@ this.lblContent.ForeColor = System.Drawing.Color.White; this.lblContent.Location = new System.Drawing.Point(0, 40); this.lblContent.Name = "lblContent"; + this.lblContent.Padding = new System.Windows.Forms.Padding(5); this.lblContent.Size = new System.Drawing.Size(522, 263); this.lblContent.TabIndex = 3; this.lblContent.Text = "label1"; - this.lblContent.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lblContent.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // FrmDialog // diff --git a/Rs.DeweyTester/SysConfig/CommonConfig.Designer.cs b/Rs.DeweyTester/SysConfig/CommonConfig.Designer.cs index 815fe1b..2ee045e 100644 --- a/Rs.DeweyTester/SysConfig/CommonConfig.Designer.cs +++ b/Rs.DeweyTester/SysConfig/CommonConfig.Designer.cs @@ -97,6 +97,7 @@ this.txtControlCenterPort = new System.Windows.Forms.TextBox(); this.cboxEnableExceptionHandlingNozzle = new System.Windows.Forms.CheckBox(); this.cboxEnableScanBarCodeByDownCamera = new System.Windows.Forms.CheckBox(); + this.cboxCheckVisionSwOpened = new System.Windows.Forms.CheckBox(); this.tableLayoutPanel1.SuspendLayout(); this.groupBox8.SuspendLayout(); this.groupBox1.SuspendLayout(); @@ -231,6 +232,7 @@ this.groupBox1.Controls.Add(this.cboxEnableTC3); this.groupBox1.Controls.Add(this.cboxEnableTC2); this.groupBox1.Controls.Add(this.cboxEnableTC1); + this.groupBox1.Controls.Add(this.cboxCheckVisionSwOpened); this.groupBox1.Controls.Add(this.cboxIsSimTest); this.groupBox1.Controls.Add(this.cboxPrintTC6Communicate); this.groupBox1.Controls.Add(this.cboxPrintTC3Communicate); @@ -635,6 +637,13 @@ this.cboxEnableScanBarCodeByDownCamera.Name = "cboxEnableScanBarCodeByDownCamera"; this.cboxEnableScanBarCodeByDownCamera.UseVisualStyleBackColor = true; // + // cboxCheckVisionSwOpened + // + resources.ApplyResources(this.cboxCheckVisionSwOpened, "cboxCheckVisionSwOpened"); + this.cboxCheckVisionSwOpened.Name = "cboxCheckVisionSwOpened"; + this.cboxCheckVisionSwOpened.UseVisualStyleBackColor = true; + this.cboxCheckVisionSwOpened.CheckedChanged += new System.EventHandler(this.cbox_CheckedChanged); + // // CommonConfig // resources.ApplyResources(this, "$this"); @@ -730,5 +739,6 @@ private System.Windows.Forms.ComboBox comBoxTestMode; private System.Windows.Forms.Label label11; private System.Windows.Forms.Label label10; + private System.Windows.Forms.CheckBox cboxCheckVisionSwOpened; } } \ No newline at end of file diff --git a/Rs.DeweyTester/SysConfig/CommonConfig.resx b/Rs.DeweyTester/SysConfig/CommonConfig.resx index 87a0f5d..2b58824 100644 --- a/Rs.DeweyTester/SysConfig/CommonConfig.resx +++ b/Rs.DeweyTester/SysConfig/CommonConfig.resx @@ -1179,6 +1179,36 @@ 21 + + True + + + NoControl + + + 448, 185 + + + 144, 16 + + + 8 + + + 检测视觉软件是否打开 + + + cboxCheckVisionSwOpened + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 22 + True @@ -1186,7 +1216,7 @@ NoControl - 233, 184 + 299, 184 72, 16 @@ -1207,7 +1237,7 @@ groupBox1 - 22 + 23 True @@ -1237,7 +1267,7 @@ groupBox1 - 23 + 24 True @@ -1267,7 +1297,7 @@ groupBox1 - 24 + 25 True @@ -1297,7 +1327,7 @@ groupBox1 - 25 + 26 True @@ -1327,7 +1357,7 @@ groupBox1 - 26 + 27 True @@ -1357,7 +1387,7 @@ groupBox1 - 27 + 28 True @@ -1387,7 +1417,7 @@ groupBox1 - 28 + 29 True @@ -1417,7 +1447,7 @@ groupBox1 - 29 + 30 False @@ -1444,7 +1474,7 @@ groupBox1 - 30 + 31 True @@ -1474,7 +1504,7 @@ groupBox1 - 31 + 32 True @@ -1504,7 +1534,7 @@ groupBox1 - 32 + 33 True @@ -1534,7 +1564,7 @@ groupBox1 - 33 + 34 True @@ -1564,7 +1594,7 @@ groupBox1 - 34 + 35 Fill @@ -2065,6 +2095,6 @@ CommonConfig - Rs.MotionPlat.BaseForm, Rs.MotionPlat, Version=3.20.24.14, Culture=neutral, PublicKeyToken=null + Rs.MotionPlat.BaseForm, Rs.MotionPlat, Version=1.20.24.1, Culture=neutral, PublicKeyToken=null \ No newline at end of file diff --git a/Rs.DeweyTester/TestFrm.cs b/Rs.DeweyTester/TestFrm.cs index 5aaf2fe..1683248 100644 --- a/Rs.DeweyTester/TestFrm.cs +++ b/Rs.DeweyTester/TestFrm.cs @@ -145,7 +145,7 @@ namespace Rs.MotionPlat private void button16_Click(object sender, EventArgs e) { - Msgbox.ShowDialog(1, EButtonType.Retry, "fasd"); + Msgbox.ShowDialog(EButtonType.Retry, "fasd"); } } } diff --git a/Rs.DeweyTester/UserForm.cs b/Rs.DeweyTester/UserForm.cs index d8edca5..b38ea36 100644 --- a/Rs.DeweyTester/UserForm.cs +++ b/Rs.DeweyTester/UserForm.cs @@ -37,7 +37,7 @@ namespace Rs.MotionPlat string userpwd = txtPassword.Text.Trim(); if(username=="Op") { - if(userpwd == "123") + if(userpwd == "1") { OnloginSuccessEvent?.Invoke(username); GlobalUser.UserLevel = EUserLevel.Op; @@ -46,7 +46,7 @@ namespace Rs.MotionPlat } else { - Msg.ShowError("userpwd error,please input again"); + Msgbox.ShowDialog( EButtonType.Ok, "userpwd error,please input again"); txtPassword.Text = ""; } } @@ -61,7 +61,7 @@ namespace Rs.MotionPlat } else { - Msg.ShowError("userpwd error,please input again"); + Msgbox.ShowDialog(EButtonType.Ok, "userpwd error,please input again"); txtPassword.Text = ""; } } @@ -76,7 +76,7 @@ namespace Rs.MotionPlat } else { - Msg.ShowError("userpwd error,please input again"); + Msgbox.ShowDialog(EButtonType.Ok, "userpwd error,please input again"); txtPassword.Text = ""; } }