Przeglądaj źródła

添加循环次数限制,包装采集界面添加机械臂对接

章政 8 lat temu
rodzic
commit
9d8742b354

+ 157 - 52
UAS-MES/FunctionCode/Make/Make_PackageCollection.Designer.cs

@@ -98,6 +98,12 @@
             this.pd_innerqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pa_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.CloseServer = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.BuildServer = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.Port = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.Port_label = new System.Windows.Forms.Label();
+            this.IP = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.IP_label = new System.Windows.Forms.Label();
             this.groupBoxWithBorder2.SuspendLayout();
             this.groupBoxWithBorder1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).BeginInit();
@@ -109,7 +115,7 @@
             this.pa_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pa_makecode.Location = new System.Drawing.Point(831, 427);
             this.pa_makecode.Name = "pa_makecode";
-            this.pa_makecode.Size = new System.Drawing.Size(0, 21);
+            this.pa_makecode.Size = new System.Drawing.Size(0, 27);
             this.pa_makecode.TabIndex = 76;
             this.pa_makecode.Visible = false;
             // 
@@ -120,7 +126,7 @@
             this.label13.ForeColor = System.Drawing.Color.Black;
             this.label13.Location = new System.Drawing.Point(7, 554);
             this.label13.Name = "label13";
-            this.label13.Size = new System.Drawing.Size(58, 21);
+            this.label13.Size = new System.Drawing.Size(72, 27);
             this.label13.TabIndex = 105;
             this.label13.Text = "序列号";
             // 
@@ -130,7 +136,7 @@
             this.Cancel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Cancel.Location = new System.Drawing.Point(279, 554);
             this.Cancel.Name = "Cancel";
-            this.Cancel.Size = new System.Drawing.Size(93, 25);
+            this.Cancel.Size = new System.Drawing.Size(114, 31);
             this.Cancel.TabIndex = 129;
             this.Cancel.Text = "取消装箱";
             this.Cancel.UseVisualStyleBackColor = true;
@@ -141,7 +147,7 @@
             this.pa_id.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pa_id.Location = new System.Drawing.Point(799, 427);
             this.pa_id.Name = "pa_id";
-            this.pa_id.Size = new System.Drawing.Size(0, 21);
+            this.pa_id.Size = new System.Drawing.Size(0, 27);
             this.pa_id.TabIndex = 153;
             this.pa_id.Visible = false;
             // 
@@ -151,7 +157,7 @@
             this.pr_packrule.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_packrule.Location = new System.Drawing.Point(849, 418);
             this.pr_packrule.Name = "pr_packrule";
-            this.pr_packrule.Size = new System.Drawing.Size(0, 21);
+            this.pr_packrule.Size = new System.Drawing.Size(0, 27);
             this.pr_packrule.TabIndex = 173;
             this.pr_packrule.Visible = false;
             // 
@@ -161,7 +167,7 @@
             this.pa_status.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pa_status.Location = new System.Drawing.Point(780, 456);
             this.pa_status.Name = "pa_status";
-            this.pa_status.Size = new System.Drawing.Size(0, 21);
+            this.pa_status.Size = new System.Drawing.Size(0, 27);
             this.pa_status.TabIndex = 174;
             this.pa_status.Visible = false;
             // 
@@ -171,7 +177,7 @@
             this.pa_sccode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pa_sccode.Location = new System.Drawing.Point(831, 456);
             this.pa_sccode.Name = "pa_sccode";
-            this.pa_sccode.Size = new System.Drawing.Size(0, 21);
+            this.pa_sccode.Size = new System.Drawing.Size(0, 27);
             this.pa_sccode.TabIndex = 176;
             this.pa_sccode.Visible = false;
             // 
@@ -181,7 +187,7 @@
             this.pa_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pa_checkno.Location = new System.Drawing.Point(825, 456);
             this.pa_checkno.Name = "pa_checkno";
-            this.pa_checkno.Size = new System.Drawing.Size(0, 21);
+            this.pa_checkno.Size = new System.Drawing.Size(0, 27);
             this.pa_checkno.TabIndex = 177;
             this.pa_checkno.Visible = false;
             // 
@@ -191,7 +197,7 @@
             this.pa_downstatus.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pa_downstatus.Location = new System.Drawing.Point(837, 456);
             this.pa_downstatus.Name = "pa_downstatus";
