2 Commits 74bdbf75ec ... 43bfc66649

Author SHA1 Message Date
  liu.ben 43bfc66649 Merge branch 'dev20250219_MES开发' of http://139.196.82.227:3000/peihang.li/xiaomiMes into dev20250219_MES开发 11 hours ago
  liu.ben 1c417e8dab 文本读最后一行上传 11 hours ago
3 changed files with 8488 additions and 8186 deletions
  1. 102 157
      MainForm/FaForm/Form_Home.Designer.cs
  2. 69 0
      MainForm/FaForm/Form_Home.cs
  3. 8317 8029
      MainForm/FaForm/Form_Home.resx

+ 102 - 157
MainForm/FaForm/Form_Home.Designer.cs

@@ -30,10 +30,10 @@
         {
             this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form_Home));
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
             this.panel1 = new System.Windows.Forms.Panel();
             this.groupBox3 = new System.Windows.Forms.GroupBox();
             this.txt_CurSupplierCode = new System.Windows.Forms.TextBox();
@@ -115,10 +115,9 @@
             this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.panel1.Controls.Add(this.groupBox3);
-            this.panel1.Location = new System.Drawing.Point(9, 10);
-            this.panel1.Margin = new System.Windows.Forms.Padding(2);
+            this.panel1.Location = new System.Drawing.Point(14, 15);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(1026, 122);
+            this.panel1.Size = new System.Drawing.Size(1539, 183);
             this.panel1.TabIndex = 0;
             // 
             // groupBox3
@@ -134,10 +133,8 @@
             this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
             this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.groupBox3.Location = new System.Drawing.Point(0, 0);
-            this.groupBox3.Margin = new System.Windows.Forms.Padding(2);
             this.groupBox3.Name = "groupBox3";
-            this.groupBox3.Padding = new System.Windows.Forms.Padding(2);
-            this.groupBox3.Size = new System.Drawing.Size(1026, 122);
+            this.groupBox3.Size = new System.Drawing.Size(1539, 183);
             this.groupBox3.TabIndex = 2;
             this.groupBox3.TabStop = false;
             this.groupBox3.Text = "当前加工订单信息";
@@ -145,20 +142,18 @@
             // txt_CurSupplierCode
             // 
             this.txt_CurSupplierCode.Enabled = false;
-            this.txt_CurSupplierCode.Location = new System.Drawing.Point(433, 80);
-            this.txt_CurSupplierCode.Margin = new System.Windows.Forms.Padding(2);
+            this.txt_CurSupplierCode.Location = new System.Drawing.Point(650, 120);
             this.txt_CurSupplierCode.Name = "txt_CurSupplierCode";
-            this.txt_CurSupplierCode.Size = new System.Drawing.Size(176, 27);
+            this.txt_CurSupplierCode.Size = new System.Drawing.Size(262, 36);
             this.txt_CurSupplierCode.TabIndex = 95;
             this.txt_CurSupplierCode.Visible = false;
             // 
             // label20
             // 
             this.label20.AutoSize = true;
-            this.label20.Location = new System.Drawing.Point(338, 83);
-            this.label20.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label20.Location = new System.Drawing.Point(507, 124);
             this.label20.Name = "label20";
-            this.label20.Size = new System.Drawing.Size(88, 20);
+            this.label20.Size = new System.Drawing.Size(128, 30);
             this.label20.TabIndex = 94;
             this.label20.Text = "供应商代码:";
             this.label20.Visible = false;
@@ -166,48 +161,43 @@
             // currentMtltmrk
             // 
             this.currentMtltmrk.Enabled = false;
-            this.currentMtltmrk.Location = new System.Drawing.Point(433, 39);
-            this.currentMtltmrk.Margin = new System.Windows.Forms.Padding(2);
+            this.currentMtltmrk.Location = new System.Drawing.Point(650, 58);
             this.currentMtltmrk.Name = "currentMtltmrk";
-            this.currentMtltmrk.Size = new System.Drawing.Size(176, 27);
+            this.currentMtltmrk.Size = new System.Drawing.Size(262, 36);
             this.currentMtltmrk.TabIndex = 10;
             // 
             // label3
             // 
             this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(353, 42);
-            this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label3.Location = new System.Drawing.Point(530, 63);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(73, 20);
+            this.label3.Size = new System.Drawing.Size(106, 30);
             this.label3.TabIndex = 7;
             this.label3.Text = "产品型号:";
             // 
             // currentBN
             // 
             this.currentBN.Enabled = false;
-            this.currentBN.Location = new System.Drawing.Point(119, 80);
-            this.currentBN.Margin = new System.Windows.Forms.Padding(2);
+            this.currentBN.Location = new System.Drawing.Point(178, 120);
             this.currentBN.Name = "currentBN";
