Przeglądaj źródła

优化参数回写

callm 3 dni temu
rodzic
commit
492c5cbaff
2 zmienionych plików z 176 dodań i 112 usunięć
  1. 133 105
      FileWatcher/AutoSMTRXY.Designer.cs
  2. 43 7
      FileWatcher/AutoSMTRXY.cs

+ 133 - 105
FileWatcher/AutoSMTRXY.Designer.cs

@@ -69,25 +69,27 @@
             this.ms_sncode = new FileWatcher.EnterTextBox();
             this.ma_code = new FileWatcher.SearchTextBox();
             this.li_code = new FileWatcher.SearchTextBox();
+            this.Stop = new System.Windows.Forms.TextBox();
+            this.label6 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.pr_pcbacount)).BeginInit();
             this.SuspendLayout();
             // 
             // OperateResult
             // 
-            this.OperateResult.Location = new System.Drawing.Point(906, 17);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.OperateResult.Location = new System.Drawing.Point(1208, 23);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(368, 402);
+            this.OperateResult.Size = new System.Drawing.Size(489, 535);
             this.OperateResult.TabIndex = 7;
             this.OperateResult.Text = "";
             // 
             // Clean
             // 
             this.Clean.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Clean.Location = new System.Drawing.Point(1035, 435);
-            this.Clean.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Clean.Location = new System.Drawing.Point(1380, 580);
+            this.Clean.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.Clean.Name = "Clean";
-            this.Clean.Size = new System.Drawing.Size(84, 36);
+            this.Clean.Size = new System.Drawing.Size(112, 48);
             this.Clean.TabIndex = 8;
             this.Clean.Text = "清除";
             this.Clean.UseVisualStyleBackColor = true;
@@ -97,9 +99,10 @@
             // 
             this.MakeCode_lable.AutoSize = true;
             this.MakeCode_lable.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.MakeCode_lable.Location = new System.Drawing.Point(38, 90);
+            this.MakeCode_lable.Location = new System.Drawing.Point(51, 120);
+            this.MakeCode_lable.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.MakeCode_lable.Name = "MakeCode_lable";
-            this.MakeCode_lable.Size = new System.Drawing.Size(79, 30);
+            this.MakeCode_lable.Size = new System.Drawing.Size(104, 38);
             this.MakeCode_lable.TabIndex = 12;
             this.MakeCode_lable.Text = "工单号";
             // 
@@ -110,19 +113,19 @@
             this.Type.Items.AddRange(new object[] {
             "投入",
             "产出"});
-            this.Type.Location = new System.Drawing.Point(166, 200);
-            this.Type.Margin = new System.Windows.Forms.Padding(2);
+            this.Type.Location = new System.Drawing.Point(221, 267);
             this.Type.Name = "Type";
-            this.Type.Size = new System.Drawing.Size(328, 26);
+            this.Type.Size = new System.Drawing.Size(436, 32);
             this.Type.TabIndex = 18;
             // 
             // label1
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(38, 196);
+            this.label1.Location = new System.Drawing.Point(51, 261);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(57, 30);
+            this.label1.Size = new System.Drawing.Size(75, 38);
             this.label1.TabIndex = 19;
             this.label1.Text = "类型";
             // 
@@ -131,29 +134,29 @@
             this.AutoStart.AutoSize = true;
             this.AutoStart.Checked = true;
             this.AutoStart.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.AutoStart.Location = new System.Drawing.Point(521, 95);
-            this.AutoStart.Margin = new System.Windows.Forms.Padding(2);
+            this.AutoStart.Location = new System.Drawing.Point(695, 127);
             this.AutoStart.Name = "AutoStart";
-            this.AutoStart.Size = new System.Drawing.Size(142, 22);
+            this.AutoStart.Size = new System.Drawing.Size(186, 28);
             this.AutoStart.TabIndex = 20;
             this.AutoStart.Text = "开机自动启动";
             this.AutoStart.UseVisualStyleBackColor = true;
             // 
             // NowQTY
             // 