-            this.pa_downstatus.Size = new System.Drawing.Size(0, 21);
+            this.pa_downstatus.Size = new System.Drawing.Size(0, 27);
             this.pa_downstatus.TabIndex = 178;
             this.pa_downstatus.Visible = false;
             // 
@@ -201,7 +207,7 @@
             this.pa_standardqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pa_standardqty.Location = new System.Drawing.Point(849, 470);
             this.pa_standardqty.Name = "pa_standardqty";
-            this.pa_standardqty.Size = new System.Drawing.Size(0, 21);
+            this.pa_standardqty.Size = new System.Drawing.Size(0, 27);
             this.pa_standardqty.TabIndex = 180;
             this.pa_standardqty.Visible = false;
             // 
@@ -211,7 +217,7 @@
             this.pr_sendchecktype.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_sendchecktype.Location = new System.Drawing.Point(709, 437);
             this.pr_sendchecktype.Name = "pr_sendchecktype";
-            this.pr_sendchecktype.Size = new System.Drawing.Size(0, 21);
+            this.pr_sendchecktype.Size = new System.Drawing.Size(0, 27);
             this.pr_sendchecktype.TabIndex = 182;
             this.pr_sendchecktype.Visible = false;
             // 
@@ -221,7 +227,7 @@
             this.mcd_remainqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mcd_remainqty_label.Location = new System.Drawing.Point(472, 470);
             this.mcd_remainqty_label.Name = "mcd_remainqty_label";
-            this.mcd_remainqty_label.Size = new System.Drawing.Size(74, 21);
+            this.mcd_remainqty_label.Size = new System.Drawing.Size(92, 27);
             this.mcd_remainqty_label.TabIndex = 196;
             this.mcd_remainqty_label.Text = "待采集数";
             // 
@@ -231,7 +237,7 @@
             this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mcd_remainqty.Location = new System.Drawing.Point(554, 470);
             this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(0, 21);
+            this.mcd_remainqty.Size = new System.Drawing.Size(0, 27);
             this.mcd_remainqty.TabIndex = 197;
             // 
             // mcd_inqty_label
@@ -240,7 +246,7 @@
             this.mcd_inqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mcd_inqty_label.Location = new System.Drawing.Point(472, 438);
             this.mcd_inqty_label.Name = "mcd_inqty_label";
-            this.mcd_inqty_label.Size = new System.Drawing.Size(74, 21);
+            this.mcd_inqty_label.Size = new System.Drawing.Size(92, 27);
             this.mcd_inqty_label.TabIndex = 194;
             this.mcd_inqty_label.Text = "已采集数";
             // 
@@ -250,7 +256,7 @@
             this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mcd_inqty.Location = new System.Drawing.Point(554, 438);
             this.mcd_inqty.Name = "mcd_inqty";
-            this.mcd_inqty.Size = new System.Drawing.Size(0, 21);
+            this.mcd_inqty.Size = new System.Drawing.Size(0, 27);
             this.mcd_inqty.TabIndex = 195;
             // 
             // pa_remark_label
@@ -259,7 +265,7 @@
             this.pa_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pa_remark_label.Location = new System.Drawing.Point(472, 500);
             this.pa_remark_label.Name = "pa_remark_label";
-            this.pa_remark_label.Size = new System.Drawing.Size(42, 21);
+            this.pa_remark_label.Size = new System.Drawing.Size(52, 27);
             this.pa_remark_label.TabIndex = 198;
             this.pa_remark_label.Text = "备注";
             // 
@@ -268,7 +274,7 @@
             this.CollecRemark.AutoSize = true;
             this.CollecRemark.Location = new System.Drawing.Point(517, 557);
             this.CollecRemark.Name = "CollecRemark";
-            this.CollecRemark.Size = new System.Drawing.Size(96, 16);
+            this.CollecRemark.Size = new System.Drawing.Size(107, 17);
             this.CollecRemark.TabIndex = 201;
             this.CollecRemark.Text = "采集备注信息";
             this.CollecRemark.UseVisualStyleBackColor = true;
@@ -332,7 +338,7 @@
             this.PrintNum.Location = new System.Drawing.Point(255, 131);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Power = null;