-            this.currentBN.Size = new System.Drawing.Size(176, 27);
+            this.currentBN.Size = new System.Drawing.Size(262, 36);
             this.currentBN.TabIndex = 3;
             this.currentBN.Visible = false;
             // 
             // currentWC
             // 
             this.currentWC.Enabled = false;
-            this.currentWC.Location = new System.Drawing.Point(119, 39);
-            this.currentWC.Margin = new System.Windows.Forms.Padding(2);
+            this.currentWC.Location = new System.Drawing.Point(178, 58);
             this.currentWC.Name = "currentWC";
-            this.currentWC.Size = new System.Drawing.Size(176, 27);
+            this.currentWC.Size = new System.Drawing.Size(262, 36);
             this.currentWC.TabIndex = 2;
             // 
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(46, 83);
-            this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label2.Location = new System.Drawing.Point(69, 124);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(69, 20);
+            this.label2.Size = new System.Drawing.Size(101, 30);
             this.label2.TabIndex = 1;
             this.label2.Text = "批次号:";
             this.label2.Visible = false;
@@ -215,10 +205,9 @@
             // label1
             // 
             this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(19, 42);
-            this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label1.Location = new System.Drawing.Point(28, 63);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(88, 20);
+            this.label1.Size = new System.Drawing.Size(128, 30);
             this.label1.TabIndex = 0;
             this.label1.Text = "车间订单号:";
             // 
@@ -227,10 +216,9 @@
             this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.panel2.Controls.Add(this.groupBox2);
-            this.panel2.Location = new System.Drawing.Point(9, 455);
-            this.panel2.Margin = new System.Windows.Forms.Padding(2);
+            this.panel2.Location = new System.Drawing.Point(14, 682);
             this.panel2.Name = "panel2";
-            this.panel2.Size = new System.Drawing.Size(1026, 100);
+            this.panel2.Size = new System.Drawing.Size(1539, 150);
             this.panel2.TabIndex = 1;
             // 
             // groupBox2
@@ -248,11 +236,9 @@
             this.groupBox2.Controls.Add(this.groupBox13);
             this.groupBox2.Controls.Add(this.groupBox11);
             this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.groupBox2.Location = new System.Drawing.Point(2, 2);
-            this.groupBox2.Margin = new System.Windows.Forms.Padding(2);
+            this.groupBox2.Location = new System.Drawing.Point(3, 3);
             this.groupBox2.Name = "groupBox2";
-            this.groupBox2.Padding = new System.Windows.Forms.Padding(2);
-            this.groupBox2.Size = new System.Drawing.Size(902, 94);
+            this.groupBox2.Size = new System.Drawing.Size(1353, 141);
             this.groupBox2.TabIndex = 1;
             this.groupBox2.TabStop = false;
             this.groupBox2.Text = "设备状态";
@@ -261,12 +247,10 @@
             // 
             this.groupBox15.Controls.Add(this.picAgvMqtt);
             this.groupBox15.Font = new System.Drawing.Font("微软雅黑", 9.6F);
-            this.groupBox15.Location = new System.Drawing.Point(245, 24);
-            this.groupBox15.Margin = new System.Windows.Forms.Padding(2);
+            this.groupBox15.Location = new System.Drawing.Point(368, 36);
             this.groupBox15.Name = "groupBox15";
-            this.groupBox15.Padding = new System.Windows.Forms.Padding(2);
             this.groupBox15.RightToLeft = System.Windows.Forms.RightToLeft.No;
-            this.groupBox15.Size = new System.Drawing.Size(90, 60);
+            this.groupBox15.Size = new System.Drawing.Size(135, 90);
             this.groupBox15.TabIndex = 14;
             this.groupBox15.TabStop = false;
             this.groupBox15.Text = "AGV Mqtt";
@@ -276,10 +260,9 @@
             this.picAgvMqtt.ErrorImage = ((System.Drawing.Image)(resources.GetObject("picAgvMqtt.ErrorImage")));
             this.picAgvMqtt.Image = ((System.Drawing.Image)(resources.GetObject("picAgvMqtt.Image")));
             this.picAgvMqtt.InitialImage = ((System.Drawing.Image)(resources.GetObject("picAgvMqtt.InitialImage")));
-            this.picAgvMqtt.Location = new System.Drawing.Point(32, 24);
-            this.picAgvMqtt.Margin = new System.Windows.Forms.Padding(2);
+            this.picAgvMqtt.Location = new System.Drawing.Point(48, 36);
             this.picAgvMqtt.Name = "picAgvMqtt";
