From c2adb918cb270eb014f189f798c9449bad3612dc Mon Sep 17 00:00:00 2001 From: lhiven <236881222@qq.com> Date: Tue, 6 Jun 2023 19:27:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E7=95=8C=E9=9D=A2=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E7=9A=84=E5=9B=BE=E7=89=87=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.MotionPlat/FormMain.Designer.cs | 477 ++++++++++++----------------- Rs.MotionPlat/FormMain.cs | 8 +- 2 files changed, 207 insertions(+), 278 deletions(-) diff --git a/Rs.MotionPlat/FormMain.Designer.cs b/Rs.MotionPlat/FormMain.Designer.cs index ad073c6..d2178c1 100644 --- a/Rs.MotionPlat/FormMain.Designer.cs +++ b/Rs.MotionPlat/FormMain.Designer.cs @@ -46,17 +46,19 @@ this.label1 = new System.Windows.Forms.Label(); this.panel4 = new System.Windows.Forms.Panel(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); + this.panelEx1 = new Rs.Controls.PanelEx(); + this.switchButton1 = new Rs.Controls.SwitchButton(); + this.panelEx2 = new Rs.Controls.PanelEx(); + this.btnWholeHome = new Rs.Controls.RsButton(); + this.panelEx3 = new Rs.Controls.PanelEx(); + this.btnStop = new Rs.Controls.RsButton(); + this.panelEx4 = new Rs.Controls.PanelEx(); + this.btnSpaceRun = new Rs.Controls.RsButton(); this.tabControlEx1 = new Rs.Controls.TabControlEx(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.rsTray1 = new Rs.Controls.RsTray(); - this.rsTray2 = new Rs.Controls.RsTray(); - this.rsTray3 = new Rs.Controls.RsTray(); - this.rsTray4 = new Rs.Controls.RsTray(); this.rsTray5 = new Rs.Controls.RsTray(); this.rsTray6 = new Rs.Controls.RsTray(); - this.rsTray7 = new Rs.Controls.RsTray(); - this.rsTray8 = new Rs.Controls.RsTray(); this.tabPage2 = new System.Windows.Forms.TabPage(); this.hWindow_Final1 = new ChoiceTech.Halcon.Control.HWindow_Final(); this.panelEx5 = new Rs.Controls.PanelEx(); @@ -68,14 +70,9 @@ this.btnPause = new System.Windows.Forms.Button(); this.textBox2 = new System.Windows.Forms.TextBox(); this.textBox1 = new System.Windows.Forms.TextBox(); - this.panelEx1 = new Rs.Controls.PanelEx(); - this.switchButton1 = new Rs.Controls.SwitchButton(); - this.panelEx2 = new Rs.Controls.PanelEx(); - this.btnWholeHome = new Rs.Controls.RsButton(); - this.panelEx3 = new Rs.Controls.PanelEx(); - this.btnStop = new Rs.Controls.RsButton(); - this.panelEx4 = new Rs.Controls.PanelEx(); - this.btnSpaceRun = new Rs.Controls.RsButton(); + this.showImage1 = new Rs.MotionPlat.ShowImage(); + this.showImage2 = new Rs.MotionPlat.ShowImage(); + this.showImage3 = new Rs.MotionPlat.ShowImage(); this.panel1.SuspendLayout(); this.tableLayoutPanel3.SuspendLayout(); this.panel3.SuspendLayout(); @@ -84,15 +81,15 @@ ((System.ComponentModel.ISupportInitialize)(this.dgv_runinfo)).BeginInit(); this.panel4.SuspendLayout(); this.tableLayoutPanel2.SuspendLayout(); + this.panelEx1.SuspendLayout(); + this.panelEx2.SuspendLayout(); + this.panelEx3.SuspendLayout(); + this.panelEx4.SuspendLayout(); this.tabControlEx1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); this.tabPage2.SuspendLayout(); this.panelEx5.SuspendLayout(); - this.panelEx1.SuspendLayout(); - this.panelEx2.SuspendLayout(); - this.panelEx3.SuspendLayout(); - this.panelEx4.SuspendLayout(); this.SuspendLayout(); // // timer1 @@ -143,7 +140,7 @@ 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("SimSun", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + 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; @@ -276,6 +273,144 @@ this.tableLayoutPanel2.Size = new System.Drawing.Size(451, 360); this.tableLayoutPanel2.TabIndex = 0; // + // panelEx1 + // + this.panelEx1.Controls.Add(this.switchButton1); + this.panelEx1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panelEx1.Location = new System.Drawing.Point(3, 3); + this.panelEx1.Name = "panelEx1"; + this.panelEx1.Padding = new System.Windows.Forms.Padding(20, 3, 20, 3); + this.panelEx1.Size = new System.Drawing.Size(445, 84); + this.panelEx1.TabIndex = 0; + // + // switchButton1 + // + this.switchButton1.Checked = false; + this.switchButton1.Cursor = System.Windows.Forms.Cursors.Hand; + this.switchButton1.Dock = System.Windows.Forms.DockStyle.Fill; + this.switchButton1.FalseColor = System.Drawing.Color.Gray; + this.switchButton1.FalseTextColr = System.Drawing.Color.White; + this.switchButton1.Font = new System.Drawing.Font("宋体", 26F); + this.switchButton1.Location = new System.Drawing.Point(20, 3); + this.switchButton1.Margin = new System.Windows.Forms.Padding(5); + this.switchButton1.Name = "switchButton1"; + this.switchButton1.Size = new System.Drawing.Size(405, 78); + this.switchButton1.SwitchType = Rs.Controls.SwitchType.Ellipse; + this.switchButton1.TabIndex = 0; + this.switchButton1.Texts = new string[] { + "自动", + "手动"}; + this.switchButton1.TrueColor = System.Drawing.Color.Blue; + this.switchButton1.TrueTextColr = System.Drawing.Color.White; + // + // panelEx2 + // + this.panelEx2.Controls.Add(this.btnWholeHome); + this.panelEx2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panelEx2.Location = new System.Drawing.Point(3, 93); + this.panelEx2.Name = "panelEx2"; + this.panelEx2.Padding = new System.Windows.Forms.Padding(20, 3, 20, 3); + this.panelEx2.Size = new System.Drawing.Size(445, 84); + this.panelEx2.TabIndex = 0; + // + // btnWholeHome + // + this.btnWholeHome.BackColor = System.Drawing.Color.White; + this.btnWholeHome.BtnBackColor = System.Drawing.Color.White; + this.btnWholeHome.BtnFont = new System.Drawing.Font("微软雅黑", 26F); + this.btnWholeHome.BtnForeColor = System.Drawing.Color.White; + this.btnWholeHome.BtnText = "整机回零"; + this.btnWholeHome.ConerRadius = 80; + this.btnWholeHome.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnWholeHome.Dock = System.Windows.Forms.DockStyle.Fill; + this.btnWholeHome.EnabledMouseEffect = true; + this.btnWholeHome.FillColor = System.Drawing.Color.Lime; + this.btnWholeHome.IsRadius = true; + this.btnWholeHome.IsShowRect = true; + this.btnWholeHome.IsShowTips = false; + this.btnWholeHome.Location = new System.Drawing.Point(20, 3); + this.btnWholeHome.Name = "btnWholeHome"; + this.btnWholeHome.RectColor = System.Drawing.Color.Lime; + this.btnWholeHome.RectWidth = 2; + this.btnWholeHome.Size = new System.Drawing.Size(405, 78); + this.btnWholeHome.TabIndex = 0; + this.btnWholeHome.TabStop = false; + this.btnWholeHome.TipsColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(30)))), ((int)(((byte)(99))))); + this.btnWholeHome.TipsText = ""; + this.btnWholeHome.BtnClick += new System.EventHandler(this.btnWholeHome_Load); + // + // panelEx3 + // + this.panelEx3.Controls.Add(this.btnStop); + this.panelEx3.Dock = System.Windows.Forms.DockStyle.Fill; + this.panelEx3.Location = new System.Drawing.Point(3, 183); + this.panelEx3.Name = "panelEx3"; + this.panelEx3.Padding = new System.Windows.Forms.Padding(20, 3, 20, 3); + this.panelEx3.Size = new System.Drawing.Size(445, 84); + this.panelEx3.TabIndex = 0; + // + // btnStop + // + this.btnStop.BackColor = System.Drawing.Color.White; + this.btnStop.BtnBackColor = System.Drawing.Color.White; + this.btnStop.BtnFont = new System.Drawing.Font("微软雅黑", 26F); + this.btnStop.BtnForeColor = System.Drawing.Color.White; + this.btnStop.BtnText = "暂停"; + this.btnStop.ConerRadius = 80; + this.btnStop.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnStop.Dock = System.Windows.Forms.DockStyle.Fill; + this.btnStop.EnabledMouseEffect = true; + this.btnStop.FillColor = System.Drawing.Color.DarkOliveGreen; + this.btnStop.IsRadius = true; + this.btnStop.IsShowRect = false; + this.btnStop.IsShowTips = false; + this.btnStop.Location = new System.Drawing.Point(20, 3); + this.btnStop.Name = "btnStop"; + this.btnStop.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(11)))), ((int)(((byte)(16)))), ((int)(((byte)(36))))); + this.btnStop.RectWidth = 2; + this.btnStop.Size = new System.Drawing.Size(405, 78); + this.btnStop.TabIndex = 1; + this.btnStop.TabStop = false; + this.btnStop.TipsColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(30)))), ((int)(((byte)(99))))); + this.btnStop.TipsText = ""; + this.btnStop.BtnClick += new System.EventHandler(this.btnStop_BtnClick); + // + // panelEx4 + // + this.panelEx4.Controls.Add(this.btnSpaceRun); + this.panelEx4.Dock = System.Windows.Forms.DockStyle.Fill; + this.panelEx4.Location = new System.Drawing.Point(3, 273); + this.panelEx4.Name = "panelEx4"; + this.panelEx4.Padding = new System.Windows.Forms.Padding(20, 3, 20, 3); + this.panelEx4.Size = new System.Drawing.Size(445, 84); + this.panelEx4.TabIndex = 0; + // + // btnSpaceRun + // + this.btnSpaceRun.BackColor = System.Drawing.Color.White; + this.btnSpaceRun.BtnBackColor = System.Drawing.Color.White; + this.btnSpaceRun.BtnFont = new System.Drawing.Font("微软雅黑", 26F); + this.btnSpaceRun.BtnForeColor = System.Drawing.Color.White; + this.btnSpaceRun.BtnText = "空跑"; + this.btnSpaceRun.ConerRadius = 80; + this.btnSpaceRun.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSpaceRun.Dock = System.Windows.Forms.DockStyle.Fill; + this.btnSpaceRun.EnabledMouseEffect = true; + this.btnSpaceRun.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(62)))), ((int)(((byte)(124))))); + this.btnSpaceRun.IsRadius = true; + this.btnSpaceRun.IsShowRect = false; + this.btnSpaceRun.IsShowTips = false; + this.btnSpaceRun.Location = new System.Drawing.Point(20, 3); + this.btnSpaceRun.Name = "btnSpaceRun"; + this.btnSpaceRun.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(11)))), ((int)(((byte)(16)))), ((int)(((byte)(36))))); + this.btnSpaceRun.RectWidth = 2; + this.btnSpaceRun.Size = new System.Drawing.Size(405, 78); + this.btnSpaceRun.TabIndex = 1; + this.btnSpaceRun.TabStop = false; + this.btnSpaceRun.TipsColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(30)))), ((int)(((byte)(99))))); + this.btnSpaceRun.TipsText = ""; + this.btnSpaceRun.BtnClick += new System.EventHandler(this.btnSpaceRun_BtnClick); + // // tabControlEx1 // this.tabControlEx1.Controls.Add(this.tabPage1); @@ -304,19 +439,15 @@ // // tableLayoutPanel1 // - this.tableLayoutPanel1.ColumnCount = 4; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.ColumnCount = 3; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); - this.tableLayoutPanel1.Controls.Add(this.rsTray1, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.rsTray2, 1, 0); - this.tableLayoutPanel1.Controls.Add(this.rsTray3, 2, 0); - this.tableLayoutPanel1.Controls.Add(this.rsTray4, 3, 0); this.tableLayoutPanel1.Controls.Add(this.rsTray5, 0, 1); this.tableLayoutPanel1.Controls.Add(this.rsTray6, 1, 1); - this.tableLayoutPanel1.Controls.Add(this.rsTray7, 2, 1); - this.tableLayoutPanel1.Controls.Add(this.rsTray8, 3, 1); + this.tableLayoutPanel1.Controls.Add(this.showImage1, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.showImage2, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.showImage3, 2, 0); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; @@ -327,135 +458,38 @@ this.tableLayoutPanel1.Size = new System.Drawing.Size(777, 814); this.tableLayoutPanel1.TabIndex = 8; // - // rsTray1 - // - this.rsTray1.CanDraw = true; - this.rsTray1.ColumnNum = 10; - this.rsTray1.Dock = System.Windows.Forms.DockStyle.Fill; - this.rsTray1.HeadText = "L-INPUT"; - this.rsTray1.LeftSpaceWidth = 20; - this.rsTray1.Location = new System.Drawing.Point(3, 3); - this.rsTray1.Name = "rsTray1"; - this.rsTray1.RowNum = 26; - this.rsTray1.SelectSlot = null; - this.rsTray1.ShowText = false; - this.rsTray1.Size = new System.Drawing.Size(188, 401); - this.rsTray1.TabIndex = 0; - this.rsTray1.TopSpaceHeight = 20; - // - // rsTray2 - // - this.rsTray2.CanDraw = true; - this.rsTray2.ColumnNum = 10; - this.rsTray2.Dock = System.Windows.Forms.DockStyle.Fill; - this.rsTray2.HeadText = "L-NG"; - this.rsTray2.LeftSpaceWidth = 20; - this.rsTray2.Location = new System.Drawing.Point(197, 3); - this.rsTray2.Name = "rsTray2"; - this.rsTray2.RowNum = 26; - this.rsTray2.SelectSlot = null; - this.rsTray2.ShowText = false; - this.rsTray2.Size = new System.Drawing.Size(188, 401); - this.rsTray2.TabIndex = 0; - this.rsTray2.TopSpaceHeight = 20; - // - // rsTray3 - // - this.rsTray3.CanDraw = true; - this.rsTray3.ColumnNum = 10; - this.rsTray3.Dock = System.Windows.Forms.DockStyle.Fill; - this.rsTray3.HeadText = "L-OK"; - this.rsTray3.LeftSpaceWidth = 20; - this.rsTray3.Location = new System.Drawing.Point(391, 3); - this.rsTray3.Name = "rsTray3"; - this.rsTray3.RowNum = 26; - this.rsTray3.SelectSlot = null; - this.rsTray3.ShowText = false; - this.rsTray3.Size = new System.Drawing.Size(188, 401); - this.rsTray3.TabIndex = 0; - this.rsTray3.TopSpaceHeight = 20; - // - // rsTray4 - // - this.rsTray4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(11)))), ((int)(((byte)(16)))), ((int)(((byte)(36))))); - this.rsTray4.CanDraw = true; - this.rsTray4.ColumnNum = 10; - this.rsTray4.Dock = System.Windows.Forms.DockStyle.Fill; - this.rsTray4.HeadText = "L-MULTI"; - this.rsTray4.LeftSpaceWidth = 20; - this.rsTray4.Location = new System.Drawing.Point(585, 3); - this.rsTray4.Name = "rsTray4"; - this.rsTray4.RowNum = 26; - this.rsTray4.SelectSlot = null; - this.rsTray4.ShowText = false; - this.rsTray4.Size = new System.Drawing.Size(189, 401); - this.rsTray4.TabIndex = 0; - this.rsTray4.TopSpaceHeight = 20; - // // rsTray5 // this.rsTray5.CanDraw = true; - this.rsTray5.ColumnNum = 10; + this.rsTray5.ColumnNum = 5; this.rsTray5.Dock = System.Windows.Forms.DockStyle.Fill; - this.rsTray5.HeadText = "R-INPUT"; + this.rsTray5.HeadText = "上料盘"; this.rsTray5.LeftSpaceWidth = 20; this.rsTray5.Location = new System.Drawing.Point(3, 410); this.rsTray5.Name = "rsTray5"; - this.rsTray5.RowNum = 26; + this.rsTray5.RowNum = 10; this.rsTray5.SelectSlot = null; - this.rsTray5.ShowText = false; - this.rsTray5.Size = new System.Drawing.Size(188, 401); + this.rsTray5.ShowText = true; + this.rsTray5.Size = new System.Drawing.Size(253, 401); this.rsTray5.TabIndex = 0; this.rsTray5.TopSpaceHeight = 20; // // rsTray6 // this.rsTray6.CanDraw = true; - this.rsTray6.ColumnNum = 10; + this.rsTray6.ColumnNum = 5; this.rsTray6.Dock = System.Windows.Forms.DockStyle.Fill; - this.rsTray6.HeadText = "R-NG"; + this.rsTray6.HeadText = "产品盘"; this.rsTray6.LeftSpaceWidth = 20; - this.rsTray6.Location = new System.Drawing.Point(197, 410); + this.rsTray6.Location = new System.Drawing.Point(262, 410); this.rsTray6.Name = "rsTray6"; - this.rsTray6.RowNum = 26; + this.rsTray6.RowNum = 10; this.rsTray6.SelectSlot = null; - this.rsTray6.ShowText = false; - this.rsTray6.Size = new System.Drawing.Size(188, 401); + this.rsTray6.ShowText = true; + this.rsTray6.Size = new System.Drawing.Size(253, 401); this.rsTray6.TabIndex = 0; this.rsTray6.TopSpaceHeight = 20; // - // rsTray7 - // - this.rsTray7.CanDraw = true; - this.rsTray7.ColumnNum = 10; - this.rsTray7.Dock = System.Windows.Forms.DockStyle.Fill; - this.rsTray7.HeadText = "R-OK"; - this.rsTray7.LeftSpaceWidth = 20; - this.rsTray7.Location = new System.Drawing.Point(391, 410); - this.rsTray7.Name = "rsTray7"; - this.rsTray7.RowNum = 26; - this.rsTray7.SelectSlot = null; - this.rsTray7.ShowText = false; - this.rsTray7.Size = new System.Drawing.Size(188, 401); - this.rsTray7.TabIndex = 0; - this.rsTray7.TopSpaceHeight = 20; - // - // rsTray8 - // - this.rsTray8.CanDraw = true; - this.rsTray8.ColumnNum = 10; - this.rsTray8.Dock = System.Windows.Forms.DockStyle.Fill; - this.rsTray8.HeadText = "R-MULTI"; - this.rsTray8.LeftSpaceWidth = 20; - this.rsTray8.Location = new System.Drawing.Point(585, 410); - this.rsTray8.Name = "rsTray8"; - this.rsTray8.RowNum = 26; - this.rsTray8.SelectSlot = null; - this.rsTray8.ShowText = false; - this.rsTray8.Size = new System.Drawing.Size(189, 401); - this.rsTray8.TabIndex = 0; - this.rsTray8.TopSpaceHeight = 20; - // // tabPage2 // this.tabPage2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(11)))), ((int)(((byte)(16)))), ((int)(((byte)(36))))); @@ -567,143 +601,35 @@ this.textBox1.Size = new System.Drawing.Size(100, 21); this.textBox1.TabIndex = 6; // - // panelEx1 - // - this.panelEx1.Controls.Add(this.switchButton1); - this.panelEx1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panelEx1.Location = new System.Drawing.Point(3, 3); - this.panelEx1.Name = "panelEx1"; - this.panelEx1.Padding = new System.Windows.Forms.Padding(20, 3, 20, 3); - this.panelEx1.Size = new System.Drawing.Size(445, 84); - this.panelEx1.TabIndex = 0; - // - // switchButton1 - // - this.switchButton1.Checked = false; - this.switchButton1.Cursor = System.Windows.Forms.Cursors.Hand; - this.switchButton1.Dock = System.Windows.Forms.DockStyle.Fill; - this.switchButton1.FalseColor = System.Drawing.Color.Gray; - this.switchButton1.FalseTextColr = System.Drawing.Color.White; - this.switchButton1.Font = new System.Drawing.Font("SimSun", 26F); - this.switchButton1.Location = new System.Drawing.Point(20, 3); - this.switchButton1.Margin = new System.Windows.Forms.Padding(5); - this.switchButton1.Name = "switchButton1"; - this.switchButton1.Size = new System.Drawing.Size(405, 78); - this.switchButton1.SwitchType = Rs.Controls.SwitchType.Ellipse; - this.switchButton1.TabIndex = 0; - this.switchButton1.Texts = new string[] { - "自动", - "手动"}; - this.switchButton1.TrueColor = System.Drawing.Color.Blue; - this.switchButton1.TrueTextColr = System.Drawing.Color.White; - // - // panelEx2 - // - this.panelEx2.Controls.Add(this.btnWholeHome); - this.panelEx2.Dock = System.Windows.Forms.DockStyle.Fill; - this.panelEx2.Location = new System.Drawing.Point(3, 93); - this.panelEx2.Name = "panelEx2"; - this.panelEx2.Padding = new System.Windows.Forms.Padding(20, 3, 20, 3); - this.panelEx2.Size = new System.Drawing.Size(445, 84); - this.panelEx2.TabIndex = 0; - // - // btnWholeHome - // - this.btnWholeHome.BackColor = System.Drawing.Color.White; - this.btnWholeHome.BtnBackColor = System.Drawing.Color.White; - this.btnWholeHome.BtnFont = new System.Drawing.Font("Microsoft YaHei", 26F); - this.btnWholeHome.BtnForeColor = System.Drawing.Color.White; - this.btnWholeHome.BtnText = "整机回零"; - this.btnWholeHome.ConerRadius = 80; - this.btnWholeHome.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnWholeHome.Dock = System.Windows.Forms.DockStyle.Fill; - this.btnWholeHome.EnabledMouseEffect = true; - this.btnWholeHome.FillColor = System.Drawing.Color.Lime; - this.btnWholeHome.IsRadius = true; - this.btnWholeHome.IsShowRect = true; - this.btnWholeHome.IsShowTips = false; - this.btnWholeHome.Location = new System.Drawing.Point(20, 3); - this.btnWholeHome.Name = "btnWholeHome"; - this.btnWholeHome.RectColor = System.Drawing.Color.Lime; - this.btnWholeHome.RectWidth = 2; - this.btnWholeHome.Size = new System.Drawing.Size(405, 78); - this.btnWholeHome.TabIndex = 0; - this.btnWholeHome.TabStop = false; - this.btnWholeHome.TipsColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(30)))), ((int)(((byte)(99))))); - this.btnWholeHome.TipsText = ""; - this.btnWholeHome.BtnClick += new System.EventHandler(this.btnWholeHome_Load); - // - // panelEx3 + // showImage1 // - this.panelEx3.Controls.Add(this.btnStop); - this.panelEx3.Dock = System.Windows.Forms.DockStyle.Fill; - this.panelEx3.Location = new System.Drawing.Point(3, 183); - this.panelEx3.Name = "panelEx3"; - this.panelEx3.Padding = new System.Windows.Forms.Padding(20, 3, 20, 3); - this.panelEx3.Size = new System.Drawing.Size(445, 84); - this.panelEx3.TabIndex = 0; + this.showImage1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(11)))), ((int)(((byte)(16)))), ((int)(((byte)(36))))); + this.showImage1.Dock = System.Windows.Forms.DockStyle.Fill; + this.showImage1.HeadText = "上料盘-上相机"; + this.showImage1.Location = new System.Drawing.Point(3, 3); + this.showImage1.Name = "showImage1"; + this.showImage1.Size = new System.Drawing.Size(253, 401); + this.showImage1.TabIndex = 1; // - // btnStop + // showImage2 // - this.btnStop.BackColor = System.Drawing.Color.White; - this.btnStop.BtnBackColor = System.Drawing.Color.White; - this.btnStop.BtnFont = new System.Drawing.Font("Microsoft YaHei", 26F); - this.btnStop.BtnForeColor = System.Drawing.Color.White; - this.btnStop.BtnText = "暂停"; - this.btnStop.ConerRadius = 80; - this.btnStop.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnStop.Dock = System.Windows.Forms.DockStyle.Fill; - this.btnStop.EnabledMouseEffect = true; - this.btnStop.FillColor = System.Drawing.Color.DarkOliveGreen; - this.btnStop.IsRadius = true; - this.btnStop.IsShowRect = false; - this.btnStop.IsShowTips = false; - this.btnStop.Location = new System.Drawing.Point(20, 3); - this.btnStop.Name = "btnStop"; - this.btnStop.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(11)))), ((int)(((byte)(16)))), ((int)(((byte)(36))))); - this.btnStop.RectWidth = 2; - this.btnStop.Size = new System.Drawing.Size(405, 78); - this.btnStop.TabIndex = 1; - this.btnStop.TabStop = false; - this.btnStop.TipsColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(30)))), ((int)(((byte)(99))))); - this.btnStop.TipsText = ""; - this.btnStop.BtnClick += new System.EventHandler(this.btnStop_BtnClick); - // - // panelEx4 - // - this.panelEx4.Controls.Add(this.btnSpaceRun); - this.panelEx4.Dock = System.Windows.Forms.DockStyle.Fill; - this.panelEx4.Location = new System.Drawing.Point(3, 273); - this.panelEx4.Name = "panelEx4"; - this.panelEx4.Padding = new System.Windows.Forms.Padding(20, 3, 20, 3); - this.panelEx4.Size = new System.Drawing.Size(445, 84); - this.panelEx4.TabIndex = 0; + this.showImage2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(11)))), ((int)(((byte)(16)))), ((int)(((byte)(36))))); + this.showImage2.Dock = System.Windows.Forms.DockStyle.Fill; + this.showImage2.HeadText = "下相机"; + this.showImage2.Location = new System.Drawing.Point(262, 3); + this.showImage2.Name = "showImage2"; + this.showImage2.Size = new System.Drawing.Size(253, 401); + this.showImage2.TabIndex = 2; // - // btnSpaceRun + // showImage3 // - this.btnSpaceRun.BackColor = System.Drawing.Color.White; - this.btnSpaceRun.BtnBackColor = System.Drawing.Color.White; - this.btnSpaceRun.BtnFont = new System.Drawing.Font("Microsoft YaHei", 26F); - this.btnSpaceRun.BtnForeColor = System.Drawing.Color.White; - this.btnSpaceRun.BtnText = "空跑"; - this.btnSpaceRun.ConerRadius = 80; - this.btnSpaceRun.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnSpaceRun.Dock = System.Windows.Forms.DockStyle.Fill; - this.btnSpaceRun.EnabledMouseEffect = true; - this.btnSpaceRun.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(62)))), ((int)(((byte)(124))))); - this.btnSpaceRun.IsRadius = true; - this.btnSpaceRun.IsShowRect = false; - this.btnSpaceRun.IsShowTips = false; - this.btnSpaceRun.Location = new System.Drawing.Point(20, 3); - this.btnSpaceRun.Name = "btnSpaceRun"; - this.btnSpaceRun.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(11)))), ((int)(((byte)(16)))), ((int)(((byte)(36))))); - this.btnSpaceRun.RectWidth = 2; - this.btnSpaceRun.Size = new System.Drawing.Size(405, 78); - this.btnSpaceRun.TabIndex = 1; - this.btnSpaceRun.TabStop = false; - this.btnSpaceRun.TipsColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(30)))), ((int)(((byte)(99))))); - this.btnSpaceRun.TipsText = ""; - this.btnSpaceRun.BtnClick += new System.EventHandler(this.btnSpaceRun_BtnClick); + this.showImage3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(11)))), ((int)(((byte)(16)))), ((int)(((byte)(36))))); + this.showImage3.Dock = System.Windows.Forms.DockStyle.Fill; + this.showImage3.HeadText = "产品-上相机"; + this.showImage3.Location = new System.Drawing.Point(521, 3); + this.showImage3.Name = "showImage3"; + this.showImage3.Size = new System.Drawing.Size(253, 401); + this.showImage3.TabIndex = 3; // // FormMain // @@ -724,16 +650,16 @@ ((System.ComponentModel.ISupportInitialize)(this.dgv_runinfo)).EndInit(); this.panel4.ResumeLayout(false); this.tableLayoutPanel2.ResumeLayout(false); + this.panelEx1.ResumeLayout(false); + this.panelEx2.ResumeLayout(false); + this.panelEx3.ResumeLayout(false); + this.panelEx4.ResumeLayout(false); this.tabControlEx1.ResumeLayout(false); this.tabPage1.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false); this.tabPage2.ResumeLayout(false); this.panelEx5.ResumeLayout(false); this.panelEx5.PerformLayout(); - this.panelEx1.ResumeLayout(false); - this.panelEx2.ResumeLayout(false); - this.panelEx3.ResumeLayout(false); - this.panelEx4.ResumeLayout(false); this.ResumeLayout(false); } @@ -755,14 +681,8 @@ private Controls.TabControlEx tabControlEx1; private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private Controls.RsTray rsTray1; - private Controls.RsTray rsTray2; - private Controls.RsTray rsTray3; - private Controls.RsTray rsTray4; private Controls.RsTray rsTray5; private Controls.RsTray rsTray6; - private Controls.RsTray rsTray7; - private Controls.RsTray rsTray8; private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private Controls.PanelEx panelEx1; @@ -784,5 +704,8 @@ private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label3; + private ShowImage showImage1; + private ShowImage showImage2; + private ShowImage showImage3; } } \ No newline at end of file diff --git a/Rs.MotionPlat/FormMain.cs b/Rs.MotionPlat/FormMain.cs index 21f9fae..7e0a6ae 100644 --- a/Rs.MotionPlat/FormMain.cs +++ b/Rs.MotionPlat/FormMain.cs @@ -31,7 +31,7 @@ namespace Rs.MotionPlat public FormMain() { InitializeComponent(); - //this.tabControlEx1.TabPages.RemoveAt(1); + this.tabControlEx1.TabPages.RemoveAt(1); HikCamera.Instance.GrabOkEvent += Instance_GrabOkEvent; winHandle = hWindow_Final1.hWindowControl.HalconWindow; h1 = hWindow_Final1.HWindowHalconID; @@ -39,6 +39,12 @@ namespace Rs.MotionPlat HOperatorSet.GenEmptyObj(out hmodelImage); modelID = new HTuple(); HOperatorSet.ReadShapeModel("Model/model.shm", out modelID); + HOperatorSet.ReadImage(out HObject image1, "productImage/1.bmp"); + showImage1.DispFitImage(image1); + HOperatorSet.ReadImage(out HObject image2, "productImage/2.bmp"); + showImage2.DispFitImage(image2); + HOperatorSet.ReadImage(out HObject image3, "productImage/3.bmp"); + showImage3.DispFitImage(image3); } bool cameraFinished = false;