From c99b68e83d11457590b2e85fd50b258143424f06 Mon Sep 17 00:00:00 2001 From: lhiven <236881222@qq.com> Date: Tue, 6 Jun 2023 19:24:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=99=E7=9B=98=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=BD=8D5=E5=88=9710=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.MotionPlat/TrayRecipe.Designer.cs | 106 +++++++++++++-------------- Rs.MotionPlat/TrayRecipe.cs | 8 +- 2 files changed, 57 insertions(+), 57 deletions(-) diff --git a/Rs.MotionPlat/TrayRecipe.Designer.cs b/Rs.MotionPlat/TrayRecipe.Designer.cs index 79f1de7..c7009a7 100644 --- a/Rs.MotionPlat/TrayRecipe.Designer.cs +++ b/Rs.MotionPlat/TrayRecipe.Designer.cs @@ -31,10 +31,10 @@ this.components = new System.ComponentModel.Container(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TrayRecipe)); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TrayRecipe)); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.panel1 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel(); @@ -43,6 +43,10 @@ this.panel3 = new System.Windows.Forms.Panel(); this.panelEx1 = new Rs.Controls.PanelEx(); this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.Index = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.X = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Y = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Move = new System.Windows.Forms.DataGridViewLinkColumn(); this.panelEx2 = new Rs.Controls.PanelEx(); this.label1 = new System.Windows.Forms.Label(); this.panel5 = new System.Windows.Forms.Panel(); @@ -55,10 +59,6 @@ this.timer1 = new System.Windows.Forms.Timer(this.components); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.tsmi_go = new System.Windows.Forms.ToolStripMenuItem(); - this.Index = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.X = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Y = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Move = new System.Windows.Forms.DataGridViewLinkColumn(); this.tableLayoutPanel1.SuspendLayout(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); @@ -121,13 +121,13 @@ // rsTray1 // this.rsTray1.CanDraw = false; - this.rsTray1.ColumnNum = 10; + this.rsTray1.ColumnNum = 5; this.rsTray1.Dock = System.Windows.Forms.DockStyle.Fill; this.rsTray1.HeadText = null; this.rsTray1.LeftSpaceWidth = 20; this.rsTray1.Location = new System.Drawing.Point(5, 0); this.rsTray1.Name = "rsTray1"; - this.rsTray1.RowNum = 26; + this.rsTray1.RowNum = 10; this.rsTray1.SelectSlot = null; this.rsTray1.ShowText = true; this.rsTray1.Size = new System.Drawing.Size(285, 585); @@ -199,6 +199,52 @@ this.dataGridView1.TabIndex = 2; this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); // + // Index + // + this.Index.DataPropertyName = "Index"; + this.Index.FillWeight = 10F; + this.Index.HeaderText = "IX"; + this.Index.Name = "Index"; + this.Index.ReadOnly = true; + // + // X + // + this.X.DataPropertyName = "X"; + dataGridViewCellStyle2.Format = "0.000"; + this.X.DefaultCellStyle = dataGridViewCellStyle2; + this.X.FillWeight = 35F; + this.X.HeaderText = "X"; + this.X.Name = "X"; + this.X.ReadOnly = true; + // + // Y + // + this.Y.DataPropertyName = "Y"; + dataGridViewCellStyle3.Format = "0.000"; + this.Y.DefaultCellStyle = dataGridViewCellStyle3; + this.Y.FillWeight = 35F; + this.Y.HeaderText = "Y"; + this.Y.Name = "Y"; + this.Y.ReadOnly = true; + // + // Move + // + this.Move.ActiveLinkColor = System.Drawing.Color.White; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.Silver; + dataGridViewCellStyle4.ForeColor = System.Drawing.Color.White; + this.Move.DefaultCellStyle = dataGridViewCellStyle4; + this.Move.FillWeight = 20F; + this.Move.HeaderText = "Move"; + this.Move.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline; + this.Move.LinkColor = System.Drawing.Color.Lime; + this.Move.Name = "Move"; + this.Move.ReadOnly = true; + this.Move.Text = "Go"; + this.Move.TrackVisitedState = false; + this.Move.UseColumnTextForLinkValue = true; + this.Move.VisitedLinkColor = System.Drawing.Color.White; + // // panelEx2 // this.panelEx2.Controls.Add(this.label1); @@ -317,52 +363,6 @@ this.tsmi_go.Text = "Go"; this.tsmi_go.Click += new System.EventHandler(this.tsmi_go_Click); // - // Index - // - this.Index.DataPropertyName = "Index"; - this.Index.FillWeight = 10F; - this.Index.HeaderText = "IX"; - this.Index.Name = "Index"; - this.Index.ReadOnly = true; - // - // X - // - this.X.DataPropertyName = "X"; - dataGridViewCellStyle2.Format = "0.000"; - this.X.DefaultCellStyle = dataGridViewCellStyle2; - this.X.FillWeight = 35F; - this.X.HeaderText = "X"; - this.X.Name = "X"; - this.X.ReadOnly = true; - // - // Y - // - this.Y.DataPropertyName = "Y"; - dataGridViewCellStyle3.Format = "0.000"; - this.Y.DefaultCellStyle = dataGridViewCellStyle3; - this.Y.FillWeight = 35F; - this.Y.HeaderText = "Y"; - this.Y.Name = "Y"; - this.Y.ReadOnly = true; - // - // Move - // - this.Move.ActiveLinkColor = System.Drawing.Color.White; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.Silver; - dataGridViewCellStyle4.ForeColor = System.Drawing.Color.White; - this.Move.DefaultCellStyle = dataGridViewCellStyle4; - this.Move.FillWeight = 20F; - this.Move.HeaderText = "Move"; - this.Move.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline; - this.Move.LinkColor = System.Drawing.Color.Lime; - this.Move.Name = "Move"; - this.Move.ReadOnly = true; - this.Move.Text = "Go"; - this.Move.TrackVisitedState = false; - this.Move.UseColumnTextForLinkValue = true; - this.Move.VisitedLinkColor = System.Drawing.Color.White; - // // TrayRecipe // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); diff --git a/Rs.MotionPlat/TrayRecipe.cs b/Rs.MotionPlat/TrayRecipe.cs index 46a4de0..39a1fc7 100644 --- a/Rs.MotionPlat/TrayRecipe.cs +++ b/Rs.MotionPlat/TrayRecipe.cs @@ -36,7 +36,7 @@ namespace Rs.MotionPlat { dataGridView1.AutoGenerateColumns = false; rsTray1.HeadText = m_button.ShowText; - trayPosition = TrayPosition.Load(m_button.ShowText); + trayPosition = TrayPosition.Load(m_button.ShowText,10,5); slot_lefttop.Position = trayPosition.LeftTop; slot_leftbottom.Position = trayPosition.LeftBottom; slot_rightbottom.Position = trayPosition.RightBottom; @@ -54,8 +54,8 @@ namespace Rs.MotionPlat if (val == 0) val = 1; else if (val == 1) val = 0; rsTray1.ChangeStatus(1, val); - rsTray1.ChangeStatus(26, val); - rsTray1.ChangeStatus(260, val); + rsTray1.ChangeStatus(10, val); + rsTray1.ChangeStatus(50, val); } protected void SavePosEvent(object sender, EventArgs e) @@ -80,7 +80,7 @@ namespace Rs.MotionPlat trayPosition.LeftBottom = new PointF(slot_leftbottom.PosX, slot_leftbottom.PosY); if (trayLocation == slot_rightbottom) trayPosition.RightBottom = new PointF(slot_rightbottom.PosX, slot_rightbottom.PosY); - trayPosition.Save(); + trayPosition.Save(); } private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)