-            this.picAgvMqtt.Size = new System.Drawing.Size(26, 28);
+            this.picAgvMqtt.Size = new System.Drawing.Size(39, 42);
             this.picAgvMqtt.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
             this.picAgvMqtt.TabIndex = 10;
             this.picAgvMqtt.TabStop = false;
@@ -288,12 +271,10 @@
             // 
             this.groupBox14.Controls.Add(this.picAgvHttp);
             this.groupBox14.Font = new System.Drawing.Font("微软雅黑", 9.6F);
-            this.groupBox14.Location = new System.Drawing.Point(156, 24);
-            this.groupBox14.Margin = new System.Windows.Forms.Padding(2);
+            this.groupBox14.Location = new System.Drawing.Point(234, 36);
             this.groupBox14.Name = "groupBox14";
-            this.groupBox14.Padding = new System.Windows.Forms.Padding(2);
             this.groupBox14.RightToLeft = System.Windows.Forms.RightToLeft.No;
-            this.groupBox14.Size = new System.Drawing.Size(85, 60);
+            this.groupBox14.Size = new System.Drawing.Size(128, 90);
             this.groupBox14.TabIndex = 13;
             this.groupBox14.TabStop = false;
             this.groupBox14.Text = "AGV Http";
@@ -303,10 +284,9 @@
             this.picAgvHttp.ErrorImage = ((System.Drawing.Image)(resources.GetObject("picAgvHttp.ErrorImage")));
             this.picAgvHttp.Image = ((System.Drawing.Image)(resources.GetObject("picAgvHttp.Image")));
             this.picAgvHttp.InitialImage = ((System.Drawing.Image)(resources.GetObject("picAgvHttp.InitialImage")));
-            this.picAgvHttp.Location = new System.Drawing.Point(28, 24);
-            this.picAgvHttp.Margin = new System.Windows.Forms.Padding(2);
+            this.picAgvHttp.Location = new System.Drawing.Point(42, 36);
             this.picAgvHttp.Name = "picAgvHttp";
-            this.picAgvHttp.Size = new System.Drawing.Size(26, 28);
+            this.picAgvHttp.Size = new System.Drawing.Size(39, 42);
             this.picAgvHttp.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
             this.picAgvHttp.TabIndex = 10;
             this.picAgvHttp.TabStop = false;
@@ -315,12 +295,10 @@
             // 
             this.groupBox1.Controls.Add(this.picIot);
             this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9.6F);
-            this.groupBox1.Location = new System.Drawing.Point(88, 24);
-            this.groupBox1.Margin = new System.Windows.Forms.Padding(2);
+            this.groupBox1.Location = new System.Drawing.Point(132, 36);
             this.groupBox1.Name = "groupBox1";
-            this.groupBox1.Padding = new System.Windows.Forms.Padding(2);
             this.groupBox1.RightToLeft = System.Windows.Forms.RightToLeft.No;
-            this.groupBox1.Size = new System.Drawing.Size(64, 60);
+            this.groupBox1.Size = new System.Drawing.Size(96, 90);
             this.groupBox1.TabIndex = 12;
             this.groupBox1.TabStop = false;
             this.groupBox1.Text = "IOT";
@@ -330,10 +308,9 @@
             this.picIot.ErrorImage = ((System.Drawing.Image)(resources.GetObject("picIot.ErrorImage")));
             this.picIot.Image = ((System.Drawing.Image)(resources.GetObject("picIot.Image")));
             this.picIot.InitialImage = ((System.Drawing.Image)(resources.GetObject("picIot.InitialImage")));
-            this.picIot.Location = new System.Drawing.Point(18, 24);
-            this.picIot.Margin = new System.Windows.Forms.Padding(2);
+            this.picIot.Location = new System.Drawing.Point(27, 36);
             this.picIot.Name = "picIot";
-            this.picIot.Size = new System.Drawing.Size(26, 28);
+            this.picIot.Size = new System.Drawing.Size(39, 42);
             this.picIot.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
             this.picIot.TabIndex = 10;
             this.picIot.TabStop = false;
@@ -342,12 +319,10 @@
             // 
             this.groupBox5.Controls.Add(this.picMESStatus);
             this.groupBox5.Font = new System.Drawing.Font("微软雅黑", 9.6F);
-            this.groupBox5.Location = new System.Drawing.Point(20, 24);
-            this.groupBox5.Margin = new System.Windows.Forms.Padding(2);
+            this.groupBox5.Location = new System.Drawing.Point(30, 36);
             this.groupBox5.Name = "groupBox5";