-            this.NowQTY.Location = new System.Drawing.Point(166, 260);
-            this.NowQTY.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.NowQTY.Location = new System.Drawing.Point(221, 347);
+            this.NowQTY.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.NowQTY.Name = "NowQTY";
-            this.NowQTY.Size = new System.Drawing.Size(110, 28);
+            this.NowQTY.Size = new System.Drawing.Size(145, 35);
             this.NowQTY.TabIndex = 26;
             // 
             // label4
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(38, 257);
+            this.label4.Location = new System.Drawing.Point(51, 343);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(101, 30);
+            this.label4.Size = new System.Drawing.Size(133, 38);
             this.label4.TabIndex = 25;
             this.label4.Text = "当前计数";
             // 
@@ -161,10 +164,9 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.label5.Location = new System.Drawing.Point(38, 143);
-            this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label5.Location = new System.Drawing.Point(51, 191);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(62, 31);
+            this.label5.Size = new System.Drawing.Size(82, 41);
             this.label5.TabIndex = 27;
             this.label5.Text = "线别";
             // 
@@ -172,9 +174,10 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(38, 318);
+            this.label2.Location = new System.Drawing.Point(51, 424);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(79, 30);
+            this.label2.Size = new System.Drawing.Size(104, 38);
             this.label2.TabIndex = 34;
             this.label2.Text = "录入框";
             // 
@@ -188,10 +191,9 @@
             this.RemindVoice.AutoSize = true;
             this.RemindVoice.Checked = true;
             this.RemindVoice.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.RemindVoice.Location = new System.Drawing.Point(521, 143);
-            this.RemindVoice.Margin = new System.Windows.Forms.Padding(2);
+            this.RemindVoice.Location = new System.Drawing.Point(695, 191);
             this.RemindVoice.Name = "RemindVoice";
-            this.RemindVoice.Size = new System.Drawing.Size(124, 22);
+            this.RemindVoice.Size = new System.Drawing.Size(162, 28);
             this.RemindVoice.TabIndex = 35;
             this.RemindVoice.Text = "开启提示音";
             this.RemindVoice.UseVisualStyleBackColor = true;
@@ -199,10 +201,9 @@
             // SN
             // 
             this.SN.AutoSize = true;
-            this.SN.Location = new System.Drawing.Point(166, 364);
-            this.SN.Margin = new System.Windows.Forms.Padding(2);
+            this.SN.Location = new System.Drawing.Point(221, 485);
             this.SN.Name = "SN";
-            this.SN.Size = new System.Drawing.Size(87, 22);
+            this.SN.Size = new System.Drawing.Size(113, 28);
             this.SN.TabIndex = 37;
             this.SN.Text = "扫描SN";
             this.SN.UseVisualStyleBackColor = true;
@@ -212,10 +213,9 @@
             // 
             this.Counter.AutoSize = true;
             this.Counter.Checked = true;
-            this.Counter.Location = new System.Drawing.Point(268, 364);
-            this.Counter.Margin = new System.Windows.Forms.Padding(2);
+            this.Counter.Location = new System.Drawing.Point(357, 485);
             this.Counter.Name = "Counter";
-            this.Counter.Size = new System.Drawing.Size(87, 22);
+            this.Counter.Size = new System.Drawing.Size(113, 28);
             this.Counter.TabIndex = 36;
             this.Counter.TabStop = true;
             this.Counter.Text = "计数器";
@@ -226,10 +226,10 @@
             // 
             this.StopWatch.Enabled = false;
             this.StopWatch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.StopWatch.Location = new System.Drawing.Point(302, 414);
-            this.StopWatch.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.StopWatch.Location = new System.Drawing.Point(403, 552);
+            this.StopWatch.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.StopWatch.Name = "StopWatch";
-            this.StopWatch.Size = new System.Drawing.Size(96, 42);
+            this.StopWatch.Size = new System.Drawing.Size(128, 56);
             this.StopWatch.TabIndex = 39;
             this.StopWatch.Text = "停止监控";
             this.StopWatch.UseVisualStyleBackColor = true;
