Browse Source

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

章政 8 years ago
parent
commit
2d1dae4a16

+ 30 - 27
UAS-MES/FunctionCode/Make/Make_UpdateCollectCode.Designer.cs

@@ -54,18 +54,21 @@
             // 
             // collectCodeRules
             // 
+            this.collectCodeRules.AllowUserToAddRows = false;
+            this.collectCodeRules.AllowUserToDeleteRows = false;
             this.collectCodeRules.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.collectCodeRules.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.psr_type,
             this.psr_prefix,
             this.psr_length,
             this.Column1});
-            this.collectCodeRules.Location = new System.Drawing.Point(248, 58);
+            this.collectCodeRules.Enabled = false;
+            this.collectCodeRules.Location = new System.Drawing.Point(279, 70);
             this.collectCodeRules.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.collectCodeRules.Name = "collectCodeRules";
             this.collectCodeRules.RowHeadersVisible = false;
             this.collectCodeRules.RowTemplate.Height = 30;
-            this.collectCodeRules.Size = new System.Drawing.Size(652, 196);
+            this.collectCodeRules.Size = new System.Drawing.Size(734, 235);
             this.collectCodeRules.TabIndex = 6;
             // 
             // psr_type
@@ -100,9 +103,9 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(244, 22);
+            this.label1.Location = new System.Drawing.Point(274, 26);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(92, 27);
+            this.label1.Size = new System.Drawing.Size(110, 31);
             this.label1.TabIndex = 7;
             this.label1.Text = "防呆规则";
             // 
@@ -139,11 +142,11 @@
             this.collects.Controls.Add(this.Imei1);
             this.collects.Controls.Add(this.Imei2);
             this.collects.Controls.Add(this.Imei3);
-            this.collects.Location = new System.Drawing.Point(24, 15);
+            this.collects.Location = new System.Drawing.Point(27, 18);
             this.collects.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.collects.Name = "collects";
             this.collects.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.collects.Size = new System.Drawing.Size(199, 239);
+            this.collects.Size = new System.Drawing.Size(224, 287);
             this.collects.TabIndex = 92;
             this.collects.TabStop = false;
             this.collects.TextColor = System.Drawing.Color.Black;
@@ -152,11 +155,11 @@
             // 
             this.Mac.AutoSize = true;
             this.Mac.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Mac.Location = new System.Drawing.Point(33, 20);
+            this.Mac.Location = new System.Drawing.Point(37, 23);
             this.Mac.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Mac.Name = "Mac";
             this.Mac.Power = null;
-            this.Mac.Size = new System.Drawing.Size(133, 31);
+            this.Mac.Size = new System.Drawing.Size(157, 35);
             this.Mac.TabIndex = 5;
             this.Mac.Text = "MAC/WIFI";
             this.Mac.UseVisualStyleBackColor = true;
@@ -166,11 +169,11 @@
             // 
             this.Bt.AutoSize = true;
             this.Bt.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Bt.Location = new System.Drawing.Point(33, 57);
+            this.Bt.Location = new System.Drawing.Point(37, 67);
             this.Bt.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Bt.Name = "Bt";
             this.Bt.Power = null;
-            this.Bt.Size = new System.Drawing.Size(58, 31);
+            this.Bt.Size = new System.Drawing.Size(69, 35);
             this.Bt.TabIndex = 4;
             this.Bt.Text = "BT";
             this.Bt.UseVisualStyleBackColor = true;
@@ -180,11 +183,11 @@
             // 
             this.NetCode.AutoSize = true;
             this.NetCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.NetCode.Location = new System.Drawing.Point(33, 93);
+            this.NetCode.Location = new System.Drawing.Point(37, 110);
             this.NetCode.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.NetCode.Name = "NetCode";
             this.NetCode.Power = null;
-            this.NetCode.Size = new System.Drawing.Size(74, 31);
+            this.NetCode.Size = new System.Drawing.Size(88, 35);
             this.NetCode.TabIndex = 3;
             this.NetCode.Text = "网标";
             this.NetCode.UseVisualStyleBackColor = true;