-            this.PrintNum.Size = new System.Drawing.Size(31, 23);
+            this.PrintNum.Size = new System.Drawing.Size(31, 27);
             this.PrintNum.Str = null;
             this.PrintNum.Str1 = null;
             this.PrintNum.Str2 = null;
@@ -344,7 +350,7 @@
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label1.Location = new System.Drawing.Point(268, 15);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(74, 21);
+            this.label1.Size = new System.Drawing.Size(92, 27);
             this.label1.TabIndex = 181;
             this.label1.Text = "当前批号";
             // 
@@ -367,7 +373,7 @@
             this.checkweightlabel.Location = new System.Drawing.Point(115, 0);
             this.checkweightlabel.MaximumSize = new System.Drawing.Size(200, 0);
             this.checkweightlabel.Name = "checkweightlabel";
-            this.checkweightlabel.Size = new System.Drawing.Size(0, 21);
+            this.checkweightlabel.Size = new System.Drawing.Size(0, 27);
             this.checkweightlabel.TabIndex = 180;
             // 
             // ob_nowcheckqty
@@ -376,7 +382,7 @@
             this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ob_nowcheckqty.Location = new System.Drawing.Point(349, 88);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
-            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 21);
+            this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 27);
             this.ob_nowcheckqty.TabIndex = 178;
             // 
             // ob_batchqty
@@ -385,7 +391,7 @@
             this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ob_batchqty.Location = new System.Drawing.Point(349, 51);
             this.ob_batchqty.Name = "ob_batchqty";
-            this.ob_batchqty.Size = new System.Drawing.Size(0, 21);
+            this.ob_batchqty.Size = new System.Drawing.Size(0, 27);
             this.ob_batchqty.TabIndex = 177;
             // 
             // ob_nowcheckqty_label
@@ -394,7 +400,7 @@
             this.ob_nowcheckqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ob_nowcheckqty_label.Location = new System.Drawing.Point(268, 88);
             this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
-            this.ob_nowcheckqty_label.Size = new System.Drawing.Size(74, 21);
+            this.ob_nowcheckqty_label.Size = new System.Drawing.Size(92, 27);
             this.ob_nowcheckqty_label.TabIndex = 176;
             this.ob_nowcheckqty_label.Text = "当前批数";
             // 
@@ -404,7 +410,7 @@
             this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ob_batchqty_label.Location = new System.Drawing.Point(268, 52);
             this.ob_batchqty_label.Name = "ob_batchqty_label";
-            this.ob_batchqty_label.Size = new System.Drawing.Size(74, 21);
+            this.ob_batchqty_label.Size = new System.Drawing.Size(92, 27);
             this.ob_batchqty_label.TabIndex = 175;
             this.ob_batchqty_label.Text = "标准批数";
             // 
@@ -414,7 +420,7 @@
             this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ob_checkno.Location = new System.Drawing.Point(349, 15);
             this.ob_checkno.Name = "ob_checkno";
-            this.ob_checkno.Size = new System.Drawing.Size(0, 21);
+            this.ob_checkno.Size = new System.Drawing.Size(0, 27);
             this.ob_checkno.TabIndex = 175;
             this.ob_checkno.TextChanged += new System.EventHandler(this.ob_checkno_TextChanged);
             // 
@@ -466,7 +472,7 @@
             this.PrintLabel.Location = new System.Drawing.Point(122, 86);
             this.PrintLabel.Margin = new System.Windows.Forms.Padding(2);
             this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(136, 25);
+            this.PrintLabel.Size = new System.Drawing.Size(136, 28);
             this.PrintLabel.TabIndex = 159;
             this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
             // 
@@ -476,7 +482,7 @@
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label3.Location = new System.Drawing.Point(6, 90);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(74, 21);
+            this.label3.Size = new System.Drawing.Size(92, 27);
             this.label3.TabIndex = 160;
             this.label3.Text = "打印标签";
             // 
@@ -524,7 +530,7 @@
             this.PrintList_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.PrintList_label.Location = new System.Drawing.Point(6, 50);
             this.PrintList_label.Name = "PrintList_label";
-            this.PrintList_label.Size = new System.Drawing.Size(90, 21);
+            this.PrintList_label.Size = new System.Drawing.Size(112, 27);
             this.PrintList_label.TabIndex = 116;
             this.PrintList_label.Text = "打印机列表";
             // 
