Browse Source

修改TextAreaTexbBox和添加了一个清除指定控件值的方法

章政 8 years ago
parent
commit
12c237dcbc
2 changed files with 29 additions and 107 deletions
  1. 21 105
      UAS-MES/FunctionCode/Make/Make_NewPallet.Designer.cs
  2. 8 2
      UAS-MES/PublicMethod/BaseUtil.cs

+ 21 - 105
UAS-MES/FunctionCode/Make/Make_NewPallet.Designer.cs

@@ -44,17 +44,9 @@
             // 
             this.pr_code_label.AutoSize = true;
             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(28, 90);
-            this.pr_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pr_code_label.Name = "pr_code_label";
-            this.pr_code_label.Size = new System.Drawing.Size(110, 31);
-
-            this.pr_code_label.Location = new System.Drawing.Point(25, 75);
-            this.pr_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_code_label.Location = new System.Drawing.Point(19, 60);
             this.pr_code_label.Name = "pr_code_label";
-            this.pr_code_label.Size = new System.Drawing.Size(92, 27);
-
+            this.pr_code_label.Size = new System.Drawing.Size(74, 21);
             this.pr_code_label.TabIndex = 0;
             this.pr_code_label.Text = "产品编号";
             // 
@@ -62,17 +54,9 @@
             // 
             this.pa_packageqty_label.AutoSize = true;
             this.pa_packageqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-
-            this.pa_packageqty_label.Location = new System.Drawing.Point(28, 158);
-            this.pa_packageqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_packageqty_label.Name = "pa_packageqty_label";
-            this.pa_packageqty_label.Size = new System.Drawing.Size(110, 31);
-
-            this.pa_packageqty_label.Location = new System.Drawing.Point(25, 131);
-            this.pa_packageqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_packageqty_label.Location = new System.Drawing.Point(19, 105);
             this.pa_packageqty_label.Name = "pa_packageqty_label";
-            this.pa_packageqty_label.Size = new System.Drawing.Size(92, 27);
-
+            this.pa_packageqty_label.Size = new System.Drawing.Size(74, 21);
             this.pa_packageqty_label.TabIndex = 1;
             this.pa_packageqty_label.Text = "箱内数量";
             // 
@@ -80,17 +64,9 @@
             // 
             this.pa_outboxcode_label.AutoSize = true;
             this.pa_outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-
-            this.pa_outboxcode_label.Location = new System.Drawing.Point(28, 226);
-            this.pa_outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_outboxcode_label.Name = "pa_outboxcode_label";
-            this.pa_outboxcode_label.Size = new System.Drawing.Size(62, 31);
-
-            this.pa_outboxcode_label.Location = new System.Drawing.Point(25, 189);
-            this.pa_outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_outboxcode_label.Location = new System.Drawing.Point(19, 151);
             this.pa_outboxcode_label.Name = "pa_outboxcode_label";
-            this.pa_outboxcode_label.Size = new System.Drawing.Size(52, 27);
-
+            this.pa_outboxcode_label.Size = new System.Drawing.Size(42, 21);
             this.pa_outboxcode_label.TabIndex = 2;
             this.pa_outboxcode_label.Text = "箱号";
             // 
@@ -100,35 +76,18 @@
             this.title.BackColor = System.Drawing.SystemColors.ControlDarkDark;
             this.title.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.title.ForeColor = System.Drawing.SystemColors.ButtonFace;
-
-            this.title.Location = new System.Drawing.Point(10, 9);
-            this.title.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.title.Location = new System.Drawing.Point(7, 6);
             this.title.Name = "title";
-            this.title.Size = new System.Drawing.Size(0, 31);
-
-            this.title.Location = new System.Drawing.Point(9, 8);
-            this.title.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.title.Name = "title";
-            this.title.Size = new System.Drawing.Size(0, 27);
-
+            this.title.Size = new System.Drawing.Size(0, 21);
             this.title.TabIndex = 9;
             // 
             // pa_outboxcode
             // 
             this.pa_outboxcode.ErrorMsg = null;
-
-            this.pa_outboxcode.Location = new System.Drawing.Point(142, 226);
-            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(6);
-            this.pa_outboxcode.Name = "pa_outboxcode";
-            this.pa_outboxcode.Pr_id = null;
-            this.pa_outboxcode.Size = new System.Drawing.Size(212, 32);
-
-            this.pa_outboxcode.Location = new System.Drawing.Point(128, 189);
-            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pa_outboxcode.Location = new System.Drawing.Point(96, 151);
             this.pa_outboxcode.Name = "pa_outboxcode";
             this.pa_outboxcode.Pr_id = null;
-            this.pa_outboxcode.Size = new System.Drawing.Size(206, 26);
-
+            this.pa_outboxcode.Size = new System.Drawing.Size(176, 21);
             this.pa_outboxcode.TabIndex = 10;
             // 
             // headBar1
@@ -136,36 +95,22 @@
             this.headBar1.BackColor = System.Drawing.SystemColors.ControlDarkDark;
             this.headBar1.Dock = System.Windows.Forms.DockStyle.Top;
             this.headBar1.Location = new System.Drawing.Point(0, 0);
-
-            this.headBar1.Margin = new System.Windows.Forms.Padding(6);
+            this.headBar1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.headBar1.Name = "headBar1";
-            this.headBar1.Size = new System.Drawing.Size(448, 48);
-
-            this.headBar1.Margin = new System.Windows.Forms.Padding(5);
-            this.headBar1.Name = "headBar1";
-            this.headBar1.Size = new System.Drawing.Size(399, 40);
-
+            this.headBar1.Size = new System.Drawing.Size(299, 32);
             this.headBar1.TabIndex = 7;