@@ -238,10 +238,10 @@
             // StartWatch
             // 
             this.StartWatch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.StartWatch.Location = new System.Drawing.Point(154, 414);
-            this.StartWatch.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.StartWatch.Location = new System.Drawing.Point(205, 552);
+            this.StartWatch.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.StartWatch.Name = "StartWatch";
-            this.StartWatch.Size = new System.Drawing.Size(96, 42);
+            this.StartWatch.Size = new System.Drawing.Size(128, 56);
             this.StartWatch.TabIndex = 38;
             this.StartWatch.Text = "开始监控";
             this.StartWatch.UseVisualStyleBackColor = true;
@@ -250,10 +250,10 @@
             // BaudRate
             // 
             this.BaudRate.Enabled = false;
-            this.BaudRate.Location = new System.Drawing.Point(765, 172);
-            this.BaudRate.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.BaudRate.Location = new System.Drawing.Point(1020, 229);
+            this.BaudRate.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.BaudRate.Name = "BaudRate";
-            this.BaudRate.Size = new System.Drawing.Size(110, 28);
+            this.BaudRate.Size = new System.Drawing.Size(145, 35);
             this.BaudRate.TabIndex = 43;
             this.BaudRate.Text = "9600";
             // 
@@ -261,9 +261,10 @@
             // 
             this.BaudRate_label.AutoSize = true;
             this.BaudRate_label.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.BaudRate_label.Location = new System.Drawing.Point(672, 172);
+            this.BaudRate_label.Location = new System.Drawing.Point(896, 229);
+            this.BaudRate_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.BaudRate_label.Name = "BaudRate_label";
-            this.BaudRate_label.Size = new System.Drawing.Size(79, 30);
+            this.BaudRate_label.Size = new System.Drawing.Size(104, 38);
             this.BaudRate_label.TabIndex = 42;
             this.BaudRate_label.Text = "波特率";
             // 
@@ -271,9 +272,10 @@
             // 
             this.ComPort_label.AutoSize = true;
             this.ComPort_label.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ComPort_label.Location = new System.Drawing.Point(694, 133);
+            this.ComPort_label.Location = new System.Drawing.Point(925, 177);
+            this.ComPort_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ComPort_label.Name = "ComPort_label";
-            this.ComPort_label.Size = new System.Drawing.Size(57, 30);
+            this.ComPort_label.Size = new System.Drawing.Size(75, 38);
             this.ComPort_label.TabIndex = 41;
             this.ComPort_label.Text = "串口";
             // 
@@ -284,10 +286,9 @@
             // 
             // pr_pcbacount
             // 
-            this.pr_pcbacount.Location = new System.Drawing.Point(403, 260);
-            this.pr_pcbacount.Margin = new System.Windows.Forms.Padding(2);
+            this.pr_pcbacount.Location = new System.Drawing.Point(537, 347);
             this.pr_pcbacount.Name = "pr_pcbacount";