@@ -534,7 +540,7 @@
             this.PrintNum_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.PrintNum_label.Location = new System.Drawing.Point(208, 129);
             this.PrintNum_label.Name = "PrintNum_label";
-            this.PrintNum_label.Size = new System.Drawing.Size(42, 21);
+            this.PrintNum_label.Size = new System.Drawing.Size(52, 27);
             this.PrintNum_label.TabIndex = 124;
             this.PrintNum_label.Text = "份数";
             // 
@@ -579,7 +585,7 @@
             this.locksalecode.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.locksalecode.Location = new System.Drawing.Point(295, 17);
             this.locksalecode.Name = "locksalecode";
-            this.locksalecode.Size = new System.Drawing.Size(96, 16);
+            this.locksalecode.Size = new System.Drawing.Size(119, 19);
             this.locksalecode.TabIndex = 196;
             this.locksalecode.Text = "当前订单锁定";
             this.locksalecode.UseVisualStyleBackColor = true;
@@ -590,7 +596,7 @@
             this.PreFix_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.PreFix_label.Location = new System.Drawing.Point(182, 16);
             this.PreFix_label.Name = "PreFix_label";
-            this.PreFix_label.Size = new System.Drawing.Size(37, 20);
+            this.PreFix_label.Size = new System.Drawing.Size(46, 24);
             this.PreFix_label.TabIndex = 195;
             this.PreFix_label.Text = "前缀";
             // 
@@ -604,7 +610,7 @@
             this.PreFix.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.PreFix.Name = "PreFix";
             this.PreFix.Power = null;
-            this.PreFix.Size = new System.Drawing.Size(38, 23);
+            this.PreFix.Size = new System.Drawing.Size(38, 27);
             this.PreFix.Str = null;
             this.PreFix.Str1 = null;
             this.PreFix.Str2 = null;
@@ -617,7 +623,7 @@
             this.pa_salecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pa_salecode_label.Location = new System.Drawing.Point(208, 132);
             this.pa_salecode_label.Name = "pa_salecode_label";
-            this.pa_salecode_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_salecode_label.Size = new System.Drawing.Size(92, 27);
             this.pa_salecode_label.TabIndex = 185;
             this.pa_salecode_label.Text = "订单编号";
             // 
@@ -627,7 +633,7 @@
             this.ma_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ma_code_label.Location = new System.Drawing.Point(4, 132);
             this.ma_code_label.Name = "ma_code_label";
-            this.ma_code_label.Size = new System.Drawing.Size(58, 21);
+            this.ma_code_label.Size = new System.Drawing.Size(72, 27);
             this.ma_code_label.TabIndex = 186;
             this.ma_code_label.Text = "工单号";
             // 
@@ -637,7 +643,7 @@
             this.ms_salecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ms_salecode.Location = new System.Drawing.Point(290, 132);
             this.ms_salecode.Name = "ms_salecode";
-            this.ms_salecode.Size = new System.Drawing.Size(0, 21);
+            this.ms_salecode.Size = new System.Drawing.Size(0, 27);
             this.ms_salecode.TabIndex = 188;
             // 
             // ms_makecode
@@ -647,7 +653,7 @@
             this.ms_makecode.Location = new System.Drawing.Point(91, 132);
             this.ms_makecode.MaximumSize = new System.Drawing.Size(150, 0);
             this.ms_makecode.Name = "ms_makecode";
-            this.ms_makecode.Size = new System.Drawing.Size(0, 21);
+            this.ms_makecode.Size = new System.Drawing.Size(0, 27);
             this.ms_makecode.TabIndex = 187;
             // 
             // OutBoxLength_label
@@ -656,7 +662,7 @@
             this.OutBoxLength_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OutBoxLength_label.Location = new System.Drawing.Point(84, 16);
             this.OutBoxLength_label.Name = "OutBoxLength_label";
-            this.OutBoxLength_label.Size = new System.Drawing.Size(37, 20);
+            this.OutBoxLength_label.Size = new System.Drawing.Size(46, 24);
             this.OutBoxLength_label.TabIndex = 184;
             this.OutBoxLength_label.Text = "长度";
             // 
@@ -670,7 +676,7 @@
             this.OutBoxLength.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.OutBoxLength.Name = "OutBoxLength";
             this.OutBoxLength.Power = null;