+            this.headBar1.Title = null;
             // 
             // pa_packageqty
             // 
             this.pa_packageqty.AllPower = null;
             this.pa_packageqty.BackColor = System.Drawing.Color.White;
             this.pa_packageqty.ID = null;
-
-            this.pa_packageqty.Location = new System.Drawing.Point(144, 158);
-
-            this.pa_packageqty.Location = new System.Drawing.Point(128, 131);
-
-            this.pa_packageqty.Margin = new System.Windows.Forms.Padding(4);
+            this.pa_packageqty.Location = new System.Drawing.Point(96, 105);
             this.pa_packageqty.Name = "pa_packageqty";
             this.pa_packageqty.Negative = false;
             this.pa_packageqty.Power = null;
-
-            this.pa_packageqty.Size = new System.Drawing.Size(264, 28);
-
-            this.pa_packageqty.Size = new System.Drawing.Size(206, 25);
-
+            this.pa_packageqty.Size = new System.Drawing.Size(156, 21);
             this.pa_packageqty.Str = null;
             this.pa_packageqty.Str1 = null;
             this.pa_packageqty.Str2 = null;
@@ -178,21 +123,12 @@
             this.pr_code.Condition = null;
             this.pr_code.DBTitle = "产品编号查询";
             this.pr_code.FormName = null;
-
-            this.pr_code.Location = new System.Drawing.Point(142, 90);
-
-            this.pr_code.Location = new System.Drawing.Point(128, 75);
-
-            this.pr_code.Margin = new System.Windows.Forms.Padding(4);
+            this.pr_code.Location = new System.Drawing.Point(96, 60);
             this.pr_code.Name = "pr_code";
             this.pr_code.Power = "ifread";
             this.pr_code.SelectField = null;
             this.pr_code.SetValueField = null;
-
-            this.pr_code.Size = new System.Drawing.Size(224, 32);
-
-            this.pr_code.Size = new System.Drawing.Size(206, 26);
-
+            this.pr_code.Size = new System.Drawing.Size(176, 21);
             this.pr_code.TabIndex = 4;
             this.pr_code.TableName = null;
             this.pr_code.TextBoxEnable = false;
@@ -205,21 +141,12 @@
             this.Confirm.DownImage = ((System.Drawing.Image)(resources.GetObject("Confirm.DownImage")));
             this.Confirm.Image = null;
             this.Confirm.IsShowBorder = true;
-
-            this.Confirm.Location = new System.Drawing.Point(184, 284);
-
-            this.Confirm.Location = new System.Drawing.Point(164, 236);
-
-            this.Confirm.Margin = new System.Windows.Forms.Padding(4);
+            this.Confirm.Location = new System.Drawing.Point(123, 189);
             this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
             this.Confirm.Name = "Confirm";
             this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
             this.Confirm.Power = null;
-
-            this.Confirm.Size = new System.Drawing.Size(80, 34);
-
-            this.Confirm.Size = new System.Drawing.Size(71, 29);
-
+            this.Confirm.Size = new System.Drawing.Size(53, 23);
             this.Confirm.TabIndex = 3;
             this.Confirm.Tag = "Make!NewPallet";
             this.Confirm.Text = "确认";
@@ -228,15 +155,9 @@
             // 
             // Make_NewPallet
             // 
-
-            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(448, 336);
-
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(399, 280);
-
+            this.ClientSize = new System.Drawing.Size(299, 224);
             this.Controls.Add(this.pa_outboxcode);
             this.Controls.Add(this.title);
             this.Controls.Add(this.headBar1);
@@ -247,11 +168,6 @@
             this.Controls.Add(this.pa_packageqty_label);
             this.Controls.Add(this.pr_code_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-
-            this.Margin = new System.Windows.Forms.Padding(4);
-
             this.Name = "Make_NewPallet";
             this.Tag = "ShowDialogWindow";
             this.Text = "新增栈板";

+ 8 - 2
UAS-MES/PublicMethod/BaseUtil.cs

@@ -82,7 +82,7 @@ namespace UAS_MES.PublicMethod
                     string controlName = collection[i].Name;
                     string controlsTag = collection[i].Tag == null ? "" : collection[i].Tag.ToString();
                     //默认给TextBox和Label赋值
-                    if (collection[i] is TextBox || collection[i] is Label || collection[i] is SearchTextBox||collection[i] is MaCodeSearchTextBox)
+                    if (collection[i] is TextBox || collection[i] is Label || collection[i] is SearchTextBox || collection[i] is MaCodeSearchTextBox)
                     {
                         for (int j = 0; j < dt.Columns.Count; j++)
                         {
@@ -134,7 +134,7 @@ namespace UAS_MES.PublicMethod
                         for (int j = 0; j < collection[i].Controls.Count; j++)
                         {
                             controlName = collection[i].Controls[j].Name;
-                            if (collection[i].Controls[j] is TextBox || collection[i].Controls[j] is Label || collection[i].Controls[j] is SearchTextBox|| collection[i].Controls[j] is MaCodeSearchTextBox)
+                            if (collection[i].Controls[j] is TextBox || collection[i].Controls[j] is Label || collection[i].Controls[j] is SearchTextBox || collection[i].Controls[j] is MaCodeSearchTextBox)
                             {
                                 for (int k = 0; k < dt.Columns.Count; k++)
                                 {
@@ -531,6 +531,12 @@ namespace UAS_MES.PublicMethod
             }
         }
 
+        public static void CleanControlsText(params Control[] ctl)
+        {
+            foreach (Control item in ctl)
+                item.Text = "";
+        }
+
         /// <summary>
         /// 需要SQL的顺序和DGV的列的顺序一致
         /// </summary>