Browse Source

DBFind添加赋值事件

章政 8 years ago
parent
commit
7798db50b7
82 changed files with 7448 additions and 648 deletions
  1. 10 12
      UAS-MES/DbFind.cs
  2. 17 428
      UAS-MES/FunctionCode/Make/Make_TestCollection.Designer.cs
  3. 38 38
      UAS-MES/FunctionCode/Make/Make_TestCollection.resx
  4. 12 0
      UAS-MES/优软MES/App.config
  5. 62 0
      UAS-MES/优软MES/Configuration.Designer.cs
  6. 20 0
      UAS-MES/优软MES/Configuration.cs
  7. 120 0
      UAS-MES/优软MES/Configuration.resx
  8. 136 0
      UAS-MES/优软MES/CustomControl/AccordionMenu/AccordionMenu.Designer.cs
  9. 171 0
      UAS-MES/优软MES/CustomControl/AccordionMenu/AccordionMenu.cs
  10. 123 0
      UAS-MES/优软MES/CustomControl/AccordionMenu/AccordionMenu.resx
  11. 42 0
      UAS-MES/优软MES/CustomControl/CustomTabControl/CustomTabControl.Designer.cs
  12. 330 0
      UAS-MES/优软MES/CustomControl/CustomTabControl/CustomTabControl.cs
  13. 120 0
      UAS-MES/优软MES/CustomControl/CustomTabControl/CustomTabControl.resx
  14. 91 0
      UAS-MES/优软MES/CustomControl/CustomTabControl/ThemedColors.cs
  15. 83 0
      UAS-MES/优软MES/CustomControl/HeadBar/HeadBar.Designer.cs
  16. 60 0
      UAS-MES/优软MES/CustomControl/HeadBar/HeadBar.cs
  17. 216 0
      UAS-MES/优软MES/CustomControl/HeadBar/HeadBar.resx
  18. 127 0
      UAS-MES/优软MES/CustomControl/HeadBar/HeadBar.zu.resx
  19. 202 0
      UAS-MES/优软MES/CustomControl/Pagination/Pagination.Designer.cs
  20. 111 0
      UAS-MES/优软MES/CustomControl/Pagination/Pagination.cs
  21. 123 0
      UAS-MES/优软MES/CustomControl/Pagination/Pagination.resx
  22. 61 0
      UAS-MES/优软MES/CustomControl/ProcessBar/ProcessBar.Designer.cs
  23. 210 0
      UAS-MES/优软MES/CustomControl/ProcessBar/ProcessBar.cs
  24. 120 0
      UAS-MES/优软MES/CustomControl/ProcessBar/ProcessBar.resx
  25. 36 0
      UAS-MES/优软MES/CustomControl/TransparentLabel/TransparentLabel.Designer.cs
  26. 29 0
      UAS-MES/优软MES/CustomControl/TransparentLabel/TransparentLabel.cs
  27. 168 0
      UAS-MES/优软MES/DataOperate/DataHelper.cs
  28. 76 0
      UAS-MES/优软MES/DataOperate/ExcelHandler.cs
  29. 18 0
      UAS-MES/优软MES/Entity/User.cs
  30. 75 0
      UAS-MES/优软MES/Form1.Designer.cs
  31. 26 0
      UAS-MES/优软MES/Form1.cs
  32. 120 0
      UAS-MES/优软MES/Form1.resx
  33. 339 0
      UAS-MES/优软MES/LabelPrint.Designer.cs
  34. 565 0
      UAS-MES/优软MES/LabelPrint.cs
  35. 126 0
      UAS-MES/优软MES/LabelPrint.resx
  36. 135 0
      UAS-MES/优软MES/Login.Designer.cs
  37. 85 0
      UAS-MES/优软MES/Login.cs
  38. 120 0
      UAS-MES/优软MES/Login.resx
  39. 118 0
      UAS-MES/优软MES/Main.Designer.cs
  40. 40 0
      UAS-MES/优软MES/Main.cs
  41. 120 0
      UAS-MES/优软MES/Main.resx
  42. 19 0
      UAS-MES/优软MES/Program.cs
  43. 36 0
      UAS-MES/优软MES/Properties/AssemblyInfo.cs
  44. 223 0
      UAS-MES/优软MES/Properties/Resources.Designer.cs
  45. 169 0
      UAS-MES/优软MES/Properties/Resources.resx
  46. 30 0
      UAS-MES/优软MES/Properties/Settings.Designer.cs
  47. 7 0
      UAS-MES/优软MES/Properties/Settings.settings
  48. 7 0
      UAS-MES/优软MES/PublicMethod/CustomControlHandler.cs
  49. 226 0
      UAS-MES/优软MES/PublicMethod/MessageBoxEx.cs
  50. BIN
      UAS-MES/优软MES/Resources/2-0btn_04.png
  51. BIN
      UAS-MES/优软MES/Resources/2-0btn_07.png
  52. BIN
      UAS-MES/优软MES/Resources/2-0btn_36.png
  53. BIN
      UAS-MES/优软MES/Resources/20130711113247276.png
  54. BIN
      UAS-MES/优软MES/Resources/Close_up_32px_1181430_easyicon.net.png
  55. BIN
      UAS-MES/优软MES/Resources/LoadingError.gif
  56. BIN
      UAS-MES/优软MES/Resources/LoadingFormat.gif
  57. BIN
      UAS-MES/优软MES/Resources/bindingNavigatorAddNewItem.Image.png
  58. BIN
      UAS-MES/优软MES/Resources/bindingNavigatorDeleteItem.Image.png
  59. BIN
      UAS-MES/优软MES/Resources/bindingNavigatorMoveFirstItem.Image.png
  60. BIN
      UAS-MES/优软MES/Resources/bindingNavigatorMoveLastItem.Image.png
  61. BIN
      UAS-MES/优软MES/Resources/bindingNavigatorMoveNextItem.Image.png
  62. BIN
      UAS-MES/优软MES/Resources/bindingNavigatorMovePreviousItem.Image.png
  63. BIN
      UAS-MES/优软MES/Resources/close_32px_1181428_easyicon.net.png
  64. BIN
      UAS-MES/优软MES/Resources/excel.png
  65. BIN
      UAS-MES/优软MES/Resources/updating.gif
  66. 120 0
      UAS-MES/优软MES/Test.resx
  67. 76 0
      UAS-MES/优软MES/Test1.Designer.cs
  68. 33 0
      UAS-MES/优软MES/Test1.cs
  69. 120 0
      UAS-MES/优软MES/Test1.resx
  70. 252 0
      UAS-MES/优软MES/Weigher.Designer.cs
  71. 129 0
      UAS-MES/优软MES/Weigher.cs
  72. 120 0
      UAS-MES/优软MES/Weigher.resx
  73. 314 0
      UAS-MES/优软MES/优软MES.csproj
  74. 4 0
      UAS-出货标签管理/App.config
  75. 4 0
      UAS-出货标签管理/Properties/Settings.Designer.cs
  76. 4 0
      UAS-出货标签管理/Properties/Settings.settings
  77. 26 20
      UAS-出货标签管理/PublicMethod/AutoSizeFormClass.cs
  78. 351 149
      UAS-出货标签管理/UAS_出货标签管理.Designer.cs
  79. 301 0
      UAS-出货标签管理/客户标签维护.Designer.cs
  80. 2 1
      UAS-出货标签管理/客户标签维护.cs
  81. 6 0
      UAS-出货标签管理/客户标签维护.resx
  82. 68 0
      f

+ 10 - 12
UAS-MES/DbFind.cs

@@ -163,7 +163,7 @@ namespace UAS_MES
         {
             try
             {
-                //赋值控件是否是容器
+                //赋值控件是否被GROUP包含
                 Boolean groupcontains = false;
                 //先判断DataTable里面是否有这个字段,然后从打开的窗口里面去获取到这个Form,从Form中的指定Panel获取到指定字段的控件
                 FormCollection fmCollection = Application.OpenForms;
@@ -174,7 +174,6 @@ namespace UAS_MES
                     for (int k = 0; k < controls.Count; k++)
                     {
                         Control ctl = controls[k];
-                        //如果控件内的控件数量大于0则为容器
                         if (ctl.Controls.Count > 0)
                         {
                             for (int j = 0; j < SetValueField.Length; j++)
@@ -187,21 +186,19 @@ namespace UAS_MES
                                     groupcontains = true;
                                 }
                             }
-                            groupcontains = true;
                         }
                         break;
                     }
                 }
                 if (!groupcontains)
                 {
-
                     for (int i = 0; i < dt.Columns.Count; i++)
                     {
                         for (int j = 0; j < SetValueField.Length; j++)
                         {
                             Control ctl = fmCollection[FormName].Controls[SetValueField[j]];
                             if (SetValueField[j] == dt.Columns[i].Caption || SetValueField[j] == dt.Columns[i].ColumnName || SetValueField[j].Contains(dt.Columns[i].Caption) || (ctl != null && ctl.Tag != null && ctl.Tag.ToString() == dt.Columns[i].Caption))
-                                ctl.Text = DbFindGridView.Rows[e.RowIndex].Cells[dt.Columns[i].ColumnName].Value.ToString();
+                                fmCollection[FormName].Controls[SetValueField[j]].Text = DbFindGridView.Rows[e.RowIndex].Cells[dt.Columns[i].ColumnName].Value.ToString();
                         }
                     }
                 }
@@ -214,7 +211,7 @@ namespace UAS_MES
                     ctl.AfterDbFind += DbFind_AfterDbFind;
                     ctl.AfterDBFindSetValue(new object(), new EventArgs());
                 }
-                fmCollection[FormName].Controls[MainField].Focus();
+
             }
             catch (Exception exa)
             {
@@ -224,12 +221,6 @@ namespace UAS_MES
             Close();
         }
 
-
-        private void DbFind_AfterDbFind(object sender, EventArgs e)
-        {
-            MainControl.Text = "";
-        }
-
         //按下Esc键的时候关闭当前的界面,用于DbFind
         private void DbFindGridView_KeyPress(object sender, KeyPressEventArgs e)
         {
@@ -240,6 +231,13 @@ namespace UAS_MES
             }
         }
 
+        private void DbFind_AfterDbFind(object sender, EventArgs e)
+        {
+            string MainControlText = MainControl.Text;
+            MainControl.Text = "";
+            MainControl.Text = MainControlText;
+        }
+
         //列宽发生变化的时候TextBox的宽度也发生变化
         private void DbFindGridView_ColumnWidthChanged(object sender, DataGridViewColumnEventArgs e)
         {

+ 17 - 428
UAS-MES/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -61,7 +61,6 @@
             this.bc_code = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.ma_code = new UAS_MES.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
             this.LockMakeCode = new UAS_MES.CustomControl.CustomCheckBox.LockCheckBox();
-            this.Save = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.mcd_remainqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pr_detail = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.ma_qty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
@@ -74,6 +73,7 @@
             this.bc_remark = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.bc_groupcode = new UAS_MES.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
             this.ms_sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.Save = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.panel2.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -83,15 +83,9 @@
             this.panel2.Controls.Add(this.label1);
             this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel2.Location = new System.Drawing.Point(0, 0);
-
-            this.panel2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.panel2.Name = "panel2";
-            this.panel2.Size = new System.Drawing.Size(1401, 44);
-
             this.panel2.Margin = new System.Windows.Forms.Padding(4);
             this.panel2.Name = "panel2";
             this.panel2.Size = new System.Drawing.Size(1230, 36);
-
             this.panel2.TabIndex = 30;
             // 
             // label1
@@ -99,17 +93,10 @@
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label1.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
-
-            this.label1.Location = new System.Drawing.Point(18, 6);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(110, 31);
-
             this.label1.Location = new System.Drawing.Point(16, 5);
             this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(92, 27);
-
             this.label1.TabIndex = 0;
             this.label1.Text = "工单信息";
             // 
@@ -117,17 +104,10 @@
             // 
             this.bc_remark_label.AutoSize = true;
             this.bc_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-
-            this.bc_remark_label.Location = new System.Drawing.Point(30, 378);
-            this.bc_remark_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.bc_remark_label.Name = "bc_remark_label";
-            this.bc_remark_label.Size = new System.Drawing.Size(110, 31);
-
             this.bc_remark_label.Location = new System.Drawing.Point(447, 214);
             this.bc_remark_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.bc_remark_label.Name = "bc_remark_label";
             this.bc_remark_label.Size = new System.Drawing.Size(92, 27);
-
             this.bc_remark_label.TabIndex = 25;
             this.bc_remark_label.Text = "不良备注";
             // 
@@ -135,17 +115,10 @@
             // 
             this.ms_sncode_label.AutoSize = true;
             this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-
-            this.ms_sncode_label.Location = new System.Drawing.Point(346, 856);
-            this.ms_sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_sncode_label.Name = "ms_sncode_label";
-            this.ms_sncode_label.Size = new System.Drawing.Size(86, 31);
-
             this.ms_sncode_label.Location = new System.Drawing.Point(308, 661);
             this.ms_sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ms_sncode_label.Name = "ms_sncode_label";
             this.ms_sncode_label.Size = new System.Drawing.Size(72, 27);
-
             this.ms_sncode_label.TabIndex = 18;
             this.ms_sncode_label.Text = "序列号";
             // 
@@ -153,157 +126,22 @@
             // 
             this.bc_groupcode_label.AutoSize = true;
             this.bc_groupcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-
-            this.bc_groupcode_label.Location = new System.Drawing.Point(30, 316);
-            this.bc_groupcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.bc_groupcode_label.Name = "bc_groupcode_label";
-            this.bc_groupcode_label.Size = new System.Drawing.Size(110, 31);
-
             this.bc_groupcode_label.Location = new System.Drawing.Point(27, 211);
             this.bc_groupcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.bc_groupcode_label.Name = "bc_groupcode_label";
             this.bc_groupcode_label.Size = new System.Drawing.Size(92, 27);
-
             this.bc_groupcode_label.TabIndex = 24;
             this.bc_groupcode_label.Text = "不良组别";
             // 
-
-            // label2
-            // 
-            this.label2.AutoSize = true;
-            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.ForeColor = System.Drawing.Color.Black;
-            this.label2.Location = new System.Drawing.Point(16, 164);
-
-            // mc_restqty_label
-            // 
-            this.mc_restqty_label.AutoSize = true;
-            this.mc_restqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-
-            this.mc_restqty_label.Location = new System.Drawing.Point(836, 152);
-            this.mc_restqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mc_restqty_label.Name = "mc_restqty_label";
-            this.mc_restqty_label.Size = new System.Drawing.Size(110, 31);
-
-            this.mc_restqty_label.Location = new System.Drawing.Point(785, 109);
-            this.mc_restqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mc_restqty_label.Name = "mc_restqty_label";
-            this.mc_restqty_label.Size = new System.Drawing.Size(92, 27);
-
-            this.mc_restqty_label.TabIndex = 17;
-            this.mc_restqty_label.Text = "待采集数";
-            // 
-            // mcd_inqty_label
-            // 
-            this.mcd_inqty_label.AutoSize = true;
-            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(460, 152);
-            this.mcd_inqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mcd_inqty_label.Name = "mcd_inqty_label";
-            this.mcd_inqty_label.Size = new System.Drawing.Size(110, 31);
-
-            this.mcd_inqty_label.Location = new System.Drawing.Point(451, 109);
-            this.mcd_inqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mcd_inqty_label.Name = "mcd_inqty_label";
-            this.mcd_inqty_label.Size = new System.Drawing.Size(92, 27);
-
-            this.mcd_inqty_label.TabIndex = 14;
-            this.mcd_inqty_label.Text = "已采集数";
-            // 
-            // ma_qty_label
-            // 
-            this.ma_qty_label.AutoSize = true;
-            this.ma_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-
-            this.ma_qty_label.Location = new System.Drawing.Point(36, 152);
-            this.ma_qty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ma_qty_label.Name = "ma_qty_label";
-            this.ma_qty_label.Size = new System.Drawing.Size(110, 31);
-
-            this.ma_qty_label.Location = new System.Drawing.Point(26, 109);
-            this.ma_qty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ma_qty_label.Name = "ma_qty_label";
-            this.ma_qty_label.Size = new System.Drawing.Size(92, 27);
-
-            this.ma_qty_label.TabIndex = 11;
-            this.ma_qty_label.Text = "工单数量";
-            // 
-            // ma_prodcode_label
-            // 
-            this.ma_prodcode_label.AutoSize = true;
-            this.ma_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-
-            this.ma_prodcode_label.Location = new System.Drawing.Point(464, 76);
-            this.ma_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ma_prodcode_label.Name = "ma_prodcode_label";
-            this.ma_prodcode_label.Size = new System.Drawing.Size(110, 31);
-
-            this.ma_prodcode_label.Location = new System.Drawing.Point(454, 59);
-            this.ma_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ma_prodcode_label.Name = "ma_prodcode_label";
-            this.ma_prodcode_label.Size = new System.Drawing.Size(92, 27);
-
-            this.ma_prodcode_label.TabIndex = 7;
-            this.ma_prodcode_label.Text = "产品编号";
-            // 
-            // pr_detail_label
-            // 
-            this.pr_detail_label.AutoSize = true;
-            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(836, 81);
-            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(110, 31);
-
-            this.pr_detail_label.Location = new System.Drawing.Point(785, 59);
-            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
-
-            this.pr_detail_label.TabIndex = 6;
-            this.pr_detail_label.Text = "产品名称";
-            // 
-            // ms_makecode_label
-            // 
-            this.ms_makecode_label.AutoSize = true;
-            this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-
-            this.ms_makecode_label.Location = new System.Drawing.Point(36, 76);
-            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_makecode_label.Name = "ms_makecode_label";
-            this.ms_makecode_label.Size = new System.Drawing.Size(110, 31);
-            this.ms_makecode_label.TabIndex = 2;
-            this.ms_makecode_label.Text = "归属工单";
-            // 
-
-            this.ms_makecode_label.Location = new System.Drawing.Point(26, 59);
-            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_makecode_label.Name = "ms_makecode_label";
-            this.ms_makecode_label.Size = new System.Drawing.Size(92, 27);
-            this.ms_makecode_label.TabIndex = 2;
-            this.ms_makecode_label.Text = "归属工单";
-            // 
-
             // label2
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-
-            this.label2.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
-            this.label2.Location = new System.Drawing.Point(18, 4);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(110, 31);
-
             this.label2.ForeColor = System.Drawing.Color.Blue;
             this.label2.Location = new System.Drawing.Point(26, 162);
-
             this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(92, 27);
-
             this.label2.TabIndex = 0;
             this.label2.Text = "采集信息";
             // 
@@ -311,17 +149,10 @@
             // 
             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(621, 321);
-            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(110, 31);
-
             this.label3.Location = new System.Drawing.Point(27, 261);
             this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(92, 27);
-
             this.label3.TabIndex = 34;
             this.label3.Text = "不良代码";
             // 
@@ -330,17 +161,10 @@
             this.GoodProduct.AutoSize = true;
             this.GoodProduct.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.GoodProduct.ForeColor = System.Drawing.Color.Blue;
-
-            this.GoodProduct.Location = new System.Drawing.Point(34, 849);
-            this.GoodProduct.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.GoodProduct.Name = "GoodProduct";
-            this.GoodProduct.Size = new System.Drawing.Size(100, 42);
-
             this.GoodProduct.Location = new System.Drawing.Point(31, 655);
             this.GoodProduct.Margin = new System.Windows.Forms.Padding(4);
             this.GoodProduct.Name = "GoodProduct";
             this.GoodProduct.Size = new System.Drawing.Size(83, 35);
-
             this.GoodProduct.TabIndex = 35;
             this.GoodProduct.TabStop = true;
             this.GoodProduct.Text = "良品";
@@ -351,17 +175,10 @@
             this.Reject.AutoSize = true;
             this.Reject.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Reject.ForeColor = System.Drawing.Color.Red;
-
-            this.Reject.Location = new System.Drawing.Point(159, 849);
-            this.Reject.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.Reject.Name = "Reject";
-            this.Reject.Size = new System.Drawing.Size(129, 42);
-
             this.Reject.Location = new System.Drawing.Point(141, 655);
             this.Reject.Margin = new System.Windows.Forms.Padding(4);
             this.Reject.Name = "Reject";
             this.Reject.Size = new System.Drawing.Size(107, 35);
-
             this.Reject.TabIndex = 36;
             this.Reject.TabStop = true;
             this.Reject.Text = "不良品";
@@ -375,17 +192,10 @@
             this.columnHeader4,
             this.columnHeader1,
             this.columnHeader2});
-
-            this.WaitRejectList.Location = new System.Drawing.Point(33, 540);
-            this.WaitRejectList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.WaitRejectList.Name = "WaitRejectList";
-            this.WaitRejectList.Size = new System.Drawing.Size(442, 292);
-
             this.WaitRejectList.Location = new System.Drawing.Point(29, 337);
             this.WaitRejectList.Margin = new System.Windows.Forms.Padding(4);
             this.WaitRejectList.Name = "WaitRejectList";
             this.WaitRejectList.Size = new System.Drawing.Size(393, 304);
-
             this.WaitRejectList.TabIndex = 37;
             this.WaitRejectList.UseCompatibleStateImageBehavior = false;
             this.WaitRejectList.View = System.Windows.Forms.View.Details;
@@ -417,17 +227,10 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-
-            this.label4.Location = new System.Drawing.Point(36, 495);
-            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(110, 31);
-
             this.label4.Location = new System.Drawing.Point(27, 306);
             this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(92, 27);
-
             this.label4.TabIndex = 39;
             this.label4.Text = "待选不良";
             // 
@@ -435,17 +238,10 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-
-            this.label5.Location = new System.Drawing.Point(615, 496);
-            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(110, 31);
-
             this.label5.Location = new System.Drawing.Point(542, 306);
             this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(92, 27);
-
             this.label5.TabIndex = 40;
             this.label5.Text = "已选不良";
             // 
@@ -453,20 +249,10 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-
             this.label6.Location = new System.Drawing.Point(946, 180);
-
-            this.label6.Location = new System.Drawing.Point(1071, 321);
-            this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(110, 31);
-
-            this.label6.Location = new System.Drawing.Point(946, 215);
-
             this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(92, 27);
-
             this.label6.TabIndex = 46;
             this.label6.Text = "操作结果";
             // 
@@ -478,17 +264,10 @@
             this.columnHeader3,
             this.columnHeader7,
             this.columnHeader8});
-
-            this.ChoosedRejectList.Location = new System.Drawing.Point(612, 540);
-            this.ChoosedRejectList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.ChoosedRejectList.Name = "ChoosedRejectList";
-            this.ChoosedRejectList.Size = new System.Drawing.Size(442, 292);
-
             this.ChoosedRejectList.Location = new System.Drawing.Point(544, 337);
             this.ChoosedRejectList.Margin = new System.Windows.Forms.Padding(4);
             this.ChoosedRejectList.Name = "ChoosedRejectList";
             this.ChoosedRejectList.Size = new System.Drawing.Size(393, 304);
-
             this.ChoosedRejectList.TabIndex = 50;
             this.ChoosedRejectList.UseCompatibleStateImageBehavior = false;
             this.ChoosedRejectList.View = System.Windows.Forms.View.Details;
@@ -597,18 +376,19 @@
             // 
             this.bc_code.AllPower = null;
             this.bc_code.BackColor = System.Drawing.Color.White;
+            this.bc_code.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bc_code.ID = null;
             this.bc_code.Location = new System.Drawing.Point(159, 261);
+            this.bc_code.Margin = new System.Windows.Forms.Padding(4);
             this.bc_code.Name = "bc_code";
             this.bc_code.Power = null;
-            this.bc_code.Size = new System.Drawing.Size(251, 25);
+            this.bc_code.Size = new System.Drawing.Size(251, 28);
             this.bc_code.Str = null;
             this.bc_code.Str1 = null;
             this.bc_code.Str2 = null;
-            this.bc_code.TabIndex = 100;
+            this.bc_code.TabIndex = 68;
             this.bc_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.bc_code_KeyDown);
-            
-
+            // 
             // ma_code
             // 
             this.ma_code.AllPower = null;
@@ -616,25 +396,14 @@
             this.ma_code.Condition = null;
             this.ma_code.DBTitle = null;
             this.ma_code.FormName = null;
-
-            this.ma_code.Location = new System.Drawing.Point(142, 59);
-
-            this.ma_code.Location = new System.Drawing.Point(196, 76);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-
-            this.ma_code.Location = new System.Drawing.Point(159, 59);
-
+            this.ma_code.Location = new System.Drawing.Point(143, 59);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(4);
             this.ma_code.Name = "ma_code";
             this.ma_code.Power = null;
             this.ma_code.SelectField = null;
             this.ma_code.SetValueField = null;
-
-            this.ma_code.Size = new System.Drawing.Size(231, 33);
-            this.ma_code.TabIndex = 64;
-
             this.ma_code.Size = new System.Drawing.Size(204, 25);
             this.ma_code.TabIndex = 67;
-
             this.ma_code.TableName = null;
             this.ma_code.Tag = "ma_code";
             this.ma_code.TextBoxEnable = true;
@@ -650,43 +419,14 @@
             this.LockMakeCode.Text = "锁定";
             this.LockMakeCode.UseVisualStyleBackColor = true;
             // 
-            // Save
-            // 
-            this.Save.AllPower = null;
-            this.Save.BackColor = System.Drawing.Color.Transparent;
-            this.Save.DownImage = ((System.Drawing.Image)(resources.GetObject("Save.DownImage")));
-            this.Save.Image = null;
-            this.Save.IsShowBorder = true;
-            this.Save.Location = new System.Drawing.Point(684, 659);
-            this.Save.Margin = new System.Windows.Forms.Padding(4);
-            this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
-            this.Save.Name = "Save";
-            this.Save.NormalImage = ((System.Drawing.Image)(resources.GetObject("Save.NormalImage")));
-            this.Save.Power = null;
-            this.Save.Size = new System.Drawing.Size(100, 30);
-            this.Save.TabIndex = 65;
-            this.Save.Text = "保存";
-            this.Save.UseVisualStyleBackColor = false;
-            this.Save.Click += new System.EventHandler(this.Save_Click);
-            // 
             // mcd_remainqty
             // 
             this.mcd_remainqty.AutoSize = true;
             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(914, 109);
-
-            this.mcd_remainqty.Location = new System.Drawing.Point(1020, 152);
-            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(0, 31);
-
-            this.mcd_remainqty.Location = new System.Drawing.Point(920, 109);
-
             this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_remainqty.Name = "mcd_remainqty";
             this.mcd_remainqty.Size = new System.Drawing.Size(0, 27);
-
             this.mcd_remainqty.TabIndex = 57;
             this.mcd_remainqty.Tag = "mcd_remainqty";
             // 
@@ -694,60 +434,30 @@
             // 
             this.pr_detail.AutoSize = true;
             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(914, 59);
-
-            this.pr_detail.Location = new System.Drawing.Point(1020, 81);
-            this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 31);
-
-            this.pr_detail.Location = new System.Drawing.Point(920, 59);
-
             this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Size = new System.Drawing.Size(0, 27);
-
             this.pr_detail.TabIndex = 56;
             // 
             // ma_qty
             // 
             this.ma_qty.AutoSize = true;
             this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-
-            this.ma_qty.Location = new System.Drawing.Point(142, 109);
-
-            this.ma_qty.Location = new System.Drawing.Point(196, 152);
-            this.ma_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ma_qty.Name = "ma_qty";
-            this.ma_qty.Size = new System.Drawing.Size(0, 31);
-
-            this.ma_qty.Location = new System.Drawing.Point(159, 109);
-
+            this.ma_qty.Location = new System.Drawing.Point(143, 109);
             this.ma_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_qty.Name = "ma_qty";
             this.ma_qty.Size = new System.Drawing.Size(0, 27);