-            this.OutBoxLength.Size = new System.Drawing.Size(38, 23);
+            this.OutBoxLength.Size = new System.Drawing.Size(38, 27);
             this.OutBoxLength.Str = null;
             this.OutBoxLength.Str1 = null;
             this.OutBoxLength.Str2 = null;
@@ -687,7 +693,7 @@
             this.pr_outboxinnerqty.Location = new System.Drawing.Point(90, 74);
             this.pr_outboxinnerqty.Name = "pr_outboxinnerqty";
             this.pr_outboxinnerqty.Power = null;
-            this.pr_outboxinnerqty.Size = new System.Drawing.Size(104, 23);
+            this.pr_outboxinnerqty.Size = new System.Drawing.Size(104, 27);
             this.pr_outboxinnerqty.Str = null;
             this.pr_outboxinnerqty.Str1 = null;
             this.pr_outboxinnerqty.Str2 = null;
@@ -718,7 +724,7 @@
             this.AutoGenBoxCode.Location = new System.Drawing.Point(247, 40);
             this.AutoGenBoxCode.Margin = new System.Windows.Forms.Padding(2);
             this.AutoGenBoxCode.Name = "AutoGenBoxCode";
-            this.AutoGenBoxCode.Size = new System.Drawing.Size(93, 25);
+            this.AutoGenBoxCode.Size = new System.Drawing.Size(114, 31);
             this.AutoGenBoxCode.TabIndex = 171;
             this.AutoGenBoxCode.Text = "自动生成";
             this.AutoGenBoxCode.UseVisualStyleBackColor = true;
@@ -729,7 +735,7 @@
             this.pa_currentqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pa_currentqty_label.Location = new System.Drawing.Point(208, 70);
             this.pa_currentqty_label.Name = "pa_currentqty_label";
-            this.pa_currentqty_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_currentqty_label.Size = new System.Drawing.Size(92, 27);
             this.pa_currentqty_label.TabIndex = 95;
             this.pa_currentqty_label.Text = "已装数量";
             // 
@@ -739,7 +745,7 @@
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_detail_label.Location = new System.Drawing.Point(208, 100);
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
+            this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
             this.pr_detail_label.TabIndex = 80;
             this.pr_detail_label.Text = "产品名称";
             // 
@@ -753,7 +759,7 @@
             this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.pa_outboxcode.Name = "pa_outboxcode";
             this.pa_outboxcode.Power = null;
-            this.pa_outboxcode.Size = new System.Drawing.Size(145, 23);
+            this.pa_outboxcode.Size = new System.Drawing.Size(145, 27);
             this.pa_outboxcode.Str = null;
             this.pa_outboxcode.Str1 = null;
             this.pa_outboxcode.Str2 = null;
@@ -766,7 +772,7 @@
             this.pa_currentqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pa_currentqty.Location = new System.Drawing.Point(290, 70);
             this.pa_currentqty.Name = "pa_currentqty";
-            this.pa_currentqty.Size = new System.Drawing.Size(0, 21);
+            this.pa_currentqty.Size = new System.Drawing.Size(0, 27);
             this.pa_currentqty.TabIndex = 169;
             // 
             // pr_code_label
@@ -775,7 +781,7 @@
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_code_label.Location = new System.Drawing.Point(4, 100);
             this.pr_code_label.Name = "pr_code_label";
-            this.pr_code_label.Size = new System.Drawing.Size(74, 21);
+            this.pr_code_label.Size = new System.Drawing.Size(92, 27);
             this.pr_code_label.TabIndex = 81;
             this.pr_code_label.Text = "产品编号";
             // 
@@ -785,7 +791,7 @@
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_detail.Location = new System.Drawing.Point(290, 100);
             this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 21);
+            this.pr_detail.Size = new System.Drawing.Size(0, 27);
             this.pr_detail.TabIndex = 168;
             // 
             // pr_outboxinnerqty_label
@@ -794,7 +800,7 @@
             this.pr_outboxinnerqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(4, 69);
             this.pr_outboxinnerqty_label.Name = "pr_outboxinnerqty_label";
-            this.pr_outboxinnerqty_label.Size = new System.Drawing.Size(74, 21);
+            this.pr_outboxinnerqty_label.Size = new System.Drawing.Size(92, 27);
             this.pr_outboxinnerqty_label.TabIndex = 97;
             this.pr_outboxinnerqty_label.Text = "箱内容量";
             // 