-            this.groupBox5.Padding = new System.Windows.Forms.Padding(2);
             this.groupBox5.RightToLeft = System.Windows.Forms.RightToLeft.No;
-            this.groupBox5.Size = new System.Drawing.Size(64, 60);
+            this.groupBox5.Size = new System.Drawing.Size(96, 90);
             this.groupBox5.TabIndex = 0;
             this.groupBox5.TabStop = false;
             this.groupBox5.Text = "MES";
@@ -357,10 +332,9 @@
             this.picMESStatus.ErrorImage = ((System.Drawing.Image)(resources.GetObject("picMESStatus.ErrorImage")));
             this.picMESStatus.Image = ((System.Drawing.Image)(resources.GetObject("picMESStatus.Image")));
             this.picMESStatus.InitialImage = ((System.Drawing.Image)(resources.GetObject("picMESStatus.InitialImage")));
-            this.picMESStatus.Location = new System.Drawing.Point(18, 24);
-            this.picMESStatus.Margin = new System.Windows.Forms.Padding(2);
+            this.picMESStatus.Location = new System.Drawing.Point(27, 36);
             this.picMESStatus.Name = "picMESStatus";
-            this.picMESStatus.Size = new System.Drawing.Size(26, 28);
+            this.picMESStatus.Size = new System.Drawing.Size(39, 42);
             this.picMESStatus.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
             this.picMESStatus.TabIndex = 10;
             this.picMESStatus.TabStop = false;
@@ -369,12 +343,10 @@
             // 
             this.groupBox7.Controls.Add(this.pictureBox6);
             this.groupBox7.Font = new System.Drawing.Font("微软雅黑", 9.6F);
-            this.groupBox7.Location = new System.Drawing.Point(680, 24);
-            this.groupBox7.Margin = new System.Windows.Forms.Padding(2);
+            this.groupBox7.Location = new System.Drawing.Point(1020, 36);
             this.groupBox7.Name = "groupBox7";
-            this.groupBox7.Padding = new System.Windows.Forms.Padding(2);
             this.groupBox7.RightToLeft = System.Windows.Forms.RightToLeft.No;
-            this.groupBox7.Size = new System.Drawing.Size(64, 60);
+            this.groupBox7.Size = new System.Drawing.Size(96, 90);
             this.groupBox7.TabIndex = 1;
             this.groupBox7.TabStop = false;
             this.groupBox7.Text = "PLC6";
@@ -385,10 +357,9 @@
             this.pictureBox6.ErrorImage = ((System.Drawing.Image)(resources.GetObject("pictureBox6.ErrorImage")));
             this.pictureBox6.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox6.Image")));
             this.pictureBox6.InitialImage = ((System.Drawing.Image)(resources.GetObject("pictureBox6.InitialImage")));
-            this.pictureBox6.Location = new System.Drawing.Point(18, 24);
-            this.pictureBox6.Margin = new System.Windows.Forms.Padding(2);
+            this.pictureBox6.Location = new System.Drawing.Point(27, 36);
             this.pictureBox6.Name = "pictureBox6";
-            this.pictureBox6.Size = new System.Drawing.Size(26, 28);
+            this.pictureBox6.Size = new System.Drawing.Size(39, 42);
             this.pictureBox6.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
             this.pictureBox6.TabIndex = 16;
             this.pictureBox6.TabStop = false;
@@ -397,12 +368,10 @@
             // 
             this.groupBox12.Controls.Add(this.pictureBox8);
             this.groupBox12.Font = new System.Drawing.Font("微软雅黑", 9.6F);
-            this.groupBox12.Location = new System.Drawing.Point(816, 24);
-            this.groupBox12.Margin = new System.Windows.Forms.Padding(2);
+            this.groupBox12.Location = new System.Drawing.Point(1224, 36);
             this.groupBox12.Name = "groupBox12";
-            this.groupBox12.Padding = new System.Windows.Forms.Padding(2);
             this.groupBox12.RightToLeft = System.Windows.Forms.RightToLeft.No;
-            this.groupBox12.Size = new System.Drawing.Size(64, 60);
+            this.groupBox12.Size = new System.Drawing.Size(96, 90);
             this.groupBox12.TabIndex = 1;
             this.groupBox12.TabStop = false;
             this.groupBox12.Text = "PLC8";
@@ -413,10 +382,9 @@
             this.pictureBox8.ErrorImage = ((System.Drawing.Image)(resources.GetObject("pictureBox8.ErrorImage")));
             this.pictureBox8.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox8.Image")));
             this.pictureBox8.InitialImage = ((System.Drawing.Image)(resources.GetObject("pictureBox8.InitialImage")));