-
             this.ma_qty.TabIndex = 55;
             // 
             // mcd_inqty
             // 
             this.mcd_inqty.AutoSize = true;
             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(562, 109);
-
-            this.mcd_inqty.Location = new System.Drawing.Point(634, 152);
-            this.mcd_inqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.mcd_inqty.Name = "mcd_inqty";
-            this.mcd_inqty.Size = new System.Drawing.Size(0, 31);
-
-            this.mcd_inqty.Location = new System.Drawing.Point(594, 109);
-
+            this.mcd_inqty.Location = new System.Drawing.Point(567, 109);
             this.mcd_inqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_inqty.Name = "mcd_inqty";
             this.mcd_inqty.Size = new System.Drawing.Size(0, 27);
-
             this.mcd_inqty.TabIndex = 54;
             this.mcd_inqty.Tag = "mcd_inqty";
             // 
@@ -755,41 +465,19 @@
             // 
             this.ma_prodcode.AutoSize = true;
             this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-
-            this.ma_prodcode.Location = new System.Drawing.Point(562, 59);
-
-            this.ma_prodcode.Location = new System.Drawing.Point(634, 76);
-            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ma_prodcode.Name = "ma_prodcode";
-            this.ma_prodcode.Size = new System.Drawing.Size(0, 31);
-
-            this.ma_prodcode.Location = new System.Drawing.Point(594, 59);
-
+            this.ma_prodcode.Location = new System.Drawing.Point(567, 59);
             this.ma_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_prodcode.Name = "ma_prodcode";
             this.ma_prodcode.Size = new System.Drawing.Size(0, 27);
-
             this.ma_prodcode.TabIndex = 53;
             // 
             // 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(951, 211);
             this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Size = new System.Drawing.Size(275, 430);
-
-            this.OperateResult.Location = new System.Drawing.Point(1077, 375);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(308, 457);
-
-            this.OperateResult.Location = new System.Drawing.Point(951, 259);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
-            this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(275, 382);
-
             this.OperateResult.TabIndex = 52;
             this.OperateResult.Text = "";
             // 
@@ -800,22 +488,13 @@
             this.CleanInfo.DownImage = ((System.Drawing.Image)(resources.GetObject("CleanInfo.DownImage")));
             this.CleanInfo.Image = ((System.Drawing.Image)(resources.GetObject("CleanInfo.Image")));
             this.CleanInfo.IsShowBorder = true;
-
-            this.CleanInfo.Location = new System.Drawing.Point(1184, 850);
-            this.CleanInfo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-
             this.CleanInfo.Location = new System.Drawing.Point(1046, 656);
             this.CleanInfo.Margin = new System.Windows.Forms.Padding(4);
-
             this.CleanInfo.MoveImage = ((System.Drawing.Image)(resources.GetObject("CleanInfo.MoveImage")));
             this.CleanInfo.Name = "CleanInfo";
             this.CleanInfo.NormalImage = ((System.Drawing.Image)(resources.GetObject("CleanInfo.NormalImage")));
             this.CleanInfo.Power = null;
-
-            this.CleanInfo.Size = new System.Drawing.Size(92, 36);
-
             this.CleanInfo.Size = new System.Drawing.Size(81, 30);
-
             this.CleanInfo.TabIndex = 47;
             this.CleanInfo.Text = "清除内容";
             this.CleanInfo.UseVisualStyleBackColor = true;
@@ -824,17 +503,10 @@
             // ChooseedReject
             // 
             this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
-
-            this.ChooseedReject.Location = new System.Drawing.Point(510, 718);
-            this.ChooseedReject.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.ChooseedReject.Name = "ChooseedReject";
-            this.ChooseedReject.Size = new System.Drawing.Size(75, 34);
-
             this.ChooseedReject.Location = new System.Drawing.Point(452, 546);
             this.ChooseedReject.Margin = new System.Windows.Forms.Padding(4);
             this.ChooseedReject.Name = "ChooseedReject";
             this.ChooseedReject.Size = new System.Drawing.Size(67, 29);
-
             this.ChooseedReject.TabIndex = 45;
             this.ChooseedReject.UseVisualStyleBackColor = true;
             this.ChooseedReject.Click += new System.EventHandler(this.ChooseedReject_Click);
@@ -842,17 +514,10 @@
             // WaitReject
             // 
             this.WaitReject.Image = ((System.Drawing.Image)(resources.GetObject("WaitReject.Image")));
-
-            this.WaitReject.Location = new System.Drawing.Point(510, 622);
-            this.WaitReject.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.WaitReject.Name = "WaitReject";
-            this.WaitReject.Size = new System.Drawing.Size(75, 34);
-
             this.WaitReject.Location = new System.Drawing.Point(452, 466);
             this.WaitReject.Margin = new System.Windows.Forms.Padding(4);
             this.WaitReject.Name = "WaitReject";
             this.WaitReject.Size = new System.Drawing.Size(67, 29);
-
             this.WaitReject.TabIndex = 44;
             this.WaitReject.UseVisualStyleBackColor = true;
             this.WaitReject.Click += new System.EventHandler(this.WaitReject_Click);
@@ -862,52 +527,25 @@
             this.bc_remark.AllPower = null;
             this.bc_remark.BackColor = System.Drawing.Color.White;
             this.bc_remark.ID = null;
-
-            this.bc_remark.Location = new System.Drawing.Point(184, 375);
-            this.bc_remark.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.bc_remark.Multiline = true;
-            this.bc_remark.Name = "bc_remark";
-            this.bc_remark.Power = null;
-            this.bc_remark.Size = new System.Drawing.Size(870, 97);
-
             this.bc_remark.Location = new System.Drawing.Point(547, 212);
             this.bc_remark.Margin = new System.Windows.Forms.Padding(4);
             this.bc_remark.Multiline = true;
             this.bc_remark.Name = "bc_remark";
             this.bc_remark.Power = null;
             this.bc_remark.Size = new System.Drawing.Size(393, 77);
-
             this.bc_remark.Str = null;
             this.bc_remark.Str1 = null;
             this.bc_remark.Str2 = null;
             this.bc_remark.TabIndex = 41;
             // 
-
-            // bc_code
-            // 
-            this.bc_code.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.bc_code.Location = new System.Drawing.Point(770, 321);
-            this.bc_code.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.bc_code.Name = "bc_code";
-            this.bc_code.Size = new System.Drawing.Size(284, 30);
-            this.bc_code.TabIndex = 33;
-            // 
-
             // bc_groupcode
             // 
             this.bc_groupcode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bc_groupcode.FormattingEnabled = true;
-
-            this.bc_groupcode.Location = new System.Drawing.Point(184, 321);
-            this.bc_groupcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.bc_groupcode.Name = "bc_groupcode";
-            this.bc_groupcode.Size = new System.Drawing.Size(282, 30);
-
             this.bc_groupcode.Location = new System.Drawing.Point(159, 215);
             this.bc_groupcode.Margin = new System.Windows.Forms.Padding(4);
             this.bc_groupcode.Name = "bc_groupcode";
             this.bc_groupcode.Size = new System.Drawing.Size(251, 26);
-
             this.bc_groupcode.TabIndex = 21;
             this.bc_groupcode.SelectedIndexChanged += new System.EventHandler(this.bc_groupcode_SelectedIndexChanged);
             // 
@@ -917,19 +555,11 @@
             this.ms_sncode.BackColor = System.Drawing.Color.White;
             this.ms_sncode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ms_sncode.ID = null;
-
-            this.ms_sncode.Location = new System.Drawing.Point(476, 856);
-            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.ms_sncode.Name = "ms_sncode";
-            this.ms_sncode.Power = null;
-            this.ms_sncode.Size = new System.Drawing.Size(270, 32);
-
             this.ms_sncode.Location = new System.Drawing.Point(423, 661);
             this.ms_sncode.Margin = new System.Windows.Forms.Padding(4);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Power = null;
             this.ms_sncode.Size = new System.Drawing.Size(240, 28);
-
             this.ms_sncode.Str = null;
             this.ms_sncode.Str1 = null;
             this.ms_sncode.Str2 = null;
@@ -937,73 +567,36 @@
             this.ms_sncode.Tag = "IfWrite";
             this.ms_sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ms_code_KeyDown);
             // 
-
-            // bc_code
+            // Save
             // 
-
             this.Save.AllPower = null;
             this.Save.BackColor = System.Drawing.Color.Transparent;
             this.Save.DownImage = ((System.Drawing.Image)(resources.GetObject("Save.DownImage")));
             this.Save.Image = null;
             this.Save.IsShowBorder = true;
-            this.Save.Location = new System.Drawing.Point(770, 855);
-            this.Save.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Save.Location = new System.Drawing.Point(705, 656);
             this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
             this.Save.Name = "Save";
             this.Save.NormalImage = ((System.Drawing.Image)(resources.GetObject("Save.NormalImage")));
             this.Save.Power = null;
-            this.Save.Size = new System.Drawing.Size(112, 36);
-            this.Save.TabIndex = 65;
+            this.Save.Size = new System.Drawing.Size(87, 33);
+            this.Save.TabIndex = 70;
             this.Save.Text = "保存";
             this.Save.UseVisualStyleBackColor = false;
             this.Save.Click += new System.EventHandler(this.Save_Click);
             // 
-            // Make_TestCollection
-            //
-            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.BackColor = System.Drawing.SystemColors.Control;
-            this.ClientSize = new System.Drawing.Size(1401, 936);
-            this.Controls.Add(this.Save);
-
-            this.bc_code.AllPower = null;
-            this.bc_code.BackColor = System.Drawing.Color.White;
-            this.bc_code.ID = null;
-            this.bc_code.Location = new System.Drawing.Point(159, 261);
-            this.bc_code.Name = "bc_code";
-            this.bc_code.Power = null;
-            this.bc_code.Size = new System.Drawing.Size(251, 25);
-            this.bc_code.Str = null;
-            this.bc_code.Str1 = null;
-            this.bc_code.Str2 = null;
-            this.bc_code.TabIndex = 68;
-            this.bc_code.KeyDown += new System.Windows.Forms.KeyEventHandler(this.bc_code_KeyDown);
-            // 
-            // AutoBadCode
-            // 
-            this.AutoBadCode.AutoSize = true;
-            this.AutoBadCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoBadCode.Location = new System.Drawing.Point(126, 309);
-            this.AutoBadCode.Name = "AutoBadCode";
-            this.AutoBadCode.Size = new System.Drawing.Size(151, 24);
-            this.AutoBadCode.TabIndex = 69;
-            this.AutoBadCode.Text = "自动产生不良代码";
-            this.AutoBadCode.UseVisualStyleBackColor = true;
-            // 
-
             // Make_TestCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.SystemColors.Control;
             this.ClientSize = new System.Drawing.Size(1230, 710);
+            this.Controls.Add(this.Save);
             this.Controls.Add(this.AutoBadCode);
             this.Controls.Add(this.bc_code);
-
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.LockMakeCode);
             this.Controls.Add(this.label2);
-            this.Controls.Add(this.Save);
             this.Controls.Add(this.mcd_remainqty);
             this.Controls.Add(this.pr_detail);
             this.Controls.Add(this.ma_qty);
@@ -1036,11 +629,7 @@
             this.Controls.Add(this.ma_prodcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.KeyPreview = true;
-
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-
             this.Margin = new System.Windows.Forms.Padding(4);
-
             this.Name = "Make_TestCollection";
             this.Tag = "Make!TestCollection";
             this.Text = " ";
@@ -1092,12 +681,12 @@
         private CustomControl.ValueLabel.ValueLabel ma_qty;
         private CustomControl.ValueLabel.ValueLabel pr_detail;
         private CustomControl.ValueLabel.ValueLabel mcd_remainqty;
-        private CustomControl.ButtonUtil.NormalButton Save;
         private System.Windows.Forms.ColumnHeader columnHeader3;
         private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
         private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
         private CustomControl.TextBoxWithIcon.EnterTextBox bc_code;
         private System.Windows.Forms.CheckBox AutoBadCode;
         private System.Windows.Forms.ColumnHeader columnHeader4;
+        private CustomControl.ButtonUtil.NormalButton Save;
     }
 }

+ 38 - 38
UAS-MES/FunctionCode/Make/Make_TestCollection.resx

@@ -118,44 +118,6 @@
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-  <data name="Save.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="Save.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="Save.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="CleanInfo.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
@@ -323,6 +285,44 @@
         ZrIE7d4UdV3k12BxFb3huIgob74jq7eOllIz0Q9sQrs7Ui9wepGrci6vk/HQgzzKm+7IZUgTOpQ2kj7o
         zB15DHqhq3IurxPdaY8R5U37C1K8XmyU9PGfh25xfV0R/UeTz52y3EtWQ9dqNEP4HY3LfwGra+NvPdw7
         fgAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="Save.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="Save.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="Save.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>

+ 12 - 0
UAS-MES/优软MES/App.config

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+  <startup>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
+  </startup>
+  <startup useLegacyV2RuntimeActivationPolicy="true">
+    <supportedRuntime version="v4.0"/>
+  </startup>
+  <appSettings>
+    <add key="DatabaseConnection" value="Data Source=192.168.253.6/orcl;User ID=uas_mes;PassWord=select!#%*("/>
+  </appSettings>
+</configuration>

+ 62 - 0
UAS-MES/优软MES/Configuration.Designer.cs

@@ -0,0 +1,62 @@
+namespace 优软MES
+{
+    partial class Configuration
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.dataGridView1 = new System.Windows.Forms.DataGridView();
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // dataGridView1
+            // 
+            this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.dataGridView1.Location = new System.Drawing.Point(0, 0);
+            this.dataGridView1.Name = "dataGridView1";
+            this.dataGridView1.RowTemplate.Height = 23;
+            this.dataGridView1.Size = new System.Drawing.Size(628, 442);
+            this.dataGridView1.TabIndex = 0;
+            // 
+            // Configuration
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(628, 442);
+            this.Controls.Add(this.dataGridView1);
+            this.Name = "Configuration";
+            this.Text = "配置界面";
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.DataGridView dataGridView1;
+    }
+}

+ 20 - 0
UAS-MES/优软MES/Configuration.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace 优软MES
+{
+    public partial class Configuration : Form
+    {
+        public Configuration()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 120 - 0
UAS-MES/优软MES/Configuration.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 136 - 0
UAS-MES/优软MES/CustomControl/AccordionMenu/AccordionMenu.Designer.cs

@@ -0,0 +1,136 @@
+namespace 优软MES.CustomControl.AccordionMenu
+{
+    partial class AccordionMenu
+    {
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            System.Windows.Forms.ListViewItem listViewItem7 = new System.Windows.Forms.ListViewItem(new string[] {
+            "text1"}, -1, System.Drawing.Color.Empty, System.Drawing.SystemColors.InactiveCaption, null);
+            System.Windows.Forms.ListViewItem listViewItem8 = new System.Windows.Forms.ListViewItem("text2");
+            System.Windows.Forms.ListViewItem listViewItem9 = new System.Windows.Forms.ListViewItem("text3");
+            this.listView1 = new System.Windows.Forms.ListView();
+            this.listView2 = new System.Windows.Forms.ListView();
+            this.listView3 = new System.Windows.Forms.ListView();
+            this.timer1 = new System.Windows.Forms.Timer(this.components);
+            this.button3 = new System.Windows.Forms.Button();
+            this.button2 = new System.Windows.Forms.Button();
+            this.button1 = new System.Windows.Forms.Button();
+            this.SuspendLayout();
+            // 
+            // listView1
+            // 
+            this.listView1.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
+            listViewItem7});
+            this.listView1.Location = new System.Drawing.Point(20, 86);
+            this.listView1.Name = "listView1";
+            this.listView1.Size = new System.Drawing.Size(121, 248);
+            this.listView1.TabIndex = 3;
+            this.listView1.UseCompatibleStateImageBehavior = false;
+            // 
+            // listView2
+            // 
+            this.listView2.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
+            listViewItem8});
+            this.listView2.Location = new System.Drawing.Point(156, 86);
+            this.listView2.Name = "listView2";
+            this.listView2.Size = new System.Drawing.Size(121, 248);
+            this.listView2.TabIndex = 4;
+            this.listView2.UseCompatibleStateImageBehavior = false;
+            // 
+            // listView3
+            // 
+            this.listView3.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
+            listViewItem9});
+            this.listView3.Location = new System.Drawing.Point(296, 86);
+            this.listView3.Name = "listView3";
+            this.listView3.Size = new System.Drawing.Size(121, 248);
+            this.listView3.TabIndex = 5;
+            this.listView3.UseCompatibleStateImageBehavior = false;
+            // 
+            // timer1
+            // 
+          
+            // 
+            // button3
+            // 
+            this.button3.Image = global::优软MES.Properties.Resources._2_0btn_36;
+            this.button3.Location = new System.Drawing.Point(296, 24);
+            this.button3.Name = "button3";
+            this.button3.Size = new System.Drawing.Size(121, 40);
+            this.button3.TabIndex = 2;
+            this.button3.Text = "button3";
+            this.button3.UseVisualStyleBackColor = true;
+            // 
+            // button2
+            // 
+            this.button2.Image = global::优软MES.Properties.Resources._2_0btn_36;
+            this.button2.Location = new System.Drawing.Point(156, 24);
+            this.button2.Name = "button2";
+            this.button2.Size = new System.Drawing.Size(121, 40);
+            this.button2.TabIndex = 1;
+            this.button2.Text = "button2";
+            this.button2.UseVisualStyleBackColor = true;
+            // 
+            // button1
+            // 
+            this.button1.Image = global::优软MES.Properties.Resources._2_0btn_36;
+            this.button1.Location = new System.Drawing.Point(20, 24);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(121, 40);
+            this.button1.TabIndex = 0;
+            this.button1.Text = "button1";
+            this.button1.UseVisualStyleBackColor = true;
+            // 
+            // AccordionMenu
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.listView3);
+            this.Controls.Add(this.listView2);
+            this.Controls.Add(this.listView1);
+            this.Controls.Add(this.button3);
+            this.Controls.Add(this.button2);
+            this.Controls.Add(this.button1);
+            this.Name = "AccordionMenu";
+            this.Size = new System.Drawing.Size(439, 351);
+            this.Load += new System.EventHandler(this.AccordionMenu_Load);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.Button button2;
+        private System.Windows.Forms.Button button3;
+        private System.Windows.Forms.ListView listView1;
+        private System.Windows.Forms.ListView listView2;
+        private System.Windows.Forms.ListView listView3;
+        private System.Windows.Forms.Timer timer1;
+    }
+}

+ 171 - 0
UAS-MES/优软MES/CustomControl/AccordionMenu/AccordionMenu.cs

@@ -0,0 +1,171 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using System.Collections;
+
+namespace 优软MES.CustomControl.AccordionMenu
+{
+    public partial class AccordionMenu : UserControl
+    {
+        /// <summary>
+        /// 记录当前功能面板中的按钮
+        /// </summary>
+        private ArrayList ArrFunButton = new ArrayList();
+        /// <summary>
+        /// 记录当前功能面板中的listview
+        /// </summary>
+        private ArrayList ArrFunListView = new ArrayList();
+        /// <summary>
+        /// 功能面板的宽度
+        /// </summary>
+        private int m_nPanFunWidth = 150;
+        //功能面板隐藏后的宽度
+        private int m_nPanFunHideWidth = 150;
+        public AccordionMenu()
+        {
+            InitializeComponent();
+        }
+
+        private void AccordionMenu_Load(object sender, EventArgs e)
+        {
+            //设置功能面板的位置和宽带
+            this.Width = m_nPanFunWidth;
+            this.Dock = DockStyle.Left;
+            //记录功能按钮
+
+            ArrFunButton.Add(this.button1);
+            ArrFunButton.Add(this.button2);
+            ArrFunButton.Add(this.button3);
+   
+            //记录功能面板中的listview,注意要和上面的button对应
+            ArrFunListView.Add(this.listView1);
+            ArrFunListView.Add(this.listView2);
+            ArrFunListView.Add(this.listView3);
+
+            int nCount = ArrFunButton.Count;
+            //布置各功能按钮的位置和ListView的属性
+            for (int i = nCount - 1; i >= 0; i--)
+            {
+                Button btn = ArrFunButton[i] as Button;
+                btn.Width = this.Width - 4;
+                btn.Left = 0;
+
+                //将按钮的单击事件和具体代码对应起来
+                btn.Click += new System.EventHandler(Btn_Click);
+                if (i == 0)
+                {
+                    btn.Top = 0;
+                    btn.Anchor = AnchorStyles.Left | AnchorStyles.Top;
+                }
+                else
+                {
+                    if (i == nCount - 1)
+                        btn.Top = this.Height - btn.Height - 4;
+                    else
+                        btn.Top = (ArrFunButton[i + 1] as Button).Top - btn.Height;
+                    btn.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
+                }
+                //鼠标在按钮上移动时,同样判断当前工具条是否隐藏
+                btn.MouseMove += new MouseEventHandler(FunListView_MouseMove);
+
+                //设置listview的anchor属性
+                ListView lsv = ArrFunListView[i] as ListView;
+                if (lsv != null)
+                {
+                    lsv.Anchor = AnchorStyles.Left | AnchorStyles.Top |
+                        AnchorStyles.Right | AnchorStyles.Bottom;
+                    //隐藏功能listview
+                    lsv.Visible = false;
+                    //设置listview双击事件
+                    lsv.DoubleClick += new EventHandler(lsvFun_DoubleClick);
+                    lsv.MouseMove += new MouseEventHandler(FunListView_MouseMove);
+                }
+            }
+            //将第一个功能按钮点一下
+            (ArrFunButton[0] as Button).PerformClick();
+            //别忘了打开记时器
+            this.timer1.Enabled = true;
+        }
+
+        public void Btn_Click(object sender, EventArgs e) {
+            Button btnNow = sender as Button;
+            if (btnNow == null)
+                return;
+
+            int nIndex = this.ArrFunButton.IndexOf(btnNow);
+            //将该按钮前面的置顶
+            for (int i = 1; i <= nIndex; i++)
+            {
+                Button btn = ArrFunButton[i] as Button; 
+                btn.Top = ((Button)ArrFunButton[i - 1]).Bottom;
+                btn.Anchor = AnchorStyles.Left | AnchorStyles.Top;
+            }
+
+            //将下面的按钮下移
+            for (int i = ArrFunButton.Count - 1; i > nIndex; i--)
+            {
+                Button btn = ArrFunButton[i] as Button;
+                if (i == ArrFunButton.Count - 1)//最后一个
+                    btn.Top = this.Height - btn.Height - 4;
+                else
+                    btn.Top = ((Button)ArrFunButton[i + 1]).Top - btn.Height;
+                btn.Anchor = AnchorStyles.Left |AnchorStyles.Bottom;
+
+            }
+            //显示对应的listview
+            for (int i = 0; i < ArrFunButton.Count; i++)
+            {
+                ListView lsv = ArrFunListView[i] as ListView;
+                //当前按钮对应的ListView
+                if (i == nIndex)
+                {
+                    lsv.Left = 0;
+                    lsv.Width = btnNow.Width;
+                    lsv.Top = btnNow.Bottom;
+                    if (nIndex == ArrFunListView.Count - 1)//最后一个
+                        lsv.Height = this.Height - btnNow.Bottom - 4;
+                    else
+                        lsv.Height = (ArrFunButton[i + 1] as Button).Top - btnNow.Bottom;
+                    //将当前ListView显示出来
+                    if (!lsv.Visible)
+                        lsv.Visible = true;
+                }
+                else //隐藏其他listview
+                {
+                    if (lsv.Visible)
+                        lsv.Visible = false;
+                }
+            }
+        }
+
+        //隐藏后鼠标在本工具条上移动时,将它显示出来
+        private void FunListView_MouseMove(object sender, MouseEventArgs e)
+        {
+            if (this.Width == m_nPanFunHideWidth)
+            {
+                this.Width = m_nPanFunWidth;
+                this.timer1.Enabled = true;
+            }
+        }
+
+        //双击listview后根据当前项执行操作
+        private void lsvFun_DoubleClick(object sender, System.EventArgs e)
+        {
+            //双击后执行一个功能
+            ListView lsv = sender as ListView;
+            if (lsv == null)
+                return;
+            if (lsv.SelectedItems.Count == 0)
+                return;
+            ListViewItem item = lsv.SelectedItems[0];
+            MessageBox.Show("你双击了:" + item.Text);
+        }
+       
+    }
+}

+ 123 - 0
UAS-MES/优软MES/CustomControl/AccordionMenu/AccordionMenu.resx

@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>

+ 42 - 0
UAS-MES/优软MES/CustomControl/CustomTabControl/CustomTabControl.Designer.cs

@@ -0,0 +1,42 @@
+namespace 优软MES.CustomControl
+{
+    partial class CustomTabControl
+    {
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.SuspendLayout();
+            // 
+            // CustomTabControl
+            // 
+            this.Name = "CustomTabControl";
+            this.Size = new System.Drawing.Size(336, 136);
+            this.ResumeLayout(false);
+        }
+
+        #endregion
+    }
+}

+ 330 - 0
UAS-MES/优软MES/CustomControl/CustomTabControl/CustomTabControl.cs