@@ -805,7 +811,7 @@
             this.pr_code.Location = new System.Drawing.Point(91, 100);
             this.pr_code.MaximumSize = new System.Drawing.Size(150, 0);
             this.pr_code.Name = "pr_code";
-            this.pr_code.Size = new System.Drawing.Size(0, 21);
+            this.pr_code.Size = new System.Drawing.Size(0, 27);
             this.pr_code.TabIndex = 167;
             this.pr_code.TextChanged += new System.EventHandler(this.pr_code_TextChanged);
             // 
@@ -815,7 +821,7 @@
             this.pa_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.pa_code_label.Location = new System.Drawing.Point(4, 38);
             this.pa_code_label.Name = "pa_code_label";
-            this.pa_code_label.Size = new System.Drawing.Size(42, 21);
+            this.pa_code_label.Size = new System.Drawing.Size(52, 27);
             this.pa_code_label.TabIndex = 113;
             this.pa_code_label.Text = "箱号";
             // 
@@ -938,11 +944,104 @@
             this.pd_id.ReadOnly = true;
             this.pd_id.Visible = false;
             // 
+            // CloseServer
+            // 
+            this.CloseServer.AllPower = null;
+            this.CloseServer.BackColor = System.Drawing.Color.Transparent;
+            this.CloseServer.DownImage = ((System.Drawing.Image)(resources.GetObject("CloseServer.DownImage")));
+            this.CloseServer.Image = null;
+            this.CloseServer.IsShowBorder = true;
+            this.CloseServer.Location = new System.Drawing.Point(781, 502);
+            this.CloseServer.MoveImage = ((System.Drawing.Image)(resources.GetObject("CloseServer.MoveImage")));
+            this.CloseServer.Name = "CloseServer";
+            this.CloseServer.NormalImage = ((System.Drawing.Image)(resources.GetObject("CloseServer.NormalImage")));
+            this.CloseServer.Power = null;
+            this.CloseServer.Size = new System.Drawing.Size(60, 24);
+            this.CloseServer.TabIndex = 207;
+            this.CloseServer.Text = "关闭服务";
+            this.CloseServer.UseVisualStyleBackColor = true;
+            this.CloseServer.Click += new System.EventHandler(this.CloseServer_Click);
+            // 
+            // BuildServer
+            // 
+            this.BuildServer.AllPower = null;
+            this.BuildServer.BackColor = System.Drawing.Color.Transparent;
+            this.BuildServer.DownImage = ((System.Drawing.Image)(resources.GetObject("BuildServer.DownImage")));
+            this.BuildServer.Image = null;
+            this.BuildServer.IsShowBorder = true;
+            this.BuildServer.Location = new System.Drawing.Point(700, 502);
+            this.BuildServer.MoveImage = ((System.Drawing.Image)(resources.GetObject("BuildServer.MoveImage")));
+            this.BuildServer.Name = "BuildServer";
+            this.BuildServer.NormalImage = ((System.Drawing.Image)(resources.GetObject("BuildServer.NormalImage")));
+            this.BuildServer.Power = null;
+            this.BuildServer.Size = new System.Drawing.Size(60, 24);
+            this.BuildServer.TabIndex = 206;
+            this.BuildServer.Text = "开启服务";
+            this.BuildServer.UseVisualStyleBackColor = true;
+            this.BuildServer.Click += new System.EventHandler(this.BuildServer_Click);
+            // 
+            // Port
+            // 
+            this.Port.AllPower = null;
+            this.Port.BackColor = System.Drawing.Color.White;
+            this.Port.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Port.ID = null;
+            this.Port.Location = new System.Drawing.Point(752, 466);
+            this.Port.Name = "Port";
+            this.Port.Power = null;
+            this.Port.Size = new System.Drawing.Size(114, 27);
+            this.Port.Str = null;
+            this.Port.Str1 = null;
+            this.Port.Str2 = null;
+            this.Port.TabIndex = 205;
+            // 
+            // Port_label
+            // 
+            this.Port_label.AutoSize = true;
+            this.Port_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Port_label.Location = new System.Drawing.Point(692, 464);
+            this.Port_label.Name = "Port_label";
+            this.Port_label.Size = new System.Drawing.Size(52, 27);
+            this.Port_label.TabIndex = 204;
+            this.Port_label.Text = "端口";
+            // 
+            // IP
+            // 
+            this.IP.AllPower = null;
+            this.IP.BackColor = System.Drawing.Color.White;
+            this.IP.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.IP.ID = null;
+            this.IP.Location = new System.Drawing.Point(752, 431);
+            this.IP.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
+            this.IP.Name = "IP";
+            this.IP.Power = null;
+            this.IP.Size = new System.Drawing.Size(114, 27);
+            this.IP.Str = null;
+            this.IP.Str1 = null;
+            this.IP.Str2 = null;
+            this.IP.TabIndex = 203;
+            // 
+            // IP_label
+            // 
+            this.IP_label.AutoSize = true;
+            this.IP_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.IP_label.Location = new System.Drawing.Point(692, 431);
+            this.IP_label.Name = "IP_label";
+            this.IP_label.Size = new System.Drawing.Size(30, 27);
+            this.IP_label.TabIndex = 202;
+            this.IP_label.Text = "IP";
+            // 
             // Make_PackageCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(879, 584);
