diff --git a/.gitignore b/.gitignore index 275b511..d90ef41 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,7 @@ # Mono auto generated files mono_crash.* - +.DS_Store # Build results [Dd]ebug/ [Dd]ebugPublic/ diff --git a/WindowsFormsApp1/MainForm.Designer.cs b/WindowsFormsApp1/MainForm.Designer.cs index 30ef193..2c22344 100644 --- a/WindowsFormsApp1/MainForm.Designer.cs +++ b/WindowsFormsApp1/MainForm.Designer.cs @@ -74,7 +74,6 @@ this.gropb = new System.Windows.Forms.GroupBox(); this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel(); this.MES提示信息 = new System.Windows.Forms.Label(); - this.Tray盘 = new System.Windows.Forms.Label(); this.原料包装LOT号 = new System.Windows.Forms.GroupBox(); this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel(); this.Tray盘二维码 = new System.Windows.Forms.Label(); @@ -84,7 +83,9 @@ this.胶水上下线 = new System.Windows.Forms.Button(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); + this.开始处理 = new System.Windows.Forms.Button(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); + this.linemode = new System.Windows.Forms.Label(); this.MES通讯时间 = new System.Windows.Forms.Label(); this.MES链接状态 = new System.Windows.Forms.Label(); this.当前时间 = new System.Windows.Forms.Label(); @@ -92,7 +93,6 @@ this.linetype = new System.Windows.Forms.Label(); this.linecode = new System.Windows.Forms.Label(); this.linename = new System.Windows.Forms.Label(); - this.开始处理 = new System.Windows.Forms.Button(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.richTextBox1 = new System.Windows.Forms.RichTextBox(); this.tableLayoutPanel8 = new System.Windows.Forms.TableLayoutPanel(); @@ -103,24 +103,6 @@ this.底部注释5 = new System.Windows.Forms.Label(); this.timer1 = new System.Windows.Forms.Timer(this.components); this.剩余寿命 = new System.Windows.Forms.Label(); - this.tableLayoutPanel10 = new System.Windows.Forms.TableLayoutPanel(); - this.linemode = new System.Windows.Forms.Label(); - this.lineremark1 = new System.Windows.Forms.Label(); - this.lineremark2 = new System.Windows.Forms.Label(); - this.lineremark3 = new System.Windows.Forms.Label(); - this.lineremark4 = new System.Windows.Forms.Label(); - this.lineremark5 = new System.Windows.Forms.Label(); - this.lineremark6 = new System.Windows.Forms.Label(); - this.lineremark7 = new System.Windows.Forms.Label(); - this.barcode1 = new System.Windows.Forms.Label(); - this.barcode2 = new System.Windows.Forms.Label(); - this.barcode3 = new System.Windows.Forms.Label(); - this.barcode4 = new System.Windows.Forms.Label(); - this.barcode5 = new System.Windows.Forms.Label(); - this.barcode6 = new System.Windows.Forms.Label(); - this.barcode7 = new System.Windows.Forms.Label(); - this.barcode8 = new System.Windows.Forms.Label(); - this.barcode9 = new System.Windows.Forms.Label(); this.menuStrip1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); this.tableLayoutPanel4.SuspendLayout(); @@ -137,7 +119,6 @@ this.tableLayoutPanel2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.tableLayoutPanel8.SuspendLayout(); - this.tableLayoutPanel10.SuspendLayout(); this.SuspendLayout(); // // menuStrip1 @@ -155,8 +136,8 @@ this.系统参数配置ToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Padding = new System.Windows.Forms.Padding(7, 2, 0, 2); - this.menuStrip1.Size = new System.Drawing.Size(1613, 44); + this.menuStrip1.Padding = new System.Windows.Forms.Padding(8, 2, 0, 2); + this.menuStrip1.Size = new System.Drawing.Size(1760, 49); this.menuStrip1.TabIndex = 0; this.menuStrip1.Text = "menuStrip1"; // @@ -167,27 +148,27 @@ this.切换用户ToolStripMenuItem, this.用户管理ToolStripMenuItem1}); this.用户管理ToolStripMenuItem.Name = "用户管理ToolStripMenuItem"; - this.用户管理ToolStripMenuItem.Size = new System.Drawing.Size(145, 40); + this.用户管理ToolStripMenuItem.Size = new System.Drawing.Size(166, 45); this.用户管理ToolStripMenuItem.Text = "用户管理"; // // 修改密码ToolStripMenuItem // this.修改密码ToolStripMenuItem.Name = "修改密码ToolStripMenuItem"; - this.修改密码ToolStripMenuItem.Size = new System.Drawing.Size(247, 44); + this.修改密码ToolStripMenuItem.Size = new System.Drawing.Size(283, 50); this.修改密码ToolStripMenuItem.Text = "修改密码"; this.修改密码ToolStripMenuItem.Click += new System.EventHandler(this.修改密码ToolStripMenuItem_Click); // // 切换用户ToolStripMenuItem // this.切换用户ToolStripMenuItem.Name = "切换用户ToolStripMenuItem"; - this.切换用户ToolStripMenuItem.Size = new System.Drawing.Size(247, 44); + this.切换用户ToolStripMenuItem.Size = new System.Drawing.Size(283, 50); this.切换用户ToolStripMenuItem.Text = "切换用户"; this.切换用户ToolStripMenuItem.Click += new System.EventHandler(this.切换用户ToolStripMenuItem_Click); // // 用户管理ToolStripMenuItem1 // this.用户管理ToolStripMenuItem1.Name = "用户管理ToolStripMenuItem1"; - this.用户管理ToolStripMenuItem1.Size = new System.Drawing.Size(247, 44); + this.用户管理ToolStripMenuItem1.Size = new System.Drawing.Size(283, 50); this.用户管理ToolStripMenuItem1.Text = "用户管理"; this.用户管理ToolStripMenuItem1.Click += new System.EventHandler(this.用户管理ToolStripMenuItem1_Click); // @@ -196,13 +177,13 @@ this.产线管理ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.产线基础信息管理ToolStripMenuItem}); this.产线管理ToolStripMenuItem.Name = "产线管理ToolStripMenuItem"; - this.产线管理ToolStripMenuItem.Size = new System.Drawing.Size(145, 40); + this.产线管理ToolStripMenuItem.Size = new System.Drawing.Size(166, 45); this.产线管理ToolStripMenuItem.Text = "产线管理"; // // 产线基础信息管理ToolStripMenuItem // this.产线基础信息管理ToolStripMenuItem.Name = "产线基础信息管理ToolStripMenuItem"; - this.产线基础信息管理ToolStripMenuItem.Size = new System.Drawing.Size(359, 44); + this.产线基础信息管理ToolStripMenuItem.Size = new System.Drawing.Size(411, 50); this.产线基础信息管理ToolStripMenuItem.Text = "产线基础信息管理"; this.产线基础信息管理ToolStripMenuItem.Click += new System.EventHandler(this.产线基础信息管理ToolStripMenuItem_Click); // @@ -213,40 +194,40 @@ this.pLC地址设置ToolStripMenuItem, this.pLC报警设置ToolStripMenuItem}); this.pLC管理ToolStripMenuItem.Name = "pLC管理ToolStripMenuItem"; - this.pLC管理ToolStripMenuItem.Size = new System.Drawing.Size(139, 40); + this.pLC管理ToolStripMenuItem.Size = new System.Drawing.Size(159, 45); this.pLC管理ToolStripMenuItem.Text = "PLC管理"; // // pLC通讯设置ToolStripMenuItem // this.pLC通讯设置ToolStripMenuItem.Name = "pLC通讯设置ToolStripMenuItem"; - this.pLC通讯设置ToolStripMenuItem.Size = new System.Drawing.Size(297, 44); + this.pLC通讯设置ToolStripMenuItem.Size = new System.Drawing.Size(340, 50); this.pLC通讯设置ToolStripMenuItem.Text = "PLC通讯设置"; this.pLC通讯设置ToolStripMenuItem.Click += new System.EventHandler(this.pLC通讯设置ToolStripMenuItem_Click); // // pLC地址设置ToolStripMenuItem // this.pLC地址设置ToolStripMenuItem.Name = "pLC地址设置ToolStripMenuItem"; - this.pLC地址设置ToolStripMenuItem.Size = new System.Drawing.Size(297, 44); + this.pLC地址设置ToolStripMenuItem.Size = new System.Drawing.Size(340, 50); this.pLC地址设置ToolStripMenuItem.Text = "PLC地址设置"; this.pLC地址设置ToolStripMenuItem.Click += new System.EventHandler(this.pLC地址设置ToolStripMenuItem_Click); // // pLC报警设置ToolStripMenuItem // this.pLC报警设置ToolStripMenuItem.Name = "pLC报警设置ToolStripMenuItem"; - this.pLC报警设置ToolStripMenuItem.Size = new System.Drawing.Size(297, 44); + this.pLC报警设置ToolStripMenuItem.Size = new System.Drawing.Size(340, 50); this.pLC报警设置ToolStripMenuItem.Text = "PLC报警设置"; // // 流程管理ToolStripMenuItem // this.流程管理ToolStripMenuItem.Name = "流程管理ToolStripMenuItem"; - this.流程管理ToolStripMenuItem.Size = new System.Drawing.Size(145, 40); + this.流程管理ToolStripMenuItem.Size = new System.Drawing.Size(166, 45); this.流程管理ToolStripMenuItem.Text = "流程管理"; this.流程管理ToolStripMenuItem.Click += new System.EventHandler(this.流程管理ToolStripMenuItem_Click); // // mES接口配置ToolStripMenuItem // this.mES接口配置ToolStripMenuItem.Name = "mES接口配置ToolStripMenuItem"; - this.mES接口配置ToolStripMenuItem.Size = new System.Drawing.Size(203, 40); + this.mES接口配置ToolStripMenuItem.Size = new System.Drawing.Size(233, 45); this.mES接口配置ToolStripMenuItem.Text = "MES接口配置"; this.mES接口配置ToolStripMenuItem.Click += new System.EventHandler(this.mES接口配置ToolStripMenuItem_Click); // @@ -259,46 +240,46 @@ this.扭力曲线配置ToolStripMenuItem, this.压力曲线设置ToolStripMenuItem}); this.扫码枪配置ToolStripMenuItem.Name = "扫码枪配置ToolStripMenuItem"; - this.扫码枪配置ToolStripMenuItem.Size = new System.Drawing.Size(201, 40); + this.扫码枪配置ToolStripMenuItem.Size = new System.Drawing.Size(230, 45); this.扫码枪配置ToolStripMenuItem.Text = "外围设备配置"; // // 扫码枪配置ToolStripMenuItem1 // this.扫码枪配置ToolStripMenuItem1.Name = "扫码枪配置ToolStripMenuItem1"; - this.扫码枪配置ToolStripMenuItem1.Size = new System.Drawing.Size(331, 44); + this.扫码枪配置ToolStripMenuItem1.Size = new System.Drawing.Size(379, 50); this.扫码枪配置ToolStripMenuItem1.Text = "COM口配置"; this.扫码枪配置ToolStripMenuItem1.Click += new System.EventHandler(this.扫码枪配置ToolStripMenuItem1_Click); // // 扭力角度扭矩设置ToolStripMenuItem // this.扭力角度扭矩设置ToolStripMenuItem.Name = "扭力角度扭矩设置ToolStripMenuItem"; - this.扭力角度扭矩设置ToolStripMenuItem.Size = new System.Drawing.Size(331, 44); + this.扭力角度扭矩设置ToolStripMenuItem.Size = new System.Drawing.Size(379, 50); this.扭力角度扭矩设置ToolStripMenuItem.Text = "螺丝枪角度设置"; this.扭力角度扭矩设置ToolStripMenuItem.Click += new System.EventHandler(this.扭力角度扭矩设置ToolStripMenuItem_Click); // // 螺丝枪扭力设置ToolStripMenuItem // this.螺丝枪扭力设置ToolStripMenuItem.Name = "螺丝枪扭力设置ToolStripMenuItem"; - this.螺丝枪扭力设置ToolStripMenuItem.Size = new System.Drawing.Size(331, 44); + this.螺丝枪扭力设置ToolStripMenuItem.Size = new System.Drawing.Size(379, 50); this.螺丝枪扭力设置ToolStripMenuItem.Text = "螺丝枪扭力设置"; this.螺丝枪扭力设置ToolStripMenuItem.Click += new System.EventHandler(this.螺丝枪扭力设置ToolStripMenuItem_Click); // // 扭力曲线配置ToolStripMenuItem // this.扭力曲线配置ToolStripMenuItem.Name = "扭力曲线配置ToolStripMenuItem"; - this.扭力曲线配置ToolStripMenuItem.Size = new System.Drawing.Size(331, 44); + this.扭力曲线配置ToolStripMenuItem.Size = new System.Drawing.Size(379, 50); this.扭力曲线配置ToolStripMenuItem.Text = "扭力曲线配置"; // // 压力曲线设置ToolStripMenuItem // this.压力曲线设置ToolStripMenuItem.Name = "压力曲线设置ToolStripMenuItem"; - this.压力曲线设置ToolStripMenuItem.Size = new System.Drawing.Size(331, 44); + this.压力曲线设置ToolStripMenuItem.Size = new System.Drawing.Size(379, 50); this.压力曲线设置ToolStripMenuItem.Text = "压力曲线设置"; // // 系统参数配置ToolStripMenuItem // this.系统参数配置ToolStripMenuItem.Name = "系统参数配置ToolStripMenuItem"; - this.系统参数配置ToolStripMenuItem.Size = new System.Drawing.Size(201, 40); + this.系统参数配置ToolStripMenuItem.Size = new System.Drawing.Size(230, 45); this.系统参数配置ToolStripMenuItem.Text = "系统参数配置"; this.系统参数配置ToolStripMenuItem.Click += new System.EventHandler(this.系统参数配置ToolStripMenuItem_Click); // @@ -312,14 +293,14 @@ this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel8, 0, 3); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(5); + this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 4; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 23.69995F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 49.35099F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 22.89995F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 4.049108F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(1613, 935); + this.tableLayoutPanel1.Size = new System.Drawing.Size(1760, 1068); this.tableLayoutPanel1.TabIndex = 6; // // tableLayoutPanel4 @@ -335,12 +316,13 @@ this.tableLayoutPanel4.Controls.Add(this.groupBox2, 2, 0); this.tableLayoutPanel4.Controls.Add(this.gropb, 0, 1); this.tableLayoutPanel4.Controls.Add(this.原料包装LOT号, 0, 0); - this.tableLayoutPanel4.Location = new System.Drawing.Point(3, 224); + this.tableLayoutPanel4.Location = new System.Drawing.Point(3, 257); + this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.tableLayoutPanel4.Name = "tableLayoutPanel4"; this.tableLayoutPanel4.RowCount = 2; this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 60.04619F)); this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 39.95381F)); - this.tableLayoutPanel4.Size = new System.Drawing.Size(1607, 455); + this.tableLayoutPanel4.Size = new System.Drawing.Size(1754, 519); this.tableLayoutPanel4.TabIndex = 8; // // groupBox4 @@ -348,9 +330,11 @@ this.groupBox4.Controls.Add(this.tableLayoutPanel9); this.groupBox4.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox4.Location = new System.Drawing.Point(1127, 3); + this.groupBox4.Location = new System.Drawing.Point(1230, 4); + this.groupBox4.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(154, 267); + this.groupBox4.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.groupBox4.Size = new System.Drawing.Size(169, 303); this.groupBox4.TabIndex = 4; this.groupBox4.TabStop = false; this.groupBox4.Text = "PLC链接"; @@ -360,20 +344,21 @@ this.tableLayoutPanel9.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single; this.tableLayoutPanel9.ColumnCount = 1; this.tableLayoutPanel9.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel9.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel9.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 22F)); this.tableLayoutPanel9.Controls.Add(this.PLC1状态, 0, 0); this.tableLayoutPanel9.Controls.Add(this.PLC1名称, 0, 1); this.tableLayoutPanel9.Controls.Add(this.PLC1机台状态, 0, 2); this.tableLayoutPanel9.Controls.Add(this.PLC1时间, 0, 3); this.tableLayoutPanel9.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel9.Location = new System.Drawing.Point(3, 35); + this.tableLayoutPanel9.Location = new System.Drawing.Point(3, 41); + this.tableLayoutPanel9.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.tableLayoutPanel9.Name = "tableLayoutPanel9"; this.tableLayoutPanel9.RowCount = 4; this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 52F)); this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16F)); this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16F)); this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16F)); - this.tableLayoutPanel9.Size = new System.Drawing.Size(148, 229); + this.tableLayoutPanel9.Size = new System.Drawing.Size(163, 258); this.tableLayoutPanel9.TabIndex = 0; // // PLC1状态 @@ -381,9 +366,9 @@ this.PLC1状态.Anchor = System.Windows.Forms.AnchorStyles.None; this.PLC1状态.AutoSize = true; this.PLC1状态.Font = new System.Drawing.Font("宋体", 26.14286F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.PLC1状态.Location = new System.Drawing.Point(28, 28); + this.PLC1状态.Location = new System.Drawing.Point(30, 31); this.PLC1状态.Name = "PLC1状态"; - this.PLC1状态.Size = new System.Drawing.Size(91, 62); + this.PLC1状态.Size = new System.Drawing.Size(102, 70); this.PLC1状态.TabIndex = 0; this.PLC1状态.Text = "OK"; // @@ -392,9 +377,9 @@ this.PLC1名称.Anchor = System.Windows.Forms.AnchorStyles.None; this.PLC1名称.AutoSize = true; this.PLC1名称.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.PLC1名称.Location = new System.Drawing.Point(26, 121); + this.PLC1名称.Location = new System.Drawing.Point(26, 136); this.PLC1名称.Name = "PLC1名称"; - this.PLC1名称.Size = new System.Drawing.Size(96, 28); + this.PLC1名称.Size = new System.Drawing.Size(111, 33); this.PLC1名称.TabIndex = 12; this.PLC1名称.Text = "label6"; // @@ -403,9 +388,9 @@ this.PLC1机台状态.Anchor = System.Windows.Forms.AnchorStyles.None; this.PLC1机台状态.AutoSize = true; this.PLC1机台状态.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.PLC1机台状态.Location = new System.Drawing.Point(26, 157); + this.PLC1机台状态.Location = new System.Drawing.Point(26, 177); this.PLC1机台状态.Name = "PLC1机台状态"; - this.PLC1机台状态.Size = new System.Drawing.Size(96, 28); + this.PLC1机台状态.Size = new System.Drawing.Size(111, 33); this.PLC1机台状态.TabIndex = 2; this.PLC1机台状态.Text = "label6"; // @@ -414,9 +399,9 @@ this.PLC1时间.Anchor = System.Windows.Forms.AnchorStyles.None; this.PLC1时间.AutoSize = true; this.PLC1时间.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.PLC1时间.Location = new System.Drawing.Point(26, 195); + this.PLC1时间.Location = new System.Drawing.Point(26, 219); this.PLC1时间.Name = "PLC1时间"; - this.PLC1时间.Size = new System.Drawing.Size(96, 28); + this.PLC1时间.Size = new System.Drawing.Size(111, 33); this.PLC1时间.TabIndex = 8; this.PLC1时间.Text = "label4"; // @@ -425,10 +410,12 @@ this.groupBox2.Controls.Add(this.tableLayoutPanel7); this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox2.Location = new System.Drawing.Point(1287, 3); + this.groupBox2.Location = new System.Drawing.Point(1405, 4); + this.groupBox2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.groupBox2.Name = "groupBox2"; + this.groupBox2.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4); this.tableLayoutPanel4.SetRowSpan(this.groupBox2, 2); - this.groupBox2.Size = new System.Drawing.Size(317, 449); + this.groupBox2.Size = new System.Drawing.Size(346, 511); this.groupBox2.TabIndex = 3; this.groupBox2.TabStop = false; this.groupBox2.Text = "MES事件结果"; @@ -452,7 +439,8 @@ this.tableLayoutPanel7.Controls.Add(this.事件4, 1, 4); this.tableLayoutPanel7.Controls.Add(this.事件4结果, 1, 3); this.tableLayoutPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel7.Location = new System.Drawing.Point(3, 35); + this.tableLayoutPanel7.Location = new System.Drawing.Point(3, 41); + this.tableLayoutPanel7.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.tableLayoutPanel7.Name = "tableLayoutPanel7"; this.tableLayoutPanel7.RowCount = 6; this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F)); @@ -461,17 +449,17 @@ this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F)); this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); - this.tableLayoutPanel7.Size = new System.Drawing.Size(311, 411); + this.tableLayoutPanel7.Size = new System.Drawing.Size(340, 466); this.tableLayoutPanel7.TabIndex = 0; // // 事件4时间 // this.事件4时间.Anchor = System.Windows.Forms.AnchorStyles.None; this.事件4时间.AutoSize = true; - this.事件4时间.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件4时间.Location = new System.Drawing.Point(166, 368); + this.事件4时间.Font = new System.Drawing.Font("宋体", 10F); + this.事件4时间.Location = new System.Drawing.Point(187, 426); this.事件4时间.Name = "事件4时间"; - this.事件4时间.Size = new System.Drawing.Size(134, 42); + this.事件4时间.Size = new System.Drawing.Size(134, 27); this.事件4时间.TabIndex = 11; this.事件4时间.Text = "事件4时间"; // @@ -479,10 +467,10 @@ // this.事件3时间.Anchor = System.Windows.Forms.AnchorStyles.None; this.事件3时间.AutoSize = true; - this.事件3时间.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件3时间.Location = new System.Drawing.Point(11, 368); + this.事件3时间.Font = new System.Drawing.Font("宋体", 10F); + this.事件3时间.Location = new System.Drawing.Point(18, 426); this.事件3时间.Name = "事件3时间"; - this.事件3时间.Size = new System.Drawing.Size(134, 42); + this.事件3时间.Size = new System.Drawing.Size(134, 27); this.事件3时间.TabIndex = 10; this.事件3时间.Text = "事件3时间"; // @@ -490,21 +478,22 @@ // this.事件2时间.Anchor = System.Windows.Forms.AnchorStyles.None; this.事件2时间.AutoSize = true; - this.事件2时间.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件2时间.Location = new System.Drawing.Point(166, 164); + this.事件2时间.Font = new System.Drawing.Font("宋体", 10F); + this.事件2时间.Location = new System.Drawing.Point(187, 194); this.事件2时间.Name = "事件2时间"; - this.事件2时间.Size = new System.Drawing.Size(134, 40); + this.事件2时间.Size = new System.Drawing.Size(134, 27); this.事件2时间.TabIndex = 9; this.事件2时间.Text = "事件2时间"; // // 事件1时间 // this.事件1时间.Anchor = System.Windows.Forms.AnchorStyles.None; + this.事件1时间.AutoEllipsis = true; this.事件1时间.AutoSize = true; - this.事件1时间.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件1时间.Location = new System.Drawing.Point(11, 164); + this.事件1时间.Font = new System.Drawing.Font("宋体", 10F); + this.事件1时间.Location = new System.Drawing.Point(18, 194); this.事件1时间.Name = "事件1时间"; - this.事件1时间.Size = new System.Drawing.Size(134, 40); + this.事件1时间.Size = new System.Drawing.Size(134, 27); this.事件1时间.TabIndex = 8; this.事件1时间.Text = "事件1时间"; // @@ -512,10 +501,10 @@ // this.事件2.Anchor = System.Windows.Forms.AnchorStyles.None; this.事件2.AutoSize = true; - this.事件2.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件2.Location = new System.Drawing.Point(183, 126); + this.事件2.Font = new System.Drawing.Font("宋体", 12F); + this.事件2.Location = new System.Drawing.Point(207, 145); this.事件2.Name = "事件2"; - this.事件2.Size = new System.Drawing.Size(100, 34); + this.事件2.Size = new System.Drawing.Size(95, 33); this.事件2.TabIndex = 3; this.事件2.Text = "事件2"; // @@ -523,10 +512,10 @@ // this.事件1.Anchor = System.Windows.Forms.AnchorStyles.None; this.事件1.AutoSize = true; - this.事件1.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件1.Location = new System.Drawing.Point(28, 126); + this.事件1.Font = new System.Drawing.Font("宋体", 12F); + this.事件1.Location = new System.Drawing.Point(37, 145); this.事件1.Name = "事件1"; - this.事件1.Size = new System.Drawing.Size(100, 34); + this.事件1.Size = new System.Drawing.Size(95, 33); this.事件1.TabIndex = 2; this.事件1.Text = "事件1"; // @@ -535,9 +524,9 @@ this.事件2结果.Anchor = System.Windows.Forms.AnchorStyles.None; this.事件2结果.AutoSize = true; this.事件2结果.Font = new System.Drawing.Font("宋体", 26.14286F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件2结果.Location = new System.Drawing.Point(187, 30); + this.事件2结果.Location = new System.Drawing.Point(203, 34); this.事件2结果.Name = "事件2结果"; - this.事件2结果.Size = new System.Drawing.Size(91, 62); + this.事件2结果.Size = new System.Drawing.Size(102, 70); this.事件2结果.TabIndex = 1; this.事件2结果.Text = "OK"; // @@ -546,9 +535,9 @@ this.事件1结果.Anchor = System.Windows.Forms.AnchorStyles.None; this.事件1结果.AutoSize = true; this.事件1结果.Font = new System.Drawing.Font("宋体", 26.14286F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件1结果.Location = new System.Drawing.Point(32, 30); + this.事件1结果.Location = new System.Drawing.Point(34, 34); this.事件1结果.Name = "事件1结果"; - this.事件1结果.Size = new System.Drawing.Size(91, 62); + this.事件1结果.Size = new System.Drawing.Size(102, 70); this.事件1结果.TabIndex = 0; this.事件1结果.Text = "OK"; // @@ -557,9 +546,9 @@ this.事件3结果.Anchor = System.Windows.Forms.AnchorStyles.None; this.事件3结果.AutoSize = true; this.事件3结果.Font = new System.Drawing.Font("宋体", 26.14286F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件3结果.Location = new System.Drawing.Point(32, 234); + this.事件3结果.Location = new System.Drawing.Point(34, 264); this.事件3结果.Name = "事件3结果"; - this.事件3结果.Size = new System.Drawing.Size(91, 62); + this.事件3结果.Size = new System.Drawing.Size(102, 70); this.事件3结果.TabIndex = 4; this.事件3结果.Text = "OK"; // @@ -567,10 +556,10 @@ // this.事件3.Anchor = System.Windows.Forms.AnchorStyles.None; this.事件3.AutoSize = true; - this.事件3.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件3.Location = new System.Drawing.Point(28, 330); + this.事件3.Font = new System.Drawing.Font("宋体", 12F); + this.事件3.Location = new System.Drawing.Point(37, 375); this.事件3.Name = "事件3"; - this.事件3.Size = new System.Drawing.Size(100, 34); + this.事件3.Size = new System.Drawing.Size(95, 33); this.事件3.TabIndex = 6; this.事件3.Text = "事件3"; // @@ -578,10 +567,10 @@ // this.事件4.Anchor = System.Windows.Forms.AnchorStyles.None; this.事件4.AutoSize = true; - this.事件4.Font = new System.Drawing.Font("宋体", 14.14286F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件4.Location = new System.Drawing.Point(183, 330); + this.事件4.Font = new System.Drawing.Font("宋体", 12F); + this.事件4.Location = new System.Drawing.Point(207, 375); this.事件4.Name = "事件4"; - this.事件4.Size = new System.Drawing.Size(100, 34); + this.事件4.Size = new System.Drawing.Size(95, 33); this.事件4.TabIndex = 7; this.事件4.Text = "事件4"; // @@ -590,9 +579,9 @@ this.事件4结果.Anchor = System.Windows.Forms.AnchorStyles.None; this.事件4结果.AutoSize = true; this.事件4结果.Font = new System.Drawing.Font("宋体", 26.14286F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.事件4结果.Location = new System.Drawing.Point(187, 234); + this.事件4结果.Location = new System.Drawing.Point(203, 264); this.事件4结果.Name = "事件4结果"; - this.事件4结果.Size = new System.Drawing.Size(91, 62); + this.事件4结果.Size = new System.Drawing.Size(102, 70); this.事件4结果.TabIndex = 5; this.事件4结果.Text = "OK"; // @@ -602,27 +591,29 @@ this.gropb.Controls.Add(this.tableLayoutPanel6); this.gropb.Dock = System.Windows.Forms.DockStyle.Fill; this.gropb.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.gropb.Location = new System.Drawing.Point(3, 276); + this.gropb.Location = new System.Drawing.Point(3, 315); + this.gropb.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.gropb.Name = "gropb"; - this.gropb.Size = new System.Drawing.Size(1278, 176); + this.gropb.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.gropb.Size = new System.Drawing.Size(1396, 200); this.gropb.TabIndex = 1; this.gropb.TabStop = false; - this.gropb.Text = "Tray盘二维码"; + this.gropb.Text = "MES提示:"; // // tableLayoutPanel6 // this.tableLayoutPanel6.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single; - this.tableLayoutPanel6.ColumnCount = 2; - this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); - this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 80F)); - this.tableLayoutPanel6.Controls.Add(this.MES提示信息, 1, 0); - this.tableLayoutPanel6.Controls.Add(this.Tray盘, 0, 0); + this.tableLayoutPanel6.ColumnCount = 1; + this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel6.Controls.Add(this.MES提示信息, 0, 0); this.tableLayoutPanel6.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel6.Location = new System.Drawing.Point(3, 35); + this.tableLayoutPanel6.Location = new System.Drawing.Point(3, 41); + this.tableLayoutPanel6.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.tableLayoutPanel6.Name = "tableLayoutPanel6"; this.tableLayoutPanel6.RowCount = 1; this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel6.Size = new System.Drawing.Size(1272, 138); + this.tableLayoutPanel6.Size = new System.Drawing.Size(1390, 155); this.tableLayoutPanel6.TabIndex = 1; // // MES提示信息 @@ -630,58 +621,49 @@ this.MES提示信息.Anchor = System.Windows.Forms.AnchorStyles.None; this.MES提示信息.AutoSize = true; this.MES提示信息.Font = new System.Drawing.Font("宋体", 21.85714F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.MES提示信息.Location = new System.Drawing.Point(401, 18); + this.MES提示信息.Location = new System.Drawing.Point(83, 48); this.MES提示信息.Name = "MES提示信息"; - this.MES提示信息.Size = new System.Drawing.Size(724, 102); + this.MES提示信息.Size = new System.Drawing.Size(1224, 59); this.MES提示信息.TabIndex = 6; this.MES提示信息.Text = "MES提示信息:11111333332222222222222222"; // - // Tray盘 - // - this.Tray盘.Anchor = System.Windows.Forms.AnchorStyles.None; - this.Tray盘.AutoSize = true; - this.Tray盘.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.Tray盘.Location = new System.Drawing.Point(24, 48); - this.Tray盘.Name = "Tray盘"; - this.Tray盘.Size = new System.Drawing.Size(207, 42); - this.Tray盘.TabIndex = 3; - this.Tray盘.Text = "MES提示:"; - // // 原料包装LOT号 // this.原料包装LOT号.Controls.Add(this.tableLayoutPanel5); this.原料包装LOT号.Dock = System.Windows.Forms.DockStyle.Fill; this.原料包装LOT号.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.原料包装LOT号.Location = new System.Drawing.Point(3, 3); + this.原料包装LOT号.Location = new System.Drawing.Point(3, 4); + this.原料包装LOT号.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.原料包装LOT号.Name = "原料包装LOT号"; - this.原料包装LOT号.Size = new System.Drawing.Size(1118, 267); + this.原料包装LOT号.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.原料包装LOT号.Size = new System.Drawing.Size(1221, 303); this.原料包装LOT号.TabIndex = 0; this.原料包装LOT号.TabStop = false; - this.原料包装LOT号.Text = "原料包装LOT号"; + this.原料包装LOT号.Text = "产品信息:"; // // tableLayoutPanel5 // this.tableLayoutPanel5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.tableLayoutPanel5.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single; this.tableLayoutPanel5.ColumnCount = 3; - this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 22.22222F)); - this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 66.66666F)); - this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.11111F)); - this.tableLayoutPanel5.Controls.Add(this.Tray盘二维码, 1, 1); - this.tableLayoutPanel5.Controls.Add(this.MES提示, 0, 1); + this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 21.75624F)); + this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67.06608F)); + this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 11.17768F)); this.tableLayoutPanel5.Controls.Add(this.LOT号显示, 0, 0); this.tableLayoutPanel5.Controls.Add(this.LOT号, 1, 0); this.tableLayoutPanel5.Controls.Add(this.胶水上下线, 2, 0); - this.tableLayoutPanel5.Controls.Add(this.剩余寿命, 2, 2); - this.tableLayoutPanel5.Controls.Add(this.tableLayoutPanel10, 0, 2); + this.tableLayoutPanel5.Controls.Add(this.剩余寿命, 2, 1); + this.tableLayoutPanel5.Controls.Add(this.MES提示, 0, 1); + this.tableLayoutPanel5.Controls.Add(this.Tray盘二维码, 1, 1); this.tableLayoutPanel5.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel5.Location = new System.Drawing.Point(3, 35); + this.tableLayoutPanel5.Location = new System.Drawing.Point(3, 41); + this.tableLayoutPanel5.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.tableLayoutPanel5.Name = "tableLayoutPanel5"; - this.tableLayoutPanel5.RowCount = 3; - this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); - this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel5.RowCount = 2; this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel5.Size = new System.Drawing.Size(1112, 229); + this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel5.Size = new System.Drawing.Size(1215, 258); this.tableLayoutPanel5.TabIndex = 0; // // Tray盘二维码 @@ -689,9 +671,9 @@ this.Tray盘二维码.Anchor = System.Windows.Forms.AnchorStyles.None; this.Tray盘二维码.AutoSize = true; this.Tray盘二维码.Font = new System.Drawing.Font("宋体", 21.85714F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.Tray盘二维码.Location = new System.Drawing.Point(328, 60); + this.Tray盘二维码.Location = new System.Drawing.Point(339, 163); this.Tray盘二维码.Name = "Tray盘二维码"; - this.Tray盘二维码.Size = new System.Drawing.Size(577, 51); + this.Tray盘二维码.Size = new System.Drawing.Size(664, 59); this.Tray盘二维码.TabIndex = 2; this.Tray盘二维码.Text = "托盘二维码:921391293"; // @@ -700,9 +682,9 @@ this.MES提示.Anchor = System.Windows.Forms.AnchorStyles.None; this.MES提示.AutoSize = true; this.MES提示.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.MES提示.Location = new System.Drawing.Point(31, 65); + this.MES提示.Location = new System.Drawing.Point(26, 169); this.MES提示.Name = "MES提示"; - this.MES提示.Size = new System.Drawing.Size(186, 42); + this.MES提示.Size = new System.Drawing.Size(212, 48); this.MES提示.TabIndex = 4; this.MES提示.Text = "托盘码:"; // @@ -711,9 +693,9 @@ this.LOT号显示.Anchor = System.Windows.Forms.AnchorStyles.None; this.LOT号显示.AutoSize = true; this.LOT号显示.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.LOT号显示.Location = new System.Drawing.Point(73, 8); + this.LOT号显示.Location = new System.Drawing.Point(74, 40); this.LOT号显示.Name = "LOT号显示"; - this.LOT号显示.Size = new System.Drawing.Size(102, 42); + this.LOT号显示.Size = new System.Drawing.Size(116, 48); this.LOT号显示.TabIndex = 2; this.LOT号显示.Text = "SN:"; // @@ -722,19 +704,19 @@ this.LOT号.Anchor = System.Windows.Forms.AnchorStyles.None; this.LOT号.AutoSize = true; this.LOT号.Font = new System.Drawing.Font("宋体", 21.85714F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.LOT号.Location = new System.Drawing.Point(405, 3); + this.LOT号.Location = new System.Drawing.Point(473, 35); this.LOT号.Name = "LOT号"; - this.LOT号.Size = new System.Drawing.Size(423, 51); + this.LOT号.Size = new System.Drawing.Size(395, 59); this.LOT号.TabIndex = 0; - this.LOT号.Text = "LOT号:23199191"; + this.LOT号.Text = "SN:23199191"; // // 胶水上下线 // this.胶水上下线.Dock = System.Windows.Forms.DockStyle.Fill; - this.胶水上下线.Location = new System.Drawing.Point(990, 4); + this.胶水上下线.Location = new System.Drawing.Point(1081, 5); + this.胶水上下线.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.胶水上下线.Name = "胶水上下线"; - this.tableLayoutPanel5.SetRowSpan(this.胶水上下线, 2); - this.胶水上下线.Size = new System.Drawing.Size(118, 107); + this.胶水上下线.Size = new System.Drawing.Size(130, 119); this.胶水上下线.TabIndex = 3; this.胶水上下线.Text = "材料\r\n上下线"; this.胶水上下线.UseVisualStyleBackColor = true; @@ -747,11 +729,11 @@ | System.Windows.Forms.AnchorStyles.Right))); this.groupBox1.Controls.Add(this.tableLayoutPanel3); this.groupBox1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox1.Location = new System.Drawing.Point(4, 4); - this.groupBox1.Margin = new System.Windows.Forms.Padding(4); + this.groupBox1.Location = new System.Drawing.Point(4, 5); + this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Padding = new System.Windows.Forms.Padding(4); - this.groupBox1.Size = new System.Drawing.Size(1605, 213); + this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.groupBox1.Size = new System.Drawing.Size(1752, 243); this.groupBox1.TabIndex = 4; this.groupBox1.TabStop = false; this.groupBox1.Text = "处理界面"; @@ -766,18 +748,32 @@ this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 8F)); this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 1F)); this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 90F)); - this.tableLayoutPanel3.Controls.Add(this.tableLayoutPanel2, 3, 0); this.tableLayoutPanel3.Controls.Add(this.开始处理, 1, 1); - this.tableLayoutPanel3.Location = new System.Drawing.Point(18, 42); - this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(5); + this.tableLayoutPanel3.Controls.Add(this.tableLayoutPanel2, 3, 0); + this.tableLayoutPanel3.Location = new System.Drawing.Point(20, 48); + this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); this.tableLayoutPanel3.Name = "tableLayoutPanel3"; this.tableLayoutPanel3.RowCount = 3; this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 80F)); this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); - this.tableLayoutPanel3.Size = new System.Drawing.Size(1577, 161); + this.tableLayoutPanel3.Size = new System.Drawing.Size(1721, 183); this.tableLayoutPanel3.TabIndex = 4; // + // 开始处理 + // + this.开始处理.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); + this.开始处理.Dock = System.Windows.Forms.DockStyle.Fill; + this.开始处理.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.开始处理.Location = new System.Drawing.Point(21, 23); + this.开始处理.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.开始处理.Name = "开始处理"; + this.开始处理.Size = new System.Drawing.Size(129, 136); + this.开始处理.TabIndex = 1; + this.开始处理.Text = "开始处理"; + this.开始处理.UseVisualStyleBackColor = false; + this.开始处理.Click += new System.EventHandler(this.开始处理_Click); + // // tableLayoutPanel2 // this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -791,13 +787,6 @@ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66667F)); this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66667F)); this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66667F)); - this.tableLayoutPanel2.Controls.Add(this.lineremark7, 2, 2); - this.tableLayoutPanel2.Controls.Add(this.lineremark6, 1, 2); - this.tableLayoutPanel2.Controls.Add(this.lineremark5, 0, 2); - this.tableLayoutPanel2.Controls.Add(this.lineremark4, 3, 1); - this.tableLayoutPanel2.Controls.Add(this.lineremark3, 2, 1); - this.tableLayoutPanel2.Controls.Add(this.lineremark2, 1, 1); - this.tableLayoutPanel2.Controls.Add(this.lineremark1, 0, 1); this.tableLayoutPanel2.Controls.Add(this.linemode, 3, 0); this.tableLayoutPanel2.Controls.Add(this.MES通讯时间, 5, 1); this.tableLayoutPanel2.Controls.Add(this.MES链接状态, 4, 1); @@ -806,27 +795,41 @@ this.tableLayoutPanel2.Controls.Add(this.linetype, 2, 0); this.tableLayoutPanel2.Controls.Add(this.linecode, 1, 0); this.tableLayoutPanel2.Controls.Add(this.linename, 0, 0); - this.tableLayoutPanel2.Location = new System.Drawing.Point(161, 5); - this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(5); + this.tableLayoutPanel2.Location = new System.Drawing.Point(176, 6); + this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); this.tableLayoutPanel2.Name = "tableLayoutPanel2"; this.tableLayoutPanel2.RowCount = 3; this.tableLayoutPanel3.SetRowSpan(this.tableLayoutPanel2, 3); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); - this.tableLayoutPanel2.Size = new System.Drawing.Size(1411, 151); + this.tableLayoutPanel2.Size = new System.Drawing.Size(1540, 171); this.tableLayoutPanel2.TabIndex = 3; // + // linemode + // + this.linemode.AutoSize = true; + this.linemode.Dock = System.Windows.Forms.DockStyle.Fill; + this.linemode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.linemode.Location = new System.Drawing.Point(774, 1); + this.linemode.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.linemode.Name = "linemode"; + this.tableLayoutPanel2.SetRowSpan(this.linemode, 3); + this.linemode.Size = new System.Drawing.Size(245, 169); + this.linemode.TabIndex = 16; + this.linemode.Text = "MachineID"; + this.linemode.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // // MES通讯时间 // this.MES通讯时间.AutoSize = true; this.MES通讯时间.Dock = System.Windows.Forms.DockStyle.Fill; this.MES通讯时间.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.MES通讯时间.Location = new System.Drawing.Point(1177, 51); + this.MES通讯时间.Location = new System.Drawing.Point(1286, 57); this.MES通讯时间.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); this.MES通讯时间.Name = "MES通讯时间"; this.tableLayoutPanel2.SetRowSpan(this.MES通讯时间, 2); - this.MES通讯时间.Size = new System.Drawing.Size(228, 99); + this.MES通讯时间.Size = new System.Drawing.Size(248, 113); this.MES通讯时间.TabIndex = 15; this.MES通讯时间.Text = "MES通讯时间:None"; this.MES通讯时间.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -836,11 +839,11 @@ this.MES链接状态.AutoSize = true; this.MES链接状态.Dock = System.Windows.Forms.DockStyle.Fill; this.MES链接状态.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.MES链接状态.Location = new System.Drawing.Point(943, 51); + this.MES链接状态.Location = new System.Drawing.Point(1030, 57); this.MES链接状态.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); this.MES链接状态.Name = "MES链接状态"; this.tableLayoutPanel2.SetRowSpan(this.MES链接状态, 2); - this.MES链接状态.Size = new System.Drawing.Size(223, 99); + this.MES链接状态.Size = new System.Drawing.Size(245, 113); this.MES链接状态.TabIndex = 12; this.MES链接状态.Text = "MES链接状态:None"; this.MES链接状态.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -850,10 +853,10 @@ this.当前时间.AutoSize = true; this.当前时间.Dock = System.Windows.Forms.DockStyle.Fill; this.当前时间.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.当前时间.Location = new System.Drawing.Point(1177, 1); + this.当前时间.Location = new System.Drawing.Point(1286, 1); this.当前时间.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); this.当前时间.Name = "当前时间"; - this.当前时间.Size = new System.Drawing.Size(228, 49); + this.当前时间.Size = new System.Drawing.Size(248, 55); this.当前时间.TabIndex = 11; this.当前时间.Text = "当前时间:"; this.当前时间.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -863,10 +866,10 @@ this.操作人员ID.AutoSize = true; this.操作人员ID.Dock = System.Windows.Forms.DockStyle.Fill; this.操作人员ID.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.操作人员ID.Location = new System.Drawing.Point(943, 1); + this.操作人员ID.Location = new System.Drawing.Point(1030, 1); this.操作人员ID.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); this.操作人员ID.Name = "操作人员ID"; - this.操作人员ID.Size = new System.Drawing.Size(223, 49); + this.操作人员ID.Size = new System.Drawing.Size(245, 55); this.操作人员ID.TabIndex = 6; this.操作人员ID.Text = "操作人员ID:"; this.操作人员ID.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -875,26 +878,28 @@ // this.linetype.AutoSize = true; this.linetype.Dock = System.Windows.Forms.DockStyle.Fill; - this.linetype.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.linetype.Location = new System.Drawing.Point(475, 1); + this.linetype.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.linetype.Location = new System.Drawing.Point(518, 1); this.linetype.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); this.linetype.Name = "linetype"; - this.linetype.Size = new System.Drawing.Size(223, 49); + this.tableLayoutPanel2.SetRowSpan(this.linetype, 3); + this.linetype.Size = new System.Drawing.Size(245, 169); this.linetype.TabIndex = 5; - this.linetype.Text = "机台编号:"; + this.linetype.Text = "StationID"; this.linetype.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // linecode // this.linecode.AutoSize = true; this.linecode.Dock = System.Windows.Forms.DockStyle.Fill; - this.linecode.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.linecode.Location = new System.Drawing.Point(241, 1); + this.linecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.linecode.Location = new System.Drawing.Point(262, 1); this.linecode.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); this.linecode.Name = "linecode"; - this.linecode.Size = new System.Drawing.Size(223, 49); + this.tableLayoutPanel2.SetRowSpan(this.linecode, 3); + this.linecode.Size = new System.Drawing.Size(245, 169); this.linecode.TabIndex = 4; - this.linecode.Text = "段别:"; + this.linecode.Text = "Line"; this.linecode.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // linename @@ -905,25 +910,12 @@ this.linename.Location = new System.Drawing.Point(6, 1); this.linename.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); this.linename.Name = "linename"; - this.linename.Size = new System.Drawing.Size(224, 49); + this.tableLayoutPanel2.SetRowSpan(this.linename, 3); + this.linename.Size = new System.Drawing.Size(245, 169); this.linename.TabIndex = 3; this.linename.Text = "线别:"; this.linename.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // 开始处理 - // - this.开始处理.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); - this.开始处理.Dock = System.Windows.Forms.DockStyle.Fill; - this.开始处理.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.开始处理.Location = new System.Drawing.Point(19, 20); - this.开始处理.Margin = new System.Windows.Forms.Padding(4); - this.开始处理.Name = "开始处理"; - this.开始处理.Size = new System.Drawing.Size(118, 120); - this.开始处理.TabIndex = 1; - this.开始处理.Text = "开始处理"; - this.开始处理.UseVisualStyleBackColor = false; - this.开始处理.Click += new System.EventHandler(this.开始处理_Click); - // // groupBox3 // this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -931,11 +923,11 @@ | System.Windows.Forms.AnchorStyles.Right))); this.groupBox3.Controls.Add(this.richTextBox1); this.groupBox3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.groupBox3.Location = new System.Drawing.Point(4, 686); - this.groupBox3.Margin = new System.Windows.Forms.Padding(4); + this.groupBox3.Location = new System.Drawing.Point(4, 785); + this.groupBox3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Padding = new System.Windows.Forms.Padding(4); - this.groupBox3.Size = new System.Drawing.Size(1605, 206); + this.groupBox3.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.groupBox3.Size = new System.Drawing.Size(1752, 234); this.groupBox3.TabIndex = 6; this.groupBox3.TabStop = false; this.groupBox3.Text = "日志页面"; @@ -946,10 +938,10 @@ | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.richTextBox1.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.richTextBox1.Location = new System.Drawing.Point(18, 42); - this.richTextBox1.Margin = new System.Windows.Forms.Padding(5); + this.richTextBox1.Location = new System.Drawing.Point(20, 48); + this.richTextBox1.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); this.richTextBox1.Name = "richTextBox1"; - this.richTextBox1.Size = new System.Drawing.Size(1574, 151); + this.richTextBox1.Size = new System.Drawing.Size(1718, 171); this.richTextBox1.TabIndex = 0; this.richTextBox1.Text = ""; // @@ -972,11 +964,12 @@ this.tableLayoutPanel8.Controls.Add(this.底部注释4, 3, 0); this.tableLayoutPanel8.Controls.Add(this.底部注释5, 4, 0); this.tableLayoutPanel8.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel8.Location = new System.Drawing.Point(3, 899); + this.tableLayoutPanel8.Location = new System.Drawing.Point(3, 1028); + this.tableLayoutPanel8.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.tableLayoutPanel8.Name = "tableLayoutPanel8"; this.tableLayoutPanel8.RowCount = 1; this.tableLayoutPanel8.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel8.Size = new System.Drawing.Size(1607, 33); + this.tableLayoutPanel8.Size = new System.Drawing.Size(1754, 36); this.tableLayoutPanel8.TabIndex = 7; // // 底部注释1 @@ -985,7 +978,7 @@ this.底部注释1.AutoSize = true; this.底部注释1.Location = new System.Drawing.Point(3, 6); this.底部注释1.Name = "底部注释1"; - this.底部注释1.Size = new System.Drawing.Size(105, 21); + this.底部注释1.Size = new System.Drawing.Size(118, 24); this.底部注释1.TabIndex = 0; this.底部注释1.Text = "底部注释1"; // @@ -993,9 +986,9 @@ // this.底部注释2.Anchor = System.Windows.Forms.AnchorStyles.Left; this.底部注释2.AutoSize = true; - this.底部注释2.Location = new System.Drawing.Point(163, 6); + this.底部注释2.Location = new System.Drawing.Point(178, 6); this.底部注释2.Name = "底部注释2"; - this.底部注释2.Size = new System.Drawing.Size(105, 21); + this.底部注释2.Size = new System.Drawing.Size(118, 24); this.底部注释2.TabIndex = 1; this.底部注释2.Text = "底部注释2"; // @@ -1003,9 +996,9 @@ // this.底部注释3.Anchor = System.Windows.Forms.AnchorStyles.Left; this.底部注释3.AutoSize = true; - this.底部注释3.Location = new System.Drawing.Point(323, 6); + this.底部注释3.Location = new System.Drawing.Point(353, 6); this.底部注释3.Name = "底部注释3"; - this.底部注释3.Size = new System.Drawing.Size(105, 21); + this.底部注释3.Size = new System.Drawing.Size(118, 24); this.底部注释3.TabIndex = 2; this.底部注释3.Text = "底部注释3"; // @@ -1013,9 +1006,9 @@ // this.底部注释4.Anchor = System.Windows.Forms.AnchorStyles.Left; this.底部注释4.AutoSize = true; - this.底部注释4.Location = new System.Drawing.Point(483, 6); + this.底部注释4.Location = new System.Drawing.Point(528, 6); this.底部注释4.Name = "底部注释4"; - this.底部注释4.Size = new System.Drawing.Size(105, 21); + this.底部注释4.Size = new System.Drawing.Size(118, 24); this.底部注释4.TabIndex = 3; this.底部注释4.Text = "底部注释4"; // @@ -1023,9 +1016,9 @@ // this.底部注释5.Anchor = System.Windows.Forms.AnchorStyles.Left; this.底部注释5.AutoSize = true; - this.底部注释5.Location = new System.Drawing.Point(643, 6); + this.底部注释5.Location = new System.Drawing.Point(703, 6); this.底部注释5.Name = "底部注释5"; - this.底部注释5.Size = new System.Drawing.Size(105, 21); + this.底部注释5.Size = new System.Drawing.Size(118, 24); this.底部注释5.TabIndex = 4; this.底部注释5.Text = "底部注释5"; // @@ -1040,268 +1033,21 @@ this.剩余寿命.Anchor = System.Windows.Forms.AnchorStyles.None; this.剩余寿命.AutoSize = true; this.剩余寿命.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.剩余寿命.Location = new System.Drawing.Point(1001, 143); + this.剩余寿命.Location = new System.Drawing.Point(1090, 160); this.剩余寿命.Name = "剩余寿命"; - this.剩余寿命.Size = new System.Drawing.Size(96, 56); + this.剩余寿命.Size = new System.Drawing.Size(111, 66); this.剩余寿命.TabIndex = 5; this.剩余寿命.Text = "剩余寿命"; // - // tableLayoutPanel10 - // - this.tableLayoutPanel10.ColumnCount = 3; - this.tableLayoutPanel5.SetColumnSpan(this.tableLayoutPanel10, 2); - this.tableLayoutPanel10.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); - this.tableLayoutPanel10.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); - this.tableLayoutPanel10.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); - this.tableLayoutPanel10.Controls.Add(this.barcode9, 2, 2); - this.tableLayoutPanel10.Controls.Add(this.barcode8, 1, 2); - this.tableLayoutPanel10.Controls.Add(this.barcode7, 0, 2); - this.tableLayoutPanel10.Controls.Add(this.barcode6, 2, 1); - this.tableLayoutPanel10.Controls.Add(this.barcode5, 1, 1); - this.tableLayoutPanel10.Controls.Add(this.barcode4, 0, 1); - this.tableLayoutPanel10.Controls.Add(this.barcode3, 2, 0); - this.tableLayoutPanel10.Controls.Add(this.barcode2, 1, 0); - this.tableLayoutPanel10.Controls.Add(this.barcode1, 0, 0); - this.tableLayoutPanel10.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel10.Location = new System.Drawing.Point(4, 118); - this.tableLayoutPanel10.Name = "tableLayoutPanel10"; - this.tableLayoutPanel10.RowCount = 3; - this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); - this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); - this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); - this.tableLayoutPanel10.Size = new System.Drawing.Size(979, 107); - this.tableLayoutPanel10.TabIndex = 6; - // - // linemode - // - this.linemode.AutoSize = true; - this.linemode.Dock = System.Windows.Forms.DockStyle.Fill; - this.linemode.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.linemode.Location = new System.Drawing.Point(709, 1); - this.linemode.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.linemode.Name = "linemode"; - this.linemode.Size = new System.Drawing.Size(223, 49); - this.linemode.TabIndex = 16; - this.linemode.Text = "机台编号:"; - this.linemode.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lineremark1 - // - this.lineremark1.AutoSize = true; - this.lineremark1.Dock = System.Windows.Forms.DockStyle.Fill; - this.lineremark1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.lineremark1.Location = new System.Drawing.Point(6, 51); - this.lineremark1.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.lineremark1.Name = "lineremark1"; - this.lineremark1.Size = new System.Drawing.Size(224, 49); - this.lineremark1.TabIndex = 17; - this.lineremark1.Text = "机台编号:"; - this.lineremark1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lineremark2 - // - this.lineremark2.AutoSize = true; - this.lineremark2.Dock = System.Windows.Forms.DockStyle.Fill; - this.lineremark2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.lineremark2.Location = new System.Drawing.Point(241, 51); - this.lineremark2.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.lineremark2.Name = "lineremark2"; - this.lineremark2.Size = new System.Drawing.Size(223, 49); - this.lineremark2.TabIndex = 18; - this.lineremark2.Text = "机台编号:"; - this.lineremark2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lineremark3 - // - this.lineremark3.AutoSize = true; - this.lineremark3.Dock = System.Windows.Forms.DockStyle.Fill; - this.lineremark3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.lineremark3.Location = new System.Drawing.Point(475, 51); - this.lineremark3.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.lineremark3.Name = "lineremark3"; - this.lineremark3.Size = new System.Drawing.Size(223, 49); - this.lineremark3.TabIndex = 19; - this.lineremark3.Text = "机台编号:"; - this.lineremark3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lineremark4 - // - this.lineremark4.AutoSize = true; - this.lineremark4.Dock = System.Windows.Forms.DockStyle.Fill; - this.lineremark4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.lineremark4.Location = new System.Drawing.Point(709, 51); - this.lineremark4.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.lineremark4.Name = "lineremark4"; - this.lineremark4.Size = new System.Drawing.Size(223, 49); - this.lineremark4.TabIndex = 20; - this.lineremark4.Text = "机台编号:"; - this.lineremark4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lineremark5 - // - this.lineremark5.AutoSize = true; - this.lineremark5.Dock = System.Windows.Forms.DockStyle.Fill; - this.lineremark5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.lineremark5.Location = new System.Drawing.Point(6, 101); - this.lineremark5.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.lineremark5.Name = "lineremark5"; - this.lineremark5.Size = new System.Drawing.Size(224, 49); - this.lineremark5.TabIndex = 21; - this.lineremark5.Text = "机台编号:"; - this.lineremark5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lineremark6 - // - this.lineremark6.AutoSize = true; - this.lineremark6.Dock = System.Windows.Forms.DockStyle.Fill; - this.lineremark6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.lineremark6.Location = new System.Drawing.Point(241, 101); - this.lineremark6.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.lineremark6.Name = "lineremark6"; - this.lineremark6.Size = new System.Drawing.Size(223, 49); - this.lineremark6.TabIndex = 22; - this.lineremark6.Text = "机台编号:"; - this.lineremark6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lineremark7 - // - this.lineremark7.AutoSize = true; - this.lineremark7.Dock = System.Windows.Forms.DockStyle.Fill; - this.lineremark7.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.lineremark7.Location = new System.Drawing.Point(475, 101); - this.lineremark7.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.lineremark7.Name = "lineremark7"; - this.lineremark7.Size = new System.Drawing.Size(223, 49); - this.lineremark7.TabIndex = 23; - this.lineremark7.Text = "机台编号:"; - this.lineremark7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // barcode1 - // - this.barcode1.AutoSize = true; - this.barcode1.Dock = System.Windows.Forms.DockStyle.Fill; - this.barcode1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.barcode1.Location = new System.Drawing.Point(5, 0); - this.barcode1.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.barcode1.Name = "barcode1"; - this.barcode1.Size = new System.Drawing.Size(316, 35); - this.barcode1.TabIndex = 22; - this.barcode1.Text = "机台编号:"; - this.barcode1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // barcode2 - // - this.barcode2.AutoSize = true; - this.barcode2.Dock = System.Windows.Forms.DockStyle.Fill; - this.barcode2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.barcode2.Location = new System.Drawing.Point(331, 0); - this.barcode2.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.barcode2.Name = "barcode2"; - this.barcode2.Size = new System.Drawing.Size(316, 35); - this.barcode2.TabIndex = 23; - this.barcode2.Text = "机台编号:"; - this.barcode2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // barcode3 - // - this.barcode3.AutoSize = true; - this.barcode3.Dock = System.Windows.Forms.DockStyle.Fill; - this.barcode3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.barcode3.Location = new System.Drawing.Point(657, 0); - this.barcode3.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.barcode3.Name = "barcode3"; - this.barcode3.Size = new System.Drawing.Size(317, 35); - this.barcode3.TabIndex = 24; - this.barcode3.Text = "机台编号:"; - this.barcode3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // barcode4 - // - this.barcode4.AutoSize = true; - this.barcode4.Dock = System.Windows.Forms.DockStyle.Fill; - this.barcode4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.barcode4.Location = new System.Drawing.Point(5, 35); - this.barcode4.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.barcode4.Name = "barcode4"; - this.barcode4.Size = new System.Drawing.Size(316, 35); - this.barcode4.TabIndex = 25; - this.barcode4.Text = "机台编号:"; - this.barcode4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // barcode5 - // - this.barcode5.AutoSize = true; - this.barcode5.Dock = System.Windows.Forms.DockStyle.Fill; - this.barcode5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.barcode5.Location = new System.Drawing.Point(331, 35); - this.barcode5.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.barcode5.Name = "barcode5"; - this.barcode5.Size = new System.Drawing.Size(316, 35); - this.barcode5.TabIndex = 26; - this.barcode5.Text = "机台编号:"; - this.barcode5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // barcode6 - // - this.barcode6.AutoSize = true; - this.barcode6.Dock = System.Windows.Forms.DockStyle.Fill; - this.barcode6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.barcode6.Location = new System.Drawing.Point(657, 35); - this.barcode6.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.barcode6.Name = "barcode6"; - this.barcode6.Size = new System.Drawing.Size(317, 35); - this.barcode6.TabIndex = 27; - this.barcode6.Text = "机台编号:"; - this.barcode6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // barcode7 - // - this.barcode7.AutoSize = true; - this.barcode7.Dock = System.Windows.Forms.DockStyle.Fill; - this.barcode7.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.barcode7.Location = new System.Drawing.Point(5, 70); - this.barcode7.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.barcode7.Name = "barcode7"; - this.barcode7.Size = new System.Drawing.Size(316, 37); - this.barcode7.TabIndex = 28; - this.barcode7.Text = "机台编号:"; - this.barcode7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // barcode8 - // - this.barcode8.AutoSize = true; - this.barcode8.Dock = System.Windows.Forms.DockStyle.Fill; - this.barcode8.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.barcode8.Location = new System.Drawing.Point(331, 70); - this.barcode8.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.barcode8.Name = "barcode8"; - this.barcode8.Size = new System.Drawing.Size(316, 37); - this.barcode8.TabIndex = 29; - this.barcode8.Text = "机台编号:"; - this.barcode8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // barcode9 - // - this.barcode9.AutoSize = true; - this.barcode9.Dock = System.Windows.Forms.DockStyle.Fill; - this.barcode9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.barcode9.Location = new System.Drawing.Point(657, 70); - this.barcode9.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.barcode9.Name = "barcode9"; - this.barcode9.Size = new System.Drawing.Size(317, 37); - this.barcode9.TabIndex = 30; - this.barcode9.Text = "机台编号:"; - this.barcode9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // // MainForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 21F); + this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1613, 935); + this.ClientSize = new System.Drawing.Size(1760, 1068); this.Controls.Add(this.menuStrip1); this.Controls.Add(this.tableLayoutPanel1); this.MainMenuStrip = this.menuStrip1; - this.Margin = new System.Windows.Forms.Padding(4); + this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Name = "MainForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Form1"; @@ -1330,8 +1076,6 @@ this.groupBox3.ResumeLayout(false); this.tableLayoutPanel8.ResumeLayout(false); this.tableLayoutPanel8.PerformLayout(); - this.tableLayoutPanel10.ResumeLayout(false); - this.tableLayoutPanel10.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -1356,18 +1100,10 @@ private System.Windows.Forms.GroupBox groupBox3; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.ToolStripMenuItem 扭力曲线配置ToolStripMenuItem; - private System.Windows.Forms.Label 操作人员ID; - private System.Windows.Forms.Label linetype; - private System.Windows.Forms.Label linecode; - private System.Windows.Forms.Label linename; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private System.Windows.Forms.ToolStripMenuItem 产线管理ToolStripMenuItem; private System.Windows.Forms.RichTextBox richTextBox1; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; private System.Windows.Forms.Button 开始处理; - private System.Windows.Forms.Label MES链接状态; - private System.Windows.Forms.Label 当前时间; - private System.Windows.Forms.Label MES通讯时间; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel8; private System.Windows.Forms.Label 底部注释1; private System.Windows.Forms.Label 底部注释2; @@ -1377,7 +1113,6 @@ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4; private System.Windows.Forms.GroupBox gropb; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel6; - private System.Windows.Forms.Label Tray盘; private System.Windows.Forms.Label Tray盘二维码; private System.Windows.Forms.GroupBox 原料包装LOT号; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel5; @@ -1412,25 +1147,16 @@ private System.Windows.Forms.Label 事件4结果; private System.Windows.Forms.Label PLC1名称; private System.Windows.Forms.Label MES提示信息; - private System.Windows.Forms.Label 剩余寿命; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel10; - private System.Windows.Forms.Label lineremark7; - private System.Windows.Forms.Label lineremark6; - private System.Windows.Forms.Label lineremark5; - private System.Windows.Forms.Label lineremark4; - private System.Windows.Forms.Label lineremark3; - private System.Windows.Forms.Label lineremark2; - private System.Windows.Forms.Label lineremark1; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private System.Windows.Forms.Label linemode; - private System.Windows.Forms.Label barcode9; - private System.Windows.Forms.Label barcode8; - private System.Windows.Forms.Label barcode7; - private System.Windows.Forms.Label barcode6; - private System.Windows.Forms.Label barcode5; - private System.Windows.Forms.Label barcode4; - private System.Windows.Forms.Label barcode3; - private System.Windows.Forms.Label barcode2; - private System.Windows.Forms.Label barcode1; + private System.Windows.Forms.Label MES通讯时间; + private System.Windows.Forms.Label MES链接状态; + private System.Windows.Forms.Label 当前时间; + private System.Windows.Forms.Label 操作人员ID; + private System.Windows.Forms.Label linetype; + private System.Windows.Forms.Label linecode; + private System.Windows.Forms.Label linename; + private System.Windows.Forms.Label 剩余寿命; } } diff --git a/WindowsFormsApp1/MainForm.cs b/WindowsFormsApp1/MainForm.cs index 2f0ef60..0a7916e 100644 --- a/WindowsFormsApp1/MainForm.cs +++ b/WindowsFormsApp1/MainForm.cs @@ -42,16 +42,16 @@ namespace WindowsFormsApp1 FormRecover(); linename.Text = Init.t_Line.linename; - linecode.Text = Init.t_Line.linecode; - linetype.Text = Init.t_Line.linetype; - linemode.Text = Init.t_Line.linemode; - lineremark1.Text = Init.t_Line.lineremark1; - lineremark2.Text = Init.t_Line.lineremark2; - lineremark3.Text = Init.t_Line.lineremark3; - lineremark4.Text = Init.t_Line.lineremark4; - lineremark5.Text = Init.t_Line.lineremark5; - lineremark6.Text = Init.t_Line.lineremark6; - lineremark7.Text = Init.t_Line.lineremark7; + linecode.Text = Init.t_Line.lineremark1; + linetype.Text = Init.t_Line.lineremark2; + linemode.Text = Init.t_Line.lineremark3; + //lineremark1.Text = ""; + //lineremark2.Text = ""; + //lineremark3.Text = ""; + //lineremark4.Text = ""; + //lineremark5.Text = ""; + //lineremark6.Text = ""; + //lineremark7.Text = ""; 操作人员ID.Text = Init.t_User.username; } @@ -136,7 +136,7 @@ namespace WindowsFormsApp1 { DateTime oldPlcstatus_LastTime = Init.Plcstatus_LastTime; //状态+报警 - if (oldstatus != PlcData.Read_Status || (Plc_Time - oldPlcstatus_LastTime).TotalSeconds > 5) + if (oldstatus != PlcData.Read_Status || (Plc_Time - oldPlcstatus_LastTime).TotalSeconds >= 15) { //反馈状态 Init.Plcstatus = PlcData.Read_Status; @@ -271,6 +271,7 @@ namespace WindowsFormsApp1 //扫码 ScanForm_DZ scanForm = new ScanForm_DZ(); DialogResult scan_result = scanForm.ShowDialog(); + ChangeBarcode(); var writeresult = siemensHelp.WriteAddress(plcaddress, PlcData); if (!writeresult.Success) @@ -379,6 +380,9 @@ namespace WindowsFormsApp1 } else { + ChangeBarcode(); + MES_MsgfORM(nowinterface.code, result.Mesresult, result.Requesttime); + MES链接状态.Text = "MES链接状态:OK"; MES链接状态.BackColor = SystemColors.Control; MES通讯时间.Text = "MES通讯时间:" + DateTime.Now.ToString("MM-dd HH:mm:ss"); @@ -770,57 +774,21 @@ namespace WindowsFormsApp1 底部注释5.Visible = false; 剩余寿命.Visible = false; - barcode1.Visible = false; - barcode2.Visible = false; - barcode3.Visible = false; - barcode4.Visible = false; - barcode5.Visible = false; - barcode6.Visible = false; - barcode7.Visible = false; - barcode8.Visible = false; - barcode9.Visible = false; } public void ChangeBarcode() { 剩余寿命.Visible = true; - barcode1.Visible = true; - barcode2.Visible = true; - barcode3.Visible = true; - barcode4.Visible = true; - barcode5.Visible = true; - barcode6.Visible = true; - barcode7.Visible = true; - barcode8.Visible = true; - barcode9.Visible = true; var power = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Power"); - var i_barcode1 = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode1"); - var i_barcode2 = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode2"); - var i_barcode3 = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode3"); - var i_barcode4 = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode4"); - var i_barcode5 = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode5"); - var i_barcode6 = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode6"); - var i_barcode7 = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode7"); - var i_barcode8 = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode8"); - var i_barcode9 = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode9"); - + 剩余寿命.Text = power == null ? "": power.value; - barcode1.Text = i_barcode1 == null ? "":i_barcode1.value; - barcode2.Text = i_barcode2 == null ? "":i_barcode2.value; - barcode3.Text = i_barcode3 == null ? "":i_barcode3.value; - barcode4.Text = i_barcode4 == null ? "":i_barcode4.value; - barcode5.Text = i_barcode5 == null ? "":i_barcode5.value; - barcode6.Text = i_barcode6 == null ? "":i_barcode6.value; - barcode7.Text = i_barcode7 == null ? "":i_barcode7.value; - barcode8.Text = i_barcode8 == null ? "":i_barcode8.value; - barcode9.Text = i_barcode9 == null ? "":i_barcode9.value; } public void PLC_Form(t_plc plc, plcstate state, DateTime time) { - string plcname = plc.plcname + ":" + plc.plcip; + string plcname = plc.plcip; string datetime = time.ToString("HH:mm:ss"); PLC1名称.Visible = true; PLC1状态.Visible = true; @@ -963,6 +931,7 @@ namespace WindowsFormsApp1 { ScanForm_SSQ scanForm = new ScanForm_SSQ(); DialogResult result = scanForm.ShowDialog(); + // 写plc } public void AirtightPort_DataReceived(object sender, SerialDataReceivedEventArgs e) { diff --git a/WindowsFormsApp1/form/LINE_Manage.Designer.cs b/WindowsFormsApp1/form/LINE_Manage.Designer.cs index e110bcb..02377be 100644 --- a/WindowsFormsApp1/form/LINE_Manage.Designer.cs +++ b/WindowsFormsApp1/form/LINE_Manage.Designer.cs @@ -38,12 +38,15 @@ this.新增 = new System.Windows.Forms.Button(); this.id = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.linename = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.linecode = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.linetype = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.linemode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + //this.linecode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + //this.linetype = new System.Windows.Forms.DataGridViewTextBoxColumn(); + //this.linemode = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.lineremark1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.lineremark2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.lineremark3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.lineremark4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.lineremark5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.lineremark6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.flowname = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.plcname = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); @@ -97,12 +100,15 @@ this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.id, this.linename, - this.linecode, - this.linetype, - this.linemode, + //this.linecode, + //this.linetype, + //this.linemode, this.lineremark1, this.lineremark2, this.lineremark3, + this.lineremark4, + this.lineremark5, + this.lineremark6, this.flowname, this.plcname}); dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; @@ -174,6 +180,8 @@ this.linename.MinimumWidth = 9; this.linename.Name = "linename"; this.linename.ReadOnly = true; + #region 不显示 + /* // // linecode // @@ -201,12 +209,14 @@ this.linemode.MinimumWidth = 9; this.linemode.Name = "linemode"; this.linemode.ReadOnly = true; + */ + #endregion 不显示 // // lineremark1 // this.lineremark1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.lineremark1.DataPropertyName = "lineremark1"; - this.lineremark1.HeaderText = "备用显示1"; + this.lineremark1.HeaderText = "Line"; this.lineremark1.MinimumWidth = 9; this.lineremark1.Name = "lineremark1"; this.lineremark1.ReadOnly = true; @@ -217,7 +227,7 @@ // this.lineremark2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.lineremark2.DataPropertyName = "lineremark2"; - this.lineremark2.HeaderText = "备用显示2"; + this.lineremark2.HeaderText = "StationID"; this.lineremark2.MinimumWidth = 9; this.lineremark2.Name = "lineremark2"; this.lineremark2.ReadOnly = true; @@ -228,13 +238,46 @@ // this.lineremark3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.lineremark3.DataPropertyName = "lineremark3"; - this.lineremark3.HeaderText = "备用显示3"; + this.lineremark3.HeaderText = "MachineID"; this.lineremark3.MinimumWidth = 9; this.lineremark3.Name = "lineremark3"; this.lineremark3.ReadOnly = true; this.lineremark3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.lineremark3.ToolTipText = "lineremark3"; // + // lineremark4 + // + this.lineremark4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.lineremark4.DataPropertyName = "lineremark4"; + this.lineremark4.HeaderText = "Token"; + this.lineremark4.MinimumWidth = 9; + this.lineremark4.Name = "lineremark4"; + this.lineremark4.ReadOnly = true; + this.lineremark4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.lineremark4.ToolTipText = "lineremark4"; + // + // lineremark5 + // + this.lineremark5.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.lineremark5.DataPropertyName = "lineremark5"; + this.lineremark5.HeaderText = "FixSn"; + this.lineremark5.MinimumWidth = 9; + this.lineremark5.Name = "lineremark5"; + this.lineremark5.ReadOnly = true; + this.lineremark5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.lineremark5.ToolTipText = "lineremark5"; + // + // lineremark6 + // + this.lineremark6.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.lineremark6.DataPropertyName = "lineremark6"; + this.lineremark6.HeaderText = "Mold"; + this.lineremark6.MinimumWidth = 9; + this.lineremark6.Name = "lineremark6"; + this.lineremark6.ReadOnly = true; + this.lineremark6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.lineremark6.ToolTipText = "lineremark6"; + // // flowname // this.flowname.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; @@ -292,6 +335,9 @@ private System.Windows.Forms.DataGridViewTextBoxColumn lineremark1; private System.Windows.Forms.DataGridViewTextBoxColumn lineremark2; private System.Windows.Forms.DataGridViewTextBoxColumn lineremark3; + private System.Windows.Forms.DataGridViewTextBoxColumn lineremark4; + private System.Windows.Forms.DataGridViewTextBoxColumn lineremark5; + private System.Windows.Forms.DataGridViewTextBoxColumn lineremark6; private System.Windows.Forms.DataGridViewTextBoxColumn flowname; private System.Windows.Forms.DataGridViewTextBoxColumn plcname; } diff --git a/WindowsFormsApp1/form/LINE_Manage.cs b/WindowsFormsApp1/form/LINE_Manage.cs index 4f88208..4aba8a0 100644 --- a/WindowsFormsApp1/form/LINE_Manage.cs +++ b/WindowsFormsApp1/form/LINE_Manage.cs @@ -93,14 +93,17 @@ namespace WindowsFormsApp1.form id = line.id, flowid = line.flowid, linename = line.linename, - linecode = line.linecode, - linetype = line.linetype, - linemode = line.linemode, + //linecode = line.linecode, + //linetype = line.linetype, + //linemode = line.linemode, flowname = flowname.flowname, plcname = plcname.plcname, lineremark1 = line.lineremark1, lineremark2 = line.lineremark2, lineremark3 = line.lineremark3, + lineremark4 = line.lineremark4, + lineremark5 = line.lineremark5, + lineremark6 = line.lineremark6, }); } diff --git a/WindowsFormsApp1/form/ScanForm_DZ.Designer.cs b/WindowsFormsApp1/form/ScanForm_DZ.Designer.cs index 24286eb..2231b1e 100644 --- a/WindowsFormsApp1/form/ScanForm_DZ.Designer.cs +++ b/WindowsFormsApp1/form/ScanForm_DZ.Designer.cs @@ -64,10 +64,10 @@ namespace WindowsFormsApp1 this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox1.Location = new System.Drawing.Point(0, 0); - this.groupBox1.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5); + this.groupBox1.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Padding = new System.Windows.Forms.Padding(6, 5, 6, 5); - this.groupBox1.Size = new System.Drawing.Size(1647, 704); + this.groupBox1.Padding = new System.Windows.Forms.Padding(7, 6, 7, 6); + this.groupBox1.Size = new System.Drawing.Size(1797, 805); this.groupBox1.TabIndex = 5; this.groupBox1.TabStop = false; this.groupBox1.Text = "端子扫码"; @@ -103,7 +103,7 @@ namespace WindowsFormsApp1 this.tableLayoutPanel1.Controls.Add(this.端子2校验, 5, 3); this.tableLayoutPanel1.Controls.Add(this.端子3校验, 5, 4); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(6, 37); + this.tableLayoutPanel1.Location = new System.Drawing.Point(7, 43); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 8; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5F)); @@ -114,16 +114,16 @@ namespace WindowsFormsApp1 this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 17F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(1635, 662); + this.tableLayoutPanel1.Size = new System.Drawing.Size(1783, 756); this.tableLayoutPanel1.TabIndex = 0; // // button3 // this.button3.Dock = System.Windows.Forms.DockStyle.Fill; this.button3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button3.Location = new System.Drawing.Point(1390, 372); + this.button3.Location = new System.Drawing.Point(1516, 424); this.button3.Name = "button3"; - this.button3.Size = new System.Drawing.Size(157, 106); + this.button3.Size = new System.Drawing.Size(172, 122); this.button3.TabIndex = 14; this.button3.Text = "清空条码"; this.button3.UseVisualStyleBackColor = true; @@ -133,9 +133,9 @@ namespace WindowsFormsApp1 // this.button2.Dock = System.Windows.Forms.DockStyle.Fill; this.button2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button2.Location = new System.Drawing.Point(1390, 260); + this.button2.Location = new System.Drawing.Point(1516, 296); this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(157, 106); + this.button2.Size = new System.Drawing.Size(172, 122); this.button2.TabIndex = 13; this.button2.Text = "清空条码"; this.button2.UseVisualStyleBackColor = true; @@ -145,9 +145,9 @@ namespace WindowsFormsApp1 // this.button1.Dock = System.Windows.Forms.DockStyle.Fill; this.button1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(1390, 148); + this.button1.Location = new System.Drawing.Point(1516, 168); this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(157, 106); + this.button1.Size = new System.Drawing.Size(172, 122); this.button1.TabIndex = 12; this.button1.Text = "清空条码"; this.button1.UseVisualStyleBackColor = true; @@ -157,9 +157,9 @@ namespace WindowsFormsApp1 // this.确认.Dock = System.Windows.Forms.DockStyle.Fill; this.确认.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.确认.Location = new System.Drawing.Point(84, 517); + this.确认.Location = new System.Drawing.Point(92, 589); this.确认.Name = "确认"; - this.确认.Size = new System.Drawing.Size(321, 106); + this.确认.Size = new System.Drawing.Size(350, 122); this.确认.TabIndex = 2; this.确认.Text = "确认"; this.确认.UseVisualStyleBackColor = true; @@ -170,9 +170,9 @@ namespace WindowsFormsApp1 this.tableLayoutPanel1.SetColumnSpan(this.取消, 2); this.取消.Dock = System.Windows.Forms.DockStyle.Fill; this.取消.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.取消.Location = new System.Drawing.Point(1227, 517); + this.取消.Location = new System.Drawing.Point(1338, 589); this.取消.Name = "取消"; - this.取消.Size = new System.Drawing.Size(320, 106); + this.取消.Size = new System.Drawing.Size(350, 122); this.取消.TabIndex = 3; this.取消.Text = "取消"; this.取消.UseVisualStyleBackColor = true; @@ -182,10 +182,10 @@ namespace WindowsFormsApp1 // this.端子2结果.Anchor = System.Windows.Forms.AnchorStyles.None; this.端子2结果.AutoSize = true; - this.端子2结果.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.端子2结果.Location = new System.Drawing.Point(1274, 292); + this.端子2结果.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Bold); + this.端子2结果.Location = new System.Drawing.Point(1395, 338); this.端子2结果.Name = "端子2结果"; - this.端子2结果.Size = new System.Drawing.Size(62, 42); + this.端子2结果.Size = new System.Drawing.Size(57, 38); this.端子2结果.TabIndex = 7; this.端子2结果.Text = "NG"; // @@ -193,12 +193,12 @@ namespace WindowsFormsApp1 // this.端子3结果.Anchor = System.Windows.Forms.AnchorStyles.None; this.端子3结果.AutoSize = true; - this.端子3结果.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.端子3结果.Location = new System.Drawing.Point(1274, 404); + this.端子3结果.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Bold); + this.端子3结果.Location = new System.Drawing.Point(1395, 466); this.端子3结果.Name = "端子3结果"; - this.端子3结果.Size = new System.Drawing.Size(62, 42); + this.端子3结果.Size = new System.Drawing.Size(57, 38); this.端子3结果.TabIndex = 8; - this.端子3结果.Text = "OK"; + this.端子3结果.Text = "NG"; // // 端子1 // @@ -206,9 +206,9 @@ namespace WindowsFormsApp1 this.端子1.AutoSize = true; this.tableLayoutPanel1.SetColumnSpan(this.端子1, 2); this.端子1.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.端子1.Location = new System.Drawing.Point(645, 180); + this.端子1.Location = new System.Drawing.Point(698, 205); this.端子1.Name = "端子1"; - this.端子1.Size = new System.Drawing.Size(260, 42); + this.端子1.Size = new System.Drawing.Size(295, 48); this.端子1.TabIndex = 1; this.端子1.Text = "12112312312"; // @@ -218,9 +218,9 @@ namespace WindowsFormsApp1 this.端子2.AutoSize = true; this.tableLayoutPanel1.SetColumnSpan(this.端子2, 2); this.端子2.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.端子2.Location = new System.Drawing.Point(645, 292); + this.端子2.Location = new System.Drawing.Point(698, 333); this.端子2.Name = "端子2"; - this.端子2.Size = new System.Drawing.Size(260, 42); + this.端子2.Size = new System.Drawing.Size(295, 48); this.端子2.TabIndex = 6; this.端子2.Text = "12112312312"; // @@ -230,9 +230,9 @@ namespace WindowsFormsApp1 this.端子3.AutoSize = true; this.tableLayoutPanel1.SetColumnSpan(this.端子3, 2); this.端子3.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.端子3.Location = new System.Drawing.Point(645, 404); + this.端子3.Location = new System.Drawing.Point(698, 461); this.端子3.Name = "端子3"; - this.端子3.Size = new System.Drawing.Size(260, 42); + this.端子3.Size = new System.Drawing.Size(295, 48); this.端子3.TabIndex = 5; this.端子3.Text = "12112312312"; // @@ -240,12 +240,12 @@ namespace WindowsFormsApp1 // this.端子1结果.Anchor = System.Windows.Forms.AnchorStyles.None; this.端子1结果.AutoSize = true; - this.端子1结果.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.端子1结果.Location = new System.Drawing.Point(1274, 180); + this.端子1结果.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Bold); + this.端子1结果.Location = new System.Drawing.Point(1395, 210); this.端子1结果.Name = "端子1结果"; - this.端子1结果.Size = new System.Drawing.Size(62, 42); + this.端子1结果.Size = new System.Drawing.Size(57, 38); this.端子1结果.TabIndex = 4; - this.端子1结果.Text = "OK"; + this.端子1结果.Text = "NG"; // // 请扫描条码 // @@ -254,9 +254,9 @@ namespace WindowsFormsApp1 this.tableLayoutPanel1.SetColumnSpan(this.请扫描条码, 3); this.请扫描条码.Font = new System.Drawing.Font("宋体", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.请扫描条码.ForeColor = System.Drawing.Color.Red; - this.请扫描条码.Location = new System.Drawing.Point(508, 61); + this.请扫描条码.Location = new System.Drawing.Point(543, 69); this.请扫描条码.Name = "请扫描条码"; - this.请扫描条码.Size = new System.Drawing.Size(452, 56); + this.请扫描条码.Size = new System.Drawing.Size(515, 64); this.请扫描条码.TabIndex = 0; this.请扫描条码.Text = "请扫描端子条码:"; // @@ -265,9 +265,9 @@ namespace WindowsFormsApp1 this.label6.Anchor = System.Windows.Forms.AnchorStyles.None; this.label6.AutoSize = true; this.label6.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(160, 180); + this.label6.Location = new System.Drawing.Point(171, 205); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(169, 42); + this.label6.Size = new System.Drawing.Size(192, 48); this.label6.TabIndex = 9; this.label6.Text = "端子1:"; // @@ -276,9 +276,9 @@ namespace WindowsFormsApp1 this.label7.Anchor = System.Windows.Forms.AnchorStyles.None; this.label7.AutoSize = true; this.label7.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(160, 292); + this.label7.Location = new System.Drawing.Point(171, 333); this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(169, 42); + this.label7.Size = new System.Drawing.Size(192, 48); this.label7.TabIndex = 10; this.label7.Text = "端子2:"; // @@ -287,9 +287,9 @@ namespace WindowsFormsApp1 this.label8.Anchor = System.Windows.Forms.AnchorStyles.None; this.label8.AutoSize = true; this.label8.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(160, 404); + this.label8.Location = new System.Drawing.Point(171, 461); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(169, 42); + this.label8.Size = new System.Drawing.Size(192, 48); this.label8.TabIndex = 11; this.label8.Text = "端子3:"; // @@ -297,21 +297,21 @@ namespace WindowsFormsApp1 // this.端子1校验.Anchor = System.Windows.Forms.AnchorStyles.None; this.端子1校验.AutoSize = true; - this.端子1校验.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.端子1校验.Location = new System.Drawing.Point(1111, 180); + this.端子1校验.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Bold); + this.端子1校验.Location = new System.Drawing.Point(1217, 210); this.端子1校验.Name = "端子1校验"; - this.端子1校验.Size = new System.Drawing.Size(62, 42); + this.端子1校验.Size = new System.Drawing.Size(57, 38); this.端子1校验.TabIndex = 15; - this.端子1校验.Text = "OK"; + this.端子1校验.Text = "NG"; // // 端子2校验 // this.端子2校验.Anchor = System.Windows.Forms.AnchorStyles.None; this.端子2校验.AutoSize = true; - this.端子2校验.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.端子2校验.Location = new System.Drawing.Point(1111, 292); + this.端子2校验.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Bold); + this.端子2校验.Location = new System.Drawing.Point(1217, 338); this.端子2校验.Name = "端子2校验"; - this.端子2校验.Size = new System.Drawing.Size(62, 42); + this.端子2校验.Size = new System.Drawing.Size(57, 38); this.端子2校验.TabIndex = 16; this.端子2校验.Text = "NG"; // @@ -319,12 +319,12 @@ namespace WindowsFormsApp1 // this.端子3校验.Anchor = System.Windows.Forms.AnchorStyles.None; this.端子3校验.AutoSize = true; - this.端子3校验.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.端子3校验.Location = new System.Drawing.Point(1111, 404); + this.端子3校验.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Bold); + this.端子3校验.Location = new System.Drawing.Point(1217, 466); this.端子3校验.Name = "端子3校验"; - this.端子3校验.Size = new System.Drawing.Size(62, 42); + this.端子3校验.Size = new System.Drawing.Size(57, 38); this.端子3校验.TabIndex = 17; - this.端子3校验.Text = "OK"; + this.端子3校验.Text = "NG"; // // timer1 // @@ -334,16 +334,16 @@ namespace WindowsFormsApp1 // // ScanForm_DZ // - this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 21F); + this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1647, 704); + this.ClientSize = new System.Drawing.Size(1797, 805); this.Controls.Add(this.groupBox1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.Margin = new System.Windows.Forms.Padding(4); + this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Name = "ScanForm_DZ"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "扫码界面"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ScanForm_FormClosing); + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ScanForm_DZ_FormClosed); this.groupBox1.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.PerformLayout(); diff --git a/WindowsFormsApp1/form/ScanForm_DZ.cs b/WindowsFormsApp1/form/ScanForm_DZ.cs index 6ddde1e..1a34bcd 100644 --- a/WindowsFormsApp1/form/ScanForm_DZ.cs +++ b/WindowsFormsApp1/form/ScanForm_DZ.cs @@ -24,7 +24,7 @@ namespace WindowsFormsApp1 public ScanForm_DZ() { InitializeComponent(); - Init.ScanPort.DataReceived += SerialPort_DataReceived; + Init.ScanPort.DataReceived += SerialPort_DataReceived_DZ; 端子1.Text = ""; 端子2.Text = ""; 端子3.Text = ""; @@ -33,6 +33,18 @@ namespace WindowsFormsApp1 private void button1_Click(object sender, EventArgs e) { this.DialogResult = DialogResult.OK; + //Init.ScanPort.DataReceived -= SerialPort_DataReceived_DZ; + //if (string.IsNullOrEmpty(端子1.Text) + // || string.IsNullOrEmpty(端子2.Text) + // || string.IsNullOrEmpty(端子3.Text)) + //{ + // //MessageBox.Show($"有端子未扫描!"); + // //return; + //} + //else + //{ + // this.Close(); + //} this.Close(); } @@ -54,10 +66,11 @@ namespace WindowsFormsApp1 } } - public void SerialPort_DataReceived(object sender, SerialDataReceivedEventArgs e) + public void SerialPort_DataReceived_DZ(object sender, SerialDataReceivedEventArgs e) { try { + var PlcData = new plcdata(); if (!Init.ScanPort.IsOpen) { Init.ScanPort?.Open(); @@ -75,14 +88,15 @@ namespace WindowsFormsApp1 return; } - + SQLiteHelper sQLiteHelper_key = new db.SQLiteHelper(); + var key_sqlresult = sQLiteHelper_key.QueryAll(); if (string.IsNullOrWhiteSpace(端子1.Text)) { this.Invoke(new Action(() => { 端子1.Text = barcode; })); - var result = ApiClient.CallFunctionByName("nowinterface.code", null, new otherdata() { JS_SN = barcode }); + var result = ApiClient.CallFunctionByName("SN_FeedingCheck", PlcData, new otherdata() { JS_SN = barcode }); if (result.Success) { this.Invoke(new Action(() => @@ -90,7 +104,7 @@ namespace WindowsFormsApp1 端子1校验.Text = "校验OK"; })); //继续调用接口 - var result2 = ApiClient.CallFunctionByName("nowinterface.code", null, new otherdata() { JS_SN = barcode }); + var result2 = ApiClient.CallFunctionByName("Link_Comp", PlcData, new otherdata() { JS_SN = barcode }); if (result2.Success) { this.Invoke(new Action(() => @@ -98,6 +112,13 @@ namespace WindowsFormsApp1 端子1结果.Text = "绑定OK"; button1.Visible = false; })); + // 写数据到 主页的barcode 数据库改,缓存改 + var txt = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode1"); + txt.value = 端子1.Text; + + var code = key_sqlresult.Data.First(x => x.key == txt.key); + code.value = 端子1.Text; + sQLiteHelper_key.Update(code); } else { @@ -121,7 +142,7 @@ namespace WindowsFormsApp1 { 端子2.Text = barcode; })); - var result = ApiClient.CallFunctionByName("nowinterface.code", null, new otherdata() { JS_SN = barcode }); + var result = ApiClient.CallFunctionByName("SN_FeedingCheck", PlcData, new otherdata() { JS_SN = barcode }); if (result.Success) { this.Invoke(new Action(() => @@ -130,10 +151,30 @@ namespace WindowsFormsApp1 })); //继续调用接口 - this.Invoke(new Action(() => + var result2 = ApiClient.CallFunctionByName("Link_Comp", PlcData, new otherdata() { JS_SN = barcode }); + if (result2.Success) { - button2.Visible = false; - })); + this.Invoke(new Action(() => + { + 端子2结果.Text = "绑定OK"; + button2.Visible = false; + })); + + // 写数据到 主页的barcode 数据库改,缓存改 + var txt = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode2"); + txt.value = 端子2.Text; + + var code = key_sqlresult.Data.First(x => x.key == txt.key); + code.value = 端子2.Text; + sQLiteHelper_key.Update(code); + } + else + { + this.Invoke(new Action(() => + { + 端子2结果.Text = "绑定NG"; + })); + } } else { @@ -149,7 +190,7 @@ namespace WindowsFormsApp1 { 端子3.Text = barcode; })); - var result = ApiClient.CallFunctionByName("nowinterface.code", null, new otherdata() { JS_SN = barcode }); + var result = ApiClient.CallFunctionByName("SN_FeedingCheck", PlcData, new otherdata() { JS_SN = barcode }); if (result.Success) { this.Invoke(new Action(() => @@ -157,11 +198,30 @@ namespace WindowsFormsApp1 端子3校验.Text = "校验OK"; })); - //继续调用接口 - this.Invoke(new Action(() => + var result2 = ApiClient.CallFunctionByName("Link_Comp", PlcData, new otherdata() { JS_SN = barcode }); + if (result2.Success) { - button3.Visible = false; - })); + this.Invoke(new Action(() => + { + 端子3结果.Text = "绑定OK"; + button3.Visible = false; + })); + + // 写数据到 主页的barcode 数据库改,缓存改 + var txt = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode3"); + txt.value = 端子3.Text; + + var code = key_sqlresult.Data.First(x => x.key == txt.key); + code.value = 端子3.Text; + sQLiteHelper_key.Update(code); + } + else + { + this.Invoke(new Action(() => + { + 端子3结果.Text = "绑定NG"; + })); + } } else { @@ -169,7 +229,7 @@ namespace WindowsFormsApp1 { 端子3校验.Text = "校验NG"; })); - + } } @@ -209,5 +269,10 @@ namespace WindowsFormsApp1 { 端子3.Text = ""; } + + private void ScanForm_DZ_FormClosed(object sender, FormClosedEventArgs e) + { + FormHelp.RemoveAllEventHandlers(Init.ScanPort, "DataReceived"); + } } } diff --git a/WindowsFormsApp1/form/ScanForm_SSQ.Designer.cs b/WindowsFormsApp1/form/ScanForm_SSQ.Designer.cs index 66b98a0..652fbf1 100644 --- a/WindowsFormsApp1/form/ScanForm_SSQ.Designer.cs +++ b/WindowsFormsApp1/form/ScanForm_SSQ.Designer.cs @@ -48,10 +48,10 @@ this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox1.Location = new System.Drawing.Point(0, 0); - this.groupBox1.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5); + this.groupBox1.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Padding = new System.Windows.Forms.Padding(6, 5, 6, 5); - this.groupBox1.Size = new System.Drawing.Size(1647, 704); + this.groupBox1.Padding = new System.Windows.Forms.Padding(7, 6, 7, 6); + this.groupBox1.Size = new System.Drawing.Size(1797, 805); this.groupBox1.TabIndex = 5; this.groupBox1.TabStop = false; this.groupBox1.Text = "物料扫码"; @@ -71,7 +71,7 @@ this.tableLayoutPanel1.Controls.Add(this.确认, 1, 6); this.tableLayoutPanel1.Controls.Add(this.取消, 3, 6); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(6, 37); + this.tableLayoutPanel1.Location = new System.Drawing.Point(7, 43); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 8; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 4.588645F)); @@ -82,16 +82,16 @@ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 9.50806F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 13.76593F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 17.19009F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(1635, 662); + this.tableLayoutPanel1.Size = new System.Drawing.Size(1783, 756); this.tableLayoutPanel1.TabIndex = 0; // // button1 // this.button1.Dock = System.Windows.Forms.DockStyle.Fill; this.button1.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(184, 304); + this.button1.Location = new System.Drawing.Point(201, 347); this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(539, 85); + this.button1.Size = new System.Drawing.Size(588, 98); this.button1.TabIndex = 4; this.button1.Text = "位置1"; this.button1.UseVisualStyleBackColor = true; @@ -101,9 +101,9 @@ // this.button2.Dock = System.Windows.Forms.DockStyle.Fill; this.button2.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button2.Location = new System.Drawing.Point(910, 304); + this.button2.Location = new System.Drawing.Point(993, 347); this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(539, 85); + this.button2.Size = new System.Drawing.Size(588, 98); this.button2.TabIndex = 5; this.button2.Text = "位置2"; this.button2.UseVisualStyleBackColor = true; @@ -116,9 +116,9 @@ this.tableLayoutPanel1.SetColumnSpan(this.请扫描条码, 3); this.请扫描条码.Font = new System.Drawing.Font("宋体", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.请扫描条码.ForeColor = System.Drawing.Color.Red; - this.请扫描条码.Location = new System.Drawing.Point(647, 47); + this.请扫描条码.Location = new System.Drawing.Point(698, 54); this.请扫描条码.Name = "请扫描条码"; - this.请扫描条码.Size = new System.Drawing.Size(338, 56); + this.请扫描条码.Size = new System.Drawing.Size(385, 64); this.请扫描条码.TabIndex = 0; this.请扫描条码.Text = "请扫描条码:"; // @@ -128,9 +128,9 @@ this.LOt号.AutoSize = true; this.tableLayoutPanel1.SetColumnSpan(this.LOt号, 3); this.LOt号.Font = new System.Drawing.Font("宋体", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.LOt号.Location = new System.Drawing.Point(544, 153); + this.LOt号.Location = new System.Drawing.Point(581, 175); this.LOt号.Name = "LOt号"; - this.LOt号.Size = new System.Drawing.Size(544, 56); + this.LOt号.Size = new System.Drawing.Size(619, 64); this.LOt号.TabIndex = 1; this.LOt号.Text = "LOt号:12112312312"; // @@ -138,9 +138,9 @@ // this.确认.Dock = System.Windows.Forms.DockStyle.Fill; this.确认.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.确认.Location = new System.Drawing.Point(184, 457); + this.确认.Location = new System.Drawing.Point(201, 522); this.确认.Name = "确认"; - this.确认.Size = new System.Drawing.Size(539, 85); + this.确认.Size = new System.Drawing.Size(588, 98); this.确认.TabIndex = 2; this.确认.Text = "上线"; this.确认.UseVisualStyleBackColor = true; @@ -150,9 +150,9 @@ // this.取消.Dock = System.Windows.Forms.DockStyle.Fill; this.取消.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.取消.Location = new System.Drawing.Point(910, 457); + this.取消.Location = new System.Drawing.Point(993, 522); this.取消.Name = "取消"; - this.取消.Size = new System.Drawing.Size(539, 85); + this.取消.Size = new System.Drawing.Size(588, 98); this.取消.TabIndex = 3; this.取消.Text = "下线"; this.取消.UseVisualStyleBackColor = true; @@ -166,15 +166,16 @@ // // ScanForm_SSQ // - this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 21F); + this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1647, 704); + this.ClientSize = new System.Drawing.Size(1797, 805); this.Controls.Add(this.groupBox1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.Margin = new System.Windows.Forms.Padding(4); + this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Name = "ScanForm_SSQ"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "扫码界面"; + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ScanForm_SSQ_FormClosed); this.groupBox1.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.PerformLayout(); diff --git a/WindowsFormsApp1/form/ScanForm_SSQ.cs b/WindowsFormsApp1/form/ScanForm_SSQ.cs index f6ed083..cbfb22d 100644 --- a/WindowsFormsApp1/form/ScanForm_SSQ.cs +++ b/WindowsFormsApp1/form/ScanForm_SSQ.cs @@ -12,6 +12,7 @@ using System.Windows.Forms; using WindowsFormsApp1.db; using WindowsFormsApp1.mod; using WindowsFormsApp1.mod.database; +using WindowsFormsApp1.mod.server; using WindowsFormsApp1.server; using static System.Windows.Forms.VisualStyles.VisualStyleElement; @@ -25,12 +26,12 @@ namespace WindowsFormsApp1 /// int index = 0; public string ReturnValue { get; set; } + public ApiClient ApiClient = new ApiClient(); public ScanForm_SSQ() { InitializeComponent(); - //Init.ScanPort.DataReceived += SerialPort_DataReceived; + Init.ScanPort.DataReceived += SerialPort_DataReceived_SSQ; LOt号.Visible = false; - } private void button1_Click(object sender, EventArgs e) { @@ -39,9 +40,25 @@ namespace WindowsFormsApp1 MessageBox.Show("扫码为空,请确认!"); return; } - + LogExecute.logNet.WriteDebug($"{ReturnValue}上线点击"); + //this.Close(); //请求后端接口,index代表位置 - //更新下数据库和init里面的keyvalue值 + var PlcData = new plcdata(); + var OtherData = new otherdata(); + OtherData.locationindex = index; + OtherData.opindex = 1; + OtherData.JS_SN = ReturnValue; + + var result = ApiClient.CallFunctionByName("Glue_CheckOut", PlcData, OtherData); + if (result.Success && result.Mesresult == mesresult.PASS) + { + this.Close(); + } + else + { + //失败逻辑 + } + //更新下数据库和init里面的keyvalue值,缓存 } private void button2_Click(object sender, EventArgs e) @@ -51,8 +68,25 @@ namespace WindowsFormsApp1 MessageBox.Show("扫码为空,请确认!"); return; } + LogExecute.logNet.WriteDebug($"{ReturnValue}下线点击"); + this.Close(); //请求后端接口,index代表位置 - //更新下数据库和init里面的keyvalue值 + var PlcData = new plcdata(); + var OtherData = new otherdata(); + OtherData.locationindex = index; + OtherData.opindex = 1; + OtherData.JS_SN = ReturnValue; + + var result = ApiClient.CallFunctionByName("Glue_CheckOut", PlcData, OtherData); + if (result.Success) + { + this.Close(); + } + else + { + //失败逻辑 + } + //更新下数据库和init里面的keyvalue值,删除缓存 } private void timer1_Tick(object sender, EventArgs e) @@ -67,7 +101,7 @@ namespace WindowsFormsApp1 } } - public void SerialPort_DataReceived(object sender, SerialDataReceivedEventArgs e) + public void SerialPort_DataReceived_SSQ(object sender, SerialDataReceivedEventArgs e) { try { @@ -135,5 +169,10 @@ namespace WindowsFormsApp1 button1.BackColor = SystemColors.Control; } } + + private void ScanForm_SSQ_FormClosed(object sender, FormClosedEventArgs e) + { + FormHelp.RemoveAllEventHandlers(Init.ScanPort, "DataReceived"); + } } } diff --git a/WindowsFormsApp1/form/editForm/KeyValue_Insert.cs b/WindowsFormsApp1/form/editForm/KeyValue_Insert.cs index e903af9..21bf625 100644 --- a/WindowsFormsApp1/form/editForm/KeyValue_Insert.cs +++ b/WindowsFormsApp1/form/editForm/KeyValue_Insert.cs @@ -30,11 +30,11 @@ namespace WindowsFormsApp1.form MessageBox.Show("关键字不能为空"); return; } - if (string.IsNullOrWhiteSpace(值.Text)) - { - MessageBox.Show("值不能为空"); - return; - } + //if (string.IsNullOrWhiteSpace(值.Text)) + //{ + // MessageBox.Show("值不能为空"); + // return; + //} if (string.IsNullOrWhiteSpace(备注.Text)) { MessageBox.Show("备注不能为空"); diff --git a/WindowsFormsApp1/form/editForm/Line_Insert.Designer.cs b/WindowsFormsApp1/form/editForm/Line_Insert.Designer.cs index 0ed85ff..a3c0f4a 100644 --- a/WindowsFormsApp1/form/editForm/Line_Insert.Designer.cs +++ b/WindowsFormsApp1/form/editForm/Line_Insert.Designer.cs @@ -41,9 +41,9 @@ this.label7 = new System.Windows.Forms.Label(); this.产线编号 = new System.Windows.Forms.TextBox(); this.关联流程 = new System.Windows.Forms.ComboBox(); - this.备用显示1 = new System.Windows.Forms.TextBox(); - this.备用显示2 = new System.Windows.Forms.TextBox(); - this.备用显示3 = new System.Windows.Forms.TextBox(); + this.Line = new System.Windows.Forms.TextBox(); + this.StationID = new System.Windows.Forms.TextBox(); + this.MachineID = new System.Windows.Forms.TextBox(); this.label5 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); @@ -73,9 +73,9 @@ this.tableLayoutPanel1.Controls.Add(this.label7, 1, 2); this.tableLayoutPanel1.Controls.Add(this.产线编号, 2, 2); this.tableLayoutPanel1.Controls.Add(this.关联流程, 2, 5); - this.tableLayoutPanel1.Controls.Add(this.备用显示1, 4, 1); - this.tableLayoutPanel1.Controls.Add(this.备用显示2, 4, 2); - this.tableLayoutPanel1.Controls.Add(this.备用显示3, 4, 3); + this.tableLayoutPanel1.Controls.Add(this.Line, 4, 1); + this.tableLayoutPanel1.Controls.Add(this.StationID, 4, 2); + this.tableLayoutPanel1.Controls.Add(this.MachineID, 4, 3); this.tableLayoutPanel1.Controls.Add(this.label5, 3, 1); this.tableLayoutPanel1.Controls.Add(this.label6, 3, 2); this.tableLayoutPanel1.Controls.Add(this.label8, 3, 3); @@ -96,7 +96,7 @@ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(1087, 854); + this.tableLayoutPanel1.Size = new System.Drawing.Size(1186, 976); this.tableLayoutPanel1.TabIndex = 0; // // label1 @@ -104,9 +104,9 @@ this.label1.Anchor = System.Windows.Forms.AnchorStyles.None; this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(182, 113); + this.label1.Location = new System.Drawing.Point(197, 129); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(68, 28); + this.label1.Size = new System.Drawing.Size(79, 33); this.label1.TabIndex = 0; this.label1.Text = "名称"; // @@ -115,9 +115,9 @@ this.button1.Anchor = System.Windows.Forms.AnchorStyles.None; this.tableLayoutPanel1.SetColumnSpan(this.button1, 2); this.button1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(228, 683); + this.button1.Location = new System.Drawing.Point(249, 779); this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(194, 79); + this.button1.Size = new System.Drawing.Size(212, 90); this.button1.TabIndex = 14; this.button1.Text = "保存"; this.button1.UseVisualStyleBackColor = true; @@ -128,9 +128,9 @@ this.button2.Anchor = System.Windows.Forms.AnchorStyles.None; this.tableLayoutPanel1.SetColumnSpan(this.button2, 2); this.button2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button2.Location = new System.Drawing.Point(664, 683); + this.button2.Location = new System.Drawing.Point(725, 779); this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(190, 79); + this.button2.Size = new System.Drawing.Size(207, 90); this.button2.TabIndex = 15; this.button2.Text = "取消"; this.button2.UseVisualStyleBackColor = true; @@ -140,9 +140,9 @@ // this.名称.Anchor = System.Windows.Forms.AnchorStyles.None; this.名称.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.名称.Location = new System.Drawing.Point(328, 108); + this.名称.Location = new System.Drawing.Point(358, 123); this.名称.Name = "名称"; - this.名称.Size = new System.Drawing.Size(211, 39); + this.名称.Size = new System.Drawing.Size(230, 44); this.名称.TabIndex = 16; // // label4 @@ -150,9 +150,9 @@ this.label4.Anchor = System.Windows.Forms.AnchorStyles.None; this.label4.AutoSize = true; this.label4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(154, 453); + this.label4.Location = new System.Drawing.Point(165, 517); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(124, 28); + this.label4.Size = new System.Drawing.Size(143, 33); this.label4.TabIndex = 3; this.label4.Text = "关联流程"; // @@ -161,39 +161,39 @@ this.label3.Anchor = System.Windows.Forms.AnchorStyles.None; this.label3.AutoSize = true; this.label3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(182, 368); + this.label3.Location = new System.Drawing.Point(197, 420); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(68, 28); + this.label3.Size = new System.Drawing.Size(79, 33); this.label3.TabIndex = 2; - this.label3.Text = "模组"; + this.label3.Text = "Mold"; // // label2 // this.label2.Anchor = System.Windows.Forms.AnchorStyles.None; this.label2.AutoSize = true; this.label2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(154, 283); + this.label2.Location = new System.Drawing.Point(189, 323); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(124, 28); + this.label2.Size = new System.Drawing.Size(95, 33); this.label2.TabIndex = 1; - this.label2.Text = "产线类型"; + this.label2.Text = "FixSn"; // // 模组 // this.模组.Anchor = System.Windows.Forms.AnchorStyles.None; this.模组.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.模组.Location = new System.Drawing.Point(328, 363); + this.模组.Location = new System.Drawing.Point(358, 414); this.模组.Name = "模组"; - this.模组.Size = new System.Drawing.Size(211, 39); + this.模组.Size = new System.Drawing.Size(230, 44); this.模组.TabIndex = 20; // // 产线类型 // this.产线类型.Anchor = System.Windows.Forms.AnchorStyles.None; this.产线类型.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.产线类型.Location = new System.Drawing.Point(328, 278); + this.产线类型.Location = new System.Drawing.Point(358, 317); this.产线类型.Name = "产线类型"; - this.产线类型.Size = new System.Drawing.Size(211, 39); + this.产线类型.Size = new System.Drawing.Size(230, 44); this.产线类型.TabIndex = 17; // // label7 @@ -201,19 +201,19 @@ this.label7.Anchor = System.Windows.Forms.AnchorStyles.None; this.label7.AutoSize = true; this.label7.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(154, 198); + this.label7.Location = new System.Drawing.Point(189, 226); this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(124, 28); + this.label7.Size = new System.Drawing.Size(95, 33); this.label7.TabIndex = 29; - this.label7.Text = "产线编号"; + this.label7.Text = "Token"; // // 产线编号 // this.产线编号.Anchor = System.Windows.Forms.AnchorStyles.None; this.产线编号.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.产线编号.Location = new System.Drawing.Point(328, 193); + this.产线编号.Location = new System.Drawing.Point(358, 220); this.产线编号.Name = "产线编号"; - this.产线编号.Size = new System.Drawing.Size(211, 39); + this.产线编号.Size = new System.Drawing.Size(230, 44); this.产线编号.TabIndex = 30; // // 关联流程 @@ -222,79 +222,79 @@ this.tableLayoutPanel1.SetColumnSpan(this.关联流程, 3); this.关联流程.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.关联流程.FormattingEnabled = true; - this.关联流程.Location = new System.Drawing.Point(364, 453); + this.关联流程.Location = new System.Drawing.Point(398, 517); this.关联流程.Name = "关联流程"; - this.关联流程.Size = new System.Drawing.Size(573, 36); + this.关联流程.Size = new System.Drawing.Size(625, 41); this.关联流程.TabIndex = 31; // - // 备用显示1 + // Line // - this.备用显示1.Anchor = System.Windows.Forms.AnchorStyles.None; - this.备用显示1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.备用显示1.Location = new System.Drawing.Point(762, 108); - this.备用显示1.Name = "备用显示1"; - this.备用显示1.Size = new System.Drawing.Size(211, 39); - this.备用显示1.TabIndex = 32; + this.Line.Anchor = System.Windows.Forms.AnchorStyles.None; + this.Line.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Line.Location = new System.Drawing.Point(832, 123); + this.Line.Name = "Line"; + this.Line.Size = new System.Drawing.Size(230, 44); + this.Line.TabIndex = 32; // - // 备用显示2 + // StationID // - this.备用显示2.Anchor = System.Windows.Forms.AnchorStyles.None; - this.备用显示2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.备用显示2.Location = new System.Drawing.Point(762, 193); - this.备用显示2.Name = "备用显示2"; - this.备用显示2.Size = new System.Drawing.Size(211, 39); - this.备用显示2.TabIndex = 33; + this.StationID.Anchor = System.Windows.Forms.AnchorStyles.None; + this.StationID.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.StationID.Location = new System.Drawing.Point(832, 220); + this.StationID.Name = "StationID"; + this.StationID.Size = new System.Drawing.Size(230, 44); + this.StationID.TabIndex = 33; // - // 备用显示3 + // MachineID // - this.备用显示3.Anchor = System.Windows.Forms.AnchorStyles.None; - this.备用显示3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.备用显示3.Location = new System.Drawing.Point(762, 278); - this.备用显示3.Name = "备用显示3"; - this.备用显示3.Size = new System.Drawing.Size(211, 39); - this.备用显示3.TabIndex = 34; + this.MachineID.Anchor = System.Windows.Forms.AnchorStyles.None; + this.MachineID.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.MachineID.Location = new System.Drawing.Point(832, 317); + this.MachineID.Name = "MachineID"; + this.MachineID.Size = new System.Drawing.Size(230, 44); + this.MachineID.TabIndex = 34; // // label5 // this.label5.Anchor = System.Windows.Forms.AnchorStyles.None; this.label5.AutoSize = true; this.label5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(581, 113); + this.label5.Location = new System.Drawing.Point(671, 129); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(138, 28); + this.label5.Size = new System.Drawing.Size(79, 33); this.label5.TabIndex = 35; - this.label5.Text = "备用显示1"; + this.label5.Text = "Line"; // // label6 // this.label6.Anchor = System.Windows.Forms.AnchorStyles.None; this.label6.AutoSize = true; this.label6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(581, 198); + this.label6.Location = new System.Drawing.Point(631, 226); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(138, 28); + this.label6.Size = new System.Drawing.Size(159, 33); this.label6.TabIndex = 36; - this.label6.Text = "备用显示2"; + this.label6.Text = "StationID"; // // label8 // this.label8.Anchor = System.Windows.Forms.AnchorStyles.None; this.label8.AutoSize = true; this.label8.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(581, 283); + this.label8.Location = new System.Drawing.Point(631, 323); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(138, 28); + this.label8.Size = new System.Drawing.Size(159, 33); this.label8.TabIndex = 37; - this.label8.Text = "备用显示3"; + this.label8.Text = "MachineID"; // // label9 // this.label9.Anchor = System.Windows.Forms.AnchorStyles.None; this.label9.AutoSize = true; this.label9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(161, 538); + this.label9.Location = new System.Drawing.Point(173, 614); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(110, 28); + this.label9.Size = new System.Drawing.Size(127, 33); this.label9.TabIndex = 38; this.label9.Text = "关联PLC"; // @@ -304,16 +304,16 @@ this.tableLayoutPanel1.SetColumnSpan(this.关联PLC, 3); this.关联PLC.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.关联PLC.FormattingEnabled = true; - this.关联PLC.Location = new System.Drawing.Point(364, 538); + this.关联PLC.Location = new System.Drawing.Point(398, 614); this.关联PLC.Name = "关联PLC"; - this.关联PLC.Size = new System.Drawing.Size(573, 36); + this.关联PLC.Size = new System.Drawing.Size(625, 41); this.关联PLC.TabIndex = 39; // // Line_Insert // - this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 21F); + this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1087, 854); + this.ClientSize = new System.Drawing.Size(1186, 976); this.Controls.Add(this.tableLayoutPanel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Name = "Line_Insert"; @@ -340,9 +340,9 @@ private System.Windows.Forms.Label label7; private System.Windows.Forms.TextBox 产线编号; private System.Windows.Forms.ComboBox 关联流程; - private System.Windows.Forms.TextBox 备用显示1; - private System.Windows.Forms.TextBox 备用显示2; - private System.Windows.Forms.TextBox 备用显示3; + private System.Windows.Forms.TextBox Line; + private System.Windows.Forms.TextBox StationID; + private System.Windows.Forms.TextBox MachineID; private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label8; diff --git a/WindowsFormsApp1/form/editForm/Line_Insert.cs b/WindowsFormsApp1/form/editForm/Line_Insert.cs index 83b3125..a5a706f 100644 --- a/WindowsFormsApp1/form/editForm/Line_Insert.cs +++ b/WindowsFormsApp1/form/editForm/Line_Insert.cs @@ -31,36 +31,36 @@ namespace WindowsFormsApp1.form MessageBox.Show("名称不能为空"); return; } - if (string.IsNullOrWhiteSpace(产线类型.Text)) - { - MessageBox.Show("产线类型不能为空"); - return; - } - if (string.IsNullOrWhiteSpace(产线编号.Text)) - { - MessageBox.Show("产线编号不能为空"); - return; - } - if (string.IsNullOrWhiteSpace(模组.Text)) - { - MessageBox.Show("模组不能为空"); - return; - } - if (string.IsNullOrWhiteSpace(备用显示1.Text)) - { - MessageBox.Show("备用显示1不能为空"); - return; - } - if (string.IsNullOrWhiteSpace(备用显示2.Text)) - { - MessageBox.Show("备用显示2不能为空"); - return; - } - if (string.IsNullOrWhiteSpace(备用显示3.Text)) - { - MessageBox.Show("备用显示3不能为空"); - return; - } + //if (string.IsNullOrWhiteSpace(产线类型.Text)) + //{ + // MessageBox.Show("产线类型不能为空"); + // return; + //} + //if (string.IsNullOrWhiteSpace(产线编号.Text)) + //{ + // MessageBox.Show("产线编号不能为空"); + // return; + //} + //if (string.IsNullOrWhiteSpace(模组.Text)) + //{ + // MessageBox.Show("模组不能为空"); + // return; + //} + //if (string.IsNullOrWhiteSpace(Line.Text)) + //{ + // MessageBox.Show("Line不能为空"); + // return; + //} + //if (string.IsNullOrWhiteSpace(StationID.Text)) + //{ + // MessageBox.Show("StationID不能为空"); + // return; + //} + //if (string.IsNullOrWhiteSpace(MachineID.Text)) + //{ + // MessageBox.Show("MachineID不能为空"); + // return; + //} if (关联流程.SelectedValue == null || (int)关联流程.SelectedValue == 0) { MessageBox.Show("关联流程不能为空"); @@ -74,14 +74,17 @@ namespace WindowsFormsApp1.form t_line t_Flow = new t_line(); t_Flow.linename = 名称.Text; - t_Flow.linetype = 产线类型.Text; - t_Flow.linecode = 产线编号.Text; - t_Flow.linemode = 模组.Text; + //t_Flow.linetype = 产线类型.Text; + //t_Flow.linecode = 产线编号.Text; + //t_Flow.linemode = 模组.Text; t_Flow.flowid = (int)关联流程.SelectedValue; t_Flow.plcid = (int)关联PLC.SelectedValue; - t_Flow.lineremark1 = 备用显示1.Text; - t_Flow.lineremark2 = 备用显示2.Text; - t_Flow.lineremark3 = 备用显示3.Text; + t_Flow.lineremark1 = Line.Text; + t_Flow.lineremark2 = StationID.Text; + t_Flow.lineremark3 = MachineID.Text; + t_Flow.lineremark4 = 产线编号.Text; + t_Flow.lineremark5 = 产线类型.Text; + t_Flow.lineremark6 = 模组.Text; SQLiteHelper sQLiteHelper1 = new db.SQLiteHelper(); @@ -92,7 +95,7 @@ namespace WindowsFormsApp1.form } else { - sQLiteHelper1.Insert(t_Flow); + var re = sQLiteHelper1.Insert(t_Flow); } MessageBox.Show("保存成功"); this.Close(); @@ -158,12 +161,12 @@ namespace WindowsFormsApp1.form } var DataToEdit = result.Data; 名称.Text = DataToEdit.linename; - 产线编号.Text = DataToEdit.linecode; - 产线类型.Text = DataToEdit.linetype; - 模组.Text = DataToEdit.linemode; - 备用显示1.Text = DataToEdit.lineremark1; - 备用显示2.Text = DataToEdit.lineremark2; - 备用显示3.Text = DataToEdit.lineremark3; + 产线编号.Text = DataToEdit.lineremark4; + 产线类型.Text = DataToEdit.lineremark5; + 模组.Text = DataToEdit.lineremark6; + Line.Text = DataToEdit.lineremark1; + StationID.Text = DataToEdit.lineremark2; + MachineID.Text = DataToEdit.lineremark3; SelectItemByValue(关联流程, DataToEdit.flowid.ToString()); SelectItemByValue2(关联PLC, DataToEdit.plcid.ToString()); } diff --git a/WindowsFormsApp1/mod/database/t_line.cs b/WindowsFormsApp1/mod/database/t_line.cs index 4d48c66..e891ff4 100644 --- a/WindowsFormsApp1/mod/database/t_line.cs +++ b/WindowsFormsApp1/mod/database/t_line.cs @@ -16,11 +16,29 @@ namespace WindowsFormsApp1.mod public string linecode { get; set; } public string linetype { get; set; } public string linemode { get; set; } + /// + /// line + /// public string lineremark1 { get; set; } + /// + /// stationid + /// public string lineremark2 { get; set; } + /// + /// machineid + /// public string lineremark3 { get; set; } + /// + /// token + /// public string lineremark4 { get; set; } + /// + /// fixsn + /// public string lineremark5 { get; set; } + /// + /// mold + /// public string lineremark6 { get; set; } public string lineremark7 { get; set; } diff --git a/WindowsFormsApp1/mod/server/otherdata.cs b/WindowsFormsApp1/mod/server/otherdata.cs index 02750db..0dc5649 100644 --- a/WindowsFormsApp1/mod/server/otherdata.cs +++ b/WindowsFormsApp1/mod/server/otherdata.cs @@ -52,6 +52,15 @@ namespace WindowsFormsApp1.mod.server /// 气密仪参数 /// public Airtight FinalAirtightValue { get; set; } + + /// + /// 上下料位置 + /// + public int locationindex { get; set; } + /// + /// 上下料操作 上料:1;下料 2 + /// + public int opindex { get; set; } } diff --git a/WindowsFormsApp1/server/ApiClient.cs b/WindowsFormsApp1/server/ApiClient.cs index 5e31a76..4984fa8 100644 --- a/WindowsFormsApp1/server/ApiClient.cs +++ b/WindowsFormsApp1/server/ApiClient.cs @@ -17,6 +17,8 @@ using System.Security.Cryptography; using Newtonsoft.Json; using HslCommunication.BasicFramework; using System.IO; +using static WindowsFormsApp1.server.ApiClient; +using System.Security.Policy; namespace WindowsFormsApp1.server { @@ -28,6 +30,9 @@ namespace WindowsFormsApp1.server private readonly string _stationID; private readonly string _machineID; private readonly string _opID; + private readonly string _mold; + private readonly string _token; + private readonly string _fixsn; public ApiClient() { @@ -36,14 +41,24 @@ namespace WindowsFormsApp1.server _httpClient.Timeout = TimeSpan.FromSeconds(10); SQLiteHelper helper = new db.SQLiteHelper(); - var apiList = helper.QueryAll().Data.ToList(); + var apiList = helper.QueryAll().Data.Select(x => new { x.code, url = x.url + x.code }).ToList(); apiUrlDict = apiList.ToDictionary(x => x.code, x => x.url); // 从配置中读取通用参数 - _line = "Testline"; - _stationID = "TestStation"; - _machineID = "TestMachine"; - _opID = ""; + _line = Init.t_Line.lineremark1; + _stationID = Init.t_Line.lineremark2; + _machineID = Init.t_Line.lineremark3; + _token = Init.t_Line.lineremark4; + _fixsn = Init.t_Line.lineremark5; + _mold = Init.t_Line.lineremark6; + + _opID = Init.t_User.username; + + + //线别.Text = "线别:" + Init.t_Line.linename; + //段别.Text = "段别:" + Init.t_Line.linemode; + //机台编号.Text = "机台编号:" + Init.t_Line.linecode; + //操作人员ID.Text = "操作人员ID:" + Init.t_User.username; } // 通用API调用方法,减少代码重复 @@ -59,14 +74,35 @@ namespace WindowsFormsApp1.server try { // 测试 - LogExecute.logNet.WriteDebug($"{eventName} 接口请求成功\n请求:{jsonPayload}"); + LogExecute.logNet.WriteDebug($"{eventName} 接口请求模拟测试成功\n请求:{jsonPayload}"); // 回写对应PLC if (statusCode > 0) PlcData.Write_Status = (short)statusCode; if (eventName == "SN_Release") PlcData.Write_stSN = "testsn"; + if(eventName == "Glue_CheckOut") + { + var station = Init.t_Line.lineremark2.ToLower(); + switch (station) + { + case "Potting"://灌胶 + case "ThermalPaste"://点胶&CCD检测 + case "UVCoating"://三防漆涂覆 + case "Sealant"://点密封胶&CCD + break; + default: + var power = Init.t_Keyvalues.First(x => x.key == "Power"); + power.value = DateTime.Now.Millisecond.ToString(); + SQLiteHelper kvHelper = new db.SQLiteHelper(); + kvHelper.Update(power); + + break; + } + } return ApiFormResult.Sucess(mesresult.PASS, false, "", PlcData, DateTime.Now); + + #region 测试不用 /* var response = _httpClient.PostAsync(url, httpContent).Result; // 检查响应状态码 @@ -93,12 +129,20 @@ namespace WindowsFormsApp1.server // 回写对应PLC if (statusCode > 0) PlcData.Write_Status = (short)statusCode; - if(eventName == "SN_Release") + if (eventName == "SN_Release") PlcData.Write_stSN = res.SN.Value; } + else + { + // 判断此站是否有胶水。返回fail,执行胶水下线 + if (eventName == "SN_FeedingCheck") + { + //执行胶水下线操作 + } + } return result - ? ApiFormResult.Sucess(mesresult.PASS, false, res.MSG.Value, PlcData, DateTime.Now) - : ApiFormResult.Sucess(mesresult.FAIL, true, res.MSG.Value, PlcData, DateTime.Now); + ? ApiFormResult.Sucess(mesresult.PASS, false, res.MSG.Value, PlcData, DateTime.Now) + : ApiFormResult.Sucess(mesresult.FAIL, true, res.MSG.Value, PlcData, DateTime.Now); } else if (res.IsSuccess != null) // 打印 mes不返回result { @@ -116,13 +160,14 @@ namespace WindowsFormsApp1.server throw new Exception($"请求失败,状态码:{response.StatusCode}"); } */ + #endregion 测试不用 } catch (Exception ex) { LogExecute.logNet.WriteError($"{eventName} 接口请求失败: {ex.Message}"); throw new Exception(ex.Message); } - //return ApiFormResult.Sucess(mesresult.PASS, false, "", PlcData, DateTime.Now); + return ApiFormResult.Sucess(mesresult.PASS, false, "", PlcData, DateTime.Now); } public ApiFormResult SN_CheckIN(string url, plcdata PlcData, otherdata OtherData) @@ -135,16 +180,23 @@ namespace WindowsFormsApp1.server StationID = _stationID, MachineID = _machineID, OPID = _opID, - Token = "", - FixSN = "", + Token = _token, + FixSN = _fixsn, SN = PlcData.Read_MaterialCode1, CarrierID = "", SendTime = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") }; - + // 1对4 有部分不需要 callapi todo return CallApi(url, request, "SN_CheckIN", PlcData, PLC_Status.SN_CheckIN); } + /// + /// 核对载具合法性 + /// + /// + /// + /// + /// public ApiFormResult Carrier_Check(string url, plcdata PlcData, otherdata OtherData) { // 组装 request json @@ -155,8 +207,8 @@ namespace WindowsFormsApp1.server StationID = _stationID, MachineID = _machineID, OPID = _opID, - Token = "", - FixSN = "", + Token = _token, + FixSN = _fixsn, CarrierID = PlcData.Read_MaterialCode1, SendTime = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") }; @@ -164,6 +216,13 @@ namespace WindowsFormsApp1.server return CallApi(url, request, "Carrier_Check", PlcData, PLC_Status.Carrier_Check); } + /// + /// 核对材料,核对胶水寿命 + /// + /// + /// + /// + /// public ApiFormResult SN_FeedingCheck(string url, plcdata PlcData, otherdata OtherData) { // 组装 request json @@ -174,15 +233,31 @@ namespace WindowsFormsApp1.server StationID = _stationID, MachineID = _machineID, OPID = _opID, - Token = "", - FixSN = "", + Token = _token, + FixSN = _fixsn, SN = OtherData.JS_SN,//扫码 SendTime = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") }; - return CallApi(url, request, "SN_FeedingCheck", PlcData, PLC_Status.SN_FeedingCheck); + var result = CallApi(url, request, "SN_FeedingCheck", PlcData, PLC_Status.SN_FeedingCheck); + if (result.Success && result.Mesresult != mesresult.PASS) + { + // 判断是否是胶水站,FAIL 直接下线 todo + return CallFunctionByName("Glue_CheckOut", PlcData, OtherData); + } + else + { + return result; + } } + /// + /// 追溯码+材料绑定 + /// + /// + /// + /// + /// public ApiFormResult Link_Comp(string url, plcdata PlcData, otherdata OtherData) { // 组装 request json @@ -193,8 +268,15 @@ namespace WindowsFormsApp1.server StationID = _stationID, MachineID = _machineID, OPID = _opID, - Token = "", - FixSN = "", + CompList = new List() + { + new CompListItem() + { + // 安装主板 端子 + CompID = OtherData.JS_SN ?? Init.ScanString, + Qty = "1" + } + }, SN = OtherData.JS_SN, SendTime = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") }; @@ -202,6 +284,13 @@ namespace WindowsFormsApp1.server return CallApi(url, request, "Link_Comp", PlcData, PLC_Status.Link_Comp); } + /// + /// 扫描机壳码,返回MES SN号,写入PLC + /// + /// + /// + /// + /// public ApiFormResult SN_Release(string url, plcdata PlcData, otherdata OtherData) { // 组装 request json @@ -212,9 +301,9 @@ namespace WindowsFormsApp1.server StationID = _stationID, MachineID = _machineID, OPID = _opID, - Token = "", - FixSN = "", - SN = Init.ScanString, + Token = _token, + FixSN = _fixsn, + SN = OtherData.JS_SN, CarrierID = "", SendTime = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") }; @@ -222,25 +311,56 @@ namespace WindowsFormsApp1.server return CallApi(url, request, "SN_Release", PlcData, PLC_Status.SN_Release); } + /// + /// 胶水、三防漆,材料 上下线 + /// + /// + /// + /// + /// public ApiFormResult Glue_CheckOut(string url, plcdata PlcData, otherdata OtherData) { // 组装 request json + //判断站 + var station = Init.t_Line.lineremark2.ToLower(); + var fixsn_1 = ""; + var locationindex = 1; + switch (station) + { + case "Potting"://灌胶 + case "ThermalPaste"://点胶&CCD检测 + case "UVCoating"://三防漆涂覆 + case "Sealant"://点密封胶&CCD + break; + default: + fixsn_1 = "CompPN"; + locationindex = OtherData.locationindex; + break; + } + var request = new { EventID = "Glue_CheckOut", Line = _line, StationID = _stationID, MachineID = _machineID, - OPID = "",//判断站,胶水不用传 - Token = "",//判断站,胶水不用传 - FixSN = "",//判断站,胶水不用传 - SN = PlcData.Read_MaterialCode0, + OPID = OtherData.opindex, + Token = locationindex.ToString(),//判断站,胶水不用传 + FixSN = fixsn_1,//判断站,胶水不用传 + SN = OtherData.JS_SN, SendTime = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") }; return CallApi(url, request, "Glue_CheckOut", PlcData, PLC_Status.Glue_CheckOut); } + /// + /// 压力曲线 扭力曲线 + /// + /// + /// + /// + /// public ApiFormResult Data_Collection(string url, plcdata PlcData, otherdata OtherData) { // 组装 request json @@ -293,8 +413,38 @@ namespace WindowsFormsApp1.server return CallApi(url, request, "Alarm", PlcData, 0); } + /// + /// 视频、图片上传 + /// + /// + /// + /// + /// public ApiFormResult SN_FileUpload(string url, plcdata PlcData, otherdata OtherData) { + // 准备文件 视频/图片 + var month = DateTime.Now.ToString("yyyyMM"); + var day = DateTime.Now.ToString("dd"); + var monthDay = DateTime.Now.ToString("MMdd"); + var time = DateTime.Now.ToString("HHmmss"); + var result = PlcData.Read_Result == 1 ? "OK" : "NG"; + + var sourceDirectory = @""; + var targetDirectory = $"{OtherData.FileUploadAddress}\\{_line.Substring(0, 2)}\\{month}\\{day}\\line{_line.Substring(_line.Length - 2)}\\{_stationID}\\{_machineID}\\{result}"; + var fileName = $"{month}{day}_{_stationID}_{result}_{PlcData.Write_stSN}_{monthDay}_{time}_{_machineID}_Original01.png"; + // 查找源文件 可能会有多张照片或视频 + string sourceFile = Path.Combine(sourceDirectory, "source.png"); + //string targetDir = Path.Combine(targetDirectory, "target"); + // 执行复制 + try + { + CopyFileToDirectory(sourceFile, targetDirectory, fileName); + } + catch (Exception ex) + { + return ApiFormResult.Error(mesresult.FAIL, false, ex.Message, PlcData, DateTime.Now); + } + // 组装 request json var request = new { @@ -309,26 +459,49 @@ namespace WindowsFormsApp1.server SN = OtherData.JS_SN, FileInfo = new List() { - new - { - FileName = OtherData.FileUploadAddress, - FilePath = OtherData.FileUploadAddress - } + //new + //{ + // FileName = OtherData.FileUploadAddress, + // FilePath = OtherData.FileUploadAddress + //} } } }, SendTime = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") }; + // 多个视频或图片 + // 动态添加 FileInfo + /* + var newFileInfo = new + { + FileName = "NewFileName.txt", + FilePath = "C:\\path\\to\\newfile.txt" + }; + + // 获取 SNList 的第一个元素(假设只有一个 SN 元素) + dynamic snElement = request.SNList[0]; + + // 将 newFileInfo 添加到 FileInfo 列表中 + snElement.FileInfo.Add(newFileInfo); + */ + return CallApi(url, request, "SN_FileUpload", PlcData, PLC_Status.SN_FileUpload); } + /// + /// 触发MES打印 + /// + /// + /// + /// + /// public ApiFormResult CodeSoftPrint(string url, plcdata PlcData, otherdata OtherData) { // 组装 request json var request = new { - Line = "CodeSoftPrint", // 特殊值,不使用_line + Line = _line, // 特殊值,不使用_line StationID = _stationID, MachineID = _machineID, SN = PlcData.Read_MaterialCode0 @@ -341,7 +514,10 @@ namespace WindowsFormsApp1.server { // 根据不同的lineCode构建不同的请求 var lineCode = Init.t_Line.linecode; + var stationid = Init.t_Line.lineremark2; + var result = PlcData.Read_Result == 1 ? "PASS" : "FAIL"; + var logresult = PlcData.Read_Result == 1 ? "OK" : "NG"; // 基础请求对象 var request = new CheckOutObject() { @@ -355,89 +531,125 @@ namespace WindowsFormsApp1.server new SNInfoItem() { SN = PlcData.Read_MaterialCode0, - Result = PlcData.Read_Result == 1 ? "PASS" : "FAIL", - DC_INFO = new List() - { - new DCInfoItem() - { - Item = PlcData.Read_MaterialCode2, - Value = PlcData.Read_UploadData1.ToString(), - Result = PlcData.Read_Result == 1 ? "PASS" : "FAIL" - } - }, + Result = result, + DC_INFO = new List(), CompList = new List() - { - new CompListItem() - { - CompID = "", - Qty = "1" - } - } } }, Qty = "", CarrierID = PlcData.Read_MaterialCode1, - Mold = "", - Token = "", - FixSN = "", + Mold = _mold, + Token = _token, + FixSN = _fixsn, SendTime = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") }; - //LogExecute.logNet.WriteDebug($"checkout:{request}"); - // 根据不同的lineCode可以在这里扩展request对象 - switch (lineCode) + var dcInfo = new DCInfoItem(); + var sninfo = request.SNInfo[0]; + var compListItem = new CompListItem(); + + //气密 + if ("SWAT".Contains(stationid)) { - case "OP1060": // 追溯码+载具,默认(todo) - case "OP1120": - case "OP1170": - case "OP1190": - case "OP1220": - case "OP1250": - break; + + sninfo.DC_INFO.Add(new DCInfoItem + { + Item = OutItem.充气压力, + Value = Init.airtight.Airtight_Value, + Result = result + }); + sninfo.DC_INFO.Add(new DCInfoItem + { + Item = OutItem.泄漏量, + Value = Init.airtight.Leak_Value, + Result = result + }); - case "OP1010":// 传气密 - case "OP1330": - var dcInfo = new DCInfoItem(); - dcInfo.Item = PlcData.Read_MaterialCode2; - dcInfo.Value = "气密测试值"; - dcInfo.Result = "PASS"; - //request.SNInfo - break; - - case "OP1050":// 胶水码 - case "OP1210":// 三防漆码 - break; - - case "OP1070":// 传螺丝 角度,扭力,【扭力曲线(datacollection)】 - case "OP1080": - case "OP1090": - case "OP1100": - case "OP1130": - case "OP1260": - break; - - case "OP1140"://压力值,压力曲线 - break; - - case "OP1160"://加热,冷却温度 - break; - - case "OP1110"://CCD检测结果 - case "OP1200"://AOI检测结果 - case "OP1240"://CCD检测结果 - case "OP1340"://CCD检测结果 - break; - - case "OP1360"://产品码 - break; - - case "OP1230"://AOI检测结果,三防漆涂胶胶宽 - break; - default: - break; + LogExecute.SNlogNet.WriteDebug($"{PlcData.Read_MaterialCode0},{Init.airtight.Airtight_Value},{Init.airtight.Leak_Value}"); } + //扭力,角度 + if ("ScrewE,Assy2,Assy3,ScrewS,ScrewM".Contains(stationid)) + { + var AngleCount = 1; + foreach (var item in OtherData.FinalAngleValue.Where(x => x > 0)) + { + //角度 + dcInfo = new DCInfoItem(); + dcInfo.Item = $"{Init.t_Line.lineremark2}_Angle{AngleCount}"; + dcInfo.Value = item.ToString(); + dcInfo.Result = result; + sninfo.DC_INFO.Add(dcInfo); + AngleCount++; + } + var TorqueCount = 1; + foreach (var item in OtherData.FinalTorqueValue.Where(x => x > 0)) + { + //扭力 + dcInfo = new DCInfoItem(); + dcInfo.Item = $"{Init.t_Line.lineremark2}_Torque{TorqueCount}"; + dcInfo.Value = item.ToString(); + dcInfo.Result = result; + + sninfo.DC_INFO.Add(dcInfo); + TorqueCount++; + } + } + + //CCD + if ("Assy2,Assy3,AOI,Assy5,Sealant,CCD,PrintLabel".Contains(stationid)) + { + dcInfo.Item = stationid == "CCD"? "CCD" : $"{Init.t_Line.lineremark2}_CCD"; + dcInfo.Value = PlcData.Read_UploadData0.ToString(); + dcInfo.Result = result; + sninfo.DC_INFO.Add(dcInfo); + + LogExecute.SNlogNet.WriteDebug($"追溯码:{PlcData.Read_MaterialCode0},检测结果:{logresult}"); + } + //抽真空 压力 + if ("Vacuum".Contains(stationid)) + { + + } + //固化 时间 + if ("Curing".Contains(stationid)) + { + + } + //胶重 + if ("Potting,ThermalPaste,Sealant".Contains(stationid)) + { + dcInfo.Item = $"{stationid}_Weight"; + dcInfo.Value = PlcData.Read_UploadData0.ToString(); + dcInfo.Result = result; + sninfo.DC_INFO.Add(dcInfo); + } + //胶宽 + if ("Sealant".Contains(stationid)) + { + dcInfo.Item = $"{stationid}_Width"; + dcInfo.Value = PlcData.Read_UploadData1.ToString(); + dcInfo.Result = result; + sninfo.DC_INFO.Add(dcInfo); + } + //胶水 材料码 + if ("Potting,ThermalPaste,Sel_Soldering,UVCoating,Sealant".Contains(stationid)) + { + compListItem.CompID = OtherData.JS_SN; + compListItem.Qty = "1"; + + sninfo.CompList.Add(compListItem); + + LogExecute.SNlogNet.WriteDebug($"{PlcData.Read_MaterialCode0},胶水码:{OtherData.JS_SN},胶重:{PlcData.Read_UploadData0}"); + } + else //其他不传 + { + compListItem.CompID = ""; + compListItem.Qty = "1"; + + sninfo.CompList.Add(compListItem); + } return CallApi(url, request, "SN_Checkout", PlcData, PLC_Status.SN_Checkout); } @@ -581,6 +793,22 @@ namespace WindowsFormsApp1.server } } + /// + /// checkout dcinfo item + /// + public sealed class OutItem + { + public const string 充气压力 = "Set_Fill"; + public const string 泄漏量 = "Leakage_Rate"; + public const string 灌胶重量 = "Glue_Weight"; + public const string 点胶重量 = "ThermalPaste_Weight"; + public const string 腔体压力 = "Chamber_Pressure"; + public const string 保压时间 = "Hold_Time"; + public const string 固化温度 = "Cure_Temperature"; + public const string 固化时间 = "Curing_Time"; + public const string 重量 = "Sealant_Weight"; + public const string 宽度 = "Sealant_Width"; + } public sealed class PLC_Status { public const int SN_CheckIN = 10; @@ -606,7 +834,8 @@ namespace WindowsFormsApp1.server public const int Fail = 1001; } - //checkout class + + #region checkout class // 根对象类 public class CheckOutObject { @@ -647,5 +876,36 @@ namespace WindowsFormsApp1.server public string CompID { get; set; } public string Qty { get; set; } } + #endregion checkout class + + // 文件copy方法 + public bool CopyFileToDirectory(string sourceFilePath, string targetDirectory, string fileName) + { + // 检查源文件是否存在 + if (!File.Exists(sourceFilePath)) + { + throw new FileNotFoundException("源文件不存在", sourceFilePath); + } + + // 如果目标目录不存在,则创建 + if (!Directory.Exists(targetDirectory)) + { + Directory.CreateDirectory(targetDirectory); + } + + string targetPath = Path.Combine(targetDirectory, fileName); + + try + { + // 复制文件 + File.Copy(sourceFilePath, targetPath, true); + } + catch (Exception ex) + { + throw new Exception(ex.Message); + } + + return true; + } } } diff --git a/WindowsFormsApp1/server/LogExecute.cs b/WindowsFormsApp1/server/LogExecute.cs index 72fa19c..6433520 100644 --- a/WindowsFormsApp1/server/LogExecute.cs +++ b/WindowsFormsApp1/server/LogExecute.cs @@ -12,7 +12,7 @@ namespace WindowsFormsApp1.server public static ILogNet logNet = new LogNetDateTime("C:\\Log\\Logs", GenerateMode.ByEveryDay); public static ILogNet PlclogNet = new LogNetDateTime("C:\\Log\\PlcLogs", GenerateMode.ByEveryDay); public static ILogNet ApilogNet = new LogNetDateTime("C:\\Log\\Apilogs", GenerateMode.ByEveryHour); - public static ILogNet QMlogNet = new LogNetDateTime("C:\\Log\\QMlogs", GenerateMode.ByEveryHour); + public static ILogNet SNlogNet = new LogNetDateTime("C:\\Log\\SNlogs", GenerateMode.ByEveryDay); public static HslCommunication.BasicFramework.SoftNumericalOrder softNumericalOrder = new HslCommunication.BasicFramework.SoftNumericalOrder("", "yyyyMMdd", 4, @"\numericalOrder.txt"); public LogExecute()