From 804341110aef1d730bae81d0fabff43ab4ff7409 Mon Sep 17 00:00:00 2001 From: lhiven Date: Thu, 6 Mar 2025 16:00:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=99=BB=E5=BD=95=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=9D=83=E9=99=90=E7=9A=84=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.DeweyTester/FormMain.cs | 58 ++++++++++++++++++++++++++++- Rs.DeweyTester/FormMain.designer.cs | 24 +++++++++--- 2 files changed, 75 insertions(+), 7 deletions(-) diff --git a/Rs.DeweyTester/FormMain.cs b/Rs.DeweyTester/FormMain.cs index 9eab04e..83459d2 100644 --- a/Rs.DeweyTester/FormMain.cs +++ b/Rs.DeweyTester/FormMain.cs @@ -48,8 +48,41 @@ namespace Rs.MotionPlat { if(!string.IsNullOrEmpty(GlobalUser.UserName)) { - if(cboxTestMode.Enabled==false) + if (tableLayoutPanel2.Enabled==false) + { + if(!GlobalUser.IsPm()) + { + tableLayoutPanel2.Enabled = true; + } + } + + if (cboxTestMode.Enabled==false) + { + cboxTestMode.Items.Clear(); + if (GlobalUser.IsOp()) + { + cboxTestMode.Items.Add("Production"); + cboxTestMode.Items.Add("REL"); + //cboxTestMode.SelectedIndex = 0; + } + else if(GlobalUser.IsAudit()) + { + cboxTestMode.Items.Add("GRR"); + cboxTestMode.Items.Add("AUDIT"); + cboxTestMode.SelectedIndex = 0; + } + else if(GlobalUser.IsSuper()||GlobalUser.IsVender()) + { + cboxTestMode.Items.Add("Production"); + cboxTestMode.Items.Add("GRR"); + cboxTestMode.Items.Add("AUDIT"); + cboxTestMode.Items.Add("REL"); + cboxTestMode.Items.Add("DOE"); + //cboxTestMode.SelectedIndex = 0; + } cboxTestMode.Enabled = true; + } + if(cboxTestMethod.Enabled==false) cboxTestMethod.Enabled = true; if(txtLotName.Enabled==false) @@ -68,8 +101,21 @@ namespace Rs.MotionPlat } else { + if (MachineManage.Instance.MachineStatus == EMachineStatus.Working) + { + Ops.Stop(); + } + if (tableLayoutPanel2.Enabled) + { + tableLayoutPanel2.Enabled = false; + } if (cboxTestMode.Enabled == true) + { + + cboxTestMode.Items.Clear(); cboxTestMode.Enabled = false; + } + if (cboxTestMethod.Enabled == true) cboxTestMethod.Enabled = false; if (txtLotName.Enabled == true) @@ -792,5 +838,15 @@ namespace Rs.MotionPlat } } } + + private void btnEndLot_Click(object sender, EventArgs e) + { + List fixtureList = TestFixtureManager.Instance.GetEnableFixtureList(); + if(fixtureList!=null && fixtureList.Count>0) + { + fixtureList[0].Send("LotEnd$"); + DevLog.EventTracker("End", 0, "", "End"); + } + } } } diff --git a/Rs.DeweyTester/FormMain.designer.cs b/Rs.DeweyTester/FormMain.designer.cs index 052a5de..d31c235 100644 --- a/Rs.DeweyTester/FormMain.designer.cs +++ b/Rs.DeweyTester/FormMain.designer.cs @@ -84,6 +84,7 @@ namespace Rs.MotionPlat this.panel7 = new System.Windows.Forms.Panel(); this.panel8 = new System.Windows.Forms.Panel(); this.groupBox39 = new System.Windows.Forms.GroupBox(); + this.btnEndLot = new System.Windows.Forms.Button(); this.btnSave = new System.Windows.Forms.Button(); this.cboxNoise = new System.Windows.Forms.CheckBox(); this.cboxMtcp = new System.Windows.Forms.CheckBox(); @@ -376,6 +377,7 @@ namespace Rs.MotionPlat this.tableLayoutPanel2.Controls.Add(this.panelEx3, 0, 2); this.tableLayoutPanel2.Controls.Add(this.panelEx4, 0, 3); this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel2.Enabled = false; this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel2.Name = "tableLayoutPanel2"; this.tableLayoutPanel2.RowCount = 4; @@ -934,6 +936,7 @@ namespace Rs.MotionPlat // // groupBox39 // + this.groupBox39.Controls.Add(this.btnEndLot); this.groupBox39.Controls.Add(this.btnSave); this.groupBox39.Controls.Add(this.cboxNoise); this.groupBox39.Controls.Add(this.cboxMtcp); @@ -956,6 +959,20 @@ namespace Rs.MotionPlat this.groupBox39.TabStop = false; this.groupBox39.Text = "Config"; // + // btnEndLot + // + this.btnEndLot.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(56)))), ((int)(((byte)(56)))), ((int)(((byte)(56))))); + this.btnEndLot.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnEndLot.FlatAppearance.BorderSize = 0; + this.btnEndLot.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnEndLot.Location = new System.Drawing.Point(407, 74); + this.btnEndLot.Name = "btnEndLot"; + this.btnEndLot.Size = new System.Drawing.Size(86, 29); + this.btnEndLot.TabIndex = 0; + this.btnEndLot.Text = "LotEnd"; + this.btnEndLot.UseVisualStyleBackColor = false; + this.btnEndLot.Click += new System.EventHandler(this.btnEndLot_Click); + // // btnSave // this.btnSave.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(56)))), ((int)(((byte)(56)))), ((int)(((byte)(56))))); @@ -1081,12 +1098,6 @@ namespace Rs.MotionPlat this.cboxTestMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cboxTestMode.Enabled = false; this.cboxTestMode.FormattingEnabled = true; - this.cboxTestMode.Items.AddRange(new object[] { - "Production", - "GRR", - "AUDIT", - "REL", - "DOE"}); this.cboxTestMode.Location = new System.Drawing.Point(83, 45); this.cboxTestMode.Name = "cboxTestMode"; this.cboxTestMode.Size = new System.Drawing.Size(173, 20); @@ -2049,5 +2060,6 @@ namespace Rs.MotionPlat private System.Windows.Forms.Label label10; private System.Windows.Forms.Label lblAvgUpg; private System.Windows.Forms.Timer timeruph; + private System.Windows.Forms.Button btnEndLot; } } \ No newline at end of file