+            this.Controls.Add(this.CloseServer);
+            this.Controls.Add(this.BuildServer);
+            this.Controls.Add(this.Port);
+            this.Controls.Add(this.Port_label);
+            this.Controls.Add(this.IP);
+            this.Controls.Add(this.IP_label);
             this.Controls.Add(this.CollecRemark);
             this.Controls.Add(this.pa_remark);
             this.Controls.Add(this.pa_remark_label);
@@ -975,12 +1074,12 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.PackCollection_FormClosing);
             this.Load += new System.EventHandler(this.PackCollection_Load);
             this.SizeChanged += new System.EventHandler(this.PackCollection_SizeChanged);
-            this.groupBoxWithBorder2.ResumeLayout(false);
+            this.groupBoxWithBorder2.ResumeLayout(true);
             this.groupBoxWithBorder2.PerformLayout();
-            this.groupBoxWithBorder1.ResumeLayout(false);
+            this.groupBoxWithBorder1.ResumeLayout(true);
             this.groupBoxWithBorder1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }
@@ -1056,5 +1155,11 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_id;
         public CustomControl.TextBoxWithIcon.SnCollectionBox pa_outboxcode;
         public System.Windows.Forms.Label ob_checkno;
+        private CustomControl.ButtonUtil.NormalButton CloseServer;
+        private CustomControl.ButtonUtil.NormalButton BuildServer;
+        private CustomControl.TextBoxWithIcon.EnterTextBox Port;
+        private System.Windows.Forms.Label Port_label;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox IP;
+        private System.Windows.Forms.Label IP_label;
     }
 }

+ 55 - 3
UAS-MES/FunctionCode/Make/Make_PackageCollection.cs

@@ -32,6 +32,8 @@ namespace UAS_MES.Make
         Document doc;
         string PR_CHECKCARTONW = "0";
 