-            this.pictureBox8.Location = new System.Drawing.Point(19, 24);
-            this.pictureBox8.Margin = new System.Windows.Forms.Padding(2);
+            this.pictureBox8.Location = new System.Drawing.Point(28, 36);
             this.pictureBox8.Name = "pictureBox8";
-            this.pictureBox8.Size = new System.Drawing.Size(26, 28);
+            this.pictureBox8.Size = new System.Drawing.Size(39, 42);
             this.pictureBox8.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
             this.pictureBox8.TabIndex = 18;
             this.pictureBox8.TabStop = false;
@@ -425,12 +393,10 @@
             // 
             this.groupBox9.Controls.Add(this.pictureBox7);
             this.groupBox9.Font = new System.Drawing.Font("微软雅黑", 9.6F);
-            this.groupBox9.Location = new System.Drawing.Point(748, 24);
-            this.groupBox9.Margin = new System.Windows.Forms.Padding(2);
+            this.groupBox9.Location = new System.Drawing.Point(1122, 36);
             this.groupBox9.Name = "groupBox9";
-            this.groupBox9.Padding = new System.Windows.Forms.Padding(2);
             this.groupBox9.RightToLeft = System.Windows.Forms.RightToLeft.No;
-            this.groupBox9.Size = new System.Drawing.Size(64, 60);
+            this.groupBox9.Size = new System.Drawing.Size(96, 90);
             this.groupBox9.TabIndex = 1;
             this.groupBox9.TabStop = false;
             this.groupBox9.Text = "PLC7";
@@ -441,10 +407,9 @@
             this.pictureBox7.ErrorImage = ((System.Drawing.Image)(resources.GetObject("pictureBox7.ErrorImage")));
             this.pictureBox7.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox7.Image")));
             this.pictureBox7.InitialImage = ((System.Drawing.Image)(resources.GetObject("pictureBox7.InitialImage")));
-            this.pictureBox7.Location = new System.Drawing.Point(20, 24);
-            this.pictureBox7.Margin = new System.Windows.Forms.Padding(2);
+            this.pictureBox7.Location = new System.Drawing.Point(30, 36);
             this.pictureBox7.Name = "pictureBox7";
-            this.pictureBox7.Size = new System.Drawing.Size(26, 28);
+            this.pictureBox7.Size = new System.Drawing.Size(39, 42);
             this.pictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
             this.pictureBox7.TabIndex = 17;
             this.pictureBox7.TabStop = false;
@@ -453,12 +418,10 @@
             // 
             this.groupBox8.Controls.Add(this.picPLC);
             this.groupBox8.Font = new System.Drawing.Font("微软雅黑", 9.6F);
-            this.groupBox8.Location = new System.Drawing.Point(339, 24);
-            this.groupBox8.Margin = new System.Windows.Forms.Padding(2);
+            this.groupBox8.Location = new System.Drawing.Point(508, 36);
             this.groupBox8.Name = "groupBox8";
-            this.groupBox8.Padding = new System.Windows.Forms.Padding(2);
             this.groupBox8.RightToLeft = System.Windows.Forms.RightToLeft.No;
-            this.groupBox8.Size = new System.Drawing.Size(64, 60);
+            this.groupBox8.Size = new System.Drawing.Size(96, 90);
             this.groupBox8.TabIndex = 1;
             this.groupBox8.TabStop = false;
             this.groupBox8.Text = "PLC";
@@ -468,10 +431,9 @@
             this.picPLC.ErrorImage = ((System.Drawing.Image)(resources.GetObject("picPLC.ErrorImage")));
             this.picPLC.Image = ((System.Drawing.Image)(resources.GetObject("picPLC.Image")));
             this.picPLC.InitialImage = ((System.Drawing.Image)(resources.GetObject("picPLC.InitialImage")));
-            this.picPLC.Location = new System.Drawing.Point(20, 24);
-            this.picPLC.Margin = new System.Windows.Forms.Padding(2);
+            this.picPLC.Location = new System.Drawing.Point(30, 36);
             this.picPLC.Name = "picPLC";
-            this.picPLC.Size = new System.Drawing.Size(26, 28);
+            this.picPLC.Size = new System.Drawing.Size(39, 42);
             this.picPLC.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
             this.picPLC.TabIndex = 0;
             this.picPLC.TabStop = false;
@@ -480,12 +442,10 @@
             // 
             this.groupBox6.Controls.Add(this.pictureBox2);
             this.groupBox6.Font = new System.Drawing.Font("微软雅黑", 9.6F);
-            this.groupBox6.Location = new System.Drawing.Point(407, 24);
-            this.groupBox6.Margin = new System.Windows.Forms.Padding(2);
+            this.groupBox6.Location = new System.Drawing.Point(610, 36);
             this.groupBox6.Name = "groupBox6";