-            this.pr_pcbacount.Size = new System.Drawing.Size(90, 28);
+            this.pr_pcbacount.Size = new System.Drawing.Size(120, 35);
             this.pr_pcbacount.TabIndex = 45;
             this.pr_pcbacount.Value = new decimal(new int[] {
             1,
@@ -299,76 +300,80 @@
             // 
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(307, 257);
+            this.label7.Location = new System.Drawing.Point(409, 343);
+            this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(79, 30);
+            this.label7.Size = new System.Drawing.Size(104, 38);
             this.label7.TabIndex = 44;
             this.label7.Text = "拼版数";
             // 
             // Read
             // 
             this.Read.Enabled = false;
-            this.Read.Location = new System.Drawing.Point(764, 214);
-            this.Read.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Read.Location = new System.Drawing.Point(1019, 285);
+            this.Read.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.Read.Name = "Read";
-            this.Read.Size = new System.Drawing.Size(110, 28);
+            this.Read.Size = new System.Drawing.Size(145, 35);
             this.Read.TabIndex = 47;
             // 
             // Read_label
             // 
             this.Read_label.AutoSize = true;
             this.Read_label.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Read_label.Location = new System.Drawing.Point(701, 210);
+            this.Read_label.Location = new System.Drawing.Point(935, 280);
+            this.Read_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Read_label.Name = "Read_label";
-            this.Read_label.Size = new System.Drawing.Size(57, 30);
+            this.Read_label.Size = new System.Drawing.Size(75, 38);
             this.Read_label.TabIndex = 46;
             this.Read_label.Text = "读取";
             // 
             // Write
             // 
             this.Write.Enabled = false;
-            this.Write.Location = new System.Drawing.Point(764, 254);
-            this.Write.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Write.Location = new System.Drawing.Point(1019, 339);
+            this.Write.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.Write.Name = "Write";
-            this.Write.Size = new System.Drawing.Size(110, 28);
+            this.Write.Size = new System.Drawing.Size(145, 35);
             this.Write.TabIndex = 49;
             // 
             // Write_label
             // 
             this.Write_label.AutoSize = true;
             this.Write_label.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Write_label.Location = new System.Drawing.Point(701, 251);
+            this.Write_label.Location = new System.Drawing.Point(935, 335);
+            this.Write_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Write_label.Name = "Write_label";
-            this.Write_label.Size = new System.Drawing.Size(57, 30);
+            this.Write_label.Size = new System.Drawing.Size(75, 38);
             this.Write_label.TabIndex = 48;
             this.Write_label.Text = "回写";
             // 
             // ToZero
             // 
             this.ToZero.Enabled = false;
-            this.ToZero.Location = new System.Drawing.Point(764, 296);
-            this.ToZero.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.ToZero.Location = new System.Drawing.Point(1019, 432);
+            this.ToZero.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.ToZero.Name = "ToZero";
-            this.ToZero.Size = new System.Drawing.Size(110, 28);
+            this.ToZero.Size = new System.Drawing.Size(145, 35);
             this.ToZero.TabIndex = 51;
             // 
             // ToZero_label
             // 
             this.ToZero_label.AutoSize = true;
             this.ToZero_label.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ToZero_label.Location = new System.Drawing.Point(701, 293);
+            this.ToZero_label.Location = new System.Drawing.Point(935, 428);
+            this.ToZero_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ToZero_label.Name = "ToZero_label";
-            this.ToZero_label.Size = new System.Drawing.Size(57, 30);
+            this.ToZero_label.Size = new System.Drawing.Size(75, 38);
             this.ToZero_label.TabIndex = 50;
             this.ToZero_label.Text = "清零";
             // 
             // CleanData
             // 
             this.CleanData.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CleanData.Location = new System.Drawing.Point(446, 414);
-            this.CleanData.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.CleanData.Location = new System.Drawing.Point(595, 552);
+            this.CleanData.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.CleanData.Name = "CleanData";
-            this.CleanData.Size = new System.Drawing.Size(96, 42);
+            this.CleanData.Size = new System.Drawing.Size(128, 56);
             this.CleanData.TabIndex = 52;
             this.CleanData.Text = "计数清零";
             this.CleanData.UseVisualStyleBackColor = true;
@@ -377,10 +382,10 @@
             // Setting
             // 
             this.Setting.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Setting.Location = new System.Drawing.Point(730, 17);
-            this.Setting.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Setting.Location = new System.Drawing.Point(973, 23);
+            this.Setting.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.Setting.Name = "Setting";
-            this.Setting.Size = new System.Drawing.Size(96, 42);
+            this.Setting.Size = new System.Drawing.Size(128, 56);
             this.Setting.TabIndex = 53;
             this.Setting.Text = "设置参数";
             this.Setting.UseVisualStyleBackColor = true;
@@ -390,9 +395,10 @@
             // 
             this.CountType_label.AutoSize = true;
             this.CountType_label.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CountType_label.Location = new System.Drawing.Point(660, 368);
+            this.CountType_label.Location = new System.Drawing.Point(880, 528);
+            this.CountType_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.CountType_label.Name = "CountType_label";
-            this.CountType_label.Size = new System.Drawing.Size(101, 30);
+            this.CountType_label.Size = new System.Drawing.Size(133, 38);
             this.CountType_label.TabIndex = 55;
             this.CountType_label.Text = "计数方式";
             // 
@@ -404,57 +410,58 @@
             this.CountType.Items.AddRange(new object[] {
             "PLC",
             "计数器"});
-            this.CountType.Location = new System.Drawing.Point(765, 373);
-            this.CountType.Margin = new System.Windows.Forms.Padding(2);
+            this.CountType.Location = new System.Drawing.Point(1020, 534);
             this.CountType.Name = "CountType";
-            this.CountType.Size = new System.Drawing.Size(104, 26);
+            this.CountType.Size = new System.Drawing.Size(137, 32);
             this.CountType.TabIndex = 54;
             // 
             // UseScan
             // 
             this.UseScan.Enabled = false;
-            this.UseScan.Location = new System.Drawing.Point(764, 334);
-            this.UseScan.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.UseScan.Location = new System.Drawing.Point(1019, 482);
+            this.UseScan.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.UseScan.Name = "UseScan";
-            this.UseScan.Size = new System.Drawing.Size(110, 28);
+            this.UseScan.Size = new System.Drawing.Size(145, 35);
             this.UseScan.TabIndex = 57;
             // 
             // UseScan_label
             // 
             this.UseScan_label.AutoSize = true;
             this.UseScan_label.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.UseScan_label.Location = new System.Drawing.Point(658, 332);
+            this.UseScan_label.Location = new System.Drawing.Point(877, 480);
+            this.UseScan_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.UseScan_label.Name = "UseScan_label";
-            this.UseScan_label.Size = new System.Drawing.Size(101, 30);
+            this.UseScan_label.Size = new System.Drawing.Size(133, 38);
             this.UseScan_label.TabIndex = 56;
             this.UseScan_label.Text = "启用扫描";
             // 
             // Password
             // 
-            this.Password.Location = new System.Drawing.Point(764, 95);
-            this.Password.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Password.Location = new System.Drawing.Point(1019, 127);
+            this.Password.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.Password.Name = "Password";
             this.Password.PasswordChar = '*';
-            this.Password.Size = new System.Drawing.Size(110, 28);
+            this.Password.Size = new System.Drawing.Size(145, 35);
             this.Password.TabIndex = 59;
             // 
             // label3
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(692, 93);
+            this.label3.Location = new System.Drawing.Point(923, 124);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(57, 30);
+            this.label3.Size = new System.Drawing.Size(75, 38);
             this.label3.TabIndex = 58;
             this.label3.Text = "密码";
             // 
             // ComPort
             // 
             this.ComPort.Enabled = false;
-            this.ComPort.Location = new System.Drawing.Point(764, 136);
-            this.ComPort.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.ComPort.Location = new System.Drawing.Point(1019, 181);
+            this.ComPort.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.ComPort.Name = "ComPort";
-            this.ComPort.Size = new System.Drawing.Size(111, 30);
+            this.ComPort.Size = new System.Drawing.Size(148, 40);
             this.ComPort.TabIndex = 40;
             // 
             // ms_sncode
@@ -462,11 +469,10 @@
             this.ms_sncode.AllPower = null;
             this.ms_sncode.BackColor = System.Drawing.Color.White;
             this.ms_sncode.ID = null;
-            this.ms_sncode.Location = new System.Drawing.Point(166, 322);
-            this.ms_sncode.Margin = new System.Windows.Forms.Padding(2);
+            this.ms_sncode.Location = new System.Drawing.Point(221, 429);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Power = null;
-            this.ms_sncode.Size = new System.Drawing.Size(251, 28);
+            this.ms_sncode.Size = new System.Drawing.Size(333, 35);
             this.ms_sncode.Str = null;
             this.ms_sncode.Str1 = null;
             this.ms_sncode.Str2 = null;
@@ -480,14 +486,13 @@
             this.ma_code.Condition = null;
             this.ma_code.DBTitle = null;
             this.ma_code.FormName = null;
-            this.ma_code.Location = new System.Drawing.Point(166, 86);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(2);
+            this.ma_code.Location = new System.Drawing.Point(221, 115);
             this.ma_code.Name = "ma_code";
             this.ma_code.Power = null;
             this.ma_code.ReturnData = null;
             this.ma_code.SelectField = null;
             this.ma_code.SetValueField = null;
-            this.ma_code.Size = new System.Drawing.Size(327, 31);
+            this.ma_code.Size = new System.Drawing.Size(436, 41);
             this.ma_code.TabIndex = 29;
             this.ma_code.TableName = null;
             this.ma_code.TextBoxEnable = false;
@@ -499,23 +504,44 @@
             this.li_code.Condition = null;
             this.li_code.DBTitle = null;
             this.li_code.FormName = null;
-            this.li_code.Location = new System.Drawing.Point(166, 143);
-            this.li_code.Margin = new System.Windows.Forms.Padding(2);
+            this.li_code.Location = new System.Drawing.Point(221, 191);
             this.li_code.Name = "li_code";
             this.li_code.Power = null;
             this.li_code.ReturnData = null;
             this.li_code.SelectField = null;
             this.li_code.SetValueField = null;
-            this.li_code.Size = new System.Drawing.Size(327, 31);
+            this.li_code.Size = new System.Drawing.Size(436, 41);
             this.li_code.TabIndex = 28;
             this.li_code.TableName = null;
             this.li_code.TextBoxEnable = false;
             // 
+            // Stop
+            // 
+            this.Stop.Enabled = false;
+            this.Stop.Location = new System.Drawing.Point(1020, 386);
+            this.Stop.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.Stop.Name = "Stop";
+            this.Stop.Size = new System.Drawing.Size(145, 35);
+            this.Stop.TabIndex = 61;
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label6.Location = new System.Drawing.Point(936, 382);
+            this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(75, 38);
+            this.label6.TabIndex = 60;
+            this.label6.Text = "停止";
+            // 
             // AutoSMTRXY
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1282, 480);
+            this.ClientSize = new System.Drawing.Size(1709, 640);
+            this.Controls.Add(this.Stop);
+            this.Controls.Add(this.label6);
             this.Controls.Add(this.Password);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.UseScan);
