diff --git a/WindowsFormsApp1/MES_PLC_Control.csproj b/WindowsFormsApp1/MES_PLC_Control.csproj
index 410d066..a91b91a 100644
--- a/WindowsFormsApp1/MES_PLC_Control.csproj
+++ b/WindowsFormsApp1/MES_PLC_Control.csproj
@@ -244,16 +244,17 @@
MESUrl.cs
-
+
Form
-
+
MaterialScanForm.cs
+
@@ -370,7 +371,7 @@
MESUrl.cs
-
+
MaterialScanForm.cs
diff --git a/WindowsFormsApp1/MainForm.Designer.cs b/WindowsFormsApp1/MainForm.Designer.cs
index 0f42739..8092c76 100644
--- a/WindowsFormsApp1/MainForm.Designer.cs
+++ b/WindowsFormsApp1/MainForm.Designer.cs
@@ -77,9 +77,9 @@ namespace WindowsFormsApp1
this.材料值 = new System.Windows.Forms.Label();
this.材料 = new System.Windows.Forms.Label();
this.LOT号显示 = new System.Windows.Forms.Label();
- this.LOT号 = new System.Windows.Forms.Label();
this.MES提示 = new System.Windows.Forms.Label();
this.Tray盘二维码 = new System.Windows.Forms.Label();
+ this.LOT号 = new System.Windows.Forms.Label();
this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
@@ -108,6 +108,7 @@ namespace WindowsFormsApp1
this.底部注释3 = new System.Windows.Forms.Label();
this.底部注释4 = new System.Windows.Forms.Label();
this.底部注释5 = new System.Windows.Forms.Label();
+ this.btnToggleTestMode = new System.Windows.Forms.Button();
this.tableLayoutPanel7 = new System.Windows.Forms.TableLayoutPanel();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.richTextBox2 = new System.Windows.Forms.RichTextBox();
@@ -133,9 +134,9 @@ namespace WindowsFormsApp1
this.plcStatusGroupBox.Controls.Add(this.plcStatusTableLayout);
this.plcStatusGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.plcStatusGroupBox.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold);
- this.plcStatusGroupBox.Location = new System.Drawing.Point(3, 969);
+ this.plcStatusGroupBox.Location = new System.Drawing.Point(3, 931);
this.plcStatusGroupBox.Name = "plcStatusGroupBox";
- this.plcStatusGroupBox.Size = new System.Drawing.Size(1754, 94);
+ this.plcStatusGroupBox.Size = new System.Drawing.Size(1754, 90);
this.plcStatusGroupBox.TabIndex = 9;
this.plcStatusGroupBox.TabStop = false;
this.plcStatusGroupBox.Text = "PLC连接状态";
@@ -149,7 +150,7 @@ namespace WindowsFormsApp1
this.plcStatusTableLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.plcStatusTableLayout.Location = new System.Drawing.Point(3, 40);
this.plcStatusTableLayout.Name = "plcStatusTableLayout";
- this.plcStatusTableLayout.Size = new System.Drawing.Size(1748, 51);
+ this.plcStatusTableLayout.Size = new System.Drawing.Size(1748, 47);
this.plcStatusTableLayout.TabIndex = 0;
//
// menuStrip1
@@ -369,13 +370,13 @@ namespace WindowsFormsApp1
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 6;
- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 105F));
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 48F));
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 101F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 59.66998F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 35.03736F));
- this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 100F));
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 96F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5.292663F));
- this.tableLayoutPanel1.Size = new System.Drawing.Size(1760, 1112);
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(1760, 1068);
this.tableLayoutPanel1.TabIndex = 6;
//
// tableLayoutPanel3
@@ -388,12 +389,12 @@ namespace WindowsFormsApp1
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel3.Controls.Add(this.tableLayoutPanel2, 0, 0);
- this.tableLayoutPanel3.Location = new System.Drawing.Point(5, 56);
+ this.tableLayoutPanel3.Location = new System.Drawing.Point(5, 54);
this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
this.tableLayoutPanel3.RowCount = 1;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.tableLayoutPanel3.Size = new System.Drawing.Size(1750, 93);
+ this.tableLayoutPanel3.Size = new System.Drawing.Size(1750, 89);
this.tableLayoutPanel3.TabIndex = 4;
//
// tableLayoutPanel2
@@ -422,18 +423,19 @@ namespace WindowsFormsApp1
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.tableLayoutPanel2.Size = new System.Drawing.Size(1740, 81);
+ this.tableLayoutPanel2.Size = new System.Drawing.Size(1740, 77);
this.tableLayoutPanel2.TabIndex = 3;
//
// linemode
//
+ this.linemode.AutoEllipsis = true;
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.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linemode.Location = new System.Drawing.Point(975, 1);
this.linemode.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.linemode.Name = "linemode";
- this.linemode.Size = new System.Drawing.Size(245, 79);
+ this.linemode.Size = new System.Drawing.Size(245, 75);
this.linemode.TabIndex = 16;
this.linemode.Text = "MachineID";
this.linemode.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@@ -442,11 +444,11 @@ namespace WindowsFormsApp1
//
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.当前时间.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.当前时间.Location = new System.Drawing.Point(1487, 1);
this.当前时间.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.当前时间.Name = "当前时间";
- this.当前时间.Size = new System.Drawing.Size(247, 79);
+ this.当前时间.Size = new System.Drawing.Size(247, 75);
this.当前时间.TabIndex = 11;
this.当前时间.Text = "当前状态:";
this.当前时间.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@@ -455,37 +457,39 @@ namespace WindowsFormsApp1
//
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.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.操作人员ID.Location = new System.Drawing.Point(1231, 1);
this.操作人员ID.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.操作人员ID.Name = "操作人员ID";
- this.操作人员ID.Size = new System.Drawing.Size(245, 79);
+ this.操作人员ID.Size = new System.Drawing.Size(245, 75);
this.操作人员ID.TabIndex = 6;
this.操作人员ID.Text = "操作人员ID:";
this.操作人员ID.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// linetype
//
+ this.linetype.AutoEllipsis = true;
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.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linetype.Location = new System.Drawing.Point(719, 1);
this.linetype.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.linetype.Name = "linetype";
- this.linetype.Size = new System.Drawing.Size(245, 79);
+ this.linetype.Size = new System.Drawing.Size(245, 75);
this.linetype.TabIndex = 5;
this.linetype.Text = "StationID";
this.linetype.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// linecode
//
+ this.linecode.AutoEllipsis = true;
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.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linecode.Location = new System.Drawing.Point(463, 1);
this.linecode.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.linecode.Name = "linecode";
- this.linecode.Size = new System.Drawing.Size(245, 79);
+ this.linecode.Size = new System.Drawing.Size(245, 75);
this.linecode.TabIndex = 4;
this.linecode.Text = "Line";
this.linecode.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@@ -494,11 +498,11 @@ namespace WindowsFormsApp1
//
this.linename.AutoSize = true;
this.linename.Dock = System.Windows.Forms.DockStyle.Fill;
- this.linename.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.linename.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.linename.Location = new System.Drawing.Point(207, 1);
this.linename.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.linename.Name = "linename";
- this.linename.Size = new System.Drawing.Size(245, 79);
+ this.linename.Size = new System.Drawing.Size(245, 75);
this.linename.TabIndex = 3;
this.linename.Text = "线别:";
this.linename.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@@ -509,7 +513,7 @@ namespace WindowsFormsApp1
this.开始处理.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.开始处理.Location = new System.Drawing.Point(4, 4);
this.开始处理.Name = "开始处理";
- this.开始处理.Size = new System.Drawing.Size(194, 73);
+ this.开始处理.Size = new System.Drawing.Size(194, 69);
this.开始处理.TabIndex = 17;
this.开始处理.Text = "开始处理";
this.开始处理.UseVisualStyleBackColor = true;
@@ -526,13 +530,13 @@ namespace WindowsFormsApp1
this.tableLayoutPanel4.Controls.Add(this.原料包装LOT号, 0, 0);
this.tableLayoutPanel4.Controls.Add(this.tableLayoutPanel6, 0, 1);
this.tableLayoutPanel4.Controls.Add(this.tableLayoutPanel9, 1, 0);
- this.tableLayoutPanel4.Location = new System.Drawing.Point(3, 159);
+ this.tableLayoutPanel4.Location = new System.Drawing.Point(3, 153);
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, 40F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 60F));
- this.tableLayoutPanel4.Size = new System.Drawing.Size(1754, 503);
+ this.tableLayoutPanel4.Size = new System.Drawing.Size(1754, 483);
this.tableLayoutPanel4.TabIndex = 8;
//
// 原料包装LOT号
@@ -544,7 +548,7 @@ namespace WindowsFormsApp1
this.原料包装LOT号.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.原料包装LOT号.Name = "原料包装LOT号";
this.原料包装LOT号.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4);
- this.原料包装LOT号.Size = new System.Drawing.Size(1397, 193);
+ this.原料包装LOT号.Size = new System.Drawing.Size(1397, 185);
this.原料包装LOT号.TabIndex = 0;
this.原料包装LOT号.TabStop = false;
this.原料包装LOT号.Text = "产品信息:";
@@ -553,15 +557,14 @@ namespace WindowsFormsApp1
//
this.tableLayoutPanel5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.tableLayoutPanel5.ColumnCount = 2;
- this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 24.49411F));
- this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 75.50589F));
- this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
+ this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+ this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 75F));
this.tableLayoutPanel5.Controls.Add(this.材料值, 1, 1);
this.tableLayoutPanel5.Controls.Add(this.材料, 0, 1);
this.tableLayoutPanel5.Controls.Add(this.LOT号显示, 0, 0);
- this.tableLayoutPanel5.Controls.Add(this.LOT号, 1, 0);
this.tableLayoutPanel5.Controls.Add(this.MES提示, 0, 2);
this.tableLayoutPanel5.Controls.Add(this.Tray盘二维码, 1, 2);
+ this.tableLayoutPanel5.Controls.Add(this.LOT号, 1, 0);
this.tableLayoutPanel5.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel5.Location = new System.Drawing.Point(3, 41);
this.tableLayoutPanel5.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
@@ -570,7 +573,7 @@ namespace WindowsFormsApp1
this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33334F));
this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33334F));
this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33334F));
- this.tableLayoutPanel5.Size = new System.Drawing.Size(1391, 148);
+ this.tableLayoutPanel5.Size = new System.Drawing.Size(1391, 140);
this.tableLayoutPanel5.TabIndex = 0;
//
// 材料值
@@ -578,9 +581,9 @@ namespace WindowsFormsApp1
this.材料值.AutoSize = true;
this.材料值.Dock = System.Windows.Forms.DockStyle.Fill;
this.材料值.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.材料值.Location = new System.Drawing.Point(343, 49);
+ this.材料值.Location = new System.Drawing.Point(350, 46);
this.材料值.Name = "材料值";
- this.材料值.Size = new System.Drawing.Size(1045, 49);
+ this.材料值.Size = new System.Drawing.Size(1038, 46);
this.材料值.TabIndex = 7;
this.材料值.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
@@ -589,9 +592,9 @@ namespace WindowsFormsApp1
this.材料.AutoSize = true;
this.材料.Dock = System.Windows.Forms.DockStyle.Fill;
this.材料.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.材料.Location = new System.Drawing.Point(3, 49);
+ this.材料.Location = new System.Drawing.Point(3, 46);
this.材料.Name = "材料";
- this.材料.Size = new System.Drawing.Size(334, 49);
+ this.材料.Size = new System.Drawing.Size(341, 46);
this.材料.TabIndex = 6;
this.材料.Text = "材 料:";
this.材料.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -603,30 +606,19 @@ namespace WindowsFormsApp1
this.LOT号显示.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.LOT号显示.Location = new System.Drawing.Point(3, 0);
this.LOT号显示.Name = "LOT号显示";
- this.LOT号显示.Size = new System.Drawing.Size(334, 49);
+ this.LOT号显示.Size = new System.Drawing.Size(341, 46);
this.LOT号显示.TabIndex = 2;
this.LOT号显示.Text = "产品 SN:";
this.LOT号显示.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
- // LOT号
- //
- this.LOT号.AutoSize = true;
- this.LOT号.Dock = System.Windows.Forms.DockStyle.Fill;
- this.LOT号.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold);
- this.LOT号.Location = new System.Drawing.Point(343, 0);
- this.LOT号.Name = "LOT号";
- this.LOT号.Size = new System.Drawing.Size(1045, 49);
- this.LOT号.TabIndex = 0;
- this.LOT号.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
// MES提示
//
this.MES提示.AutoSize = true;
this.MES提示.Dock = System.Windows.Forms.DockStyle.Fill;
this.MES提示.Font = new System.Drawing.Font("宋体", 15F);
- this.MES提示.Location = new System.Drawing.Point(3, 98);
+ this.MES提示.Location = new System.Drawing.Point(3, 92);
this.MES提示.Name = "MES提示";
- this.MES提示.Size = new System.Drawing.Size(334, 50);
+ this.MES提示.Size = new System.Drawing.Size(341, 48);
this.MES提示.TabIndex = 4;
this.MES提示.Text = "托 盘 码:";
this.MES提示.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -636,20 +628,31 @@ namespace WindowsFormsApp1
this.Tray盘二维码.AutoSize = true;
this.Tray盘二维码.Dock = System.Windows.Forms.DockStyle.Fill;
this.Tray盘二维码.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold);
- this.Tray盘二维码.Location = new System.Drawing.Point(343, 98);
+ this.Tray盘二维码.Location = new System.Drawing.Point(350, 92);
this.Tray盘二维码.Name = "Tray盘二维码";
- this.Tray盘二维码.Size = new System.Drawing.Size(1045, 50);
+ this.Tray盘二维码.Size = new System.Drawing.Size(1038, 48);
this.Tray盘二维码.TabIndex = 2;
this.Tray盘二维码.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
+ // LOT号
+ //
+ this.LOT号.AutoSize = true;
+ this.LOT号.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.LOT号.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold);
+ this.LOT号.Location = new System.Drawing.Point(350, 0);
+ this.LOT号.Name = "LOT号";
+ this.LOT号.Size = new System.Drawing.Size(1038, 46);
+ this.LOT号.TabIndex = 0;
+ this.LOT号.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
// tableLayoutPanel6
//
this.tableLayoutPanel6.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single;
this.tableLayoutPanel6.ColumnCount = 3;
this.tableLayoutPanel4.SetColumnSpan(this.tableLayoutPanel6, 2);
this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
- this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15F));
- this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 60F));
+ this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+ this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel6.Controls.Add(this.label1, 0, 0);
this.tableLayoutPanel6.Controls.Add(this.label2, 1, 0);
this.tableLayoutPanel6.Controls.Add(this.label3, 2, 0);
@@ -657,12 +660,12 @@ namespace WindowsFormsApp1
this.tableLayoutPanel6.Controls.Add(this.MES提示信息, 2, 1);
this.tableLayoutPanel6.Controls.Add(this.eventTableLayout, 0, 1);
this.tableLayoutPanel6.Dock = System.Windows.Forms.DockStyle.Fill;
- this.tableLayoutPanel6.Location = new System.Drawing.Point(3, 204);
+ this.tableLayoutPanel6.Location = new System.Drawing.Point(3, 196);
this.tableLayoutPanel6.Name = "tableLayoutPanel6";
this.tableLayoutPanel6.RowCount = 2;
- this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
+ this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 48F));
this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.tableLayoutPanel6.Size = new System.Drawing.Size(1748, 296);
+ this.tableLayoutPanel6.Size = new System.Drawing.Size(1748, 284);
this.tableLayoutPanel6.TabIndex = 3;
//
// label1
@@ -672,7 +675,7 @@ namespace WindowsFormsApp1
this.label1.Font = new System.Drawing.Font("宋体", 10.125F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(4, 1);
this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(430, 50);
+ this.label1.Size = new System.Drawing.Size(430, 48);
this.label1.TabIndex = 0;
this.label1.Text = "MES事件";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -684,7 +687,7 @@ namespace WindowsFormsApp1
this.label2.Font = new System.Drawing.Font("宋体", 10.125F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(441, 1);
this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(255, 50);
+ this.label2.Size = new System.Drawing.Size(430, 48);
this.label2.TabIndex = 1;
this.label2.Text = "MES事件结果";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -694,9 +697,9 @@ namespace WindowsFormsApp1
this.label3.AutoSize = true;
this.label3.Dock = System.Windows.Forms.DockStyle.Fill;
this.label3.Font = new System.Drawing.Font("宋体", 10.125F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label3.Location = new System.Drawing.Point(703, 1);
+ this.label3.Location = new System.Drawing.Point(878, 1);
this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(1041, 50);
+ this.label3.Size = new System.Drawing.Size(866, 48);
this.label3.TabIndex = 2;
this.label3.Text = "MES信息提示";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -706,9 +709,9 @@ namespace WindowsFormsApp1
this.事件结果.AutoSize = true;
this.事件结果.Dock = System.Windows.Forms.DockStyle.Fill;
this.事件结果.Font = new System.Drawing.Font("宋体", 25.875F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.事件结果.Location = new System.Drawing.Point(441, 52);
+ this.事件结果.Location = new System.Drawing.Point(441, 50);
this.事件结果.Name = "事件结果";
- this.事件结果.Size = new System.Drawing.Size(255, 243);
+ this.事件结果.Size = new System.Drawing.Size(430, 233);
this.事件结果.TabIndex = 3;
this.事件结果.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
@@ -716,10 +719,10 @@ namespace WindowsFormsApp1
//
this.MES提示信息.AutoSize = true;
this.MES提示信息.Dock = System.Windows.Forms.DockStyle.Fill;
- this.MES提示信息.Font = new System.Drawing.Font("宋体", 16.125F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.MES提示信息.Location = new System.Drawing.Point(703, 52);
+ this.MES提示信息.Font = new System.Drawing.Font("宋体", 22.125F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.MES提示信息.Location = new System.Drawing.Point(878, 50);
this.MES提示信息.Name = "MES提示信息";
- this.MES提示信息.Size = new System.Drawing.Size(1041, 243);
+ this.MES提示信息.Size = new System.Drawing.Size(866, 233);
this.MES提示信息.TabIndex = 4;
this.MES提示信息.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
@@ -739,7 +742,7 @@ namespace WindowsFormsApp1
this.eventTableLayout.Controls.Add(this.label8, 0, 3);
this.eventTableLayout.Controls.Add(this.label9, 0, 4);
this.eventTableLayout.Dock = System.Windows.Forms.DockStyle.Fill;
- this.eventTableLayout.Location = new System.Drawing.Point(4, 55);
+ this.eventTableLayout.Location = new System.Drawing.Point(4, 53);
this.eventTableLayout.Name = "eventTableLayout";
this.eventTableLayout.RowCount = 5;
this.eventTableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
@@ -747,7 +750,7 @@ namespace WindowsFormsApp1
this.eventTableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.eventTableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.eventTableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
- this.eventTableLayout.Size = new System.Drawing.Size(430, 237);
+ this.eventTableLayout.Size = new System.Drawing.Size(430, 227);
this.eventTableLayout.TabIndex = 5;
//
// panel1
@@ -756,46 +759,46 @@ namespace WindowsFormsApp1
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(333, 3);
this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(94, 41);
+ this.panel1.Size = new System.Drawing.Size(94, 39);
this.panel1.TabIndex = 0;
//
// panel2
//
- this.panel2.Location = new System.Drawing.Point(38, 47);
+ this.panel2.Location = new System.Drawing.Point(38, 45);
this.panel2.Name = "panel2";
- this.panel2.Size = new System.Drawing.Size(200, 41);
+ this.panel2.Size = new System.Drawing.Size(200, 39);
this.panel2.TabIndex = 1;
//
// panel4
//
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panel4.Location = new System.Drawing.Point(333, 50);
+ this.panel4.Location = new System.Drawing.Point(333, 48);
this.panel4.Name = "panel4";
- this.panel4.Size = new System.Drawing.Size(94, 41);
+ this.panel4.Size = new System.Drawing.Size(94, 39);
this.panel4.TabIndex = 2;
//
// panel3
//
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panel3.Location = new System.Drawing.Point(333, 97);
+ this.panel3.Location = new System.Drawing.Point(333, 93);
this.panel3.Name = "panel3";
- this.panel3.Size = new System.Drawing.Size(94, 41);
+ this.panel3.Size = new System.Drawing.Size(94, 39);
this.panel3.TabIndex = 1;
//
// panel5
//
this.panel5.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panel5.Location = new System.Drawing.Point(333, 144);
+ this.panel5.Location = new System.Drawing.Point(333, 138);
this.panel5.Name = "panel5";
- this.panel5.Size = new System.Drawing.Size(94, 41);
+ this.panel5.Size = new System.Drawing.Size(94, 39);
this.panel5.TabIndex = 3;
//
// panel6
//
this.panel6.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panel6.Location = new System.Drawing.Point(333, 191);
+ this.panel6.Location = new System.Drawing.Point(333, 183);
this.panel6.Name = "panel6";
- this.panel6.Size = new System.Drawing.Size(94, 43);
+ this.panel6.Size = new System.Drawing.Size(94, 41);
this.panel6.TabIndex = 4;
//
// label5
@@ -805,7 +808,7 @@ namespace WindowsFormsApp1
this.label5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold);
this.label5.Location = new System.Drawing.Point(3, 0);
this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(324, 47);
+ this.label5.Size = new System.Drawing.Size(324, 45);
this.label5.TabIndex = 5;
this.label5.Text = "label5";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -815,9 +818,9 @@ namespace WindowsFormsApp1
this.label6.AutoSize = true;
this.label6.Dock = System.Windows.Forms.DockStyle.Fill;
this.label6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label6.Location = new System.Drawing.Point(3, 47);
+ this.label6.Location = new System.Drawing.Point(3, 45);
this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(324, 47);
+ this.label6.Size = new System.Drawing.Size(324, 45);
this.label6.TabIndex = 6;
this.label6.Text = "label6";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -827,9 +830,9 @@ namespace WindowsFormsApp1
this.label7.AutoSize = true;
this.label7.Dock = System.Windows.Forms.DockStyle.Fill;
this.label7.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label7.Location = new System.Drawing.Point(3, 94);
+ this.label7.Location = new System.Drawing.Point(3, 90);
this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(324, 47);
+ this.label7.Size = new System.Drawing.Size(324, 45);
this.label7.TabIndex = 7;
this.label7.Text = "label7";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -839,9 +842,9 @@ namespace WindowsFormsApp1
this.label8.AutoSize = true;
this.label8.Dock = System.Windows.Forms.DockStyle.Fill;
this.label8.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label8.Location = new System.Drawing.Point(3, 141);
+ this.label8.Location = new System.Drawing.Point(3, 135);
this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(324, 47);
+ this.label8.Size = new System.Drawing.Size(324, 45);
this.label8.TabIndex = 8;
this.label8.Text = "label8";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -851,9 +854,9 @@ namespace WindowsFormsApp1
this.label9.AutoSize = true;
this.label9.Dock = System.Windows.Forms.DockStyle.Fill;
this.label9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label9.Location = new System.Drawing.Point(3, 188);
+ this.label9.Location = new System.Drawing.Point(3, 180);
this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(324, 49);
+ this.label9.Size = new System.Drawing.Size(324, 47);
this.label9.TabIndex = 9;
this.label9.Text = "label9";
this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -869,9 +872,9 @@ namespace WindowsFormsApp1
this.tableLayoutPanel9.Location = new System.Drawing.Point(1406, 3);
this.tableLayoutPanel9.Name = "tableLayoutPanel9";
this.tableLayoutPanel9.RowCount = 2;
- this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
+ this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 48F));
this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.tableLayoutPanel9.Size = new System.Drawing.Size(345, 195);
+ this.tableLayoutPanel9.Size = new System.Drawing.Size(345, 187);
this.tableLayoutPanel9.TabIndex = 4;
//
// label4
@@ -881,7 +884,7 @@ namespace WindowsFormsApp1
this.label4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.Location = new System.Drawing.Point(3, 0);
this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(339, 50);
+ this.label4.Size = new System.Drawing.Size(339, 48);
this.label4.TabIndex = 0;
this.label4.Text = "胶水寿命";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@@ -891,9 +894,9 @@ namespace WindowsFormsApp1
this.剩余寿命.AutoSize = true;
this.剩余寿命.Dock = System.Windows.Forms.DockStyle.Fill;
this.剩余寿命.Font = new System.Drawing.Font("宋体", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.剩余寿命.Location = new System.Drawing.Point(3, 50);
+ this.剩余寿命.Location = new System.Drawing.Point(3, 48);
this.剩余寿命.Name = "剩余寿命";
- this.剩余寿命.Size = new System.Drawing.Size(339, 145);
+ this.剩余寿命.Size = new System.Drawing.Size(339, 139);
this.剩余寿命.TabIndex = 1;
this.剩余寿命.Text = "label5";
this.剩余寿命.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@@ -906,7 +909,7 @@ namespace WindowsFormsApp1
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, 5, 4, 5);
- this.groupBox1.Size = new System.Drawing.Size(1752, 40);
+ this.groupBox1.Size = new System.Drawing.Size(1752, 38);
this.groupBox1.TabIndex = 4;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "处理界面";
@@ -929,13 +932,14 @@ namespace WindowsFormsApp1
this.tableLayoutPanel8.Controls.Add(this.底部注释3, 2, 0);
this.tableLayoutPanel8.Controls.Add(this.底部注释4, 3, 0);
this.tableLayoutPanel8.Controls.Add(this.底部注释5, 4, 0);
+ this.tableLayoutPanel8.Controls.Add(this.btnToggleTestMode, 9, 0);
this.tableLayoutPanel8.Dock = System.Windows.Forms.DockStyle.Fill;
- this.tableLayoutPanel8.Location = new System.Drawing.Point(3, 1070);
+ 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(1754, 38);
+ this.tableLayoutPanel8.Size = new System.Drawing.Size(1754, 36);
this.tableLayoutPanel8.TabIndex = 7;
//
// 底部注释1
@@ -944,7 +948,7 @@ namespace WindowsFormsApp1
this.底部注释1.AutoSize = true;
this.底部注释1.Location = new System.Drawing.Point(3, 6);
this.底部注释1.Name = "底部注释1";
- this.底部注释1.Size = new System.Drawing.Size(108, 25);
+ this.底部注释1.Size = new System.Drawing.Size(118, 24);
this.底部注释1.TabIndex = 0;
this.底部注释1.Text = "底部注释1";
//
@@ -954,7 +958,7 @@ namespace WindowsFormsApp1
this.底部注释2.AutoSize = true;
this.底部注释2.Location = new System.Drawing.Point(178, 6);
this.底部注释2.Name = "底部注释2";
- this.底部注释2.Size = new System.Drawing.Size(108, 25);
+ this.底部注释2.Size = new System.Drawing.Size(118, 24);
this.底部注释2.TabIndex = 1;
this.底部注释2.Text = "底部注释2";
//
@@ -964,7 +968,7 @@ namespace WindowsFormsApp1
this.底部注释3.AutoSize = true;
this.底部注释3.Location = new System.Drawing.Point(353, 6);
this.底部注释3.Name = "底部注释3";
- this.底部注释3.Size = new System.Drawing.Size(108, 25);
+ this.底部注释3.Size = new System.Drawing.Size(118, 24);
this.底部注释3.TabIndex = 2;
this.底部注释3.Text = "底部注释3";
//
@@ -974,7 +978,7 @@ namespace WindowsFormsApp1
this.底部注释4.AutoSize = true;
this.底部注释4.Location = new System.Drawing.Point(528, 6);
this.底部注释4.Name = "底部注释4";
- this.底部注释4.Size = new System.Drawing.Size(108, 25);
+ this.底部注释4.Size = new System.Drawing.Size(118, 24);
this.底部注释4.TabIndex = 3;
this.底部注释4.Text = "底部注释4";
//
@@ -984,10 +988,22 @@ namespace WindowsFormsApp1
this.底部注释5.AutoSize = true;
this.底部注释5.Location = new System.Drawing.Point(703, 6);
this.底部注释5.Name = "底部注释5";
- this.底部注释5.Size = new System.Drawing.Size(108, 25);
+ this.底部注释5.Size = new System.Drawing.Size(118, 24);
this.底部注释5.TabIndex = 4;
this.底部注释5.Text = "底部注释5";
//
+ // btnToggleTestMode
+ //
+ this.btnToggleTestMode.BackColor = System.Drawing.Color.Gray;
+ this.btnToggleTestMode.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.btnToggleTestMode.Location = new System.Drawing.Point(1578, 3);
+ this.btnToggleTestMode.Name = "btnToggleTestMode";
+ this.btnToggleTestMode.Size = new System.Drawing.Size(173, 30);
+ this.btnToggleTestMode.TabIndex = 5;
+ this.btnToggleTestMode.Text = "调试模式";
+ this.btnToggleTestMode.UseVisualStyleBackColor = false;
+ this.btnToggleTestMode.Click += new System.EventHandler(this.BtnToggleTestMode_Click);
+ //
// tableLayoutPanel7
//
this.tableLayoutPanel7.ColumnCount = 2;
@@ -996,12 +1012,12 @@ namespace WindowsFormsApp1
this.tableLayoutPanel7.Controls.Add(this.richTextBox1, 0, 0);
this.tableLayoutPanel7.Controls.Add(this.richTextBox2, 1, 0);
this.tableLayoutPanel7.Dock = System.Windows.Forms.DockStyle.Fill;
- this.tableLayoutPanel7.Location = new System.Drawing.Point(3, 669);
+ this.tableLayoutPanel7.Location = new System.Drawing.Point(3, 643);
this.tableLayoutPanel7.Name = "tableLayoutPanel7";
this.tableLayoutPanel7.RowCount = 1;
this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
- this.tableLayoutPanel7.Size = new System.Drawing.Size(1754, 294);
+ this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 19F));
+ this.tableLayoutPanel7.Size = new System.Drawing.Size(1754, 282);
this.tableLayoutPanel7.TabIndex = 10;
//
// richTextBox1
@@ -1009,7 +1025,7 @@ namespace WindowsFormsApp1
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Location = new System.Drawing.Point(3, 3);
this.richTextBox1.Name = "richTextBox1";
- this.richTextBox1.Size = new System.Drawing.Size(871, 288);
+ this.richTextBox1.Size = new System.Drawing.Size(871, 276);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = "";
//
@@ -1018,15 +1034,15 @@ namespace WindowsFormsApp1
this.richTextBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox2.Location = new System.Drawing.Point(880, 3);
this.richTextBox2.Name = "richTextBox2";
- this.richTextBox2.Size = new System.Drawing.Size(871, 288);
+ this.richTextBox2.Size = new System.Drawing.Size(871, 276);
this.richTextBox2.TabIndex = 1;
this.richTextBox2.Text = "";
//
// MainForm
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 25F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(1760, 1112);
+ this.ClientSize = new System.Drawing.Size(1760, 1068);
this.Controls.Add(this.menuStrip1);
this.Controls.Add(this.tableLayoutPanel1);
this.MainMenuStrip = this.menuStrip1;
@@ -1142,6 +1158,7 @@ namespace WindowsFormsApp1
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
+ private System.Windows.Forms.Button btnToggleTestMode;
}
}
diff --git a/WindowsFormsApp1/MainForm.cs b/WindowsFormsApp1/MainForm.cs
index 784c622..7ebccc8 100644
--- a/WindowsFormsApp1/MainForm.cs
+++ b/WindowsFormsApp1/MainForm.cs
@@ -3,8 +3,10 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
+using System.IO;
using System.IO.Ports;
using System.Linq;
+using System.Media;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.InteropServices;
@@ -30,10 +32,15 @@ namespace WindowsFormsApp1
{
public partial class MainForm : Form
{
+ #region 内部变量
+ // 添加一个静态互斥体对象,用于防止程序多开
+ private static Mutex _singleInstanceMutex;
+
// 添加一个标志变量,用于标记是否已经执行了清理操作
private bool _isCleanupDone = false;
- private bool _isFormClosing = false; // 添加标志,表示窗体正在关闭
- // 添加一个静态变量来跟踪下一个要使用的槽位
+ // 添加标志,表示窗体正在关闭
+ private bool _isFormClosing = false;
+ // 添加一个静态变量来跟踪下一个要使用的槽位
private static int _nextEventSlot = 1;
// 在MainForm类中添加一个字典,用于存储PLC状态控件
private Dictionary plcStatusLabels = new Dictionary();
@@ -43,23 +50,35 @@ namespace WindowsFormsApp1
private System.Windows.Forms.Timer statusReportTimer = new System.Windows.Forms.Timer();
private ApiClient statusApiClient = new ApiClient(); // 专用于状态上报的API客户端
private object curingLock = new object();
- private int OldPlcTrigger = 0;
+ private Dictionary OldPlcTrigger = new Dictionary();
// 在MainForm类的成员变量部分添加
private List