@@ -0,0 +1,330 @@
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+using System.Drawing.Drawing2D;
+using 优软MES;
+using System.Runtime.InteropServices;
+
+namespace 优软MES.CustomControl
+{
+    [ToolboxBitmap(typeof(TabControl))]
+    public partial class CustomTabControl : TabControl
+    {
+        const int CLOSE_SIZE = 16;
+        //   Bitmap image = new Bitmap("../../Resources/close.png");
+        public CustomTabControl() : base()
+        {
+            //首先判断选择的是什么样式
+            if (this._DisplayManager.Equals(TabControlDisplayManager.Custom))
+            {
+                //是否由系统绘制,true表示自行绘制
+                this.SetStyle(ControlStyles.UserPaint, true);
+                this.ItemSize = new Size(0, 15);
+                this.Padding = new Point(9, 0);
+            }
+            this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
+            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
+            this.SetStyle(ControlStyles.ResizeRedraw, true);
+            this.ResizeRedraw = true;
+        }
+
+        //用户选择样式
+        TabControlDisplayManager _DisplayManager = TabControlDisplayManager.Custom;
+
+        [System.ComponentModel.DefaultValue(typeof(TabControlDisplayManager), "Custom")]
+        public TabControlDisplayManager DisplayManager
+        {
+            get
+            {
+                return this._DisplayManager;
+            }
+            set
+            {
+                if (this._DisplayManager != value)
+                {
+                    if (this._DisplayManager.Equals(TabControlDisplayManager.Custom))
+                    {
+                        this.SetStyle(ControlStyles.UserPaint, true);
+                        this.ItemSize = new Size(0, 15);
+                        this.Padding = new Point(9, 0);
+                    }
+                    else
+                    {
+                        this.ItemSize = new Size(0, 0);
+                        this.Padding = new Point(6, 3);
+                        this.SetStyle(ControlStyles.UserPaint, false);
+                    }
+                }
+            }
+        }
+
+        protected override void OnPaintBackground(PaintEventArgs pevent)
+        {
+            //是否绘制该控件
+            if (this.DesignMode == true)
+            {
+                LinearGradientBrush backBrush = new LinearGradientBrush(
+                            this.Bounds,
+                            SystemColors.ControlLightLight,
+                            SystemColors.ControlLight,
+                            LinearGradientMode.Vertical);
+                pevent.Graphics.FillRectangle(backBrush, this.Bounds);
+                backBrush.Dispose();
+            }
+            else
+            {
+                this.PaintTransparentBackground(pevent.Graphics, this.ClientRectangle);
+            }
+        }
+
+        protected void PaintTransparentBackground(Graphics g, Rectangle clipRect)
+        {
+            if ((this.Parent != null))
+            {
+                clipRect.Offset(this.Location);
+                PaintEventArgs e = new PaintEventArgs(g, clipRect);
+                GraphicsState state = g.Save();
+                g.SmoothingMode = SmoothingMode.HighSpeed;
+                try
+                {
+                    g.TranslateTransform((float)-this.Location.X, (float)-this.Location.Y);
+                    this.InvokePaintBackground(this.Parent, e);
+                    this.InvokePaint(this.Parent, e);
+                }
+                finally
+                {
+                    g.Restore(state);
+                    clipRect.Offset(-this.Location.X, -this.Location.Y);
+                }
+            }
+            else
+            {
+                LinearGradientBrush backBrush = new LinearGradientBrush(this.Bounds, SystemColors.ControlLightLight, SystemColors.ControlLight, System.Drawing.Drawing2D.LinearGradientMode.Vertical);
+                g.FillRectangle(backBrush, this.Bounds);
+                backBrush.Dispose();
+            }
+        }
+        //将组件绘制到界面,加载的时候执行
+        protected override void OnPaint(PaintEventArgs e)
+        {
+
+            //  Paint the Background
+            this.PaintTransparentBackground(e.Graphics, this.ClientRectangle);
+            //绘制所有的tabPage
+            this.PaintAllTheTabs(e);
+            //绘制tabPage的边框
+            this.PaintTheTabPageBorder(e);
+            //选中的tabPage去除边框
+            this.PaintTheSelectedTab(e);
+        }
+
+        //也是调用PaintTab循环绘制出来的
+        private void PaintAllTheTabs(System.Windows.Forms.PaintEventArgs e)
+        {
+            if (this.TabCount > 0)
+            {
+                for (int index = 0; index < this.TabCount; index++)
+                {
+                    this.PaintTab(e, index);
+                }
+            }
+        }
+        //绘制tab
+        private void PaintTab(PaintEventArgs e, int index)
+        {
+            GraphicsPath path = this.GetPath(index);
+            this.PaintTabBackground(e.Graphics, index, path);
+            this.PaintTabBorder(e.Graphics, index, path);
+            this.PaintTabText(e.Graphics, index);
+            this.PaintTabImage(e.Graphics, index);
+        }
+
+        private void PaintTabBackground(Graphics graph, int index, GraphicsPath path)
+        {
+            Rectangle rect = this.GetTabRect(index);
+            Brush buttonBrush =
+                new LinearGradientBrush(
+                    rect,
+                    SystemColors.ControlLightLight,
+                    SystemColors.ControlLight,
+                    LinearGradientMode.Vertical);
+
+            if (index == this.SelectedIndex)
+            {
+                buttonBrush = new SolidBrush(SystemColors.ControlLightLight);
+            }
+
+            graph.FillPath(buttonBrush, path);
+            buttonBrush.Dispose();
+        }
+        //绘制边框
+        private void PaintTabBorder(Graphics graph, int index, GraphicsPath path)
+        {
+            Pen borderPen = new Pen(SystemColors.ControlDark);
+
+            if (index == this.SelectedIndex)
+            {
+                borderPen = new Pen(ThemedColors.ToolBorder);
+            }
+            graph.DrawPath(borderPen, path);
+            borderPen.Dispose();
+        }
+
+        private void PaintTabImage(System.Drawing.Graphics graph, int index)
+        {
+            Image tabImage = null;
+            if (this.TabPages[index].ImageIndex > -1 && this.ImageList != null)
+            {
+                tabImage = this.ImageList.Images[this.TabPages[index].ImageIndex];
+            }
+            else if (this.TabPages[index].ImageKey.Trim().Length > 0 && this.ImageList != null)
+            {
+                tabImage = this.ImageList.Images[this.TabPages[index].ImageKey];
+            }
+            if (tabImage != null)
+            {
+                Rectangle rect = this.GetTabRect(index);
+                graph.DrawImage(tabImage, rect.Right - rect.Height + 5, 4, rect.Height - 2, rect.Height - 2);
+            }
+        }
+        //绘制文字
+        private void PaintTabText(Graphics graph, int index)
+        {
+            Rectangle rect = this.GetTabRect(index);
+            Rectangle rect2 = new Rectangle(rect.Left + 8, rect.Top + 1, rect.Width - 6, rect.Height);
+            if (index == 0)
+            {
+                rect2 = new Rectangle(rect.Left + rect.Height, rect.Top + 1, rect.Width - rect.Height, rect.Height);
+            }
+            else
+            {
+                rect2 = new Rectangle(rect.Left + rect.Height - 5, rect.Top + 1, rect.Width - rect.Height + 5, rect.Height);
+            }
+
+            string tabtext = this.TabPages[index].Text;
+
+            StringFormat format = new StringFormat();
+            //字符串的水平和垂直对齐方式
+            format.Alignment = StringAlignment.Near;
+            format.LineAlignment = StringAlignment.Center;
+            format.Trimming = StringTrimming.EllipsisCharacter;
+
+            Brush forebrush = null;
+
+            if (this.TabPages[index].Enabled == false)
+            {
+                forebrush = SystemBrushes.ControlDark;
+            }
+            else
+            {
+                forebrush = SystemBrushes.ControlText;
+            }
+            Font tabFont = this.Font;
+            //选中了之后文本加粗
+            if (index == this.SelectedIndex)
+            {
+                tabFont = new Font(this.Font, FontStyle.Bold);
+                if (index == 0)
+                {
+                    //第一个的时候做特殊处理,调整文字的位置
+                    rect2 = new Rectangle(rect.Left + rect.Height, rect.Top + 1, rect.Width - rect.Height + 5, rect.Height);
+                }
+
+            }
+            graph.DrawString(tabtext, tabFont, forebrush, rect2, format);
+        }
+        //绘制边框
+        private void PaintTheTabPageBorder(System.Windows.Forms.PaintEventArgs e)
+        {
+            if (this.TabCount > 0)
+            {
+                Rectangle borderRect = this.TabPages[0].Bounds;
+                borderRect.Inflate(1, 1);
+                ControlPaint.DrawBorder(e.Graphics, borderRect, ThemedColors.ToolBorder, ButtonBorderStyle.Solid);
+            }
+        }
+        //选中tabPage的时候去除下边框
+        private void PaintTheSelectedTab(System.Windows.Forms.PaintEventArgs e)
+        {
+            Rectangle selrect;
+            int selrectRight = 0;
+
+            switch (this.SelectedIndex)
+            {
+                case -1:
+                    break;
+                case 0:
+                    selrect = this.GetTabRect(this.SelectedIndex);
+                    selrectRight = selrect.Right;
+                    e.Graphics.DrawLine(SystemPens.ControlLightLight, selrect.Left + 2, selrect.Bottom + 1, selrectRight + 8, selrect.Bottom + 1);
+                    break;
+                default:
+                    selrect = this.GetTabRect(this.SelectedIndex);
+                    selrectRight = selrect.Right;
+                    e.Graphics.DrawLine(SystemPens.ControlLightLight, selrect.Left + 11, selrect.Bottom + 1, selrectRight + 5, selrect.Bottom + 1);
+                    break;
+            }
+        }
+        //绘制tabPage的形状
+        private GraphicsPath GetPath(int index)
+        {
+            GraphicsPath path = new GraphicsPath();
+            path.Reset();
+
+            Rectangle rect = this.GetTabRect(index);
+
+            if (index == 0)
+            {   //画线的地方,采用两个点相连的方式,需要设置x1,y1,x2,y2四个坐标
+                path.AddLine(rect.Left + 1, rect.Bottom + 1, rect.Left + rect.Height, rect.Top + 2);
+                path.AddLine(rect.Left + rect.Height + 4, rect.Top, rect.Right + 8, rect.Top);
+                path.AddLine(rect.Right + 10, rect.Top + 2, rect.Right + 10, rect.Bottom + 1);
+            }
+            else
+            {
+                if (index == this.SelectedIndex)
+                {
+                    path.AddLine(rect.Left + 12, rect.Top + 5, rect.Left + 15, rect.Top + 2);
+                    path.AddLine(rect.Left + 19, rect.Top, rect.Right + 8, rect.Top);
+                    path.AddLine(rect.Right + 10, rect.Top + 2, rect.Right + 10, rect.Bottom + 1);
+                    path.AddLine(rect.Right + 10, rect.Bottom + 1, rect.Left + 11, rect.Bottom + 1);
+                }
+                else
+                {
+                    path.AddLine(rect.Left + 12, rect.Top + 5, rect.Left + 15, rect.Top + 2);
+                    path.AddLine(rect.Left + 19, rect.Top, rect.Right + 8, rect.Top);
+                    path.AddLine(rect.Right + 10, rect.Top + 2, rect.Right + 10, rect.Bottom + 1);
+                    path.AddLine(rect.Right + 10, rect.Bottom + 1, rect.Left + 11, rect.Bottom + 1);
+                }
+            }
+            return path;
+        }
+        //枚举类型 多个风格的界面
+        public enum TabControlDisplayManager
+        {
+            Default,
+            Custom
+        }
+
+        [DllImport("user32.dll")]
+        private static extern IntPtr SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);
+
+        private const int WM_SETFONT = 0x30;
+        private const int WM_FONTCHANGE = 0x1d;
+        //在启动时
+        protected override void OnCreateControl()
+        {
+            base.OnCreateControl();
+            this.OnFontChanged(EventArgs.Empty);
+        }
+        //设置字体后自适应改变宽高
+        protected override void OnFontChanged(EventArgs e)
+        {
+            base.OnFontChanged(e);
+            IntPtr hFont = this.Font.ToHfont();
+            SendMessage(this.Handle, WM_SETFONT, hFont, (IntPtr)(-1));
+            SendMessage(this.Handle, WM_FONTCHANGE, IntPtr.Zero, IntPtr.Zero);
+            this.UpdateStyles();
+            this.ItemSize = new Size(0, this.Font.Height + 2);
+        }
+    }
+}

+ 120 - 0
UAS-MES/优软MES/CustomControl/CustomTabControl/CustomTabControl.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 91 - 0
UAS-MES/优软MES/CustomControl/CustomTabControl/ThemedColors.cs

@@ -0,0 +1,91 @@
+using System.Windows.Forms;
+using System.Windows.Forms.VisualStyles;
+using System.Drawing;
+
+
+namespace 优软MES
+{
+    class ThemedColors
+    {
+        #region "    Variables and Constants "
+        private const string NormalColor = "NormalColor";
+        private const string HomeStead = "HomeStead";
+        private const string Metallic = "Metallic";
+        private const string NoTheme = "NoTheme";
+        private static Color[] _toolBorder;
+        #endregion
+        #region "    Properties "
+        public static int CurrentThemeIndex
+        {
+            get
+            {
+                return ThemedColors.GetCurrentThemeIndex();
+            }
+        }
+        public static string CurrentThemeName
+        {
+            get
+            {
+                return ThemedColors.GetCurrentThemeName();
+            }
+        }
+        public static Color ToolBorder
+        {
+            get
+            {
+                return ThemedColors._toolBorder[ThemedColors.CurrentThemeIndex];
+            }
+        }
+        #endregion
+        #region "    Constructors "
+        private ThemedColors()
+        {
+        }
+        static ThemedColors()
+        {
+            Color[] colorArray1;
+            colorArray1 = new Color[] { Color.FromArgb(127, 157, 185), Color.FromArgb(164, 185, 127), Color.FromArgb(165, 172, 178), Color.FromArgb(132, 130, 132) };
+            ThemedColors._toolBorder = colorArray1;
+        }
+        #endregion
+        private static int GetCurrentThemeIndex()
+        {
+            int theme = (int)ColorScheme.NoTheme;
+            if (VisualStyleInformation.IsSupportedByOS && VisualStyleInformation.IsEnabledByUser && Application.RenderWithVisualStyles)
+            {
+                switch (VisualStyleInformation.ColorScheme)
+                {
+                    case NormalColor:
+                        theme = (int)ColorScheme.NormalColor;
+                        break;
+                    case HomeStead:
+                        theme = (int)ColorScheme.HomeStead;
+                        break;
+                    case Metallic:
+                        theme = (int)ColorScheme.Metallic;
+                        break;
+                    default:
+                        theme = (int)ColorScheme.NoTheme;
+                        break;
+                }
+            }
+            return theme;
+        }
+        private static string GetCurrentThemeName()
+        {
+            string theme = NoTheme;
+            if (VisualStyleInformation.IsSupportedByOS && VisualStyleInformation.IsEnabledByUser && Application.RenderWithVisualStyles)
+            {
+                theme = VisualStyleInformation.ColorScheme;
+            }
+            return theme;
+        }
+        public enum ColorScheme
+        {
+            NormalColor = 0,
+            HomeStead = 1,
+            Metallic = 2,
+            NoTheme = 3
+        }
+    }
+}

+ 83 - 0
UAS-MES/优软MES/CustomControl/HeadBar/HeadBar.Designer.cs

@@ -0,0 +1,83 @@
+namespace 优软MES.CustomControl
+{
+    partial class HeadBar
+    {
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HeadBar));
+            this.CloseWindow = new System.Windows.Forms.PictureBox();
+            this.MinWindow = new System.Windows.Forms.PictureBox();
+            this.label1 = new System.Windows.Forms.Label();
+            ((System.ComponentModel.ISupportInitialize)(this.CloseWindow)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.MinWindow)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // CloseWindow
+            // 
+            resources.ApplyResources(this.CloseWindow, "CloseWindow");
+            this.CloseWindow.Image = global::优软MES.Properties.Resources.close_32px_1181428_easyicon_net;
+            this.CloseWindow.Name = "CloseWindow";
+            this.CloseWindow.TabStop = false;
+            this.CloseWindow.Click += new System.EventHandler(this.CloseWindow_Click);
+            // 
+            // MinWindow
+            // 
+            resources.ApplyResources(this.MinWindow, "MinWindow");
+            this.MinWindow.Image = global::优软MES.Properties.Resources.Close_up_32px_1181430_easyicon_net;
+            this.MinWindow.Name = "MinWindow";
+            this.MinWindow.TabStop = false;
+            this.MinWindow.Click += new System.EventHandler(this.MinWindow_Click);
+            // 
+            // label1
+            // 
+            resources.ApplyResources(this.label1, "label1");
+            this.label1.ForeColor = System.Drawing.Color.White;
+            this.label1.Name = "label1";
+            // 
+            // HeadBar
+            // 
+            resources.ApplyResources(this, "$this");
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.CloseWindow);
+            this.Controls.Add(this.MinWindow);
+            this.Name = "HeadBar";
+            ((System.ComponentModel.ISupportInitialize)(this.CloseWindow)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.MinWindow)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.PictureBox CloseWindow;
+        private System.Windows.Forms.PictureBox MinWindow;
+        private System.Windows.Forms.Label label1;
+    }
+}

+ 60 - 0
UAS-MES/优软MES/CustomControl/HeadBar/HeadBar.cs

@@ -0,0 +1,60 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Runtime.InteropServices;
+using System.Windows.Forms;
+using 优软MES.PublicMethod;
+
+namespace 优软MES.CustomControl
+{
+    public partial class HeadBar : UserControl
+    {   
+        //需要关闭前提示窗口的在这里加
+        private List<string> NeedConfirm = new List<string>() {"Main"};
+        [DllImport("user32.dll")]
+        public static extern bool ReleaseCapture();
+        [DllImport("user32.dll")]
+        public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
+        public const int WM_SYSCOMMAND = 0x0112;
+        public const int SC_MOVE = 0xF010;
+        public const int HTCAPTION = 0x0002;
+        public HeadBar()
+        {
+            InitializeComponent();
+        }
+        /// <summary>
+        /// 用于对窗体的关闭,判断主窗体的时候退出程序,非主窗体时关闭该窗体,同时回收内存
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        public void CloseWindow_Click(object sender, EventArgs e)
+        {    
+            //判断是否需要关闭前的提示
+            if (NeedConfirm.Contains(this.ParentForm.Name))
+            {
+                MessageBoxButtons messButton = MessageBoxButtons.YesNo;
+                string logout_confirm = MessageBox.Show(this.ParentForm, "是否关闭", "提示", messButton).ToString();
+                if (logout_confirm == "Yes")
+                {
+                    this.ParentForm.Close();
+                }
+            }
+            else {
+                this.ParentForm.Close();
+            }       
+        }
+        /// <summary>
+        /// 最小化父级窗体
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void MinWindow_Click(object sender, EventArgs e)
+        {
+            if (this.ParentForm.WindowState == FormWindowState.Normal) {
+                this.ParentForm.WindowState = FormWindowState.Minimized;
+            }
+        }
+
+      
+    }
+}

+ 216 - 0
UAS-MES/优软MES/CustomControl/HeadBar/HeadBar.resx

@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="CloseWindow.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Bottom, Right</value>
+  </data>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="CloseWindow.Location" type="System.Drawing.Point, System.Drawing">
+    <value>577, 0</value>
+  </data>
+  <data name="CloseWindow.Size" type="System.Drawing.Size, System.Drawing">
+    <value>32, 32</value>
+  </data>
+  <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="CloseWindow.TabIndex" type="System.Int32, mscorlib">
+    <value>3</value>
+  </data>
+  <data name="&gt;&gt;CloseWindow.Name" xml:space="preserve">
+    <value>CloseWindow</value>
+  </data>
+  <data name="&gt;&gt;CloseWindow.Type" xml:space="preserve">
+    <value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;CloseWindow.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;CloseWindow.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="MinWindow.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Bottom, Right</value>
+  </data>
+  <data name="MinWindow.Location" type="System.Drawing.Point, System.Drawing">
+    <value>539, 0</value>
+  </data>
+  <data name="MinWindow.Size" type="System.Drawing.Size, System.Drawing">
+    <value>32, 32</value>
+  </data>
+  <data name="MinWindow.TabIndex" type="System.Int32, mscorlib">
+    <value>2</value>
+  </data>
+  <data name="&gt;&gt;MinWindow.Name" xml:space="preserve">
+    <value>MinWindow</value>
+  </data>
+  <data name="&gt;&gt;MinWindow.Type" xml:space="preserve">
+    <value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;MinWindow.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;MinWindow.ZOrder" xml:space="preserve">
+    <value>2</value>
+  </data>
+  <data name="label1.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="label1.Font" type="System.Drawing.Font, System.Drawing">
+    <value>黑体, 12.75pt</value>
+  </data>
+  <data name="label1.Location" type="System.Drawing.Point, System.Drawing">
+    <value>9, 8</value>
+  </data>
+  <data name="label1.Size" type="System.Drawing.Size, System.Drawing">
+    <value>107, 17</value>
+  </data>
+  <data name="label1.TabIndex" type="System.Int32, mscorlib">
+    <value>4</value>
+  </data>
+  <data name="label1.Text" xml:space="preserve">
+    <value>优软科技MES</value>
+  </data>
+  <data name="&gt;&gt;label1.Name" xml:space="preserve">
+    <value>label1</value>
+  </data>
+  <data name="&gt;&gt;label1.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;label1.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
+    <value>0</value>
+  </data>
+  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
+    <value>6, 12</value>
+  </data>
+  <data name="$this.Size" type="System.Drawing.Size, System.Drawing">
+    <value>612, 32</value>
+  </data>
+  <data name="&gt;&gt;$this.Name" xml:space="preserve">
+    <value>HeadBar</value>
+  </data>
+  <data name="&gt;&gt;$this.Type" xml:space="preserve">
+    <value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+</root>

+ 127 - 0
UAS-MES/优软MES/CustomControl/HeadBar/HeadBar.zu.resx

@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="CloseWindow.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="MinWindow.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+</root>

+ 202 - 0
UAS-MES/优软MES/CustomControl/Pagination/Pagination.Designer.cs

@@ -0,0 +1,202 @@
+namespace 优软MES.CustomControl.Pagination
+{
+    partial class Pagination
+    {
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.panel1 = new System.Windows.Forms.Panel();
+            this.ExportExcel = new System.Windows.Forms.PictureBox();
+            this.ShowItemsNum = new System.Windows.Forms.TextBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.TotalPage = new System.Windows.Forms.Label();
+            this.CurrentPage = new System.Windows.Forms.TextBox();
+            this.PreviousPage = new System.Windows.Forms.PictureBox();
+            this.LastPage = new System.Windows.Forms.PictureBox();
+            this.NextPage = new System.Windows.Forms.PictureBox();
+            this.FirstPage = new System.Windows.Forms.PictureBox();
+            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
+            this.panel1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.ExportExcel)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.PreviousPage)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.LastPage)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.NextPage)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.FirstPage)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // panel1
+            // 
+            this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.panel1.BackColor = System.Drawing.SystemColors.Control;
+            this.panel1.Controls.Add(this.ExportExcel);
+            this.panel1.Controls.Add(this.ShowItemsNum);
+            this.panel1.Controls.Add(this.label2);
+            this.panel1.Controls.Add(this.TotalPage);
+            this.panel1.Controls.Add(this.CurrentPage);
+            this.panel1.Controls.Add(this.PreviousPage);
+            this.panel1.Controls.Add(this.LastPage);
+            this.panel1.Controls.Add(this.NextPage);
+            this.panel1.Controls.Add(this.FirstPage);
+            this.panel1.Location = new System.Drawing.Point(0, 0);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(543, 32);
+            this.panel1.TabIndex = 0;
+            // 
+            // ExportExcel
+            // 
+            this.ExportExcel.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.ExportExcel.Image = global::优软MES.Properties.Resources.excel;
+            this.ExportExcel.Location = new System.Drawing.Point(274, 10);
+            this.ExportExcel.Name = "ExportExcel";
+            this.ExportExcel.Size = new System.Drawing.Size(16, 18);
+            this.ExportExcel.TabIndex = 8;
+            this.ExportExcel.TabStop = false;
+            this.ExportExcel.Click += new System.EventHandler(this.ExportExcel_Click);
+            // 
+            // ShowItemsNum
+            // 
+            this.ShowItemsNum.Location = new System.Drawing.Point(234, 6);
+            this.ShowItemsNum.Name = "ShowItemsNum";
+            this.ShowItemsNum.Size = new System.Drawing.Size(24, 21);
+            this.ShowItemsNum.TabIndex = 7;
+            this.ShowItemsNum.Text = "20";
+            this.ShowItemsNum.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Cursor = System.Windows.Forms.Cursors.Default;
+            this.label2.Location = new System.Drawing.Point(171, 10);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(65, 12);
+            this.label2.TabIndex = 6;
+            this.label2.Text = "显示数量:";
+            // 
+            // TotalPage
+            // 
+            this.TotalPage.AutoSize = true;
+            this.TotalPage.Cursor = System.Windows.Forms.Cursors.Default;
+            this.TotalPage.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.TotalPage.Location = new System.Drawing.Point(87, 5);
+            this.TotalPage.Name = "TotalPage";
+            this.TotalPage.Size = new System.Drawing.Size(0, 20);
+            this.TotalPage.TabIndex = 5;
+            // 
+            // CurrentPage
+            // 
+            this.CurrentPage.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.CurrentPage.Location = new System.Drawing.Point(56, 4);
+            this.CurrentPage.Name = "CurrentPage";
+            this.CurrentPage.Size = new System.Drawing.Size(24, 23);
+            this.CurrentPage.TabIndex = 4;
+            this.CurrentPage.Text = "1";
+            this.CurrentPage.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // PreviousPage
+            // 
+            this.PreviousPage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.PreviousPage.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.PreviousPage.Image = global::优软MES.Properties.Resources.bindingNavigatorMovePreviousItem_Image;
+            this.PreviousPage.Location = new System.Drawing.Point(37, 8);
+            this.PreviousPage.Name = "PreviousPage";
+            this.PreviousPage.Size = new System.Drawing.Size(15, 15);
+            this.PreviousPage.TabIndex = 3;
+            this.PreviousPage.TabStop = false;
+            this.PreviousPage.Click += new System.EventHandler(this.PreviousPage_Click);
+            // 
+            // LastPage
+            // 
+            this.LastPage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.LastPage.Image = global::优软MES.Properties.Resources.bindingNavigatorMoveLastItem_Image;
+            this.LastPage.Location = new System.Drawing.Point(143, 8);
+            this.LastPage.Name = "LastPage";
+            this.LastPage.Size = new System.Drawing.Size(15, 15);
+            this.LastPage.TabIndex = 2;
+            this.LastPage.TabStop = false;
+            this.LastPage.Click += new System.EventHandler(this.LastPage_Click);
+            // 
+            // NextPage
+            // 
+            this.NextPage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.NextPage.Image = global::优软MES.Properties.Resources.bindingNavigatorMoveNextItem_Image;
+            this.NextPage.Location = new System.Drawing.Point(119, 8);
+            this.NextPage.Name = "NextPage";
+            this.NextPage.Size = new System.Drawing.Size(15, 15);
+            this.NextPage.TabIndex = 1;
+            this.NextPage.TabStop = false;
+            this.NextPage.Click += new System.EventHandler(this.NextPage_Click);
+            // 
+            // FirstPage
+            // 
+            this.FirstPage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.FirstPage.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.FirstPage.Image = global::优软MES.Properties.Resources.bindingNavigatorMoveFirstItem_Image;
+            this.FirstPage.Location = new System.Drawing.Point(16, 8);
+            this.FirstPage.Name = "FirstPage";
+            this.FirstPage.Size = new System.Drawing.Size(15, 15);
+            this.FirstPage.TabIndex = 0;
+            this.FirstPage.TabStop = false;
+            this.FirstPage.Click += new System.EventHandler(this.FirstPage_Click);
+            // 
+            // Pagination
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.panel1);
+            this.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Name = "Pagination";
+            this.Size = new System.Drawing.Size(543, 32);
+            this.panel1.ResumeLayout(false);
+            this.panel1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.ExportExcel)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.PreviousPage)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.LastPage)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.NextPage)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.FirstPage)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Panel panel1;
+        private System.Windows.Forms.TextBox ShowItemsNum;
+        private System.Windows.Forms.Label TotalPage;
+        private System.Windows.Forms.TextBox CurrentPage;
+        private System.Windows.Forms.PictureBox PreviousPage;
+        private System.Windows.Forms.PictureBox LastPage;
+        private System.Windows.Forms.PictureBox NextPage;
+        private System.Windows.Forms.PictureBox FirstPage;
+        private System.Windows.Forms.PictureBox ExportExcel;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
+    }
+}

+ 111 - 0
UAS-MES/优软MES/CustomControl/Pagination/Pagination.cs