-            this.groupBox6.Padding = new System.Windows.Forms.Padding(2);
             this.groupBox6.RightToLeft = System.Windows.Forms.RightToLeft.No;
-            this.groupBox6.Size = new System.Drawing.Size(64, 60);
+            this.groupBox6.Size = new System.Drawing.Size(96, 90);
             this.groupBox6.TabIndex = 11;
             this.groupBox6.TabStop = false;
             this.groupBox6.Text = "PLC2";
@@ -496,10 +456,9 @@
             this.pictureBox2.ErrorImage = ((System.Drawing.Image)(resources.GetObject("pictureBox2.ErrorImage")));
             this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
             this.pictureBox2.InitialImage = ((System.Drawing.Image)(resources.GetObject("pictureBox2.InitialImage")));
-            this.pictureBox2.Location = new System.Drawing.Point(20, 24);
-            this.pictureBox2.Margin = new System.Windows.Forms.Padding(2);
+            this.pictureBox2.Location = new System.Drawing.Point(30, 36);
             this.pictureBox2.Name = "pictureBox2";
-            this.pictureBox2.Size = new System.Drawing.Size(26, 28);
+            this.pictureBox2.Size = new System.Drawing.Size(39, 42);
             this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
             this.pictureBox2.TabIndex = 12;
             this.pictureBox2.TabStop = false;
@@ -508,12 +467,10 @@
             // 
             this.groupBox10.Controls.Add(this.pictureBox3);
             this.groupBox10.Font = new System.Drawing.Font("微软雅黑", 9.6F);
-            this.groupBox10.Location = new System.Drawing.Point(475, 24);
-            this.groupBox10.Margin = new System.Windows.Forms.Padding(2);
+            this.groupBox10.Location = new System.Drawing.Point(712, 36);
             this.groupBox10.Name = "groupBox10";
-            this.groupBox10.Padding = new System.Windows.Forms.Padding(2);
             this.groupBox10.RightToLeft = System.Windows.Forms.RightToLeft.No;
-            this.groupBox10.Size = new System.Drawing.Size(64, 60);
+            this.groupBox10.Size = new System.Drawing.Size(96, 90);
             this.groupBox10.TabIndex = 1;
             this.groupBox10.TabStop = false;
             this.groupBox10.Text = "PLC3";
@@ -524,10 +481,9 @@
             this.pictureBox3.ErrorImage = ((System.Drawing.Image)(resources.GetObject("pictureBox3.ErrorImage")));
             this.pictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox3.Image")));
             this.pictureBox3.InitialImage = ((System.Drawing.Image)(resources.GetObject("pictureBox3.InitialImage")));
-            this.pictureBox3.Location = new System.Drawing.Point(18, 24);
-            this.pictureBox3.Margin = new System.Windows.Forms.Padding(2);
+            this.pictureBox3.Location = new System.Drawing.Point(27, 36);
             this.pictureBox3.Name = "pictureBox3";
-            this.pictureBox3.Size = new System.Drawing.Size(26, 28);
+            this.pictureBox3.Size = new System.Drawing.Size(39, 42);
             this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
             this.pictureBox3.TabIndex = 13;
             this.pictureBox3.TabStop = false;
@@ -536,12 +492,10 @@
             // 
             this.groupBox13.Controls.Add(this.pictureBox5);
             this.groupBox13.Font = new System.Drawing.Font("微软雅黑", 9.6F);
-            this.groupBox13.Location = new System.Drawing.Point(611, 24);
-            this.groupBox13.Margin = new System.Windows.Forms.Padding(2);
+            this.groupBox13.Location = new System.Drawing.Point(916, 36);
             this.groupBox13.Name = "groupBox13";
-            this.groupBox13.Padding = new System.Windows.Forms.Padding(2);
             this.groupBox13.RightToLeft = System.Windows.Forms.RightToLeft.No;
-            this.groupBox13.Size = new System.Drawing.Size(64, 60);
+            this.groupBox13.Size = new System.Drawing.Size(96, 90);
             this.groupBox13.TabIndex = 1;
             this.groupBox13.TabStop = false;
             this.groupBox13.Text = "PLC5";
@@ -552,10 +506,9 @@
             this.pictureBox5.ErrorImage = ((System.Drawing.Image)(resources.GetObject("pictureBox5.ErrorImage")));
             this.pictureBox5.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox5.Image")));
             this.pictureBox5.InitialImage = ((System.Drawing.Image)(resources.GetObject("pictureBox5.InitialImage")));
