From cea003988c497cf017b5656b370bde15255a8869 Mon Sep 17 00:00:00 2001 From: lhiven Date: Sat, 3 Aug 2024 09:18:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=99=E7=9B=98=E8=BF=90?= =?UTF-8?q?=E5=8A=A8=E5=8F=AF=E4=BB=A5=E8=BF=90=E5=8A=A8=E5=88=B0=E4=B8=89?= =?UTF-8?q?=E7=82=B9=E5=AE=9A=E4=BD=8D=E7=9A=84=E7=82=B9=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StockTrayLocationRecipe.Designer.cs | 9 +++ .../Recipe/StockTrayLocationRecipe.cs | 18 +++++- .../Recipe/StockTrayLocationRecipe.resx | 63 +++++++++++++------ 3 files changed, 70 insertions(+), 20 deletions(-) diff --git a/Rs.DeweyTester/Recipe/StockTrayLocationRecipe.Designer.cs b/Rs.DeweyTester/Recipe/StockTrayLocationRecipe.Designer.cs index 9c1db72..8f6b55b 100644 --- a/Rs.DeweyTester/Recipe/StockTrayLocationRecipe.Designer.cs +++ b/Rs.DeweyTester/Recipe/StockTrayLocationRecipe.Designer.cs @@ -101,6 +101,7 @@ this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewLinkColumn2 = new System.Windows.Forms.DataGridViewLinkColumn(); + this.cboxThreePointLocation = new System.Windows.Forms.CheckBox(); this.contextMenuStrip1.SuspendLayout(); this.panelEx2.SuspendLayout(); this.panelEx5.SuspendLayout(); @@ -311,6 +312,7 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.cboxThreePointLocation); this.groupBox1.Controls.Add(this.btnThreePointLocation); this.groupBox1.Controls.Add(this.btnCreateMatrix); this.groupBox1.Controls.Add(this.btnSaveSlotOffsetDistY); @@ -697,6 +699,12 @@ this.dataGridViewLinkColumn2.UseColumnTextForLinkValue = true; this.dataGridViewLinkColumn2.VisitedLinkColor = System.Drawing.Color.White; // + // cboxThreePointLocation + // + resources.ApplyResources(this.cboxThreePointLocation, "cboxThreePointLocation"); + this.cboxThreePointLocation.Name = "cboxThreePointLocation"; + this.cboxThreePointLocation.UseVisualStyleBackColor = true; + // // StockTrayLocationRecipe // resources.ApplyResources(this, "$this"); @@ -783,5 +791,6 @@ private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6; private System.Windows.Forms.DataGridViewLinkColumn dataGridViewLinkColumn2; private System.Windows.Forms.Button btnThreePointLocation; + private System.Windows.Forms.CheckBox cboxThreePointLocation; } } \ No newline at end of file diff --git a/Rs.DeweyTester/Recipe/StockTrayLocationRecipe.cs b/Rs.DeweyTester/Recipe/StockTrayLocationRecipe.cs index 27580e7..802cde9 100644 --- a/Rs.DeweyTester/Recipe/StockTrayLocationRecipe.cs +++ b/Rs.DeweyTester/Recipe/StockTrayLocationRecipe.cs @@ -176,6 +176,9 @@ namespace Rs.MotionPlat.Recipe { if(selectedSlot!=null) { + //string key = $"{GlobalVar.CurRecipe}-{}-{}"; + Enum.TryParse(dt.Rows[0]["trayname"].ToString(), out ETrayType trayType); + SlotPoint sp = TrayRunPointManager.GetSlotPoint(trayType, selectedSlot.Index); int nozzleIndex = 0; string querySql = string.Empty; //if(m_trayName=="Input" || m_trayName=="Ng") @@ -190,8 +193,19 @@ namespace Rs.MotionPlat.Recipe DataTable dtGoPosition = db.GetDataTable(querySql); if(ObjectHelper.IsNotNullorEmpty(dtGoPosition)) { - double targetX = double.Parse(dtGoPosition.Rows[0]["X"].ToString()); - double targetY = double.Parse(dtGoPosition.Rows[0]["Y"].ToString()); + double targetX = 0.0; + double targetY = 0.0; + if (cboxThreePointLocation.Checked) + { + targetX = sp.X; + targetY = sp.Y; + } + else + { + targetX = double.Parse(dtGoPosition.Rows[0]["X"].ToString()); + targetY = double.Parse(dtGoPosition.Rows[0]["Y"].ToString()); + } + ToolStripMenuItem subMenu=sender as ToolStripMenuItem; ToolStripMenuItem parentMenu = (ToolStripMenuItem)subMenu.OwnerItem; if (parentMenu.Text.IndexOf("Nozzle") >= 0) diff --git a/Rs.DeweyTester/Recipe/StockTrayLocationRecipe.resx b/Rs.DeweyTester/Recipe/StockTrayLocationRecipe.resx index e0be33c..56d1c82 100644 --- a/Rs.DeweyTester/Recipe/StockTrayLocationRecipe.resx +++ b/Rs.DeweyTester/Recipe/StockTrayLocationRecipe.resx @@ -122,7 +122,7 @@ - 109, 22 + 180, 22 Move @@ -339,6 +339,33 @@ 0 + + True + + + 324, 137 + + + 96, 16 + + + 57 + + + 三点定位数据 + + + cboxThreePointLocation + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 0 + Bottom, Left @@ -367,7 +394,7 @@ groupBox1 - 0 + 1 Bottom, Right @@ -394,7 +421,7 @@ groupBox1 - 1 + 2 Top, Right @@ -427,7 +454,7 @@ groupBox1 - 2 + 3 Flat @@ -457,7 +484,7 @@ groupBox1 - 3 + 4 Top, Right @@ -490,7 +517,7 @@ groupBox1 - 4 + 5 Flat @@ -520,7 +547,7 @@ groupBox1 - 5 + 6 Flat @@ -550,7 +577,7 @@ groupBox1 - 6 + 7 Flat @@ -580,7 +607,7 @@ groupBox1 - 7 + 8 Top, Right @@ -613,7 +640,7 @@ groupBox1 - 8 + 9 Top, Right @@ -646,7 +673,7 @@ groupBox1 - 9 + 10 Top, Right @@ -679,7 +706,7 @@ groupBox1 - 10 + 11 宋体, 9pt @@ -709,7 +736,7 @@ groupBox1 - 11 + 12 Top, Right @@ -742,7 +769,7 @@ groupBox1 - 12 + 13 宋体, 9pt @@ -772,7 +799,7 @@ groupBox1 - 13 + 14 True @@ -802,7 +829,7 @@ groupBox1 - 14 + 15 True @@ -832,7 +859,7 @@ groupBox1 - 15 + 16 Fill @@ -1333,6 +1360,6 @@ StockTrayLocationRecipe - Rs.MotionPlat.BaseForm, Rs.MotionPlat, Version=1.20.24.1, Culture=neutral, PublicKeyToken=null + Rs.MotionPlat.BaseForm, Rs.MotionPlat, Version=1.20.24.6, Culture=neutral, PublicKeyToken=null \ No newline at end of file