@@ -554,12 +580,12 @@
             this.Controls.Add(this.MakeCode_lable);
             this.Controls.Add(this.Clean);
             this.Controls.Add(this.OperateResult);
-            this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.MaximizeBox = false;
             this.Name = "AutoSMTRXY";
             this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
-            this.Text = "过站数据统计2026-09-22";
+            this.Text = "过站数据统计2026-10-19";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
             this.Load += new System.EventHandler(this.Form1_Load);
             ((System.ComponentModel.ISupportInitialize)(this.pr_pcbacount)).EndInit();
@@ -609,6 +635,8 @@
         private System.Windows.Forms.Label UseScan_label;
         private System.Windows.Forms.TextBox Password;
         private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.TextBox Stop;
+        private System.Windows.Forms.Label label6;
     }
 }
 

+ 43 - 7
FileWatcher/AutoSMTRXY.cs

@@ -131,6 +131,26 @@ namespace FileWatcher
                     dh.ExecuteSql("insert into makehourcount(mhc_id,mhc_macode,mhc_indate,mhc_type,mhc_qty,mhc_linecode,mhc_pcbcount)" +
                              "values(makehourcount_seq.nextval,'" + ma_code.Text + "',sysdate,'" + Type.Text + "','" + (qty - lastqty) + "','" + li_code.Text + "','" + pr_pcbacount.Value + "')", "insert");
                 }