+        ModeBusTCPServer md;
+
         public Make_PackageCollection()
         {
 
@@ -54,12 +56,15 @@ namespace UAS_MES.Make
 
         private void PackCollection_Load(object sender, EventArgs e)
         {
+            IP.Text = BaseUtil.GetCacheData("IP").ToString();
+            Port.Text = BaseUtil.GetCacheData("IPPort").ToString();
             //设置DbFind的必须的数据
             PrintNum.Text = "1";
             asc.controllInitializeSize(this);
             thread = new Thread(NewPrint);
             SetLoadingWindow stw = new SetLoadingWindow(thread, "初始化打印程序");
             BaseUtil.SetFormCenter(stw);
+            md = new ModeBusTCPServer();
             stw.ShowDialog();
             try
             {
@@ -186,7 +191,7 @@ namespace UAS_MES.Make
                         string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
                         if (nextstepcode != "" && nextstepcode != User.CurrentStepCode)
                         {
-                            OperateResult.AppendText("当前序列号下一道工序" + nextstepcode+",当前资源不允许采集\n", Color.Red);
+                            OperateResult.AppendText("当前序列号下一道工序" + nextstepcode + ",当前资源不允许采集\n", Color.Red);
                             return;
                         }
                         PR_CHECKCARTONW = dh.getFieldDataByCondition("craftdetail left join craft on cr_id=cd_crid left join makeserial on ms_craftcode =cr_code and cr_prodcode = ms_prodcode", "nvl(cd_ifweigh,'0') cd_ifweigh", "ms_sncode='" + sn_code.Text + "' and ms_makecode='" + oMakeCode + "' and cd_stepcode = '" + User.CurrentStepCode + "'").ToString();
@@ -311,6 +316,10 @@ namespace UAS_MES.Make
                                 ////箱号不存在的情况
                                 if (LogicHandler.Packing(sn_code.Text, pa_outboxcode.Text, AutoGenBoxCode.Checked, "标准", User.UserSourceCode, User.UserCode, pr_outboxinnerqty.Text, Cancel.Checked, out oOutBoxCode, out ErrorMessage))
                                 {
+                                    if (md.IsOpen)
+                                    {
+                                        md.SendOrder("M501_ON");
+                                    }
                                     //提示正确返回时传递的信息
                                     if (ErrorMessage.Contains("AFTERSUCCESS"))
                                         OperateResult.AppendText(">>" + ErrorMessage + "\n");
@@ -391,10 +400,24 @@ namespace UAS_MES.Make
                                 pa_status.Text = "0";
                                 OperateResult.AppendText(">>已从该箱中移除序列号" + sn_code.Text + "\n", Color.Green, sn_code);
                             }
-                            else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sn_code);
+                            else
+                            {
+                                OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sn_code);
+                                if (md.IsOpen)
+                                {
+                                    md.SendOrder("M502_ON");
+                                }
+                            }
+                        }
+                    }
+                    else
+                    {
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sn_code);
+                        if (md.IsOpen)
+                        {
+                            md.SendOrder("M502_ON");
                         }
                     }
-                    else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sn_code);
                 }
                 else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sn_code);
             }
@@ -813,5 +836,34 @@ namespace UAS_MES.Make
                 }
             }
         }
+
+        private void BuildServer_Click(object sender, EventArgs e)
+        {
+            if (!md.IsOpen)
+            {
+                md.IP = IP.Text;
+                md.Port = Port.Text;
+                if (md.Open())
+                {
+                    BaseUtil.SetCacheData("IP", IP.Text);
+                    BaseUtil.SetCacheData("IPPort", Port.Text);
+                    OperateResult.AppendText(">>服务开启成功\n");
+                }
+            }
+            else
+                OperateResult.AppendText(">>服务已经开启\n");
+
+        }
+
+        private void CloseServer_Click(object sender, EventArgs e)
+        {
+            if (md.IsOpen)
+            {
+                md.Close();
+                OperateResult.AppendText(">>服务关闭成功\n");
+            }
+            else
+                OperateResult.AppendText(">>服务尚未开启\n");
+        }
     }
 }

+ 76 - 0
UAS-MES/FunctionCode/Make/Make_PackageCollection.resx

@@ -306,6 +306,82 @@
         2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
         zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="CloseServer.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="CloseServer.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="CloseServer.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="BuildServer.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="BuildServer.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="BuildServer.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
 </root>

+ 8 - 5
UAS-MES/PublicMethod/ModeBusTCPServer.cs

@@ -71,7 +71,7 @@ namespace UAS_MES.PublicMethod
 
         public ModeBusTCPServer()
         {
-           
+
         }
 
 
@@ -145,9 +145,11 @@ namespace UAS_MES.PublicMethod
                 case "M501_ON":
                     socConnection.Send(M501_ON);
                     WaitFinish = true;
-                    while (WaitFinish)
+                    int LoopTime = 0;
+                    while (WaitFinish && LoopTime <= 40)
                     {
-                        Thread.Sleep(80);
+                        Thread.Sleep(100);
+                        LoopTime += LoopTime + 1;
                         socConnection.Send(M503_READ);
                     }
                     break;
@@ -157,9 +159,10 @@ namespace UAS_MES.PublicMethod
                 case "M502_ON":
                     socConnection.Send(M502_ON);
                     WaitFinish = true;
-                    while (WaitFinish)
+                    int LoopTime1 = 0;
+                    while (WaitFinish && LoopTime1 <= 40)
                     {
-                        Thread.Sleep(80);
+                        Thread.Sleep(100);
                         socConnection.Send(M503_READ);
                     }
                     break;