@@ -194,11 +197,11 @@
             // 
             this.Imei1.AutoSize = true;
             this.Imei1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Imei1.Location = new System.Drawing.Point(33, 129);
+            this.Imei1.Location = new System.Drawing.Point(37, 154);
             this.Imei1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Imei1.Name = "Imei1";
             this.Imei1.Power = null;
-            this.Imei1.Size = new System.Drawing.Size(89, 31);
+            this.Imei1.Size = new System.Drawing.Size(104, 35);
             this.Imei1.TabIndex = 2;
             this.Imei1.Text = "IMEI1";
             this.Imei1.UseVisualStyleBackColor = true;
@@ -208,11 +211,11 @@
             // 
             this.Imei2.AutoSize = true;
             this.Imei2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Imei2.Location = new System.Drawing.Point(33, 166);
+            this.Imei2.Location = new System.Drawing.Point(37, 198);
             this.Imei2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Imei2.Name = "Imei2";
             this.Imei2.Power = null;
-            this.Imei2.Size = new System.Drawing.Size(89, 31);
+            this.Imei2.Size = new System.Drawing.Size(104, 35);
             this.Imei2.TabIndex = 1;
             this.Imei2.Text = "IMEI2";
             this.Imei2.UseVisualStyleBackColor = true;
@@ -222,11 +225,11 @@
             // 
             this.Imei3.AutoSize = true;
             this.Imei3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Imei3.Location = new System.Drawing.Point(33, 202);
+            this.Imei3.Location = new System.Drawing.Point(37, 241);
             this.Imei3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Imei3.Name = "Imei3";
             this.Imei3.Power = null;
-            this.Imei3.Size = new System.Drawing.Size(89, 31);
+            this.Imei3.Size = new System.Drawing.Size(104, 35);
             this.Imei3.TabIndex = 0;
             this.Imei3.Text = "IMEI3";
             this.Imei3.UseVisualStyleBackColor = true;
@@ -237,11 +240,11 @@
             this.inputValue.AllPower = null;
             this.inputValue.BackColor = System.Drawing.Color.White;
             this.inputValue.ID = null;
-            this.inputValue.Location = new System.Drawing.Point(147, 477);
+            this.inputValue.Location = new System.Drawing.Point(165, 572);
             this.inputValue.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.inputValue.Name = "inputValue";
             this.inputValue.Power = null;
-            this.inputValue.Size = new System.Drawing.Size(229, 25);
+            this.inputValue.Size = new System.Drawing.Size(257, 28);
             this.inputValue.Str = null;
             this.inputValue.Str1 = null;
             this.inputValue.Str2 = null;
@@ -251,10 +254,10 @@
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(24, 272);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.OperateResult.Location = new System.Drawing.Point(27, 326);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(876, 191);
+            this.OperateResult.Size = new System.Drawing.Size(985, 228);
             this.OperateResult.TabIndex = 88;
             this.OperateResult.Text = "";
             // 
@@ -262,17 +265,17 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(69, 475);
+            this.label3.Location = new System.Drawing.Point(78, 570);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(72, 27);
+            this.label3.Size = new System.Drawing.Size(86, 31);
             this.label3.TabIndex = 93;
             this.label3.Text = "输入框";
             // 
             // Make_UpdateCollectCode
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(924, 512);
+            this.ClientSize = new System.Drawing.Size(1040, 614);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.collects);
             this.Controls.Add(this.inputValue);

+ 5 - 0
UAS-MES/FunctionCode/Make/Make_UpdateCollectCode.cs

@@ -73,6 +73,11 @@ namespace UAS_MES.Make
                 OperateResult.AppendText(">>" + inputValue.Text + "\n", Color.Black);
                 if (step == 0)
                 {
+                    //避免第一步出错的时候添加不需要的数据
+                    if (list.Count!=0)
+                    {
+                        list.Clear();
+                    }
                     //判断是否有已勾选的项次
                     foreach (Control ctl in collects.Controls)
                     {