+                dt = (DataTable)dh.ExecuteSql("select nvl(sum(MHC_QTY* MHC_PCBCOUNT),0)MHC_QTY,max(ma_qty)ma_qty from makehourcount left join make on ma_code=mhc_macode where mhc_macode='" + ma_code.Text + "'", "select");
+                if (dt.Rows.Count > 0)
+                {
+                    int MHC_QTY = int.Parse(dt.Rows[0]["MHC_QTY"].ToString());
+                    int ma_qty = int.Parse(dt.Rows[0]["ma_qty"].ToString());
+                    if (MHC_QTY >= ma_qty)
+                    {
+                        OperateResult write = plc.Write(Stop.Text, 1);
+                        if (write.IsSuccess)
+                        {
+                            OperateResult.AppendText("通过,发送指令" + Stop.Text + "写入1\n");
+                            OperateResult.ScrollToCaret();
+                        }
+                        else
+                        {
+                            OperateResult.AppendText("写入失败\n");
+                            OperateResult.ScrollToCaret();
+                        }
+                    }
+                }
                 if (Counter.Checked)
                 {
                     LogicHandler.CS_SetResultRXY(ma_code.Text, li_code.Text, "", qty.ToString(), li_code.Text, "OK", out error);
@@ -208,6 +228,20 @@ namespace FileWatcher
                     string 料号 = dt.Rows[i]["料号"].ToString();
                     BaseUtil.PlaySound("站位" + 站位 + "物料" + 料号 + "数量剩余" + 余数 + "请及时接料");
                 }