-            this.pictureBox5.Location = new System.Drawing.Point(20, 24);
-            this.pictureBox5.Margin = new System.Windows.Forms.Padding(2);
+            this.pictureBox5.Location = new System.Drawing.Point(30, 36);
             this.pictureBox5.Name = "pictureBox5";
-            this.pictureBox5.Size = new System.Drawing.Size(26, 28);
+            this.pictureBox5.Size = new System.Drawing.Size(39, 42);
             this.pictureBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
             this.pictureBox5.TabIndex = 15;
             this.pictureBox5.TabStop = false;
@@ -564,12 +517,10 @@
             // 
             this.groupBox11.Controls.Add(this.pictureBox4);
             this.groupBox11.Font = new System.Drawing.Font("微软雅黑", 9.6F);
-            this.groupBox11.Location = new System.Drawing.Point(543, 24);
-            this.groupBox11.Margin = new System.Windows.Forms.Padding(2);
+            this.groupBox11.Location = new System.Drawing.Point(814, 36);
             this.groupBox11.Name = "groupBox11";
-            this.groupBox11.Padding = new System.Windows.Forms.Padding(2);
             this.groupBox11.RightToLeft = System.Windows.Forms.RightToLeft.No;
-            this.groupBox11.Size = new System.Drawing.Size(64, 60);
+            this.groupBox11.Size = new System.Drawing.Size(96, 90);
             this.groupBox11.TabIndex = 1;
             this.groupBox11.TabStop = false;
             this.groupBox11.Text = "PLC4";
@@ -580,10 +531,9 @@
             this.pictureBox4.ErrorImage = ((System.Drawing.Image)(resources.GetObject("pictureBox4.ErrorImage")));
             this.pictureBox4.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox4.Image")));
             this.pictureBox4.InitialImage = ((System.Drawing.Image)(resources.GetObject("pictureBox4.InitialImage")));
-            this.pictureBox4.Location = new System.Drawing.Point(20, 24);
-            this.pictureBox4.Margin = new System.Windows.Forms.Padding(2);
+            this.pictureBox4.Location = new System.Drawing.Point(30, 36);
             this.pictureBox4.Name = "pictureBox4";
-            this.pictureBox4.Size = new System.Drawing.Size(26, 28);
+            this.pictureBox4.Size = new System.Drawing.Size(39, 42);
             this.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
             this.pictureBox4.TabIndex = 14;
             this.pictureBox4.TabStop = false;
@@ -594,10 +544,9 @@
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
             this.panel3.Controls.Add(this.groupBox4);
-            this.panel3.Location = new System.Drawing.Point(9, 137);
-            this.panel3.Margin = new System.Windows.Forms.Padding(2);
+            this.panel3.Location = new System.Drawing.Point(14, 206);
             this.panel3.Name = "panel3";
-            this.panel3.Size = new System.Drawing.Size(1026, 313);
+            this.panel3.Size = new System.Drawing.Size(1539, 470);
             this.panel3.TabIndex = 2;
             // 
             // groupBox4
@@ -606,10 +555,8 @@
             this.groupBox4.Dock = System.Windows.Forms.DockStyle.Fill;
             this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.groupBox4.Location = new System.Drawing.Point(0, 0);
-            this.groupBox4.Margin = new System.Windows.Forms.Padding(2);
             this.groupBox4.Name = "groupBox4";
-            this.groupBox4.Padding = new System.Windows.Forms.Padding(2);
-            this.groupBox4.Size = new System.Drawing.Size(1026, 313);
+            this.groupBox4.Size = new System.Drawing.Size(1539, 470);
             this.groupBox4.TabIndex = 1;
             this.groupBox4.TabStop = false;
             this.groupBox4.Text = "数据采集";
@@ -622,14 +569,14 @@
             this.systemLog.AllowUserToResizeRows = false;
             this.systemLog.BackgroundColor = System.Drawing.Color.White;
             this.systemLog.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
-            dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.systemLog.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
+            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle5.BackColor = System.Drawing.Color.WhiteSmoke;
+            dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.systemLog.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
             this.systemLog.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.systemLog.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.colDate,
@@ -638,32 +585,31 @@
             this.systemLog.Dock = System.Windows.Forms.DockStyle.Fill;
             this.systemLog.EnableHeadersVisualStyles = false;
             this.systemLog.GridColor = System.Drawing.Color.Gainsboro;
-            this.systemLog.Location = new System.Drawing.Point(2, 22);
-            this.systemLog.Margin = new System.Windows.Forms.Padding(2);
+            this.systemLog.Location = new System.Drawing.Point(3, 32);
             this.systemLog.Name = "systemLog";
             this.systemLog.ReadOnly = true;