@@ -0,0 +1,111 @@
+using System;
+using System.Data;
+using System.Windows.Forms;
+using 优软MES.DataOperate;
+
+namespace 优软MES.CustomControl.Pagination
+{
+    public partial class Pagination : UserControl
+    {
+        //申明一些全局变量用来在函数之间传递参数
+        int PageSize;
+        int Current_Page;
+        int TotalPageCount;
+        string TableName;
+        string[] Field;
+        DataGridView Dgv;
+        DataTable dt;
+      
+        public Pagination()
+        {
+            InitializeComponent();
+        }
+        /// <summary>
+        /// 将数据绑定到数据源
+        /// </summary>
+        /// <param name="dgv"></param>
+        /// <param name="TableName"></param>
+        /// <param name="Field"></param>
+        public void BindDataToNavigator(DataGridView dgv,string tableName,string[] field) {
+            DataHelper dh = new DataHelper();
+            //将传来的值赋给全局变量
+            Dgv = dgv;
+            TableName = tableName;
+            Field = field;
+           
+            //绑定的数据源
+            BindingSource bs = new BindingSource();
+            //每页显示的数据数量
+            PageSize = int.Parse(this.ShowItemsNum.Text);
+            //当前在多少页
+            Current_Page = int.Parse(this.CurrentPage.Text);
+            //获取记录的总行数
+            int RowCount = dh.getRowCount(TableName);
+            //分页获取数据,先取第一页的
+            dt = dh.getFieldsDatasByPageing(TableName, Field, Current_Page, PageSize);
+            //给BindingSource指定一个DataTable
+            bs.DataSource = dt;
+            //取模后+1来确定总的页数
+            TotalPageCount = RowCount / PageSize + 1;
+            //设置总页数Label显示的值
+            this.TotalPage.Text ="/ "+TotalPageCount.ToString();
+            //给父控件的DataGridView绑定数据
+            dgv.DataSource = dt;
+        }
+        //获取分页的数据
+        public void GetPageData()
+        {
+             BindingSource bs = new BindingSource();
+             DataHelper dh = new DataHelper();
+             this.TotalPage.Text = "/ " + TotalPageCount.ToString();
+             CurrentPage.Text = Current_Page.ToString();
+             dt = dh.getFieldsDatasByPageing(TableName, Field, Current_Page, PageSize);
+             bs.DataSource = dt;
+             Dgv.DataSource = bs;     
+        }
+        //第一页
+        private void FirstPage_Click(object sender, EventArgs e)
+        {
+            Current_Page = 1;
+            GetPageData();
+        }
+        //往前翻一页
+        private void PreviousPage_Click(object sender, EventArgs e)
+        {
+            if (Current_Page > 1) {
+                Current_Page--;
+            }
+            GetPageData();
+        }
+        //往后翻一页
+        private void NextPage_Click(object sender, EventArgs e)
+        {
+            if (Current_Page < 6) {
+                Current_Page++;
+            }
+            GetPageData();
+        }
+        //最后一页
+        private void LastPage_Click(object sender, EventArgs e)
+        {
+            Current_Page = TotalPageCount;
+            CurrentPage.Text = TotalPageCount.ToString();
+            GetPageData();
+        }
+
+        private void ExportExcel_Click(object sender, EventArgs e)
+        {
+            folderBrowserDialog1.Description = "选择导出的路径";
+            DialogResult result = folderBrowserDialog1.ShowDialog();
+            if (result == DialogResult.OK) {
+                string FolderPath = folderBrowserDialog1.SelectedPath;
+                DataHelper dh = new DataHelper();
+                ExcelHandler eh = new ExcelHandler();
+                DataTable dt = new DataTable();
+                dt = dh.getFieldsDatas(TableName, Field);
+                eh.ExportExcel(dt, FolderPath);
+                MessageBox.Show("导出Excel成功");
+            }
+        }
+    }
+}

+ 123 - 0
UAS-MES/优软MES/CustomControl/Pagination/Pagination.resx

@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>

+ 61 - 0
UAS-MES/优软MES/CustomControl/ProcessBar/ProcessBar.Designer.cs

@@ -0,0 +1,61 @@
+namespace 优软MES.CustomControl
+{
+    partial class ProcessBar
+    {
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.pictureBox1 = new System.Windows.Forms.PictureBox();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // pictureBox1
+            // 
+            this.pictureBox1.BackColor = System.Drawing.SystemColors.ButtonHighlight;
+            this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.pictureBox1.Location = new System.Drawing.Point(0, 0);
+            this.pictureBox1.Name = "pictureBox1";
+            this.pictureBox1.Size = new System.Drawing.Size(428, 40);
+            this.pictureBox1.TabIndex = 0;
+            this.pictureBox1.TabStop = false;
+            // 
+            // ProcessBar
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.pictureBox1);
+            this.Name = "ProcessBar";
+            this.Size = new System.Drawing.Size(428, 40);
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.PictureBox pictureBox1;
+    }
+}

+ 210 - 0
UAS-MES/优软MES/CustomControl/ProcessBar/ProcessBar.cs