+                if (dt.Rows.Count > 0)
+                {
+                    OperateResult write = plc.Write(Stop.Text, 1);
+                    if (write.IsSuccess)
+                    {
+                        OperateResult.AppendText("通过,发送指令" + Stop.Text + "写入1\n");
+                        OperateResult.ScrollToCaret();
+                    }
+                    else
+                    {
+                        OperateResult.AppendText("写入失败\n");
+                        OperateResult.ScrollToCaret();
+                    }
+                }
             }
         }
 
@@ -522,7 +556,7 @@ namespace FileWatcher
             {
                 ComPort.Enabled = false; Read.Enabled = false; Write.Enabled = false;
                 BaudRate.Enabled = false; ToZero.Enabled = false; UseScan.Enabled = false;
-                CountType.Enabled = false;
+                CountType.Enabled = false; Read.Enabled = false;
             }
             else
             {
@@ -530,7 +564,7 @@ namespace FileWatcher
                 {
                     ComPort.Enabled = true; Read.Enabled = true; Write.Enabled = true;
                     BaudRate.Visible = true; ToZero.Enabled = true; UseScan.Enabled = true;
-                    CountType.Enabled = true;
+                    CountType.Enabled = true; Read.Enabled = true;
                     Password.Text = "";
                 }
                 else
@@ -542,7 +576,8 @@ namespace FileWatcher
 
         private void Counter_CheckedChanged(object sender, EventArgs e)
         {
-            if (Counter.Checked) {
+            if (Counter.Checked)
+            {
                 string ExitConfirm = MessageBox.Show(this, "确认切换为计数器?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
                 if (ExitConfirm == "Yes")
                 {
@@ -561,16 +596,17 @@ namespace FileWatcher
                     SN.Checked = false;
                 }
             }
-         
+
         }
 
         private void SN_CheckedChanged(object sender, EventArgs e)
         {
-            if (SN.Checked) {
+            if (SN.Checked)
+            {
                 string ExitConfirm = MessageBox.Show(this, "确认切换为扫码?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
                 if (ExitConfirm == "Yes")
                 {
-                    if(plc == null)
+                    if (plc == null)
                     {
                         OperateResult.AppendText("请先开始监控\n");
                         return;
@@ -590,7 +626,7 @@ namespace FileWatcher
                     Counter.Checked = true;
                 }
             }
-       
+
         }
     }
 }