-            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
-            dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.systemLog.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
+            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle7.BackColor = System.Drawing.Color.WhiteSmoke;
+            dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.systemLog.RowHeadersDefaultCellStyle = dataGridViewCellStyle7;
             this.systemLog.RowHeadersVisible = false;
             this.systemLog.RowHeadersWidth = 51;
             this.systemLog.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
-            dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.systemLog.RowsDefaultCellStyle = dataGridViewCellStyle4;
+            dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.systemLog.RowsDefaultCellStyle = dataGridViewCellStyle8;
             this.systemLog.RowTemplate.Height = 27;
             this.systemLog.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
-            this.systemLog.Size = new System.Drawing.Size(1022, 289);
+            this.systemLog.Size = new System.Drawing.Size(1533, 435);
             this.systemLog.TabIndex = 0;
             // 
             // colDate
             // 
-            dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.colDate.DefaultCellStyle = dataGridViewCellStyle2;
+            dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.colDate.DefaultCellStyle = dataGridViewCellStyle6;
             this.colDate.HeaderText = "日期";
             this.colDate.MinimumWidth = 6;
             this.colDate.Name = "colDate";
@@ -699,14 +645,13 @@
             // 
             // Form_Home
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.White;
-            this.ClientSize = new System.Drawing.Size(1044, 561);
+            this.ClientSize = new System.Drawing.Size(1566, 842);
             this.Controls.Add(this.panel3);
             this.Controls.Add(this.panel2);
             this.Controls.Add(this.panel1);
-            this.Margin = new System.Windows.Forms.Padding(2);
             this.Name = "Form_Home";
             this.Text = "Form_Home";
             this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Form_Home_FormClosed);

+ 69 - 0
MainForm/FaForm/Form_Home.cs

@@ -1165,6 +1165,59 @@ namespace MainForm
             }
         }
 
+
+        public Dictionary<string, string> GetLastLineCompensation()
+        {
+            // 创建字典存储补偿点及其对应的值
+            Dictionary<string, string> compensationDict = new Dictionary<string, string>();
+
+            try
+            {
+                string path = "D:\\TempNew";
+                // 获取当前日期并格式化为 "yyyy-MM-dd" 格式
+                string currentDate = DateTime.Now.ToString("yyyy-MM-dd");
+                string filename = $"Laser-{currentDate}-W0.txt";
+                // 拼接完整路径
+                string fullPath = Path.Combine(path, filename);
+
+                // 判断文件是否存在
+                if (File.Exists(fullPath))
+                {
+                    // 读取文件内容
+                    string[] lines = File.ReadAllLines(fullPath);
+
+                    // 获取最后一行数据(忽略标题行)
+                    if (lines.Length > 1)
+                    {
+                        string lastLine = lines[lines.Length - 1];
+
+                        // 将最后一行按逗号分隔
+                        string[] values = lastLine.Split(',');
+
+                        // 提取“1点补偿”到“6点补偿”的值
+                        for (int i = 2; i <= 7 && i < values.Length; i++) // 从索引2开始,最多提取6个值
+                        {
+                            string key = $"{i - 1}点补偿"; // 构造键名
+                            string value = values[i].Trim(); // 获取值并去除多余空格
+                            compensationDict[key] = value;
+                        }
+                    }
+                }
+                else
+                {
+                    Console.WriteLine($"文件不存在: {fullPath}");
+                }
+            }
+            catch (Exception ex)
+            {
+                // 捕获异常并输出错误信息
+                Console.WriteLine($"发生错误: {ex.Message}");
+            }
+
+            return compensationDict;
+        }
+
+
         /// <summary>
         /// 调用进站接口并保存进站数据
         /// </summary>
@@ -1341,6 +1394,22 @@ namespace MainForm
                         });  // 设备数据 - 部件码
                     }
 
+                    //OP30站读txt数据
+                    if (stationNameStr.Contains("OP30"))
+                    {
+                        //字典存储数据
+                        Dictionary<string, string> compensationDict = GetLastLineCompensation();
+                        foreach (var kvp in compensationDict)
+                        {
+                            outRequest_Body.unitData.processData.Add(
+                                new XmMES_StationOutRequest_Body.XmStationOut_ProcessData()
+                                {
+                                    dataName = kvp.Key.ToString(),
+                                    dataValue = kvp.Value.ToString()
+                                });
+                        }
+                    }
+
                     string jsonstr1 = JsonConvert.SerializeObject(outRequest_Body);
 
                     if (GlobalContext.IsSendProcessData)

File diff suppressed because it is too large
+ 8317 - 8029
MainForm/FaForm/Form_Home.resx