@@ -0,0 +1,210 @@
+using System;
+using System.Drawing;
+using System.Threading;
+using System.Windows.Forms;
+
+namespace 优软MES.CustomControl
+{
+    public partial class ProcessBar : UserControl
+    {
+        public delegate void TaskHandler(ref float percentage);
+        private Thread _monitorThread = null;
+        private Thread _workerThread = null;
+        private float _percentage = 0f;
+        private ProcessBarStatue _currentStatue = ProcessBarStatue.UnStarted;
+        private TaskHandler _task = null;
+        public ProcessBar()
+        {
+            InitializeComponent();
+            this._monitorThread = new Thread(new ThreadStart(Monitor));
+        }
+        /// <summary>
+        /// 任务委托
+        /// 多次对该属性赋值会造成不必要的浪费
+        /// </summary>
+        public TaskHandler Task
+        {
+            set
+            {
+                //任务线程 通过传入引用类型参数获得实时的进度变更 
+                this._workerThread = new Thread(() => value(ref _percentage));
+                this._task = value;
+            }
+        }
+        /// <summary>
+        /// 外部也可以实时获取当前任务进度
+        /// </summary>
+        public float Percentage
+        {
+            get
+            {
+                return this._percentage;
+            }
+        }
+        /// <summary>
+        /// 外部实时获取当前任务状态
+        /// </summary>
+        public ProcessBarStatue CurrentStatue
+        {
+            get
+            {
+                return this._currentStatue;
+            }
+        }
+
+        public void Run()
+        {
+            if (this._workerThread == null)
+            {
+                throw new NullReferenceException("Task委托不能为空!");
+            }
+            //初次启动 需要同时启动工作线程和监听线程
+            if (this._currentStatue == ProcessBarStatue.UnStarted)
+            {
+                _monitorThread.IsBackground = true;
+                _monitorThread.Start();
+                _workerThread.IsBackground = true;
+                _workerThread.Start();
+                this._currentStatue = ProcessBarStatue.Running;
+            }
+            //被终止后第二次启动 只需要重启工作线程就可以 
+            else if (this._currentStatue == ProcessBarStatue.Aborted)
+            {
+                this._currentStatue = ProcessBarStatue.Running;
+                //若原工作线程已经终止 则重新初始化工作线程
+                if (this._workerThread.ThreadState == ThreadState.Aborted)
+                {
+                    this._workerThread = null;
+                    this._workerThread = new Thread(() => _task(ref _percentage));
+                }
+                _workerThread.IsBackground = true;
+                _workerThread.Start();
+            }
+            else
+            {
+                throw new InvalidOperationException("已经开始的任务无法再次开始!");
+            }
+        }
+
+        public void Stop()
+        {
+            if (_workerThread == null)
+            {
+                throw new NullReferenceException("Task委托不能为空!");
+            }
+            if (this._currentStatue == ProcessBarStatue.Aborted)
+            {
+                throw new InvalidOperationException("已经终止的操作无法暂停!");
+            }
+            if (this._currentStatue != ProcessBarStatue.Suspended)
+            {
+                _workerThread.Suspend();
+                _monitorThread.Suspend();
+                this._currentStatue = ProcessBarStatue.Suspended;
+            }
+
+        }
+
+        public void Resume()
+        {
+            if (_workerThread == null)
+            {
+                throw new NullReferenceException("Task委托不能为空!");
+            }
+            if (this._currentStatue == ProcessBarStatue.Aborted)
+            {
+                throw new InvalidOperationException("已经终止的操作无法继续!");
+            }
+            if (this._currentStatue == ProcessBarStatue.Suspended)
+            {
+                _monitorThread.Resume();
+                _workerThread.Resume();
+                this._currentStatue = ProcessBarStatue.Running;
+            }
+
+        }
+        public void Abort()
+        {
+            if (this._workerThread == null)
+            {
+                throw new NullReferenceException("Task委托不能为空!");
+            }
+            if (this._currentStatue != ProcessBarStatue.Aborted)
+            {
+                //若之前为Suspended状态 则需要先Resume才可以终止工作线程
+                this.Resume();
+                _workerThread.Abort();
+                this._currentStatue = ProcessBarStatue.Aborted;
+            }
+        }
+
+        private void Monitor()
+        {
+            //外层无限循环 监听标志变量的改变
+            while (true)
+            {
+                //当UI调用Start方法时监听线程首次启动并设置标志变量为Running
+                if (this._currentStatue == ProcessBarStatue.Running)
+                {
+                    //在此循环中监听_percetage变量的改变情况 由于该变量作为引用参数传入Task委托 所以可以得到实时的进度
+                    while (this._percentage <= 1f)
+                    {
+                        //调用Draw方法更新UI
+                        using (var graphic = pictureBox1.CreateGraphics())
+                        {
+                            if (this.pictureBox1.InvokeRequired)
+                            {
+                                this.Invoke(new Action(() => Draw(this._percentage, graphic)));
+                            }
+                            else
+                            {
+                                this.Draw(this._percentage, graphic);
+                            }
+
+                            Thread.Sleep(10);//重绘间隔为10ms
+                            //当发现标志变量改变为终止时跳出 回到最外层监听标志变量的循环
+                            if (this._currentStatue == ProcessBarStatue.Aborted)
+                            {
+                                this._percentage = 0f;//将百分比重置为0
+                                if (this.pictureBox1.InvokeRequired)//将绘图区清空
+                                {
+                                    this.Invoke(new Action(() => this.Clear(graphic)));
+                                }
+                                else
+                                {
+                                    this.Clear(graphic);
+                                }
+                                break;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        /// <summary>
+        /// 如果要更改进度条显示的形式 则继承当前类 重写Draw方法
+        /// </summary>
+        /// <param name="percentage"></param>
+        /// <param name="graphic"></param>
+        protected virtual void Draw(float percentage, Graphics graphic)
+        {
+            graphic.FillRectangle(Brushes.Black, 0f, 0f, _percentage * pictureBox1.Width, pictureBox1.Height);
+        }
+        /// <summary>
+        /// 若需要更改进度条默认颜色 背景 则继承当前类 重写Clear方法
+        /// </summary>
+        /// <param name="graphic"></param>
+        private void Clear(Graphics graphic)
+        {
+            graphic.Clear(Color.White);
+        }
+        public enum ProcessBarStatue
+        {
+            UnStarted,
+            Running,
+            Suspended,
+            Aborted
+        }
+    }
+}

+ 120 - 0
UAS-MES/优软MES/CustomControl/ProcessBar/ProcessBar.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 36 - 0
UAS-MES/优软MES/CustomControl/TransparentLabel/TransparentLabel.Designer.cs

@@ -0,0 +1,36 @@
+namespace 优软MES.CustomControl.TransparentLabel
+{
+    partial class TransparentLabel
+    {
+        /// <summary>
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary>
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            components = new System.ComponentModel.Container();
+        }
+
+        #endregion
+    }
+}

+ 29 - 0
UAS-MES/优软MES/CustomControl/TransparentLabel/TransparentLabel.cs

@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace 优软MES.CustomControl.TransparentLabel
+{
+    public partial class TransparentLabel : Label
+    {
+        public TransparentLabel()
+        {
+            InitializeComponent();
+        }
+
+        protected override void OnPaint(PaintEventArgs pe)
+        {
+            pe.Graphics.DrawString(this.Text, this.Font, new SolidBrush(this.ForeColor), this.ClientRectangle);
+            this.Parent.Controls.Add(this);
+            this.ImageIndex = 20;
+            this.BackColor = Color.Transparent;
+            base.OnPaint(pe);
+        }
+    }
+}

+ 168 - 0
UAS-MES/优软MES/DataOperate/DataHelper.cs

@@ -0,0 +1,168 @@
+using Oracle.DataAccess.Client;
+using System.Configuration;
+using System.Data;
+using System;
+
+namespace 优软MES.DataOperate
+{
+
+    class DataHelper
+    {
+        public static readonly string ConnectionStrings = ConfigurationSettings.AppSettings["DatabaseConnection"];
+        OracleCommand command = null;
+        OracleConnection connection = new OracleConnection(ConnectionStrings);
+
+        public DataHelper() {
+            connection.Open();
+        }
+
+        /// <summary>
+        /// 根据表名获取该表字段数据类型
+        /// </summary>
+        public DataTable getColumnDataType(string TableName) {
+            DataTable dt = new DataTable();
+            command = new OracleCommand("select Column_Name,Data_Type from cols where TABLE_name=upper('"+TableName+"')", connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.Fill(dt);
+            return dt;
+        }
+
+        /// <summary>
+        /// 获取第一行第一列的信息
+        /// </summary>
+        public object getFieldDataByCondition(string TableName,string Field,string Condition) {
+            DataTable dt = new DataTable();
+            string sql = "select "+Field+" from " +TableName +" where "+Condition;
+            command = new OracleCommand();
+            command.CommandText = sql;
+            OracleDataAdapter ad = new OracleDataAdapter();
+            ad.SelectCommand = command;
+            ad.Fill(dt);
+            return dt.Rows[0][0];
+        }
+
+        /// <summary>
+        /// 获取指定表的数量
+        /// </summary>
+        /// <returns></returns>
+        public int getRowCount(string TableName) {
+            DataTable dt = new DataTable();
+            string sql = "select count(1) from "+TableName;
+            command = new OracleCommand(sql, connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.Fill(dt);
+            int count =int.Parse(dt.Rows[0][0].ToString());
+            return count;
+        }
+
+        /// <summary>
+        /// 通过表名和获取单行的记录
+        /// </summary>
+        public DataTable getFieldsDataByCondition(string TableName,string[] Fields,string Condition) {
+            DataTable dt = new DataTable();
+            string sql = "select " ;
+            sql += AddField(Fields);
+            sql += " from " + TableName + " where " + Condition +"and rownum=1";
+            Console.Write(sql);
+            command = new OracleCommand(sql, connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.Fill(dt);
+            return dt;
+        }
+
+        /// <summary>
+        /// 将DataTable导入到指定的表中
+        /// </summary>
+        /// <param name="DataTable"></param>
+        /// <param name="TableName"></param>
+        public void InsertDataTable(DataTable DataTable ,string TableName) {
+            for (int i = 0; i < DataTable.Rows.Count; i++) {
+                for (int j = 0; j < DataTable.Columns.Count; j++) {
+
+                }
+            }
+        }
+
+        /// <summary>
+        /// 通过表名,字段获取DataTable类型的分页数据
+        /// </summary>
+        // SELECT * FROM (SELECT  RN A.*, ROWNUM  FROM (SELECT* FROM datalist) A WHERE ROWNUM <= 50) WHERE RN >= 21
+        public DataTable getFieldsDatasByPageing(string TableName,string[] Fields,int CurrentPage,int PageSize) {
+            string sql = "select * from (select ROWNUM RN,A.* from (select ";
+            DataTable dt = new DataTable();
+            sql += AddField(Fields);
+            sql += " from " + TableName +") A where ROWNUM <="+CurrentPage*PageSize+") where RN>"+ (CurrentPage - 1)* PageSize;
+            command = new OracleCommand(sql, connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.Fill(dt);
+            return dt;
+        }
+
+        /// <summary>
+        /// 通过表名,字段和条件获取DataTable类型的数据
+        /// </summary>
+        public DataTable getFieldsDatasByCondition(string TableName, string[] Fields, string Condition)
+        {
+            DataTable dt = new DataTable();
+            string sql = "select ";
+            sql += AddField(Fields);
+            sql += " from " + TableName + "where " + Condition;
+            command = new OracleCommand(sql, connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.Fill(dt);
+            return dt;
+        }
+
+        /// <summary>
+        /// 通过表名,字段获取DataTable类型的数据
+        /// </summary>
+        public DataTable getFieldsDatas(string TableName, string[] Fields)
+        {
+            DataTable dt = new DataTable();
+            string sql = "select ";
+            sql += AddField(Fields);
+            sql += " from " + TableName;
+            command = new OracleCommand(sql, connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.Fill(dt);
+            return dt;
+        }
+        /// <summary>
+        /// 根据指定条件更新Table
+        /// </summary>
+        /// <param name="TableName"></param>
+        /// <param name="UpdateStatement"></param>
+        /// <param name="Condition"></param>
+        public void UpDateTableByCondition(string TableName,string UpdateStatement,string Condition) {
+
+        }
+        /// <summary>
+        /// 执行SQL的方法获取数据
+        /// </summary>
+        /// <param name="SQL"></param>
+        /// <returns></returns>
+        public DataTable ExecuteSql(string SQL) {
+            DataTable dt = new DataTable();
+            command = new OracleCommand(SQL, connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.Fill(dt);
+            return dt;
+        }
+
+        public string AddField(string[]  Fields) {
+            string sql = " " ;
+            foreach (string field in Fields)
+            {
+                if (!field.Equals(Fields[Fields.Length - 1]))
+                {
+                    sql += field + ",";
+                }
+                else
+                {
+                    sql += field;
+                }
+            }
+            return sql;
+        }
+    }
+}

+ 76 - 0
UAS-MES/优软MES/DataOperate/ExcelHandler.cs

@@ -0,0 +1,76 @@
+using System.IO;
+using System.Data;
+using System;
+using NPOI.HSSF.UserModel;
+using NPOI.SS.UserModel;
+
+namespace 优软MES.DataOperate
+{
+    class ExcelHandler
+    {
+        DataHelper dh = new DataHelper();
+        /// <summary>
+        /// 导出Excel
+        /// </summary
+        public  void ExportExcel(DataTable dt,string FolderPath) {
+            //创建一个内存流,用来接收转换成Excel的内容
+            MemoryStream ms;
+            ms = DataTableToExcel(dt);
+            //以系统当前时间命名文件,FileMode.Create表示创建文件,FileAccess.Write表示拥有写的权限
+            FileStream fs = new FileStream(@FolderPath+"\\"+DateTime.Now.ToString("yyyyMMddHHmmss") +".xls", FileMode.Create, FileAccess.Write);
+            byte[] data = ms.ToArray();
+            fs.Write(data, 0, data.Length);
+            fs.Flush();
+            //释放当前Excel文件,否则打开文件的时候会显示文件被占用
+            ms.Dispose();
+            fs.Dispose();
+        }
+
+        /// <summary>
+        /// 导入Excel
+        /// </summary>
+        public void ImportExcel(DataTable DataTable, string TableName) {
+            
+        }
+        /// <summary>
+        /// 将DataTable形式的数据转成Excel格式的,然后用字节流的形式写入文件
+        /// </summary>
+        /// <param name="DataTable"></param>
+        /// <returns></returns>
+        public MemoryStream  DataTableToExcel(DataTable DataTable) {
+           
+            //创建内存流
+            MemoryStream ms=new MemoryStream();
+            //创建一个Book,相当于一个Excel文件
+            HSSFWorkbook book = new HSSFWorkbook();
+            //Excel中的Sheet
+            ISheet sheet = book.CreateSheet("sheet1");
+            //获取行数量和列数量
+            int rowNum = DataTable.Rows.Count;
+            int columnNum = DataTable.Columns.Count;
+            //设置列的宽度,根据首行的列的内容的长度来设置
+            for (int i=0;i<columnNum;i++) {
+                int dataLength = DataTable.Rows[0][i].ToString().Length;
+                if (dataLength <= 3)
+                {
+                    sheet.SetColumnWidth(i, dataLength * 1200);
+                }
+                else {
+                    sheet.SetColumnWidth(i, dataLength * 400);
+                }
+            }
+            //将DataTable的值循环赋值给book,Aligment设置居中
+            for (int i = 0; i < rowNum; i++) {
+                IRow row = sheet.CreateRow(i);
+                row.HeightInPoints = 20;
+                for (int j = 0; j < columnNum; j++) {
+                    row.CreateCell(j).SetCellValue(DataTable.Rows[i][j].ToString());
+                    row.GetCell(j).CellStyle.Alignment = HorizontalAlignment.CENTER;
+                }
+            }
+            //将book的内容写入内存流中返回
+            book.Write(ms);
+            return ms;
+        }
+    }
+}

+ 18 - 0
UAS-MES/优软MES/Entity/User.cs

@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace 优软MES.Entity
+{
+    class User
+    {
+        public static string UserName; //  姓名 em_name
+        public static string UserCode; //  工号 em_code
+        public static string UserPosition;// 岗位 em_position
+        public static string UserDepartment;//部门 em_depart
+        public static string UserDepartmentCode; //部门编号 em_departmentcode
+        public static string UserProfessName;//职称 em_professname
+    }
+}

+ 75 - 0
UAS-MES/优软MES/Form1.Designer.cs

@@ -0,0 +1,75 @@
+namespace 优软MES
+{
+    partial class Form1
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.dataGridView1 = new System.Windows.Forms.DataGridView();
+            this.pagination1 = new 优软MES.CustomControl.Pagination.Pagination();
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // dataGridView1
+            // 
+            this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.dataGridView1.Location = new System.Drawing.Point(0, 31);
+            this.dataGridView1.Name = "dataGridView1";
+            this.dataGridView1.RowTemplate.Height = 23;
+            this.dataGridView1.Size = new System.Drawing.Size(795, 338);
+            this.dataGridView1.TabIndex = 0;
+            // 
+            // pagination1
+            // 
+            this.pagination1.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.pagination1.Dock = System.Windows.Forms.DockStyle.Top;
+            this.pagination1.Location = new System.Drawing.Point(0, 0);
+            this.pagination1.Name = "pagination1";
+            this.pagination1.Size = new System.Drawing.Size(795, 33);
+            this.pagination1.TabIndex = 1;
+            this.pagination1.Load += new System.EventHandler(this.pagination1_Load);
+            // 
+            // Form1
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(795, 369);
+            this.Controls.Add(this.pagination1);
+            this.Controls.Add(this.dataGridView1);
+            this.Name = "Form1";
+            this.Text = "Form1";
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.DataGridView dataGridView1;
+        private CustomControl.Pagination.Pagination pagination1;
+    }
+}

+ 26 - 0
UAS-MES/优软MES/Form1.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace 优软MES
+{
+    public partial class Form1 : Form
+    {
+        public Form1()
+        {
+            InitializeComponent();
+        }
+
+        private void pagination1_Load(object sender, EventArgs e)
+        {
+            string[] fields = {"dl_id"};
+            pagination1.BindDataToNavigator(dataGridView1,"datalist",fields);
+        }
+    }
+}

+ 120 - 0
UAS-MES/优软MES/Form1.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 339 - 0
UAS-MES/优软MES/LabelPrint.Designer.cs

@@ -0,0 +1,339 @@
+namespace 优软MES
+{
+   partial class LabelPrint
+   {
+      /// <summary>
+      /// Required designer variable.
+      /// </summary>
+      private System.ComponentModel.IContainer components = null;
+
+      /// <summary>
+      /// Clean up any resources being used.
+      /// </summary>
+      /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+      protected override void Dispose(bool disposing)
+      {
+         if (disposing && (components != null))
+         {
+            components.Dispose();
+         }
+         base.Dispose(disposing);
+      }
+
+      #region Windows Form Designer generated code
+
+      /// <summary>
+      /// Required method for Designer support - do not modify
+      /// the contents of this method with the code editor.
+      /// </summary>
+      private void InitializeComponent()
+      {
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
+            this.txtFolderPath = new System.Windows.Forms.TextBox();
+            this.btnOpen = new System.Windows.Forms.Button();
+            this.label1 = new System.Windows.Forms.Label();
+            this.substringGrid = new System.Windows.Forms.DataGridView();
+            this.label2 = new System.Windows.Forms.Label();
+            this.cboPrinters = new System.Windows.Forms.ComboBox();
+            this.btnPrint = new System.Windows.Forms.Button();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.txtIdenticalCopies = new System.Windows.Forms.TextBox();
+            this.label5 = new System.Windows.Forms.Label();
+            this.txtSerializedCopies = new System.Windows.Forms.TextBox();
+            this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.lstLabelBrowser = new System.Windows.Forms.ListView();
+            this.thumbnailCacheWorker = new System.ComponentModel.BackgroundWorker();
+            this.folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog();
+            this.picUpdatingFormat = new System.Windows.Forms.PictureBox();
+            this.lblNoSubstrings = new System.Windows.Forms.Label();
+            this.lblFormatError = new System.Windows.Forms.Label();
+            this.headBar1 = new 优软MES.CustomControl.HeadBar();
+            ((System.ComponentModel.ISupportInitialize)(this.substringGrid)).BeginInit();
+            this.groupBox1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.picUpdatingFormat)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // txtFolderPath
+            // 
+            this.txtFolderPath.Location = new System.Drawing.Point(99, 46);
+            this.txtFolderPath.Name = "txtFolderPath";
+            this.txtFolderPath.ReadOnly = true;
+            this.txtFolderPath.Size = new System.Drawing.Size(315, 21);
+            this.txtFolderPath.TabIndex = 8;
+            // 
+            // btnOpen
+            // 
+            this.btnOpen.Location = new System.Drawing.Point(420, 47);
+            this.btnOpen.Name = "btnOpen";
+            this.btnOpen.Size = new System.Drawing.Size(75, 21);
+            this.btnOpen.TabIndex = 0;
+            this.btnOpen.Text = "打开";
+            this.btnOpen.UseVisualStyleBackColor = true;
+            this.btnOpen.Click += new System.EventHandler(this.btnOpen_Click);
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(17, 49);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(77, 12);
+            this.label1.TabIndex = 7;
+            this.label1.Text = "选择文件夹:";
+            // 
+            // substringGrid
+            // 
+            this.substringGrid.AllowUserToAddRows = false;
+            this.substringGrid.AllowUserToDeleteRows = false;
+            this.substringGrid.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
+            this.substringGrid.BackgroundColor = System.Drawing.Color.White;
+            this.substringGrid.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle16.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.substringGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle16;
+            this.substringGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle17.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.substringGrid.DefaultCellStyle = dataGridViewCellStyle17;
+            this.substringGrid.Location = new System.Drawing.Point(504, 72);
+            this.substringGrid.MultiSelect = false;
+            this.substringGrid.Name = "substringGrid";
+            dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Control;
+            dataGridViewCellStyle18.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.substringGrid.RowHeadersDefaultCellStyle = dataGridViewCellStyle18;
+            this.substringGrid.Size = new System.Drawing.Size(389, 300);
+            this.substringGrid.TabIndex = 3;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(504, 51);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(65, 12);
+            this.label2.TabIndex = 2;
+            this.label2.Text = "具名数据源";
+            // 
+            // cboPrinters
+            // 
+            this.cboPrinters.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cboPrinters.FormattingEnabled = true;
+            this.cboPrinters.Location = new System.Drawing.Point(98, 17);
+            this.cboPrinters.Name = "cboPrinters";
+            this.cboPrinters.Size = new System.Drawing.Size(282, 20);
+            this.cboPrinters.Sorted = true;
+            this.cboPrinters.TabIndex = 1;
+            // 
+            // btnPrint
+            // 
+            this.btnPrint.Enabled = false;
+            this.btnPrint.Location = new System.Drawing.Point(306, 63);
+            this.btnPrint.Name = "btnPrint";
+            this.btnPrint.Size = new System.Drawing.Size(75, 21);
+            this.btnPrint.TabIndex = 6;
+            this.btnPrint.Text = "打印";
+            this.btnPrint.UseVisualStyleBackColor = true;
+            this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(6, 19);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(77, 12);
+            this.label3.TabIndex = 0;
+            this.label3.Text = "选择打印机:";
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Location = new System.Drawing.Point(6, 44);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(65, 12);
+            this.label4.TabIndex = 2;
+            this.label4.Text = "打印份数:";
+            // 
+            // txtIdenticalCopies
+            // 
+            this.txtIdenticalCopies.Location = new System.Drawing.Point(98, 42);
+            this.txtIdenticalCopies.Name = "txtIdenticalCopies";
+            this.txtIdenticalCopies.ReadOnly = true;
+            this.txtIdenticalCopies.Size = new System.Drawing.Size(112, 21);
+            this.txtIdenticalCopies.TabIndex = 3;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(6, 68);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(113, 12);
+            this.label5.TabIndex = 4;
+            this.label5.Text = "&Serialized Copies:";
+            // 
+            // txtSerializedCopies
+            // 
+            this.txtSerializedCopies.Location = new System.Drawing.Point(98, 66);
+            this.txtSerializedCopies.Name = "txtSerializedCopies";
+            this.txtSerializedCopies.ReadOnly = true;
+            this.txtSerializedCopies.Size = new System.Drawing.Size(112, 21);
+            this.txtSerializedCopies.TabIndex = 5;
+            // 
+            // groupBox1
+            // 
+            this.groupBox1.Controls.Add(this.txtIdenticalCopies);
+            this.groupBox1.Controls.Add(this.label5);
+            this.groupBox1.Controls.Add(this.txtSerializedCopies);
+            this.groupBox1.Controls.Add(this.label4);
+            this.groupBox1.Controls.Add(this.label3);
+            this.groupBox1.Controls.Add(this.btnPrint);
+            this.groupBox1.Controls.Add(this.cboPrinters);
+            this.groupBox1.Location = new System.Drawing.Point(504, 378);
+            this.groupBox1.Name = "groupBox1";
+            this.groupBox1.Size = new System.Drawing.Size(389, 91);
+            this.groupBox1.TabIndex = 6;
+            this.groupBox1.TabStop = false;
+            this.groupBox1.Text = "打印工作区";
+            // 
+            // lstLabelBrowser
+            // 
+            this.lstLabelBrowser.BackColor = System.Drawing.Color.White;
+            this.lstLabelBrowser.HideSelection = false;
+            this.lstLabelBrowser.Location = new System.Drawing.Point(20, 72);
+            this.lstLabelBrowser.MultiSelect = false;
+            this.lstLabelBrowser.Name = "lstLabelBrowser";
+            this.lstLabelBrowser.Size = new System.Drawing.Size(475, 397);
+            this.lstLabelBrowser.TabIndex = 1;
+            this.lstLabelBrowser.UseCompatibleStateImageBehavior = false;
+            this.lstLabelBrowser.VirtualMode = true;
+            this.lstLabelBrowser.CacheVirtualItems += new System.Windows.Forms.CacheVirtualItemsEventHandler(this.lstLabelBrowser_CacheVirtualItems);
+            this.lstLabelBrowser.RetrieveVirtualItem += new System.Windows.Forms.RetrieveVirtualItemEventHandler(this.lstLabelBrowser_RetrieveVirtualItem);
+            this.lstLabelBrowser.SelectedIndexChanged += new System.EventHandler(this.lstLabelBrowser_SelectedIndexChanged);
+            // 
+            // thumbnailCacheWorker
+            // 
+            this.thumbnailCacheWorker.WorkerReportsProgress = true;
+            this.thumbnailCacheWorker.WorkerSupportsCancellation = true;
+            this.thumbnailCacheWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.thumbnailCacheWorker_DoWork);
+            this.thumbnailCacheWorker.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.thumbnailCacheWorker_ProgressChanged);
+            // 
+            // folderBrowserDialog
+            // 
+            this.folderBrowserDialog.ShowNewFolderButton = false;
+            // 
+            // picUpdatingFormat
+            // 
+            this.picUpdatingFormat.BackColor = System.Drawing.Color.White;
+            this.picUpdatingFormat.Image = global::优软MES.Properties.Resources.updating;
+            this.picUpdatingFormat.Location = new System.Drawing.Point(688, 221);
+            this.picUpdatingFormat.Name = "picUpdatingFormat";
+            this.picUpdatingFormat.Size = new System.Drawing.Size(28, 23);
+            this.picUpdatingFormat.TabIndex = 34;
+            this.picUpdatingFormat.TabStop = false;
+            this.picUpdatingFormat.Visible = false;
+            // 
+            // lblNoSubstrings
+            // 
+            this.lblNoSubstrings.AutoSize = true;
+            this.lblNoSubstrings.BackColor = System.Drawing.Color.White;
+            this.lblNoSubstrings.Location = new System.Drawing.Point(631, 183);
+            this.lblNoSubstrings.Name = "lblNoSubstrings";
+            this.lblNoSubstrings.Size = new System.Drawing.Size(125, 12);
+            this.lblNoSubstrings.TabIndex = 4;
+            this.lblNoSubstrings.Text = "当前文件不存在数据源";
+            this.lblNoSubstrings.Visible = false;
+            // 
+            // lblFormatError
+            // 
+            this.lblFormatError.AutoSize = true;
+            this.lblFormatError.BackColor = System.Drawing.Color.White;
+            this.lblFormatError.Location = new System.Drawing.Point(675, 206);
+            this.lblFormatError.Name = "lblFormatError";
+            this.lblFormatError.Size = new System.Drawing.Size(53, 12);
+            this.lblFormatError.TabIndex = 5;
+            this.lblFormatError.Text = "打开错误";
+            this.lblFormatError.Visible = false;
+            // 
+            // headBar1
+            // 
+            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.Name = "headBar1";
+            this.headBar1.Size = new System.Drawing.Size(919, 32);
+            this.headBar1.TabIndex = 35;
+            this.headBar1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.headBar1_MouseDown);
+            // 
+            // LabelPrint
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(919, 493);
+            this.Controls.Add(this.headBar1);
+            this.Controls.Add(this.lblFormatError);
+            this.Controls.Add(this.lblNoSubstrings);
+            this.Controls.Add(this.picUpdatingFormat);
+            this.Controls.Add(this.lstLabelBrowser);
+            this.Controls.Add(this.groupBox1);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.substringGrid);
+            this.Controls.Add(this.txtFolderPath);
+            this.Controls.Add(this.btnOpen);
+            this.Controls.Add(this.label1);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.MaximizeBox = false;
+            this.Name = "LabelPrint";
+            this.ShowIcon = false;
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "标签打印";
+            this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.LabelPrint_FormClosed);
+            this.Load += new System.EventHandler(this.LabelPrint_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.substringGrid)).EndInit();
+            this.groupBox1.ResumeLayout(false);
+            this.groupBox1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.picUpdatingFormat)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+      }
+
+      #endregion
+
+      private System.Windows.Forms.TextBox txtFolderPath;
+      private System.Windows.Forms.Button btnOpen;
+      private System.Windows.Forms.Label label1;
+      private System.Windows.Forms.DataGridView substringGrid;
+      private System.Windows.Forms.Label label2;
+      private System.Windows.Forms.ComboBox cboPrinters;
+      private System.Windows.Forms.Button btnPrint;
+      private System.Windows.Forms.Label label3;
+      private System.Windows.Forms.Label label4;
+      private System.Windows.Forms.TextBox txtIdenticalCopies;
+      private System.Windows.Forms.Label label5;
+      private System.Windows.Forms.TextBox txtSerializedCopies;
+      private System.Windows.Forms.GroupBox groupBox1;
+      private System.Windows.Forms.ListView lstLabelBrowser;
+      private System.ComponentModel.BackgroundWorker thumbnailCacheWorker;
+      private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog;
+      private System.Windows.Forms.PictureBox picUpdatingFormat;
+      private System.Windows.Forms.Label lblNoSubstrings;
+      private System.Windows.Forms.Label lblFormatError;
+        private CustomControl.HeadBar headBar1;
+    }
+}
+

+ 565 - 0
UAS-MES/优软MES/LabelPrint.cs

@@ -0,0 +1,565 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Windows.Forms;
+using Seagull.BarTender.Print;
+using System.Data;
+using System.Runtime.InteropServices;
+
+namespace 优软MES
+{
+   
+    public partial class LabelPrint : Form
+   {
+        #region Fields
+        // Common strings.
+        [DllImport("user32.dll")]
+        public static extern bool ReleaseCapture();
+        [DllImport("user32.dll")]
+        public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
+        public const int WM_SYSCOMMAND = 0x0112;
+        public const int SC_MOVE = 0xF010;
+        public const int HTCAPTION = 0x0002;
+
+      private const string appName = "Label Print";
+      private const string dataSourced = "Data Sourced";
+
+      private Engine engine = null; // The BarTender Print Engine
+      private LabelFormatDocument format = null; // The currently open Format
+      private bool isClosing = false; // Set to true if we are closing. This helps discontinue thumbnail loading.
+
+      // 标签预览
+      private string[] browsingFormats; // 当前选取的文件夹下的Btw文件
+      Hashtable listItems; // A hash table containing ListViewItems and indexed by format name.
+                           // It keeps track of what formats have had their image loaded.
+      Queue<int> generationQueue; // A queue containing indexes into browsingFormats
+                                  // to facilitate the generation of thumbnails
+
+      // 预览文件的索引
+      int topIndex; // The top visible index in the lstLabelBrowser
+      int selectedIndex; // 预览框选中文件的索引
+      #endregion
+
+      #region Enumerations
+      // Indexes into our image list for the label browser.
+      enum ImageIndex { LoadingFormatImage = 0, FailureToLoadFormatImage = 1 };
+      #endregion
+
+      #region Constructor
+      /// <summary>
+      /// 构造函数初始化
+      /// </summary>
+      public LabelPrint()
+      {
+         InitializeComponent();
+      }
+      #endregion
+
+      #region Delegates
+      delegate void DelegateShowMessageBox(string message);
+      #endregion
+
+      #region Event Handlers
+      #region Form Event Handlers
+      /// <summary>
+      /// 页面启动的时候执行,和打印机进行连接
+      /// </summary>
+      /// <param name="sender"></param>
+      /// <param name="e"></param>
+      private void LabelPrint_Load(object sender, EventArgs e)
+      {
+         this.headBar1.MouseDown += new MouseEventHandler(this.headBar1_MouseDown);
+            // 创建一个打印机进程
+         try
+         {
+            engine = new Engine(true);
+         }
+         catch (PrintEngineException exception)
+         {
+            // 不能打印进程返回错误信息直接退出程序
+            MessageBox.Show(this, exception.Message, appName);
+            this.Close(); 
+            return;
+         }
+
+         // 获取打印机列表
+         Printers printers = new Printers();
+         foreach (Printer printer in printers)
+         {
+            cboPrinters.Items.Add(printer.PrinterName);
+         }
+
+         if (printers.Count > 0)
+         {
+            // 设置下拉框选中默认打印机
+            cboPrinters.SelectedItem = printers.Default.PrinterName;
+         }
+
+         // 设置预览框中的图标
+         lstLabelBrowser.View = View.LargeIcon;
+         lstLabelBrowser.LargeImageList = new ImageList();
+         lstLabelBrowser.LargeImageList.ImageSize = new Size(100, 100);
+         lstLabelBrowser.LargeImageList.Images.Add(Properties.Resources.LoadingFormat);
+         lstLabelBrowser.LargeImageList.Images.Add(Properties.Resources.LoadingError);
+
+         // 初始化一个队列
+         listItems = new Hashtable();
+         generationQueue = new Queue<int>();
+
+         //设置打印份数的最大值
+         txtIdenticalCopies.MaxLength = 9;
+         txtSerializedCopies.MaxLength = 9;
+      }
+
+      /// <summary>
+      /// 关闭窗口的时候执行该方法
+      /// </summary>
+      /// <param name="sender"></param>
+      /// <param name="e"></param>
+      private void LabelPrint_FormClosed(object sender, FormClosedEventArgs e)
+      {
+         isClosing = true;
+
+         // 关闭窗口之前向后台请求取消尚未打印的内容 
+         thumbnailCacheWorker.CancelAsync();
+         while (thumbnailCacheWorker.IsBusy)
+         {
+            Application.DoEvents();
+         };
+
+         // 如果已经启动了打印机,停止打印机并且不保存修改的文件SubString
+         if (engine != null)
+            engine.Stop(SaveOptions.DoNotSaveChanges);
+      }
+
+      /// <summary>
+      ///打开文件夹的时候,选择该文件夹下面后缀名为.BTW的文件进行显示
+      /// </summary>
+      /// <param name="sender"></param>
+      /// <param name="e"></param>
+      private void btnOpen_Click(object sender, EventArgs e)
+      {
+         //选择文件的时提示的描述
+         folderBrowserDialog.Description = "选择一个包含打印文件(*.BTW)的文件夹";
+         DialogResult result = folderBrowserDialog.ShowDialog();
+         if (result == DialogResult.OK)
+         {
+            lock (generationQueue)
+            {
+               generationQueue.Clear();
+            }
+            //清空之前选择的内容
+            listItems.Clear();
+            //将文件夹的路径赋值给TextBox
+            txtFolderPath.Text = folderBrowserDialog.SelectedPath;
+            //为选取的时候打印按钮为Disabled
+            btnPrint.Enabled = false;
+            //读取该文件夹下面的BTW文件,browsingFormats是文件名的字符串数组
+            browsingFormats = System.IO.Directory.GetFiles(txtFolderPath.Text, "*.btw");
+
+            // ListView序列化的长度
+            lstLabelBrowser.VirtualListSize = browsingFormats.Length;
+         }
+      }
+
+      /// <summary>
+      /// 点击打印按钮的时候执行
+      /// </summary>
+      /// <param name="sender"></param>
+      /// <param name="e"></param>
+      private void btnPrint_Click(object sender, EventArgs e)
+      {
+         // 正在打印的时候锁定该进程
+         // 用户点击也不展示SubString
+         lock (engine)
+         {
+            bool success = true;
+            // 设置打印参数
+            if (format.PrintSetup.SupportsIdenticalCopies)
+            {   
+               int copies = 1;
+               success = Int32.TryParse(txtIdenticalCopies.Text, out copies) && (copies >= 1);
+               if (!success)
+                  MessageBox.Show(this, "打印的份数必须大于1的整数", appName);
+               else
+               {
+                  format.PrintSetup.IdenticalCopiesOfLabel = copies;
+               }
+            }
+            // 数据源是数据库的时候
+            // Assign number of serialized copies if it is not datasourced.
+            if (success && (format.PrintSetup.SupportsSerializedLabels))
+            {
+               int copies = 1;
+               success = Int32.TryParse(txtSerializedCopies.Text, out copies) && (copies >= 1);
+               if (!success)
+               {
+                  MessageBox.Show(this, "打印份数必须是大于1的数字", appName);
+               }
+               else
+               {
+                  format.PrintSetup.NumberOfSerializedLabels = copies;
+               }
+            }
+
+            // 所有的验证条件通过执行打印
+            if (success)
+            {
+               Cursor.Current = Cursors.WaitCursor;
+
+               // 选择打印机的名称
+               if (cboPrinters.SelectedItem != null)
+                  format.PrintSetup.PrinterName = cboPrinters.SelectedItem.ToString();
+
+               Messages messages;
+               int waitForCompletionTimeout = 10000; // 10 seconds
+               Result result = format.Print(appName, waitForCompletionTimeout, out messages);
+               string messageString = "\n\nMessages:";
+
+               foreach (Seagull.BarTender.Print.Message message in messages)
+               {
+                  messageString += "\n\n" + message.Text;
+               }
+
+               if (result == Result.Failure)
+                  MessageBox.Show(this, "Print Failed" + messageString, appName);
+               else
+                  MessageBox.Show(this, "Label was successfully sent to printer." + messageString, appName);
+            }
+         }
+      }
+      #endregion
+
+      #region List View Event Handlers
+      /// <summary>
+      /// 选中预览文件的时候读取SubString
+      /// </summary>
+      /// <param name="sender"></param>
+      /// <param name="e"></param>
+      private void lstLabelBrowser_SelectedIndexChanged(object sender, EventArgs e)
+      {
+         if (lstLabelBrowser.SelectedIndices.Count == 1)
+         {
+            selectedIndex = lstLabelBrowser.SelectedIndices[0];
+            EnableControls(false);
+            picUpdatingFormat.Visible = true;
+
+            // 启动后台加载函数读取内容
+            // 读取到的数据显示在DataGridView当中
+            BackgroundWorker formatLoader = new BackgroundWorker();
+            formatLoader.DoWork += new DoWorkEventHandler(formatLoader_DoWork);
+            formatLoader.RunWorkerCompleted += new RunWorkerCompletedEventHandler(formatLoader_RunWorkerCompleted);
+            formatLoader.RunWorkerAsync(selectedIndex);
+         }
+         else if (lstLabelBrowser.SelectedIndices.Count == 0)
+         {
+            EnableControls(false);
+            picUpdatingFormat.Visible = false;
+         }
+      }
+      /// <summary>
+      /// 读取完文件夹的时候展示问价在该区域
+      /// </summary>
+      /// <param name="sender"></param>
+      /// <param name="e"></param>
+      private void lstLabelBrowser_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
+      {
+         int btwFileIndex = e.ItemIndex;
+
+         //如果不存在这个项目则设置成默认的图片
+         if (listItems[browsingFormats[btwFileIndex]] == null)
+         {
+            e.Item = new ListViewItem(browsingFormats[btwFileIndex]);
+            e.Item.ImageIndex = (int)ImageIndex.LoadingFormatImage;
+            listItems.Add(browsingFormats[btwFileIndex], e.Item);
+         }
+         else
+         {
+            e.Item = (ListViewItem)listItems[browsingFormats[btwFileIndex]];
+         }
+
+         // 将索引添加到队列.
+         if (e.Item.ImageIndex == (int)ImageIndex.LoadingFormatImage)
+         {
+            lock (generationQueue)
+            {
+               if (!generationQueue.Contains(btwFileIndex))
+                  generationQueue.Enqueue(btwFileIndex);
+            }
+         }
+
+         // 将东西放进队列的时候,如果队列没有被占用则开始执行任务
+         if (!thumbnailCacheWorker.IsBusy && (generationQueue.Count > 0))
+         {
+            thumbnailCacheWorker.RunWorkerAsync();
+         }
+      }
+
+      /// <summary>
+      /// 缓存读取的文件列表
+      /// </summary>
+      /// <param name="sender"></param>
+      /// <param name="cacheEvent"></param>
+      private void lstLabelBrowser_CacheVirtualItems(object sender, CacheVirtualItemsEventArgs cacheEvent)
+      {
+         topIndex = cacheEvent.StartIndex;
+
+         lock (generationQueue)
+         {
+            for (int index = cacheEvent.StartIndex; index <= cacheEvent.EndIndex; ++index)
+            {
+               ListViewItem listViewItem = (ListViewItem)listItems[browsingFormats[index]];
+
+               if ((listViewItem != null) && (listViewItem.ImageIndex == (int)ImageIndex.LoadingFormatImage))
+               {
+                  if (!generationQueue.Contains(index))
+                     generationQueue.Enqueue(index);
+               }
+            }
+         }
+
+         // 任务资源可用的时候执行
+         if (!thumbnailCacheWorker.IsBusy && (generationQueue.Count > 0))
+         {
+            thumbnailCacheWorker.RunWorkerAsync();
+         }
+      }
+      #endregion
+
+      #region Thumbnail Event Handlers
+      /// <summary>
+      /// Called when a thumbnail was loaded so it can be shown.
+      /// </summary>
+      /// <param name="sender"></param>
+      /// <param name="e"></param>
+      void thumbnailCacheWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
+      {
+         object[] args = e.UserState as object[];
+         ListViewItem item = (ListViewItem)args[0];
+
+         // 100 means we got the image successfully.
+         if (e.ProgressPercentage == 100)
+         {
+            Image thumbnail = (Image)args[1];
+
+            lstLabelBrowser.LargeImageList.Images.Add(item.Text, thumbnail);
+            item.ImageIndex = lstLabelBrowser.LargeImageList.Images.IndexOfKey(item.Text);
+         }
+         else if (e.ProgressPercentage == 0) // 0 means we did not successfully get the format image.
+         {
+            item.ImageIndex = (int)ImageIndex.FailureToLoadFormatImage;
+         }
+         item.ListView.Invalidate(item.Bounds);
+      }
+
+      /// <summary>
+      /// 后台启用函数加载缩略图
+      /// </summary>
+      /// <param name="sender"></param>
+      /// <param name="e"></param>
+      void thumbnailCacheWorker_DoWork(object sender, DoWorkEventArgs e)
+      {
+         BackgroundWorker worker = (BackgroundWorker)sender;
+
+         int index;
+         string fileName;
+
+         // Loop until the queue of items that need to be loaded is empty or the worker was cancelled.
+         while ((generationQueue.Count > 0) && !worker.CancellationPending && !isClosing)
+         {
+            lock (generationQueue)
+            {
+               // Get the index to use.
+               index = generationQueue.Dequeue();
+            }
+
+            // If this is way out of our view don't bother generating it.
+            if (Math.Abs(index - topIndex) < 30)
+            {
+               fileName = browsingFormats[index];
+
+               // 检查文件是否出缩略图外都已经加载完成了
+               ListViewItem item = (ListViewItem)listItems[fileName];
+               if (item == null)
+               {
+                  item = new ListViewItem(fileName);
+                  item.ImageIndex = (int)ImageIndex.LoadingFormatImage;
+                  listItems.Add(fileName, item);
+               }
+
+               // 没有缩略图的时候就给个默认的
+               if (item.ImageIndex == (int)ImageIndex.LoadingFormatImage)
+               {
+                  try
+                  {
+                     Image btwImage = LabelFormatThumbnail.Create(fileName, Color.Gray, 100, 100);
+
+                     object[] progressReport = new object[] { item, btwImage };
+                     worker.ReportProgress(100, progressReport);
+                  }
+                  catch
+                  {
+                     object[] progressReport = new object[] { item, null };
+                     worker.ReportProgress(0, progressReport);
+                  }
+               }
+            }
+         }
+      }
+      #endregion
+
+      #region Format Loader Event Handlers
+      /// <summary>
+      ///在另一个进程中进行文件的读取,不用占用当前的界面
+      /// </summary>
+      /// <param name="sender"></param>
+      /// <param name="e"></param>
+      void formatLoader_DoWork(object sender, DoWorkEventArgs e)
+      {
+         int index = (int)e.Argument;
+         string errorMessage = "";
+
+         // 确保安全先锁定打印机,因为可能正在执行打印任务
+         lock (engine)
+         {
+            //确保用户选中该列表
+            if (selectedIndex == index)
+            {
+               try
+               {
+                  if (format != null)
+                  //是否保存对文件的编辑
+                  format.Close(SaveOptions.DoNotSaveChanges);
+                  format = engine.Documents.Open(browsingFormats[index]);
+               }
+               catch (System.Runtime.InteropServices.COMException comException)
+               {
+                  errorMessage = String.Format("Unable to open format: {0}\nReason: {1}", browsingFormats[index], comException.Message);
+                  format = null;
+               }
+            }
+         }
+         // 后台执行只能调用MessageBox来显示信息
+         if (errorMessage.Length != 0)
+            Invoke(new DelegateShowMessageBox(ShowMessageBox), errorMessage);
+      }
+
+      /// <summary>
+      /// 文件加载玩的时候执行
+      /// 填充打印份数默认值为1,如果存在SubString则读取出来
+      /// </summary>
+      /// <param name="sender"></param>
+      /// <param name="e"></param>
+      void formatLoader_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
+      {
+         // 确保正在操作的时候不会丢失该文件
+         lock (engine)
+         {
+            if (format != null)
+            {
+               EnableControls(true);
+               cboPrinters.SelectedItem = format.PrintSetup.PrinterName;
+               picUpdatingFormat.Visible = false;
+               lblFormatError.Visible = false;
+
+               //支持打印多份的时候
+               if (format.PrintSetup.SupportsIdenticalCopies == false)
+               {
+                  txtIdenticalCopies.Text = dataSourced;
+                  txtIdenticalCopies.ReadOnly = true;
+               }
+               else
+               {
+                  txtIdenticalCopies.Text = format.PrintSetup.IdenticalCopiesOfLabel.ToString();
+                  txtIdenticalCopies.ReadOnly = false;
+               }
+
+               //数据源是数据库的时候 
+               if (format.PrintSetup.SupportsSerializedLabels == false)
+               {
+                  txtSerializedCopies.Text = dataSourced;
+                  txtSerializedCopies.ReadOnly = true;
+               }
+               else
+               {
+                  txtSerializedCopies.Text = format.PrintSetup.NumberOfSerializedLabels.ToString();
+                  txtSerializedCopies.ReadOnly = false;
+               }
+                    //DataTable dt = new DataTable();
+                    //DataRow row = dt.NewRow();
+                    //dt.Columns.Add(new DataColumn("name"));
+                    //dt.Columns.Add(new DataColumn("sex"));
+                    //dt.Columns.Add(new DataColumn("age"));
+                    //row["name"] = "John";
+                    //row["sex"] = "Smith";
+                    //row["age"] = "18";
+                    //dt.Rows.Add(row);
+
+                    // 设置DataGridView展示数据
+                    //获取具名数据源
+                    if (format.SubStrings.Count > 0)
+               {
+                  BindingSource bindingSource = new BindingSource();
+                  bindingSource.DataSource = format.SubStrings;
+                  substringGrid.DataSource = bindingSource;
+                  substringGrid.AutoResizeColumns();
+                  lblNoSubstrings.Visible = false;
+               }
+               else
+               {
+                  lblNoSubstrings.Visible = true;
+               }
+               substringGrid.Invalidate();
+            }
+            else // 没有文件的时候,隐藏标签信息
+            {
+               picUpdatingFormat.Visible = false;
+               lblNoSubstrings.Visible = false;
+               lblFormatError.Visible = true;
+            }
+         }
+      }
+      #endregion
+      #endregion
+
+      #region Methods
+      /// <summary>
+      ///打开的文件无效禁用所有的控件
+      /// </summary>
+      /// <param name="enable"></param>
+      void EnableControls(bool enable)
+      {
+         txtIdenticalCopies.Enabled = enable;
+         txtSerializedCopies.Enabled = enable;
+         btnPrint.Enabled = enable;
+
+         if (!enable)
+         {
+            txtIdenticalCopies.Text = "";
+            txtSerializedCopies.Text = "";
+            substringGrid.DataSource = null;
+            lblFormatError.Visible = false;
+            lblNoSubstrings.Visible = false;
+         }
+      }
+
+      /// <summary>
+      /// 重写一个展示消息的方法
+      /// </summary>
+      /// <param name="message">展示的信息</param>
+      void ShowMessageBox(string message)
+      {
+         MessageBox.Show(this, message, appName);
+      }
+
+        #endregion
+
+        private void headBar1_MouseDown(object sender, MouseEventArgs e)
+        {
+            ReleaseCapture();
+            SendMessage(this.Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
+        }
+    }
+}

+ 126 - 0
UAS-MES/优软MES/LabelPrint.resx

@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="thumbnailCacheWorker.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="folderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>184, 17</value>
+  </metadata>
+</root>

+ 135 - 0
UAS-MES/优软MES/Login.Designer.cs

@@ -0,0 +1,135 @@
+namespace 优软MES
+{
+    partial class Login
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.UserName = new System.Windows.Forms.TextBox();
+            this.PassWord = new System.Windows.Forms.TextBox();
+            this.linkLabel1 = new System.Windows.Forms.LinkLabel();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.LoginButton = new System.Windows.Forms.Button();
+            this.SuspendLayout();
+            // 
+            // UserName
+            // 
+            this.UserName.Location = new System.Drawing.Point(259, 129);
+            this.UserName.Name = "UserName";
+            this.UserName.Size = new System.Drawing.Size(172, 21);
+            this.UserName.TabIndex = 0;
+            // 
+            // PassWord
+            // 
+            this.PassWord.Location = new System.Drawing.Point(259, 171);
+            this.PassWord.Name = "PassWord";
+            this.PassWord.PasswordChar = '*';
+            this.PassWord.Size = new System.Drawing.Size(172, 21);
+            this.PassWord.TabIndex = 1;
+            // 
+            // linkLabel1
+            // 
+            this.linkLabel1.AutoSize = true;
+            this.linkLabel1.Location = new System.Drawing.Point(440, 233);
+            this.linkLabel1.Name = "linkLabel1";
+            this.linkLabel1.Size = new System.Drawing.Size(65, 12);
+            this.linkLabel1.TabIndex = 3;
+            this.linkLabel1.TabStop = true;
+            this.linkLabel1.Text = "没有账号?";
+            this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(216, 134);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(41, 12);
+            this.label1.TabIndex = 4;
+            this.label1.Text = "账号:";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(216, 174);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(41, 12);
+            this.label2.TabIndex = 5;
+            this.label2.Text = "密码:";
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(239, 80);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(211, 21);
+            this.label3.TabIndex = 8;
+            this.label3.Text = "欢迎使用优软科技MES";
+            // 
+            // LoginButton
+            // 
+            this.LoginButton.Image = global::优软MES.Properties.Resources._2_0btn_36;
+            this.LoginButton.Location = new System.Drawing.Point(281, 233);
+            this.LoginButton.Name = "LoginButton";
+            this.LoginButton.Size = new System.Drawing.Size(128, 45);
+            this.LoginButton.TabIndex = 2;
+            this.LoginButton.Text = "登录";
+            this.LoginButton.UseVisualStyleBackColor = true;
+            this.LoginButton.Click += new System.EventHandler(this.LoginButton_Click);
+            // 
+            // Login
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.SystemColors.AppWorkspace;
+            this.ClientSize = new System.Drawing.Size(721, 377);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.linkLabel1);
+            this.Controls.Add(this.LoginButton);
+            this.Controls.Add(this.PassWord);
+            this.Controls.Add(this.UserName);
+            this.Name = "Login";
+            this.Text = "用户登录";
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.TextBox UserName;
+        private System.Windows.Forms.TextBox PassWord;
+        private System.Windows.Forms.Button LoginButton;
+        private System.Windows.Forms.LinkLabel linkLabel1;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label3;
+    }
+}

+ 85 - 0
UAS-MES/优软MES/Login.cs

@@ -0,0 +1,85 @@
+using System;
+using System.Windows.Forms;
+using Oracle.DataAccess.Client;
+using System.Configuration;
+using System.Data;
+using System.Drawing;
+using 优软MES.DataOperate;
+using 优软MES.Entity;
+
+namespace 优软MES
+{
+    public partial class Login : Form
+    {
+         
+        public static readonly string ConnectionStrings = ConfigurationSettings.AppSettings["DatabaseConnection"];
+        OracleCommand command = null;
+        OracleConnection connection = new OracleConnection(ConnectionStrings);
+
+        public Login()
+        {
+            InitializeComponent();
+            //让Label透明
+            //label1.BackColor = Color.Transparent; 
+            //label2.BackColor = Color.Transparent;
+            //label3.BackColor = Color.Transparent;
+        }
+        //点击登陆按钮的时候
+        private void LoginButton_Click(object sender, EventArgs e)
+        {
+            LoginCheck(UserName.Text, PassWord.Text);
+        }
+
+        //点击没有密码的时候给出的提示信息
+        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
+        {
+            MessageBox.Show("请联系管理员开设账号");
+        }
+
+        /// <summary>
+        ///  //检查账号和密码是否正确
+        /// </summary>
+        /// <param name="UserName">用户名</param>
+        /// <param name="PassWord">密码</param>
+        private void LoginCheck(string UserName,string PassWord) {
+
+            DataTable dt = new DataTable();
+            string SQL = "select em_code from employee where em_code=:UserName and em_password =:PassWord";
+            command = connection.CreateCommand();
+            command.CommandText = SQL;
+            //将用户名和密码参数化
+            command.Parameters.Add(new OracleParameter("UserName", OracleDbType.Varchar2, ParameterDirection.Input));
+            command.Parameters.Add(new OracleParameter("PassWord", OracleDbType.Varchar2, ParameterDirection.Input));
+            command.Parameters["UserName"].Value = UserName;
+            command.Parameters["PassWord"].Value = PassWord;
+            OracleDataAdapter ad = new OracleDataAdapter();
+            ad.SelectCommand = command;
+            ad.Fill(dt);
+            if (dt.Rows.Count > 0)
+            {
+                this.Hide();
+                setUser();//设置User的全局变量
+                Main dialog = new Main();
+                dialog.ShowDialog();
+                this.Close();
+            }
+            else {
+                MessageBox.Show("用户名密码错误");
+            }
+        }
+
+        //设置User类的全局变量,类似于Session
+        public void setUser() {
+            DataHelper dh = new DataHelper();
+            DataTable dt = new DataTable();
+            string[] field = { "*" };
+            dt= dh.getFieldsDataByCondition("Employee",field,"em_code='"+UserName.Text+"'");
+            User.UserCode = dt.Rows[0]["em_code"].ToString();
+            User.UserDepartment = dt.Rows[0]["em_depart"].ToString();
+            User.UserDepartmentCode = dt.Rows[0]["em_departmentcode"].ToString();
+            User.UserName = dt.Rows[0]["em_name"].ToString();
+            User.UserPosition = dt.Rows[0]["em_position"].ToString();
+            User.UserProfessName = dt.Rows[0]["em_professname"].ToString();
+        }
+    }
+}

+ 120 - 0
UAS-MES/优软MES/Login.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 118 - 0
UAS-MES/优软MES/Main.Designer.cs

@@ -0,0 +1,118 @@
+namespace 优软MES
+{
+    partial class Main
+    {
+        /// <summary>
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows 窗体设计器生成的代码
+
+        /// <summary>
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.customTabControl1 = new 优软MES.CustomControl.CustomTabControl();
+            this.tabPage1 = new System.Windows.Forms.TabPage();
+            this.accordionMenu1 = new 优软MES.CustomControl.AccordionMenu.AccordionMenu();
+            this.headBar1 = new 优软MES.CustomControl.HeadBar();
+            this.button1 = new System.Windows.Forms.Button();
+            this.customTabControl1.SuspendLayout();
+            this.tabPage1.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // customTabControl1
+            // 
+            this.customTabControl1.Controls.Add(this.tabPage1);
+            this.customTabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.customTabControl1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.customTabControl1.ItemSize = new System.Drawing.Size(0, 18);
+            this.customTabControl1.Location = new System.Drawing.Point(150, 32);
+            this.customTabControl1.Name = "customTabControl1";
+            this.customTabControl1.Padding = new System.Drawing.Point(9, 0);
+            this.customTabControl1.SelectedIndex = 0;
+            this.customTabControl1.Size = new System.Drawing.Size(1114, 668);
+            this.customTabControl1.TabIndex = 2;
+            // 
+            // tabPage1
+            // 
+            this.tabPage1.Controls.Add(this.button1);
+            this.tabPage1.Location = new System.Drawing.Point(4, 22);
+            this.tabPage1.Name = "tabPage1";
+            this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
+            this.tabPage1.Size = new System.Drawing.Size(1106, 642);
+            this.tabPage1.TabIndex = 2;
+            this.tabPage1.Text = "tabPage1";
+            this.tabPage1.UseVisualStyleBackColor = true;
+            // 
+            // accordionMenu1
+            // 
+            this.accordionMenu1.Dock = System.Windows.Forms.DockStyle.Left;
+            this.accordionMenu1.Location = new System.Drawing.Point(0, 32);
+            this.accordionMenu1.Name = "accordionMenu1";
+            this.accordionMenu1.Size = new System.Drawing.Size(150, 668);
+            this.accordionMenu1.TabIndex = 1;
+            // 
+            // headBar1
+            // 
+            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.Name = "headBar1";
+            this.headBar1.Size = new System.Drawing.Size(1264, 32);
+            this.headBar1.TabIndex = 0;
+            // 
+            // button1
+            // 
+            this.button1.Location = new System.Drawing.Point(93, 36);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(75, 23);
+            this.button1.TabIndex = 0;
+            this.button1.Text = "button1";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
+            // 
+            // Main
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1264, 700);
+            this.Controls.Add(this.customTabControl1);
+            this.Controls.Add(this.accordionMenu1);
+            this.Controls.Add(this.headBar1);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Name = "Main";
+            this.Text = "优软科技MES系统";
+            this.Load += new System.EventHandler(this.Main_Load);
+            this.customTabControl1.ResumeLayout(false);
+            this.tabPage1.ResumeLayout(false);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private CustomControl.HeadBar headBar1;
+        private CustomControl.AccordionMenu.AccordionMenu accordionMenu1;
+        private CustomControl.CustomTabControl customTabControl1;
+        private System.Windows.Forms.TabPage tabPage1;
+        private System.Windows.Forms.Button button1;
+    }
+}
+

+ 40 - 0
UAS-MES/优软MES/Main.cs

@@ -0,0 +1,40 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Windows.Forms;
+using 优软MES.Entity;
+
+namespace 优软MES
+{
+    public partial class Main : Form
+    {
+        [DllImport("user32.dll")]
+        public static extern bool ReleaseCapture();
+        [DllImport("user32.dll")]
+        public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
+        public const int WM_SYSCOMMAND = 0x0112;
+        public const int SC_MOVE = 0xF010;
+        public const int HTCAPTION = 0x0002;
+        public Main()
+        {
+            InitializeComponent();
+        }
+
+        //窗体加载的时候将headBar的事件委托给指定的函数
+        private void Main_Load(object sender, EventArgs e)
+        {
+            this.headBar1.MouseDown += new MouseEventHandler(this.headBar_MouseDown);
+        }
+
+        //鼠标点下的时候监听
+        private void headBar_MouseDown(object sender, MouseEventArgs e)
+        {   
+            ReleaseCapture();
+            SendMessage(this.Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
+        }
+
+        private void button1_Click(object sender, EventArgs e)
+        {
+            MessageBox.Show(User.UserName);
+        }
+    }
+}

+ 120 - 0
UAS-MES/优软MES/Main.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 19 - 0
UAS-MES/优软MES/Program.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Windows.Forms;
+
+namespace 优软MES
+{
+    static class Program
+    {
+        /// <summary>
+        /// 应用程序的主入口点。
+        /// </summary>
+        [STAThread]
+        static void Main()
+        {
+            Application.EnableVisualStyles();
+            Application.SetCompatibleTextRenderingDefault(false);
+            Application.Run(new LabelPrint());
+        }
+    }
+} 

+ 36 - 0
UAS-MES/优软MES/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("优软MES")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("优软MES")]
+[assembly: AssemblyCopyright("Copyright ©  2016")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//将 ComVisible 设置为 false 将使此程序集中的类型
+//对 COM 组件不可见。  如果需要从 COM 访问此程序集中的类型,
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("411dee44-b893-47e0-a0c2-797a3dae2466")]
+
+// 程序集的版本信息由下列四个值组成: 
+//
+//      主版本
+//      次版本
+//      生成号
+//      修订号
+//
+//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
+// 方法是按如下所示使用“*”: :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 223 - 0
UAS-MES/优软MES/Properties/Resources.Designer.cs

@@ -0,0 +1,223 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     此代码由工具生成。
+//     运行时版本:4.0.30319.42000
+//
+//     对此文件的更改可能会导致不正确的行为,并且如果
+//     重新生成代码,这些更改将会丢失。
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace 优软MES.Properties {
+    using System;
+    
+    
+    /// <summary>
+    ///   一个强类型的资源类,用于查找本地化的字符串等。
+    /// </summary>
+    // 此类是由 StronglyTypedResourceBuilder
+    // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+    // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+    // (以 /str 作为命令选项),或重新生成 VS 项目。
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources() {
+        }
+        
+        /// <summary>
+        ///   返回此类使用的缓存的 ResourceManager 实例。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("优软MES.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   使用此强类型资源类,为所有资源查找
+        ///   重写当前线程的 CurrentUICulture 属性。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap _2_0btn_04 {
+            get {
+                object obj = ResourceManager.GetObject("_2_0btn_04", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap _2_0btn_07 {
+            get {
+                object obj = ResourceManager.GetObject("_2_0btn_07", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap _2_0btn_36 {
+            get {
+                object obj = ResourceManager.GetObject("_2_0btn_36", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap _20130711113247276 {
+            get {
+                object obj = ResourceManager.GetObject("_20130711113247276", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap bindingNavigatorAddNewItem_Image {
+            get {
+                object obj = ResourceManager.GetObject("bindingNavigatorAddNewItem_Image", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap bindingNavigatorDeleteItem_Image {
+            get {
+                object obj = ResourceManager.GetObject("bindingNavigatorDeleteItem_Image", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap bindingNavigatorMoveFirstItem_Image {
+            get {
+                object obj = ResourceManager.GetObject("bindingNavigatorMoveFirstItem_Image", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap bindingNavigatorMoveLastItem_Image {
+            get {
+                object obj = ResourceManager.GetObject("bindingNavigatorMoveLastItem_Image", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap bindingNavigatorMoveNextItem_Image {
+            get {
+                object obj = ResourceManager.GetObject("bindingNavigatorMoveNextItem_Image", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap bindingNavigatorMovePreviousItem_Image {
+            get {
+                object obj = ResourceManager.GetObject("bindingNavigatorMovePreviousItem_Image", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap close_32px_1181428_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("close_32px_1181428_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap Close_up_32px_1181430_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("Close_up_32px_1181430_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap excel {
+            get {
+                object obj = ResourceManager.GetObject("excel", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap LoadingError {
+            get {
+                object obj = ResourceManager.GetObject("LoadingError", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap LoadingFormat {
+            get {
+                object obj = ResourceManager.GetObject("LoadingFormat", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap updating {
+            get {
+                object obj = ResourceManager.GetObject("updating", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+    }
+}

+ 169 - 0
UAS-MES/优软MES/Properties/Resources.resx

@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="close_32px_1181428_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\close_32px_1181428_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="Close_up_32px_1181430_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Close_up_32px_1181430_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="LoadingError" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\LoadingError.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="LoadingFormat" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\LoadingFormat.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="updating" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\updating.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="_2_0btn_07" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\2-0btn_07.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="_2_0btn_04" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\2-0btn_04.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="_2_0btn_36" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\2-0btn_36.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="bindingNavigatorAddNewItem_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\bindingNavigatorAddNewItem.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="bindingNavigatorDeleteItem_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\bindingNavigatorDeleteItem.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="bindingNavigatorMoveFirstItem_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\bindingNavigatorMoveFirstItem.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="bindingNavigatorMoveLastItem_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\bindingNavigatorMoveLastItem.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="bindingNavigatorMoveNextItem_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\bindingNavigatorMoveNextItem.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="bindingNavigatorMovePreviousItem_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\bindingNavigatorMovePreviousItem.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="excel" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\excel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="_20130711113247276" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\20130711113247276.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+</root>

+ 30 - 0
UAS-MES/优软MES/Properties/Settings.Designer.cs

@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace 优软MES.Properties
+{
+
+
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+    {
+
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+        public static Settings Default
+        {
+            get
+            {
+                return defaultInstance;
+            }
+        }
+    }
+}

+ 7 - 0
UAS-MES/优软MES/Properties/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

+ 7 - 0
UAS-MES/优软MES/PublicMethod/CustomControlHandler.cs

@@ -0,0 +1,7 @@
+namespace 优软MES.PublicMethod
+{
+    class CustomControlHandler
+    {
+      
+    }
+}

+ 226 - 0
UAS-MES/优软MES/PublicMethod/MessageBoxEx.cs

@@ -0,0 +1,226 @@
+using System;
+using System.Windows.Forms;
+using System.Text;
+using System.Drawing;
+using System.Runtime.InteropServices;
+
+namespace 优软MES.PublicMethod {
+    public class MessageBoxEx
+    {
+        private static IWin32Window _owner;
+        private static HookProc _hookProc;
+        private static IntPtr _hHook;
+
+        public static DialogResult Show(string text)
+        {
+            Initialize();
+            return MessageBox.Show(text);
+        }
+    
+        public static DialogResult Show(string text, string caption)
+        {
+            Initialize();
+            return MessageBox.Show(text, caption);
+        }
+
+        public static DialogResult Show(string text, string caption, MessageBoxButtons buttons)
+        {
+            Initialize();
+            return MessageBox.Show(text, caption, buttons);
+        }
+
+        public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
+        {
+            Initialize();
+            return MessageBox.Show(text, caption, buttons, icon);
+        }
+
+        public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defButton)
+        {
+            Initialize();
+            return MessageBox.Show(text, caption, buttons, icon, defButton);
+        }
+
+        public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defButton, MessageBoxOptions options)
+        {
+            Initialize();
+            return MessageBox.Show(text, caption, buttons, icon, defButton, options);
+        }
+
+        public static DialogResult Show(IWin32Window owner, string text)
+        {
+            _owner = owner;
+            Initialize();
+            return MessageBox.Show(owner, text);
+        }
+
+        public static DialogResult Show(IWin32Window owner, string text, string caption)
+        {
+            _owner = owner;
+            Initialize();
+            return MessageBox.Show(owner, text, caption);
+        }
+
+        public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons)
+        {
+            _owner = owner;
+            Initialize();
+            return MessageBox.Show(owner, text, caption, buttons);
+        }
+
+        public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
+        {
+            _owner = owner;
+            Initialize();
+            return MessageBox.Show(owner, text, caption, buttons, icon);
+        }
+
+        public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defButton)
+        {
+            _owner = owner;
+            Initialize();
+            return MessageBox.Show(owner, text, caption, buttons, icon, defButton);
+        }
+
+        public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defButton, MessageBoxOptions options)
+        {
+            _owner = owner;
+            Initialize();
+            return MessageBox.Show(owner, text, caption, buttons, icon,
+                                   defButton, options);
+        }
+
+        public delegate IntPtr HookProc(int nCode, IntPtr wParam, IntPtr lParam);
+
+        public delegate void TimerProc(IntPtr hWnd, uint uMsg, UIntPtr nIDEvent, uint dwTime);
+
+        public const int WH_CALLWNDPROCRET = 12;
+
+        public enum CbtHookAction : int
+        {
+            HCBT_MOVESIZE = 0,
+            HCBT_MINMAX = 1,
+            HCBT_QS = 2,
+            HCBT_CREATEWND = 3,
+            HCBT_DESTROYWND = 4,
+            HCBT_ACTIVATE = 5,
+            HCBT_CLICKSKIPPED = 6,
+            HCBT_KEYSKIPPED = 7,
+            HCBT_SYSCOMMAND = 8,
+            HCBT_SETFOCUS = 9
+        }
+
+        [DllImport("user32.dll")]
+        private static extern bool GetWindowRect(IntPtr hWnd, ref Rectangle lpRect);
+
+        [DllImport("user32.dll")]
+        private static extern int MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
+
+        [DllImport("User32.dll")]
+        public static extern UIntPtr SetTimer(IntPtr hWnd, UIntPtr nIDEvent, uint uElapse, TimerProc lpTimerFunc);
+
+        [DllImport("User32.dll")]
+        public static extern IntPtr SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);
+
+        [DllImport("user32.dll")]
+        public static extern IntPtr SetWindowsHookEx(int idHook, HookProc lpfn, IntPtr hInstance, int threadId);
+
+        [DllImport("user32.dll")]
+        public static extern int UnhookWindowsHookEx(IntPtr idHook);
+
+        [DllImport("user32.dll")]
+        public static extern IntPtr CallNextHookEx(IntPtr idHook, int nCode, IntPtr wParam, IntPtr lParam);
+
+        [DllImport("user32.dll")]
+        public static extern int GetWindowTextLength(IntPtr hWnd);
+
+        [DllImport("user32.dll")]
+        public static extern int GetWindowText(IntPtr hWnd, StringBuilder text, int maxLength);
+
+        [DllImport("user32.dll")]
+        public static extern int EndDialog(IntPtr hDlg, IntPtr nResult);
+
+        [StructLayout(LayoutKind.Sequential)]
+        public struct CWPRETSTRUCT
+        {
+            public IntPtr lResult;
+            public IntPtr lParam;
+            public IntPtr wParam;
+            public uint message;
+            public IntPtr hwnd;
+        };
+
+        static MessageBoxEx()
+        {
+            _hookProc = new HookProc(MessageBoxHookProc);
+            _hHook = IntPtr.Zero;
+        }
+
+        private static void Initialize()
+        {
+            if (_hHook != IntPtr.Zero)
+            {
+                throw new NotSupportedException("multiple calls are not supported");
+            }
+
+            if (_owner != null)
+            {
+                _hHook = SetWindowsHookEx(WH_CALLWNDPROCRET, _hookProc, IntPtr.Zero, AppDomain.GetCurrentThreadId());
+            }
+        }
+
+        private static IntPtr MessageBoxHookProc(int nCode, IntPtr wParam, IntPtr lParam)
+        {
+            if (nCode < 0)
+            {
+                return CallNextHookEx(_hHook, nCode, wParam, lParam);
+            }
+
+            CWPRETSTRUCT msg = (CWPRETSTRUCT)Marshal.PtrToStructure(lParam, typeof(CWPRETSTRUCT));
+            IntPtr hook = _hHook;
+
+            if (msg.message == (int)CbtHookAction.HCBT_ACTIVATE)
+            {
+                try
+                {
+                    CenterWindow(msg.hwnd);
+                }
+                finally
+                {
+                    UnhookWindowsHookEx(_hHook);
+                    _hHook = IntPtr.Zero;
+                }
+            }
+
+            return CallNextHookEx(hook, nCode, wParam, lParam);
+        }
+
+        private static void CenterWindow(IntPtr hChildWnd)
+        {
+            Rectangle recChild = new Rectangle(0, 0, 0, 0);
+            bool success = GetWindowRect(hChildWnd, ref recChild);
+
+            int width = recChild.Width - recChild.X;
+            int height = recChild.Height - recChild.Y;
+
+            Rectangle recParent = new Rectangle(0, 0, 0, 0);
+            success = GetWindowRect(_owner.Handle, ref recParent);
+
+            Point ptCenter = new Point(0, 0);
+            ptCenter.X = recParent.X + ((recParent.Width - recParent.X) / 2);
+            ptCenter.Y = recParent.Y + ((recParent.Height - recParent.Y) / 2);
+
+
+            Point ptStart = new Point(0, 0);
+            ptStart.X = (ptCenter.X - (width / 2));
+            ptStart.Y = (ptCenter.Y - (height / 2));
+
+            ptStart.X = (ptStart.X < 0) ? 0 : ptStart.X;
+            ptStart.Y = (ptStart.Y < 0) ? 0 : ptStart.Y;
+
+            int result = MoveWindow(hChildWnd, ptStart.X, ptStart.Y, width,
+                                    height, false);
+        }
+
+    }
+}

BIN
UAS-MES/优软MES/Resources/2-0btn_04.png


BIN
UAS-MES/优软MES/Resources/2-0btn_07.png


BIN
UAS-MES/优软MES/Resources/2-0btn_36.png


BIN
UAS-MES/优软MES/Resources/20130711113247276.png


BIN
UAS-MES/优软MES/Resources/Close_up_32px_1181430_easyicon.net.png


BIN
UAS-MES/优软MES/Resources/LoadingError.gif


BIN
UAS-MES/优软MES/Resources/LoadingFormat.gif


BIN
UAS-MES/优软MES/Resources/bindingNavigatorAddNewItem.Image.png


BIN
UAS-MES/优软MES/Resources/bindingNavigatorDeleteItem.Image.png


BIN
UAS-MES/优软MES/Resources/bindingNavigatorMoveFirstItem.Image.png


BIN
UAS-MES/优软MES/Resources/bindingNavigatorMoveLastItem.Image.png


BIN
UAS-MES/优软MES/Resources/bindingNavigatorMoveNextItem.Image.png


BIN
UAS-MES/优软MES/Resources/bindingNavigatorMovePreviousItem.Image.png


BIN
UAS-MES/优软MES/Resources/close_32px_1181428_easyicon.net.png


BIN
UAS-MES/优软MES/Resources/excel.png


BIN
UAS-MES/优软MES/Resources/updating.gif


+ 120 - 0
UAS-MES/优软MES/Test.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 76 - 0
UAS-MES/优软MES/Test1.Designer.cs

@@ -0,0 +1,76 @@
+namespace 优软MES
+{
+    partial class Test1
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.pagination1 = new 优软MES.CustomControl.Pagination.Pagination();
+            this.dataGridView1 = new System.Windows.Forms.DataGridView();
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // pagination1
+            // 
+            this.pagination1.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.pagination1.Dock = System.Windows.Forms.DockStyle.Top;
+            this.pagination1.Location = new System.Drawing.Point(0, 0);
+            this.pagination1.Name = "pagination1";
+            this.pagination1.Size = new System.Drawing.Size(760, 32);
+            this.pagination1.TabIndex = 0;
+            this.pagination1.Load += new System.EventHandler(this.pagination1_Load);
+            // 
+            // dataGridView1
+            // 
+            this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Top;
+            this.dataGridView1.Location = new System.Drawing.Point(0, 32);
+            this.dataGridView1.Name = "dataGridView1";
+            this.dataGridView1.RowTemplate.Height = 23;
+            this.dataGridView1.Size = new System.Drawing.Size(760, 343);
+            this.dataGridView1.TabIndex = 1;
+            this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
+            // 
+            // Test1
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(760, 375);
+            this.Controls.Add(this.dataGridView1);
+            this.Controls.Add(this.pagination1);
+            this.Name = "Test1";
+            this.Text = "Test1";
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private CustomControl.Pagination.Pagination pagination1;
+        private System.Windows.Forms.DataGridView dataGridView1;
+    }
+}

+ 33 - 0
UAS-MES/优软MES/Test1.cs

@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace 优软MES
+{
+    public partial class Test1 : Form
+    {
+        public Test1()
+        {
+            InitializeComponent();
+        }
+
+        private void pagination1_Load(object sender, EventArgs e)
+        {
+            string[] field = { "*" };
+            pagination1.BindDataToNavigator(dataGridView1,"bom",field);
+        }
+        
+        private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
+        {
+            if ((int)Control.ModifierKeys == (int)Keys.Control + (int)Keys.Alt && e.KeyCode==Keys.S) {
+                
+            }
+        }
+    }
+}

+ 120 - 0
UAS-MES/优软MES/Test1.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 252 - 0
UAS-MES/优软MES/Weigher.Designer.cs

@@ -0,0 +1,252 @@
+namespace 优软MES
+{
+    partial class Weigher
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.GetSeriadlData = new System.Windows.Forms.Button();
+            this.DataFlush = new System.Windows.Forms.TextBox();
+            this.StopGetSerialData = new System.Windows.Forms.Button();
+            this.comboBox1 = new System.Windows.Forms.ComboBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.BaudRate = new System.Windows.Forms.TextBox();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
+            this.WeigherData = new System.Windows.Forms.TextBox();
+            this.label6 = new System.Windows.Forms.Label();
+            this.label7 = new System.Windows.Forms.Label();
+            this.label8 = new System.Windows.Forms.Label();
+            this.textBox4 = new System.Windows.Forms.TextBox();
+            this.textBox5 = new System.Windows.Forms.TextBox();
+            this.headBar1 = new 优软MES.CustomControl.HeadBar();
+            this.SuspendLayout();
+            // 
+            // GetSeriadlData
+            // 
+            this.GetSeriadlData.Location = new System.Drawing.Point(282, 194);
+            this.GetSeriadlData.Name = "GetSeriadlData";
+            this.GetSeriadlData.Size = new System.Drawing.Size(119, 54);
+            this.GetSeriadlData.TabIndex = 1;
+            this.GetSeriadlData.Text = "接收数据";
+            this.GetSeriadlData.UseVisualStyleBackColor = true;
+            this.GetSeriadlData.Click += new System.EventHandler(this.GetSeriadlData_Click);
+            // 
+            // DataFlush
+            // 
+            this.DataFlush.Location = new System.Drawing.Point(499, 60);
+            this.DataFlush.Multiline = true;
+            this.DataFlush.Name = "DataFlush";
+            this.DataFlush.Size = new System.Drawing.Size(268, 371);
+            this.DataFlush.TabIndex = 2;
+            // 
+            // StopGetSerialData
+            // 
+            this.StopGetSerialData.Location = new System.Drawing.Point(282, 297);
+            this.StopGetSerialData.Name = "StopGetSerialData";
+            this.StopGetSerialData.Size = new System.Drawing.Size(119, 50);
+            this.StopGetSerialData.TabIndex = 3;
+            this.StopGetSerialData.Text = "停止接收";
+            this.StopGetSerialData.UseVisualStyleBackColor = true;
+            this.StopGetSerialData.Click += new System.EventHandler(this.StopGetSeriadlData_Click);
+            // 
+            // comboBox1
+            // 
+            this.comboBox1.FormattingEnabled = true;
+            this.comboBox1.Location = new System.Drawing.Point(142, 60);
+            this.comboBox1.Name = "comboBox1";
+            this.comboBox1.Size = new System.Drawing.Size(75, 20);
+            this.comboBox1.TabIndex = 4;
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(50, 63);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(77, 12);
+            this.label1.TabIndex = 5;
+            this.label1.Text = "选择端口号:";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(50, 97);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(77, 12);
+            this.label2.TabIndex = 6;
+            this.label2.Text = "输入波特率:";
+            // 
+            // BaudRate
+            // 
+            this.BaudRate.Location = new System.Drawing.Point(142, 94);
+            this.BaudRate.Name = "BaudRate";
+            this.BaudRate.Size = new System.Drawing.Size(75, 21);
+            this.BaudRate.TabIndex = 7;
+            this.BaudRate.Text = "9600";
+            // 
+            // label3
+            // 
+            this.label3.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
+            this.label3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label3.Location = new System.Drawing.Point(-13, 156);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(510, 4);
+            this.label3.TabIndex = 8;
+            // 
+            // label4
+            // 
+            this.label4.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
+            this.label4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.label4.Location = new System.Drawing.Point(496, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(4, 467);
+            this.label4.TabIndex = 9;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("宋体", 10F);
+            this.label5.Location = new System.Drawing.Point(572, 39);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(119, 14);
+            this.label5.TabIndex = 10;
+            this.label5.Text = "电子秤数据缓冲区";
+            // 
+            // WeigherData
+            // 
+            this.WeigherData.Location = new System.Drawing.Point(25, 356);
+            this.WeigherData.Multiline = true;
+            this.WeigherData.Name = "WeigherData";
+            this.WeigherData.Size = new System.Drawing.Size(188, 47);
+            this.WeigherData.TabIndex = 11;
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Font = new System.Drawing.Font("宋体", 11F);
+            this.label6.Location = new System.Drawing.Point(23, 332);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(97, 15);
+            this.label6.TabIndex = 12;
+            this.label6.Text = "最终称量结果";
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Location = new System.Drawing.Point(24, 179);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(113, 12);
+            this.label7.TabIndex = 13;
+            this.label7.Text = "称量过程中数据标识";
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Location = new System.Drawing.Point(26, 251);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(101, 12);
+            this.label8.TabIndex = 14;
+            this.label8.Text = "称量结果数据标识";
+            // 
+            // textBox4
+            // 
+            this.textBox4.Location = new System.Drawing.Point(26, 212);
+            this.textBox4.Name = "textBox4";
+            this.textBox4.Size = new System.Drawing.Size(100, 21);
+            this.textBox4.TabIndex = 15;
+            this.textBox4.Text = "US";
+            // 
+            // textBox5
+            // 
+            this.textBox5.Location = new System.Drawing.Point(26, 276);
+            this.textBox5.Name = "textBox5";
+            this.textBox5.Size = new System.Drawing.Size(100, 21);
+            this.textBox5.TabIndex = 16;
+            this.textBox5.Text = "ST";
+            // 
+            // headBar1
+            // 
+            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.Name = "headBar1";
+            this.headBar1.Size = new System.Drawing.Size(767, 32);
+            this.headBar1.TabIndex = 17;
+            // 
+            // Weigher
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(767, 428);
+            this.Controls.Add(this.headBar1);
+            this.Controls.Add(this.textBox5);
+            this.Controls.Add(this.textBox4);
+            this.Controls.Add(this.label8);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.label6);
+            this.Controls.Add(this.WeigherData);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.BaudRate);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.comboBox1);
+            this.Controls.Add(this.StopGetSerialData);
+            this.Controls.Add(this.DataFlush);
+            this.Controls.Add(this.GetSeriadlData);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Name = "Weigher";
+            this.Text = "Serial";
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Weigher_FormClosing);
+            this.Load += new System.EventHandler(this.Weigher_Load);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private System.Windows.Forms.Button GetSeriadlData;
+        private System.Windows.Forms.TextBox DataFlush;
+        private System.Windows.Forms.Button StopGetSerialData;
+        private System.Windows.Forms.ComboBox comboBox1;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.TextBox BaudRate;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.TextBox WeigherData;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.Label label7;
+        private System.Windows.Forms.Label label8;
+        private System.Windows.Forms.TextBox textBox4;
+        private System.Windows.Forms.TextBox textBox5;
+        private CustomControl.HeadBar headBar1;
+    }
+}

+ 129 - 0
UAS-MES/优软MES/Weigher.cs

@@ -0,0 +1,129 @@
+using Microsoft.Win32;
+using System;
+using System.IO;
+using System.IO.Ports;
+using System.Runtime.InteropServices;
+using System.Threading;
+using System.Windows.Forms;
+using 优软MES.CustomControl;
+namespace 优软MES
+{
+    public partial class Weigher : Form
+    {
+        [DllImport("user32.dll")]
+        public static extern bool ReleaseCapture();
+        [DllImport("user32.dll")]
+        public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
+        public const int WM_SYSCOMMAND = 0x0112;
+        public const int SC_MOVE = 0xF010;
+        public const int HTCAPTION = 0x0002;
+        string LastData="";
+        //实例化一个串口
+        SerialPort serialPort1 = new SerialPort();
+        Thread thread;
+        bool getData;
+        public Weigher()
+        {
+            InitializeComponent();
+            CheckForIllegalCrossThreadCalls = false;
+            GetComList();
+        }
+
+        private void Weigher_Load(object sender, EventArgs e)
+        {
+            this.headBar1.MouseDown += new MouseEventHandler(headBar_MouseDown);
+        }
+
+        private void GetSeriadlData_Click(object sender, EventArgs e)
+        {
+            getData = true;
+            thread = new Thread(getSerialData);
+            thread.Start();
+        }
+
+  
+        private void StopGetSeriadlData_Click(object sender, EventArgs e)
+        {
+            getData = false;
+            Thread.Sleep(1000);
+            serialPort1.Close();
+        }
+        //开始接受串口数据
+        private void getSerialData(){
+
+            if (!serialPort1.IsOpen)
+            {
+                serialPort1.PortName = this.comboBox1.Text;
+                serialPort1.BaudRate =int.Parse(BaudRate.Text);
+                serialPort1.Open();
+                DataFlush.Text = "开始接受数据\n";
+                while (getData)
+                {
+                    try { ShowData(serialPort1.ReadLine() + "\n"); }
+                    catch (IOException ex) { MessageBox.Show(ex.Message); }
+                }
+            }
+            else {
+                MessageBox.Show("请勿重复打开端口", "警告");
+            }
+        }
+
+        // 获取串口列表
+        private void GetComList()
+        {
+            RegistryKey keyCom = Registry.LocalMachine.OpenSubKey("Hardware\\DeviceMap\\SerialComm");
+            
+            if (keyCom != null)
+            {
+                string[] sSubKeys = keyCom.GetValueNames();
+                //获取串口的名称
+                //for (int i = 0; i < sSubKeys.Length; i++)
+                //{
+                //    string sValue = (string)(sSubKeys[i]);
+                //    comboBox1.Items.Add(sValue);
+                //    comboBox1.SelectedIndex = i;
+                //}
+                
+                //获取串口号
+                for (int i = 0; i < sSubKeys.Length; i++)
+                {
+                    string sValue = (string)keyCom.GetValue(sSubKeys[i]);
+                    comboBox1.Items.Add(sValue);
+                    comboBox1.SelectedIndex = i;
+                }
+            }
+        }
+
+        private void headBar_MouseDown(object sender, MouseEventArgs e)
+        {
+            ReleaseCapture();
+            SendMessage(this.Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
+        }
+
+        private void ShowData(string Data) {
+            //判断数据是否稳定,将稳定值展示到称量结果
+            if (Data.Substring(0, 1) == "S")
+            {
+                    WeigherData.Text = Data;    
+            }
+            //判断数据和上一条是否相等
+            if (!(LastData == Data)) {
+                DataFlush.AppendText(Data);
+            }
+            LastData = Data;
+        }
+
+        private void Weigher_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            if (serialPort1.IsOpen)
+            {
+                MessageBoxButtons messButton = MessageBoxButtons.YesNo;
+                string logout_confirm = MessageBox.Show(this.ParentForm, "端口尚未关闭,仍要关闭窗口?", "警告!", messButton).ToString();
+                if (!(logout_confirm == "Yes"))
+                {
+                    e.Cancel = true;
+                }
+            }
+        }
+    }
+}

+ 120 - 0
UAS-MES/优软MES/Weigher.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 314 - 0
UAS-MES/优软MES/优软MES.csproj

@@ -0,0 +1,314 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{411DEE44-B893-47E0-A0C2-797A3DAE2466}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>优软MES</RootNamespace>
+    <AssemblyName>优软MES</AssemblyName>
+    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <PublishUrl>C:\Users\callmexiaozhang\Desktop\优软MES\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>2</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <PublishWizardCompleted>true</PublishWizardCompleted>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup>
+    <ManifestCertificateThumbprint>A9473670BB1D2DE8817429668BA26BAFFC07574D</ManifestCertificateThumbprint>
+  </PropertyGroup>
+  <PropertyGroup>
+    <ManifestKeyFile>优软MES_TemporaryKey.pfx</ManifestKeyFile>
+  </PropertyGroup>
+  <PropertyGroup>
+    <GenerateManifests>true</GenerateManifests>
+  </PropertyGroup>
+  <PropertyGroup>
+    <SignManifests>true</SignManifests>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="DevComponents.DotNetBar2">
+      <HintPath>Tool\DevComponents.DotNetBar2.dll</HintPath>
+    </Reference>
+    <Reference Include="ExcelHelper">
+      <HintPath>Tool\ExcelHelper.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <EmbedInteropTypes>True</EmbedInteropTypes>
+      <HintPath>Tool\Microsoft.Office.Interop.Excel.dll</HintPath>
+    </Reference>
+    <Reference Include="NPOI">
+      <HintPath>Tool\NPOI.dll</HintPath>
+    </Reference>
+    <Reference Include="Oracle.DataAccess%2811g%29">
+      <HintPath>Tool\Oracle.DataAccess(11g).dll</HintPath>
+    </Reference>
+    <Reference Include="Seagull.BarTender.Print, Version=10.1.3.1, Culture=neutral, PublicKeyToken=109ff779a1b4cbc7, processorArchitecture=x86">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>Tool\Seagull.BarTender.Print.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Configuration.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Configuration.Designer.cs">
+      <DependentUpon>Configuration.cs</DependentUpon>
+    </Compile>
+    <Compile Include="CustomControl\AccordionMenu\AccordionMenu.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="CustomControl\AccordionMenu\AccordionMenu.Designer.cs">
+      <DependentUpon>AccordionMenu.cs</DependentUpon>
+    </Compile>
+    <Compile Include="CustomControl\CustomTabControl\CustomTabControl.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="CustomControl\CustomTabControl\CustomTabControl.Designer.cs">
+      <DependentUpon>CustomTabControl.cs</DependentUpon>
+    </Compile>
+    <Compile Include="CustomControl\CustomTabControl\ThemedColors.cs" />
+    <Compile Include="CustomControl\HeadBar\HeadBar.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="CustomControl\HeadBar\HeadBar.Designer.cs">
+      <DependentUpon>HeadBar.cs</DependentUpon>
+    </Compile>
+    <Compile Include="CustomControl\Pagination\Pagination.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="CustomControl\Pagination\Pagination.Designer.cs">
+      <DependentUpon>Pagination.cs</DependentUpon>
+    </Compile>
+    <Compile Include="CustomControl\ProcessBar\ProcessBar.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="CustomControl\ProcessBar\ProcessBar.Designer.cs">
+      <DependentUpon>ProcessBar.cs</DependentUpon>
+    </Compile>
+    <Compile Include="CustomControl\TransparentLabel\TransparentLabel.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="CustomControl\TransparentLabel\TransparentLabel.Designer.cs">
+      <DependentUpon>TransparentLabel.cs</DependentUpon>
+    </Compile>
+    <Compile Include="DataOperate\DataHelper.cs" />
+    <Compile Include="DataOperate\ExcelHandler.cs" />
+    <Compile Include="Entity\User.cs" />
+    <Compile Include="Form1.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Form1.Designer.cs">
+      <DependentUpon>Form1.cs</DependentUpon>
+    </Compile>
+    <Compile Include="LabelPrint.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="LabelPrint.Designer.cs">
+      <DependentUpon>LabelPrint.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Login.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Login.Designer.cs">
+      <DependentUpon>Login.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Main.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Main.Designer.cs">
+      <DependentUpon>Main.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="PublicMethod\CustomControlHandler.cs" />
+    <Compile Include="PublicMethod\MessageBoxEx.cs" />
+    <Compile Include="Test1.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Test1.Designer.cs">
+      <DependentUpon>Test1.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Weigher.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Weigher.Designer.cs">
+      <DependentUpon>Weigher.cs</DependentUpon>
+    </Compile>
+    <EmbeddedResource Include="Configuration.resx">
+      <DependentUpon>Configuration.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="CustomControl\AccordionMenu\AccordionMenu.resx">
+      <DependentUpon>AccordionMenu.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="CustomControl\CustomTabControl\CustomTabControl.resx">
+      <DependentUpon>CustomTabControl.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="CustomControl\HeadBar\HeadBar.resx">
+      <DependentUpon>HeadBar.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="CustomControl\HeadBar\HeadBar.zu.resx">
+      <DependentUpon>HeadBar.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="CustomControl\Pagination\Pagination.resx">
+      <DependentUpon>Pagination.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="CustomControl\ProcessBar\ProcessBar.resx">
+      <DependentUpon>ProcessBar.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Form1.resx">
+      <DependentUpon>Form1.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="LabelPrint.resx">
+      <DependentUpon>LabelPrint.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Login.resx">
+      <DependentUpon>Login.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Main.resx">
+      <DependentUpon>Main.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Resources.resx</DependentUpon>
+      <DesignTime>True</DesignTime>
+    </Compile>
+    <EmbeddedResource Include="Test1.resx">
+      <DependentUpon>Test1.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Weigher.resx">
+      <DependentUpon>Weigher.cs</DependentUpon>
+    </EmbeddedResource>
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
+      <Visible>False</Visible>
+      <ProductName>Microsoft .NET Framework 4.5.2 %28x86 和 x64%29</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\Close_up_32px_1181430_easyicon.net.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\close_32px_1181428_easyicon.net.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\LoadingError.gif" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\LoadingFormat.gif" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\updating.gif" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\2-0btn_07.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\2-0btn_36.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\2-0btn_04.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\bindingNavigatorAddNewItem.Image.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\bindingNavigatorDeleteItem.Image.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\bindingNavigatorMoveFirstItem.Image.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\bindingNavigatorMoveLastItem.Image.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\bindingNavigatorMoveNextItem.Image.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\bindingNavigatorMovePreviousItem.Image.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\excel.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\20130711113247276.png" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 4 - 0
UAS-出货标签管理/App.config

@@ -25,7 +25,11 @@
         <value />
       </setting>
       <setting name="FTPAddress" serializeAs="String">
+<<<<<<< HEAD
+        <value>ftp://sz.hi-mantech.com:46688|yhndftp|Stga28ytG8</value>
+=======
         <value>ftp://richwellgroup.com.cn|printuser|printuser</value>
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
       </setting>
     </UAS_LabelMachine.Properties.Settings>
   </userSettings>

+ 4 - 0
UAS-出货标签管理/Properties/Settings.Designer.cs

@@ -73,7 +73,11 @@ namespace UAS_LabelMachine.Properties {
         
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+<<<<<<< HEAD
+        [global::System.Configuration.DefaultSettingValueAttribute("ftp://sz.hi-mantech.com:46688|yhndftp|Stga28ytG8")]
+=======
         [global::System.Configuration.DefaultSettingValueAttribute("ftp://richwellgroup.com.cn|printuser|printuser")]
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
         public string FTPAddress {
             get {
                 return ((string)(this["FTPAddress"]));

+ 4 - 0
UAS-出货标签管理/Properties/Settings.settings

@@ -15,7 +15,11 @@
       <Value Profile="(Default)" />
     </Setting>
     <Setting Name="FTPAddress" Type="System.String" Scope="User">
+<<<<<<< HEAD
+      <Value Profile="(Default)">ftp://sz.hi-mantech.com:46688|yhndftp|Stga28ytG8</Value>
+=======
       <Value Profile="(Default)">ftp://richwellgroup.com.cn|printuser|printuser</Value>
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
     </Setting>
   </Settings>
 </SettingsFile>

+ 26 - 20
UAS-出货标签管理/PublicMethod/AutoSizeFormClass.cs

@@ -1,7 +1,6 @@
 using System.Collections.Generic;
 using System.Windows.Forms;
 using UAS_LabelMachine.CustomControl;
-using UAS_LabelMachine.CustomControl.GroupBoxWithBorder;
 
 namespace UAS_LabelMachine.PublicMethod
 {
@@ -30,6 +29,7 @@ namespace UAS_LabelMachine.PublicMethod
             AddControl(mForm);//窗体内其余控件还可能嵌套控件(比如panel),要单独抽出,因为要递归调用
                               //this.WindowState = (FormWindowState)(2);//记录完控件的初始位置和大小后,再最大化
                               //0 - Normalize , 1 - Minimize,2- Maximize
+
         }
 
         private void AddControl(Control ctl)
@@ -44,6 +44,7 @@ namespace UAS_LabelMachine.PublicMethod
                 //**放在这里,是先记录控件本身,后记录控件的子控件
                 if (c.Controls.Count > 0)
                     AddControl(c);//窗体内其余控件还可能嵌套控件(比如panel),要单独抽出,因为要递归调用
+                System.Console.WriteLine("初始位置:" + objCtrl.Left + "," + objCtrl.Top + "," + objCtrl.Width + "," + objCtrl.Height);
             }
         }
         //(3.2)控件自适应大小,
@@ -63,6 +64,7 @@ namespace UAS_LabelMachine.PublicMethod
             float hScale = (float)mForm.Height / (float)oldCtrl[0].Height;//.Height;
             ctrlNo = 1;//进入=1,第0个为窗体本身,窗体内的控件,从序号1开始
             AutoScaleControl(mForm, wScale, hScale);//窗体内其余控件还可能嵌套控件(比如panel),要单独抽出,因为要递归调用
+
         }
 
         private void AutoScaleControl(Control ctl, float wScale, float hScale)
@@ -70,9 +72,10 @@ namespace UAS_LabelMachine.PublicMethod
             int ctrLeft0, ctrTop0, ctrWidth0, ctrHeight0;
             //int ctrlNo = 1;//第1个是窗体自身的 Left,Top,Width,Height,所以窗体控件从ctrlNo=1开始
             foreach (Control c in ctl.Controls)
-            { //**放在这里,是先缩放控件的子控件,后缩放控件本身
-              //if (c.Controls.Count > 0)
-              //   AutoScaleControl(c, wScale, hScale);//窗体内其余控件还可能嵌套控件(比如panel),要单独抽出,因为要递归调用
+            {
+                //**放在这里,是先缩放控件的子控件,后缩放控件本身
+                //if (c.Controls.Count > 0)
+                //AutoScaleControl(c, wScale, hScale);//窗体内其余控件还可能嵌套控件(比如panel),要单独抽出,因为要递归调用
                 ctrLeft0 = oldCtrl[ctrlNo].Left;
                 ctrTop0 = oldCtrl[ctrlNo].Top;
                 ctrWidth0 = oldCtrl[ctrlNo].Width;
@@ -83,7 +86,7 @@ namespace UAS_LabelMachine.PublicMethod
                 c.Left = (int)((ctrLeft0) * wScale);//新旧控件之间的线性比例。控件位置只相对于窗体,所以不能加 + wLeft1
                 c.Top = (int)((ctrTop0) * hScale);//
                 //设置指定的类型不进行宽高的变化
-                if (!(c is Button || c is HeadBar))
+                if (!(c is Button || c is HeadBar||c is Pagination))
                 {
                     c.Width = (int)(ctrWidth0 * wScale);//只与最初的大小相关,所以不能与现在的宽度相乘 (int)(c.Width * w);
                     c.Height = (int)(ctrHeight0 * hScale);//
@@ -91,24 +94,27 @@ namespace UAS_LabelMachine.PublicMethod
                 ctrlNo++;//累加序号
                 //**放在这里,是先缩放控件本身,后缩放控件的子控件
                 if (c.Controls.Count > 0)
+                {
                     AutoScaleControl(c, wScale, hScale);//窗体内其余控件还可能嵌套控件(比如panel),要单独抽出,因为要递归调用
-
-                if (ctl is DataGridView)
+                    System.Console.WriteLine(c.GetType());
+                    System.Console.WriteLine("修改之后:" + c.Left + "," + c.Top + "," + c.Width + "," + c.Height);
+                }
+            }
+            if (ctl is DataGridView)
+            {
+                DataGridView dgv = ctl as DataGridView;
+                Cursor.Current = Cursors.WaitCursor;
+                int widths = 0;
+                for (int i = 0; i < dgv.Columns.Count; i++)
                 {
-                    DataGridView dgv = ctl as DataGridView;
-                    Cursor.Current = Cursors.WaitCursor;
-                    int widths = 0;
-                    for (int i = 0; i < dgv.Columns.Count; i++)
-                    {
-                        dgv.AutoResizeColumn(i, DataGridViewAutoSizeColumnMode.AllCells);  // 自动调整列宽  
-                        widths += dgv.Columns[i].Width;   // 计算调整列后单元列的宽度和                       
-                    }
-                    if (widths >= ctl.Size.Width)  // 如果调整列的宽度大于设定列宽  
-                        dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;  // 调整列的模式 自动  
-                    else
-                        dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;  // 如果小于 则填充  
-                    Cursor.Current = Cursors.Default;
+                    dgv.AutoResizeColumn(i, DataGridViewAutoSizeColumnMode.AllCells);  // 自动调整列宽  
+                    widths += dgv.Columns[i].Width;   // 计算调整列后单元列的宽度和                       
                 }
+                if (widths >= ctl.Size.Width)  // 如果调整列的宽度大于设定列宽  
+                    dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;  // 调整列的模式 自动  
+                else
+                    dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;  // 如果小于 则填充  
+                Cursor.Current = Cursors.Default;
             }
         }
     }

File diff suppressed because it is too large
+ 351 - 149
UAS-出货标签管理/UAS_出货标签管理.Designer.cs


+ 301 - 0
UAS-出货标签管理/客户标签维护.Designer.cs

@@ -33,8 +33,13 @@ namespace UAS_LabelMachine
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(客户标签维护));
+<<<<<<< HEAD
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+=======
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.cl_code_label = new System.Windows.Forms.Label();
             this.cu_name_label = new System.Windows.Forms.Label();
             this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
@@ -56,7 +61,10 @@ namespace UAS_LabelMachine
             this.la_name = new System.Windows.Forms.TextBox();
             this.la_name_label = new System.Windows.Forms.Label();
             this.FTPShare = new System.Windows.Forms.CheckBox();
+<<<<<<< HEAD
+=======
             this.CodeSoft = new System.Windows.Forms.RadioButton();
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.pagination1 = new UAS_LabelMachine.CustomControl.Pagination();
             this.NewLabel = new UAS_LabelMachine.CustomControl.NormalButton();
             this.NetURL = new UAS_LabelMachine.CustomControl.EnterTextBox();
@@ -91,10 +99,17 @@ namespace UAS_LabelMachine
             // 
             this.cl_code_label.AutoSize = true;
             this.cl_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+<<<<<<< HEAD
+            this.cl_code_label.Location = new System.Drawing.Point(46, 22);
+            this.cl_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.cl_code_label.Name = "cl_code_label";
+            this.cl_code_label.Size = new System.Drawing.Size(110, 31);
+=======
             this.cl_code_label.Location = new System.Drawing.Point(41, 19);
             this.cl_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.cl_code_label.Name = "cl_code_label";
             this.cl_code_label.Size = new System.Drawing.Size(92, 27);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.cl_code_label.TabIndex = 145;
             this.cl_code_label.Text = "客户编号";
             // 
@@ -102,10 +117,17 @@ namespace UAS_LabelMachine
             // 
             this.cu_name_label.AutoSize = true;
             this.cu_name_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+<<<<<<< HEAD
+            this.cu_name_label.Location = new System.Drawing.Point(488, 24);
+            this.cu_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.cu_name_label.Name = "cu_name_label";
+            this.cu_name_label.Size = new System.Drawing.Size(110, 31);
+=======
             this.cu_name_label.Location = new System.Drawing.Point(433, 20);
             this.cu_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.cu_name_label.Name = "cu_name_label";
             this.cu_name_label.Size = new System.Drawing.Size(92, 27);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.cu_name_label.TabIndex = 144;
             this.cu_name_label.Text = "客户名称";
             // 
@@ -113,14 +135,62 @@ namespace UAS_LabelMachine
             // 
             this.openFileDialog1.FileName = "openFileDialog1";
             // 
+<<<<<<< HEAD
+            // CodeSoft
+            // 
+            this.CodeSoft.AutoSize = true;
+            this.CodeSoft.Checked = true;
+            this.CodeSoft.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.CodeSoft.Location = new System.Drawing.Point(1517, 27);
+            this.CodeSoft.Margin = new System.Windows.Forms.Padding(4);
+            this.CodeSoft.Name = "CodeSoft";
+            this.CodeSoft.Size = new System.Drawing.Size(145, 35);
+            this.CodeSoft.TabIndex = 161;
+            this.CodeSoft.TabStop = true;
+            this.CodeSoft.Text = "CodeSoft";
+            this.CodeSoft.UseVisualStyleBackColor = true;
+            // 
+            // Bartender
+            // 
+            this.Bartender.AutoSize = true;
+            this.Bartender.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Bartender.Location = new System.Drawing.Point(1352, 27);
+            this.Bartender.Margin = new System.Windows.Forms.Padding(4);
+            this.Bartender.Name = "Bartender";
+            this.Bartender.Size = new System.Drawing.Size(157, 35);
+            this.Bartender.TabIndex = 162;
+            this.Bartender.Text = "BarTender";
+            this.Bartender.UseVisualStyleBackColor = true;
+            this.Bartender.Visible = false;
+            // 
+            // labelSoft_label
+            // 
+            this.labelSoft_label.AutoSize = true;
+            this.labelSoft_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.labelSoft_label.Location = new System.Drawing.Point(1234, 22);
+            this.labelSoft_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.labelSoft_label.Name = "labelSoft_label";
+            this.labelSoft_label.Size = new System.Drawing.Size(110, 31);
+            this.labelSoft_label.TabIndex = 163;
+            this.labelSoft_label.Text = "模板软件";
+            // 
+=======
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             // label1
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+<<<<<<< HEAD
+            this.label1.Location = new System.Drawing.Point(1317, 165);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(158, 31);
+=======
             this.label1.Location = new System.Drawing.Point(1225, 111);
             this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(132, 27);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.label1.TabIndex = 164;
             this.label1.Text = "模板参数预览";
             // 
@@ -128,19 +198,33 @@ namespace UAS_LabelMachine
             // 
             this.PrinterList_lable.AutoSize = true;
             this.PrinterList_lable.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+<<<<<<< HEAD
+            this.PrinterList_lable.Location = new System.Drawing.Point(1234, 74);
+            this.PrinterList_lable.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PrinterList_lable.Name = "PrinterList_lable";
+            this.PrinterList_lable.Size = new System.Drawing.Size(134, 31);
+=======
             this.PrinterList_lable.Location = new System.Drawing.Point(1227, 26);
             this.PrinterList_lable.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.PrinterList_lable.Name = "PrinterList_lable";
             this.PrinterList_lable.Size = new System.Drawing.Size(112, 27);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.PrinterList_lable.TabIndex = 175;
             this.PrinterList_lable.Text = "打印机列表";
             // 
             // OpenFolder
             // 
+<<<<<<< HEAD
+            this.OpenFolder.Location = new System.Drawing.Point(847, 584);
+            this.OpenFolder.Margin = new System.Windows.Forms.Padding(4);
+            this.OpenFolder.Name = "OpenFolder";
+            this.OpenFolder.Size = new System.Drawing.Size(112, 40);
+=======
             this.OpenFolder.Location = new System.Drawing.Point(776, 612);
             this.OpenFolder.Margin = new System.Windows.Forms.Padding(4);
             this.OpenFolder.Name = "OpenFolder";
             this.OpenFolder.Size = new System.Drawing.Size(100, 34);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.OpenFolder.TabIndex = 156;
             this.OpenFolder.Text = "打开";
             this.OpenFolder.UseVisualStyleBackColor = true;
@@ -150,30 +234,51 @@ namespace UAS_LabelMachine
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+<<<<<<< HEAD
+            this.label3.Location = new System.Drawing.Point(454, 539);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(110, 31);
+=======
             this.label3.Location = new System.Drawing.Point(403, 566);
             this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(92, 27);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.label3.TabIndex = 171;
             this.label3.Text = "盘标类型";
             // 
             // FolderPath
             // 
             this.FolderPath.Enabled = false;
+<<<<<<< HEAD
+            this.FolderPath.Location = new System.Drawing.Point(572, 592);
+            this.FolderPath.Margin = new System.Windows.Forms.Padding(4);
+            this.FolderPath.Name = "FolderPath";
+            this.FolderPath.Size = new System.Drawing.Size(240, 28);
+=======
             this.FolderPath.Location = new System.Drawing.Point(531, 616);
             this.FolderPath.Margin = new System.Windows.Forms.Padding(4);
             this.FolderPath.Name = "FolderPath";
             this.FolderPath.Size = new System.Drawing.Size(213, 25);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.FolderPath.TabIndex = 157;
             // 
             // FolderPath_Label
             // 
             this.FolderPath_Label.AutoSize = true;
             this.FolderPath_Label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+<<<<<<< HEAD
+            this.FolderPath_Label.Location = new System.Drawing.Point(442, 589);
+            this.FolderPath_Label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.FolderPath_Label.Name = "FolderPath_Label";
+            this.FolderPath_Label.Size = new System.Drawing.Size(110, 31);
+=======
             this.FolderPath_Label.Location = new System.Drawing.Point(403, 616);
             this.FolderPath_Label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.FolderPath_Label.Name = "FolderPath_Label";
             this.FolderPath_Label.Size = new System.Drawing.Size(92, 27);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.FolderPath_Label.TabIndex = 158;
             this.FolderPath_Label.Text = "模板路径";
             // 
@@ -186,20 +291,34 @@ namespace UAS_LabelMachine
             "单盘",
             "中盒",
             "外箱"});
+<<<<<<< HEAD
+            this.la_type1.Location = new System.Drawing.Point(572, 545);
+            this.la_type1.Margin = new System.Windows.Forms.Padding(4);
+            this.la_type1.Name = "la_type1";
+            this.la_type1.Size = new System.Drawing.Size(240, 26);
+=======
             this.la_type1.Location = new System.Drawing.Point(531, 567);
             this.la_type1.Margin = new System.Windows.Forms.Padding(4);
             this.la_type1.Name = "la_type1";
             this.la_type1.Size = new System.Drawing.Size(213, 23);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.la_type1.TabIndex = 169;
             // 
             // cl_custcode_label
             // 
             this.cl_custcode_label.AutoSize = true;
             this.cl_custcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+<<<<<<< HEAD
+            this.cl_custcode_label.Location = new System.Drawing.Point(37, 540);
+            this.cl_custcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.cl_custcode_label.Name = "cl_custcode_label";
+            this.cl_custcode_label.Size = new System.Drawing.Size(110, 31);
+=======
             this.cl_custcode_label.Location = new System.Drawing.Point(27, 562);
             this.cl_custcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.cl_custcode_label.Name = "cl_custcode_label";
             this.cl_custcode_label.Size = new System.Drawing.Size(92, 27);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.cl_custcode_label.TabIndex = 167;
             this.cl_custcode_label.Text = "客户编号";
             // 
@@ -213,30 +332,51 @@ namespace UAS_LabelMachine
             // 
             this.la_code_label.AutoSize = true;
             this.la_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+<<<<<<< HEAD
+            this.la_code_label.Location = new System.Drawing.Point(841, 540);
+            this.la_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.la_code_label.Name = "la_code_label";
+            this.la_code_label.Size = new System.Drawing.Size(110, 31);
+=======
             this.la_code_label.Location = new System.Drawing.Point(777, 566);
             this.la_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.la_code_label.Name = "la_code_label";
             this.la_code_label.Size = new System.Drawing.Size(92, 27);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.la_code_label.TabIndex = 178;
             this.la_code_label.Text = "模板编号";
             // 
             // LabelParam
             // 
             this.LabelParam.AutoScroll = true;
+<<<<<<< HEAD
+            this.LabelParam.Location = new System.Drawing.Point(1269, 200);
+            this.LabelParam.Margin = new System.Windows.Forms.Padding(4);
+            this.LabelParam.Name = "LabelParam";
+            this.LabelParam.Size = new System.Drawing.Size(428, 318);
+=======
             this.LabelParam.Location = new System.Drawing.Point(1230, 147);
             this.LabelParam.Margin = new System.Windows.Forms.Padding(4);
             this.LabelParam.Name = "LabelParam";
             this.LabelParam.Size = new System.Drawing.Size(328, 400);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.LabelParam.TabIndex = 180;
             // 
             // NetURL_label
             // 
             this.NetURL_label.AutoSize = true;
             this.NetURL_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+<<<<<<< HEAD
+            this.NetURL_label.Location = new System.Drawing.Point(1234, 113);
+            this.NetURL_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.NetURL_label.Name = "NetURL_label";
+            this.NetURL_label.Size = new System.Drawing.Size(110, 31);
+=======
             this.NetURL_label.Location = new System.Drawing.Point(1248, 61);
             this.NetURL_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.NetURL_label.Name = "NetURL_label";
             this.NetURL_label.Size = new System.Drawing.Size(92, 27);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.NetURL_label.TabIndex = 181;
             this.NetURL_label.Text = "网络路径";
             // 
@@ -244,10 +384,17 @@ namespace UAS_LabelMachine
             // 
             this.cl_labeltype_label.AutoSize = true;
             this.cl_labeltype_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+<<<<<<< HEAD
+            this.cl_labeltype_label.Location = new System.Drawing.Point(860, 24);
+            this.cl_labeltype_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.cl_labeltype_label.Name = "cl_labeltype_label";
+            this.cl_labeltype_label.Size = new System.Drawing.Size(110, 31);
+=======
             this.cl_labeltype_label.Location = new System.Drawing.Point(812, 19);
             this.cl_labeltype_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.cl_labeltype_label.Name = "cl_labeltype_label";
             this.cl_labeltype_label.Size = new System.Drawing.Size(92, 27);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.cl_labeltype_label.TabIndex = 185;
             this.cl_labeltype_label.Text = "盘标类型";
             // 
@@ -256,10 +403,17 @@ namespace UAS_LabelMachine
             this.la_type.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.la_type.DropDownWidth = 161;
             this.la_type.FormattingEnabled = true;
+<<<<<<< HEAD
+            this.la_type.Location = new System.Drawing.Point(980, 24);
+            this.la_type.Margin = new System.Windows.Forms.Padding(4);
+            this.la_type.Name = "la_type";
+            this.la_type.Size = new System.Drawing.Size(240, 26);
+=======
             this.la_type.Location = new System.Drawing.Point(940, 20);
             this.la_type.Margin = new System.Windows.Forms.Padding(4);
             this.la_type.Name = "la_type";
             this.la_type.Size = new System.Drawing.Size(213, 23);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.la_type.TabIndex = 184;
             this.la_type.Tag = "cl_labeltype";
             // 
@@ -267,20 +421,34 @@ namespace UAS_LabelMachine
             // 
             this.la_name.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
+<<<<<<< HEAD
+            this.la_name.Location = new System.Drawing.Point(164, 585);
+            this.la_name.Margin = new System.Windows.Forms.Padding(4);
+            this.la_name.Name = "la_name";
+            this.la_name.Size = new System.Drawing.Size(221, 28);
+=======
             this.la_name.Location = new System.Drawing.Point(155, 616);
             this.la_name.Margin = new System.Windows.Forms.Padding(4);
             this.la_name.Name = "la_name";
             this.la_name.Size = new System.Drawing.Size(0, 25);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.la_name.TabIndex = 186;
             // 
             // la_name_label
             // 
             this.la_name_label.AutoSize = true;
             this.la_name_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+<<<<<<< HEAD
+            this.la_name_label.Location = new System.Drawing.Point(37, 585);
+            this.la_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.la_name_label.Name = "la_name_label";
+            this.la_name_label.Size = new System.Drawing.Size(110, 31);
+=======
             this.la_name_label.Location = new System.Drawing.Point(27, 616);
             this.la_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.la_name_label.Name = "la_name_label";
             this.la_name_label.Size = new System.Drawing.Size(92, 27);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.la_name_label.TabIndex = 187;
             this.la_name_label.Text = "模板名称";
             // 
@@ -289,14 +457,23 @@ namespace UAS_LabelMachine
             this.FTPShare.AutoSize = true;
             this.FTPShare.Checked = true;
             this.FTPShare.CheckState = System.Windows.Forms.CheckState.Checked;
+<<<<<<< HEAD
+            this.FTPShare.Location = new System.Drawing.Point(1002, 594);
+            this.FTPShare.Margin = new System.Windows.Forms.Padding(4);
+            this.FTPShare.Name = "FTPShare";
+            this.FTPShare.Size = new System.Drawing.Size(97, 22);
+=======
             this.FTPShare.Location = new System.Drawing.Point(905, 621);
             this.FTPShare.Margin = new System.Windows.Forms.Padding(4);
             this.FTPShare.Name = "FTPShare";
             this.FTPShare.Size = new System.Drawing.Size(83, 19);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.FTPShare.TabIndex = 188;
             this.FTPShare.Text = "FTP共享";
             this.FTPShare.UseVisualStyleBackColor = true;
             // 
+<<<<<<< HEAD
+=======
             // CodeSoft
             // 
             this.CodeSoft.AutoSize = true;
@@ -312,23 +489,38 @@ namespace UAS_LabelMachine
             this.CodeSoft.UseVisualStyleBackColor = true;
             this.CodeSoft.Visible = false;
             // 
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             // pagination1
             // 
             this.pagination1.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
             this.pagination1.Cursor = System.Windows.Forms.Cursors.Hand;
+<<<<<<< HEAD
+            this.pagination1.Location = new System.Drawing.Point(0, 667);
+            this.pagination1.Margin = new System.Windows.Forms.Padding(6);
+            this.pagination1.Name = "pagination1";
+            this.pagination1.Size = new System.Drawing.Size(1733, 39);
+=======
             this.pagination1.Location = new System.Drawing.Point(0, 683);
             this.pagination1.Margin = new System.Windows.Forms.Padding(5);
             this.pagination1.Name = "pagination1";
             this.pagination1.Size = new System.Drawing.Size(1572, 39);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.pagination1.TabIndex = 190;
             // 
             // NewLabel
             // 
             this.NewLabel.Image = ((System.Drawing.Image)(resources.GetObject("NewLabel.Image")));
+<<<<<<< HEAD
+            this.NewLabel.Location = new System.Drawing.Point(1269, 573);
+            this.NewLabel.Margin = new System.Windows.Forms.Padding(4);
+            this.NewLabel.Name = "NewLabel";
+            this.NewLabel.Size = new System.Drawing.Size(112, 44);
+=======
             this.NewLabel.Location = new System.Drawing.Point(1128, 613);
             this.NewLabel.Margin = new System.Windows.Forms.Padding(4);
             this.NewLabel.Name = "NewLabel";
             this.NewLabel.Size = new System.Drawing.Size(81, 30);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.NewLabel.TabIndex = 189;
             this.NewLabel.Tag = "IfWrite";
             this.NewLabel.Text = "新增标签";
@@ -338,10 +530,17 @@ namespace UAS_LabelMachine
             // NetURL
             // 
             this.NetURL.ID = null;
+<<<<<<< HEAD
+            this.NetURL.Location = new System.Drawing.Point(1393, 116);
+            this.NetURL.Margin = new System.Windows.Forms.Padding(4);
+            this.NetURL.Name = "NetURL";
+            this.NetURL.Size = new System.Drawing.Size(282, 28);
+=======
             this.NetURL.Location = new System.Drawing.Point(1368, 61);
             this.NetURL.Margin = new System.Windows.Forms.Padding(4);
             this.NetURL.Name = "NetURL";
             this.NetURL.Size = new System.Drawing.Size(161, 25);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.NetURL.Str = null;
             this.NetURL.Str1 = null;
             this.NetURL.Str2 = null;
@@ -354,12 +553,20 @@ namespace UAS_LabelMachine
             this.la_code.Caller = null;
             this.la_code.Condition = null;
             this.la_code.FormName = null;
+<<<<<<< HEAD
+            this.la_code.Location = new System.Drawing.Point(977, 544);
+=======
             this.la_code.Location = new System.Drawing.Point(905, 569);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.la_code.Margin = new System.Windows.Forms.Padding(4);
             this.la_code.Name = "la_code";
             this.la_code.SelectField = null;
             this.la_code.SetValueField = null;
+<<<<<<< HEAD
+            this.la_code.Size = new System.Drawing.Size(242, 32);
+=======
             this.la_code.Size = new System.Drawing.Size(215, 26);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.la_code.TabIndex = 179;
             this.la_code.TableName = null;
             this.la_code.Tag = "la_code";
@@ -367,10 +574,17 @@ namespace UAS_LabelMachine
             // Save
             // 
             this.Save.Image = ((System.Drawing.Image)(resources.GetObject("Save.Image")));
+<<<<<<< HEAD
+            this.Save.Location = new System.Drawing.Point(1107, 584);
+            this.Save.Margin = new System.Windows.Forms.Padding(4);
+            this.Save.Name = "Save";
+            this.Save.Size = new System.Drawing.Size(112, 44);
+=======
             this.Save.Location = new System.Drawing.Point(1020, 613);
             this.Save.Margin = new System.Windows.Forms.Padding(4);
             this.Save.Name = "Save";
             this.Save.Size = new System.Drawing.Size(81, 30);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.Save.TabIndex = 170;
             this.Save.Tag = "IfWrite";
             this.Save.Text = "保存";
@@ -379,20 +593,34 @@ namespace UAS_LabelMachine
             // 
             // ChooseAll
             // 
+<<<<<<< HEAD
+            this.ChooseAll.Location = new System.Drawing.Point(26, 146);
+            this.ChooseAll.Margin = new System.Windows.Forms.Padding(4);
+            this.ChooseAll.Name = "ChooseAll";
+            this.ChooseAll.Size = new System.Drawing.Size(76, 34);
+=======
             this.ChooseAll.Location = new System.Drawing.Point(23, 112);
             this.ChooseAll.Margin = new System.Windows.Forms.Padding(4);
             this.ChooseAll.Name = "ChooseAll";
             this.ChooseAll.Size = new System.Drawing.Size(45, 26);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.ChooseAll.TabIndex = 177;
             this.ChooseAll.Text = "全选";
             this.ChooseAll.UseVisualStyleBackColor = true;
             // 
             // PrinterList
             // 
+<<<<<<< HEAD
+            this.PrinterList.Location = new System.Drawing.Point(1393, 74);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(6, 8, 6, 8);
+            this.PrinterList.Name = "PrinterList";
+            this.PrinterList.Size = new System.Drawing.Size(284, 30);
+=======
             this.PrinterList.Location = new System.Drawing.Point(1368, 27);
             this.PrinterList.Margin = new System.Windows.Forms.Padding(5);
             this.PrinterList.Name = "PrinterList";
             this.PrinterList.Size = new System.Drawing.Size(161, 25);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.PrinterList.TabIndex = 174;
             // 
             // LabelDataGridView
@@ -414,6 +642,24 @@ namespace UAS_LabelMachine
             this.cl_detno,
             this.cl_labelsoft,
             this.cl_status});
+<<<<<<< HEAD
+            this.LabelDataGridView.Location = new System.Drawing.Point(26, 123);
+            this.LabelDataGridView.Margin = new System.Windows.Forms.Padding(4);
+            this.LabelDataGridView.Name = "LabelDataGridView";
+            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle1.BackColor = System.Drawing.Color.Blue;
+            dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
+            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.LabelDataGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle1;
+            dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;
+            this.LabelDataGridView.RowsDefaultCellStyle = dataGridViewCellStyle2;
+            this.LabelDataGridView.RowTemplate.Height = 23;
+            this.LabelDataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
+            this.LabelDataGridView.Size = new System.Drawing.Size(1193, 395);
+=======
             this.LabelDataGridView.Location = new System.Drawing.Point(23, 112);
             this.LabelDataGridView.Margin = new System.Windows.Forms.Padding(4);
             this.LabelDataGridView.Name = "LabelDataGridView";
@@ -430,6 +676,7 @@ namespace UAS_LabelMachine
             this.LabelDataGridView.RowTemplate.Height = 23;
             this.LabelDataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
             this.LabelDataGridView.Size = new System.Drawing.Size(1186, 435);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.LabelDataGridView.TabIndex = 172;
             this.LabelDataGridView.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.LabelDataGridView_CellContentClick);
             this.LabelDataGridView.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.LabelDataGridView_CellFormatting);
@@ -524,10 +771,17 @@ namespace UAS_LabelMachine
             // PrintTest
             // 
             this.PrintTest.Image = ((System.Drawing.Image)(resources.GetObject("PrintTest.Image")));
+<<<<<<< HEAD
+            this.PrintTest.Location = new System.Drawing.Point(1397, 573);
+            this.PrintTest.Margin = new System.Windows.Forms.Padding(4);
+            this.PrintTest.Name = "PrintTest";
+            this.PrintTest.Size = new System.Drawing.Size(112, 44);
+=======
             this.PrintTest.Location = new System.Drawing.Point(1354, 569);
             this.PrintTest.Margin = new System.Windows.Forms.Padding(4);
             this.PrintTest.Name = "PrintTest";
             this.PrintTest.Size = new System.Drawing.Size(81, 30);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.PrintTest.TabIndex = 166;
             this.PrintTest.Tag = "Print";
             this.PrintTest.Text = "打印测试";
@@ -539,12 +793,20 @@ namespace UAS_LabelMachine
             this.客户编号.Caller = null;
             this.客户编号.Condition = null;
             this.客户编号.FormName = null;
+<<<<<<< HEAD
+            this.客户编号.Location = new System.Drawing.Point(164, 539);
+=======
             this.客户编号.Location = new System.Drawing.Point(155, 566);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.客户编号.Margin = new System.Windows.Forms.Padding(4);
             this.客户编号.Name = "客户编号";
             this.客户编号.SelectField = null;
             this.客户编号.SetValueField = null;
+<<<<<<< HEAD
+            this.客户编号.Size = new System.Drawing.Size(242, 32);
+=======
             this.客户编号.Size = new System.Drawing.Size(181, 26);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.客户编号.TabIndex = 168;
             this.客户编号.TableName = null;
             this.客户编号.Tag = "cu_code";
@@ -554,12 +816,20 @@ namespace UAS_LabelMachine
             this.cu_code.Caller = null;
             this.cu_code.Condition = null;
             this.cu_code.FormName = null;
+<<<<<<< HEAD
+            this.cu_code.Location = new System.Drawing.Point(190, 24);
+=======
             this.cu_code.Location = new System.Drawing.Point(169, 20);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.cu_code.Margin = new System.Windows.Forms.Padding(4);
             this.cu_code.Name = "cu_code";
             this.cu_code.SelectField = null;
             this.cu_code.SetValueField = null;
+<<<<<<< HEAD
+            this.cu_code.Size = new System.Drawing.Size(225, 32);
+=======
             this.cu_code.Size = new System.Drawing.Size(200, 26);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.cu_code.TabIndex = 159;
             this.cu_code.TableName = null;
             this.cu_code.Tag = "cl_custcode";
@@ -567,10 +837,17 @@ namespace UAS_LabelMachine
             // UpdateGrid
             // 
             this.UpdateGrid.Image = ((System.Drawing.Image)(resources.GetObject("UpdateGrid.Image")));
+<<<<<<< HEAD
+            this.UpdateGrid.Location = new System.Drawing.Point(1044, 71);
+            this.UpdateGrid.Margin = new System.Windows.Forms.Padding(4);
+            this.UpdateGrid.Name = "UpdateGrid";
+            this.UpdateGrid.Size = new System.Drawing.Size(112, 44);
+=======
             this.UpdateGrid.Location = new System.Drawing.Point(927, 61);
             this.UpdateGrid.Margin = new System.Windows.Forms.Padding(4);
             this.UpdateGrid.Name = "UpdateGrid";
             this.UpdateGrid.Size = new System.Drawing.Size(81, 30);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.UpdateGrid.TabIndex = 154;
             this.UpdateGrid.Tag = "IfWrite";
             this.UpdateGrid.Text = "更新";
@@ -580,10 +857,17 @@ namespace UAS_LabelMachine
             // Screen
             // 
             this.Screen.Image = ((System.Drawing.Image)(resources.GetObject("Screen.Image")));
+<<<<<<< HEAD
+            this.Screen.Location = new System.Drawing.Point(866, 71);
+            this.Screen.Margin = new System.Windows.Forms.Padding(4);
+            this.Screen.Name = "Screen";
+            this.Screen.Size = new System.Drawing.Size(112, 44);
+=======
             this.Screen.Location = new System.Drawing.Point(776, 61);
             this.Screen.Margin = new System.Windows.Forms.Padding(4);
             this.Screen.Name = "Screen";
             this.Screen.Size = new System.Drawing.Size(81, 30);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.Screen.TabIndex = 153;
             this.Screen.Tag = "IfRead";
             this.Screen.Text = "筛选";
@@ -593,10 +877,17 @@ namespace UAS_LabelMachine
             // cu_name
             // 
             this.cu_name.ID = null;
+<<<<<<< HEAD
+            this.cu_name.Location = new System.Drawing.Point(628, 24);
+            this.cu_name.Margin = new System.Windows.Forms.Padding(4);
+            this.cu_name.Name = "cu_name";
+            this.cu_name.Size = new System.Drawing.Size(223, 28);
+=======
             this.cu_name.Location = new System.Drawing.Point(559, 20);
             this.cu_name.Margin = new System.Windows.Forms.Padding(4);
             this.cu_name.Name = "cu_name";
             this.cu_name.Size = new System.Drawing.Size(199, 25);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.cu_name.Str = null;
             this.cu_name.Str1 = null;
             this.cu_name.Str2 = null;
@@ -605,9 +896,15 @@ namespace UAS_LabelMachine
             // 
             // 客户标签维护
             // 
+<<<<<<< HEAD
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1732, 706);
+=======
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1572, 726);
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.Controls.Add(this.pagination1);
             this.Controls.Add(this.NewLabel);
             this.Controls.Add(this.FTPShare);
@@ -641,6 +938,10 @@ namespace UAS_LabelMachine
             this.Controls.Add(this.cu_name);
             this.Controls.Add(this.cl_code_label);
             this.Controls.Add(this.cu_name_label);
+<<<<<<< HEAD
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+=======
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
             this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "客户标签维护";
             this.Tag = "Make!CustLabel";

+ 2 - 1
UAS-出货标签管理/客户标签维护.cs

@@ -87,7 +87,7 @@ namespace UAS_LabelMachine
             la_code.SelectField = "la_code # 模板编号,la_name # 模板名称";
             NetURL.Text = Settings.Default.ShareUrl;
         }
-
+        
         private void 条码维护_Load(object sender, EventArgs e)
         {
             if (Settings.Default.FTPAddress == "")
@@ -104,6 +104,7 @@ namespace UAS_LabelMachine
             Width = Width + 1;
             asc.controllInitializeSize(this);
             lbl = new ApplicationClass();
+            Width = Width + 1;
         }
 
         private void LabelDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)

+ 6 - 0
UAS-出货标签管理/客户标签维护.resx

@@ -223,4 +223,10 @@
         48ufT7++/fX28+vfzz/+UQIABijggAQWaOCBCCao4FEaNejggxBG1NCEFFZoIUIBAQA7
 </value>
   </data>
+<<<<<<< HEAD
+  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>78</value>
+  </metadata>
+=======
+>>>>>>> 45a8a889b36b36e16643a2d33d74fc41ee4073a5
 </root>

+ 68 - 0
f

@@ -0,0 +1,68 @@
+diff --git a/TestProject/Form1.Designer.cs b/TestProject/Form1.Designer.cs
+index 403a991..5dedabe 100644
+--- a/TestProject/Form1.Designer.cs
++++ b/TestProject/Form1.Designer.cs
+@@ -28,53 +28,13 @@
+         /// </summary>
+         private void InitializeComponent()
+         {
+-            this.button1 = new System.Windows.Forms.Button();
+-            this.button2 = new System.Windows.Forms.Button();
+-            this.qqButton1 = new TestProject.QQButton();
+             this.SuspendLayout();
+             // 
+-            // button1
+-            // 
+-            this.button1.Location = new System.Drawing.Point(632, 124);
+-            this.button1.Margin = new System.Windows.Forms.Padding(4);
+-            this.button1.Name = "button1";
+-            this.button1.Size = new System.Drawing.Size(100, 29);
+-            this.button1.TabIndex = 0;
+-            this.button1.Text = "button1";
+-            this.button1.UseVisualStyleBackColor = true;
+-            this.button1.Click += new System.EventHandler(this.button1_Click);
+-            // 
+-            // button2
+-            // 
+-            this.button2.Location = new System.Drawing.Point(373, 112);
+-            this.button2.Margin = new System.Windows.Forms.Padding(4);
+-            this.button2.Name = "button2";
+-            this.button2.Size = new System.Drawing.Size(100, 29);
+-            this.button2.TabIndex = 1;
+-            this.button2.Text = "button2";
+-            this.button2.UseVisualStyleBackColor = true;
+-            this.button2.Click += new System.EventHandler(this.button2_Click);
+-            // 
+-            // qqButton1
+-            // 
+-            this.qqButton1.ForeColor = System.Drawing.SystemColors.ControlText;
+-            this.qqButton1.IsShowBorder = true;
+-            this.qqButton1.Location = new System.Drawing.Point(159, 112);
+-            this.qqButton1.Name = "qqButton1";
+-            this.qqButton1.Size = new System.Drawing.Size(166, 97);
+-            this.qqButton1.TabIndex = 2;
+-            this.qqButton1.Text = "12312";
+-            this.qqButton1.UseVisualStyleBackColor = true;
+-            this.qqButton1.Click += new System.EventHandler(this.qqButton1_Click);
+-            // 
+             // Form1
+             // 
+             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+             this.ClientSize = new System.Drawing.Size(1063, 578);
+-            this.Controls.Add(this.qqButton1);
+-            this.Controls.Add(this.button2);
+-            this.Controls.Add(this.button1);
+             this.Margin = new System.Windows.Forms.Padding(4);
+             this.Name = "Form1";
+             this.Text = "Form1";
+@@ -84,9 +44,6 @@
+         }
+ 
+         #endregion
+-
+-        private System.Windows.Forms.Button button1;
+-        private System.Windows.Forms.Button button2;
+         private QQButton qqButton1;
+     }
+ }

Some files were not shown because too many files changed in this diff