Ver Fonte

慧眼MES项目初始化

callm há 1 ano atrás
pai
commit
6e82c499bc
100 ficheiros alterados com 12627 adições e 0 exclusões
  1. 79 0
      UAS_MES_HYSX/App.config
  2. 444 0
      UAS_MES_HYSX/CustomControl/AccordionMenu/AccordionMenu.Designer.cs
  3. 317 0
      UAS_MES_HYSX/CustomControl/AccordionMenu/AccordionMenu.cs
  4. 783 0
      UAS_MES_HYSX/CustomControl/AccordionMenu/AccordionMenu.resx
  5. 74 0
      UAS_MES_HYSX/CustomControl/AccordionMenu/NavagationBar.Designer.cs
  6. 165 0
      UAS_MES_HYSX/CustomControl/AccordionMenu/NavagationBar.cs
  7. 123 0
      UAS_MES_HYSX/CustomControl/AccordionMenu/NavagationBar.resx
  8. 48 0
      UAS_MES_HYSX/CustomControl/BaseForm/BaseForm.Designer.cs
  9. 37 0
      UAS_MES_HYSX/CustomControl/BaseForm/BaseForm.cs
  10. 120 0
      UAS_MES_HYSX/CustomControl/BaseForm/BaseForm.resx
  11. 37 0
      UAS_MES_HYSX/CustomControl/ButtonUtil/ArrowLeftButton.Designer.cs
  12. 14 0
      UAS_MES_HYSX/CustomControl/ButtonUtil/ArrowLeftButton.cs
  13. 37 0
      UAS_MES_HYSX/CustomControl/ButtonUtil/ArrowRightButton.Designer.cs
  14. 14 0
      UAS_MES_HYSX/CustomControl/ButtonUtil/ArrowRightButton.cs
  15. 36 0
      UAS_MES_HYSX/CustomControl/ButtonUtil/ChooseAllButton.Designer.cs
  16. 49 0
      UAS_MES_HYSX/CustomControl/ButtonUtil/ChooseAllButton.cs
  17. 36 0
      UAS_MES_HYSX/CustomControl/ButtonUtil/CloseButton.Designer.cs
  18. 25 0
      UAS_MES_HYSX/CustomControl/ButtonUtil/CloseButton.cs
  19. 36 0
      UAS_MES_HYSX/CustomControl/ButtonUtil/DeleteButton.Designer.cs
  20. 52 0
      UAS_MES_HYSX/CustomControl/ButtonUtil/DeleteButton.cs
  21. 37 0
      UAS_MES_HYSX/CustomControl/ButtonUtil/LockMakeCode.Designer.cs
  22. 411 0
      UAS_MES_HYSX/CustomControl/ButtonUtil/LockMakeCode.cs
  23. 37 0
      UAS_MES_HYSX/CustomControl/ButtonUtil/NormalButton.Designer.cs
  24. 414 0
      UAS_MES_HYSX/CustomControl/ButtonUtil/NormalButton.cs
  25. 43 0
      UAS_MES_HYSX/CustomControl/ClickPicBox/ClickPicBox.Designer.cs
  26. 43 0
      UAS_MES_HYSX/CustomControl/ClickPicBox/ClickPicBox.cs
  27. 120 0
      UAS_MES_HYSX/CustomControl/ClickPicBox/ClickPicBox.resx
  28. 37 0
      UAS_MES_HYSX/CustomControl/ClickPicBox/LockIcon.Designer.cs
  29. 46 0
      UAS_MES_HYSX/CustomControl/ClickPicBox/LockIcon.cs
  30. 37 0
      UAS_MES_HYSX/CustomControl/ComBoxWithFocus/ComBoxWithFocus.Designer.cs
  31. 32 0
      UAS_MES_HYSX/CustomControl/ComBoxWithFocus/ComBoxWithFocus.cs
  32. 46 0
      UAS_MES_HYSX/CustomControl/ComBoxWithFocus/ComboxWithTip.Designer.cs
  33. 29 0
      UAS_MES_HYSX/CustomControl/ComBoxWithFocus/ComboxWithTip.cs
  34. 126 0
      UAS_MES_HYSX/CustomControl/ComBoxWithFocus/ComboxWithTip.resx
  35. 62 0
      UAS_MES_HYSX/CustomControl/ComBoxWithFocus/PrinterCombox.Designer.cs
  36. 53 0
      UAS_MES_HYSX/CustomControl/ComBoxWithFocus/PrinterCombox.cs
  37. 120 0
      UAS_MES_HYSX/CustomControl/ComBoxWithFocus/PrinterCombox.resx
  38. 62 0
      UAS_MES_HYSX/CustomControl/ComBoxWithFocus/SerialPortCombox.Designer.cs
  39. 43 0
      UAS_MES_HYSX/CustomControl/ComBoxWithFocus/SerialPortCombox.cs
  40. 120 0
      UAS_MES_HYSX/CustomControl/ComBoxWithFocus/SerialPortCombox.resx
  41. 62 0
      UAS_MES_HYSX/CustomControl/CustomCheckBox/AutoPrintCheckBox.Designer.cs
  42. 63 0
      UAS_MES_HYSX/CustomControl/CustomCheckBox/AutoPrintCheckBox.cs
  43. 120 0
      UAS_MES_HYSX/CustomControl/CustomCheckBox/AutoPrintCheckBox.resx
  44. 36 0
      UAS_MES_HYSX/CustomControl/CustomCheckBox/CustomCheckBox.Designer.cs
  45. 51 0
      UAS_MES_HYSX/CustomControl/CustomCheckBox/CustomCheckBox.cs
  46. 43 0
      UAS_MES_HYSX/CustomControl/CustomCheckBox/LockCheckBox.Designer.cs
  47. 76 0
      UAS_MES_HYSX/CustomControl/CustomCheckBox/LockCheckBox.cs
  48. 123 0
      UAS_MES_HYSX/CustomControl/CustomCheckBox/LockCheckBox.resx
  49. 42 0
      UAS_MES_HYSX/CustomControl/CustomCheckBox/ReSetCheckBox.Designer.cs
  50. 31 0
      UAS_MES_HYSX/CustomControl/CustomCheckBox/ReSetCheckBox.cs
  51. 123 0
      UAS_MES_HYSX/CustomControl/CustomCheckBox/ReSetCheckBox.resx
  52. 42 0
      UAS_MES_HYSX/CustomControl/CustomTabControl/CustomTabControl.Designer.cs
  53. 330 0
      UAS_MES_HYSX/CustomControl/CustomTabControl/CustomTabControl.cs
  54. 120 0
      UAS_MES_HYSX/CustomControl/CustomTabControl/CustomTabControl.resx
  55. 91 0
      UAS_MES_HYSX/CustomControl/CustomTabControl/ThemedColors.cs
  56. 42 0
      UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewExpand.Designer.cs
  57. 288 0
      UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewExpand.cs
  58. 123 0
      UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewExpand.resx
  59. 45 0
      UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewWithCheckBox.Designer.cs
  60. 129 0
      UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewWithCheckBox.cs
  61. 123 0
      UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewWithCheckBox.resx
  62. 45 0
      UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewWithFilter.Designer.cs
  63. 29 0
      UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewWithFilter.cs
  64. 123 0
      UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewWithFilter.resx
  65. 49 0
      UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewWithSerialNum.Designer.cs
  66. 72 0
      UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewWithSerialNum.cs
  67. 123 0
      UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewWithSerialNum.resx
  68. 44 0
      UAS_MES_HYSX/CustomControl/GroupBoxWithBorder/GroupBoxWithBorder.Designer.cs
  69. 66 0
      UAS_MES_HYSX/CustomControl/GroupBoxWithBorder/GroupBoxWithBorder.cs
  70. 152 0
      UAS_MES_HYSX/CustomControl/HeadBar/HeadBar.Designer.cs
  71. 150 0
      UAS_MES_HYSX/CustomControl/HeadBar/HeadBar.cs
  72. 432 0
      UAS_MES_HYSX/CustomControl/HeadBar/HeadBar.resx
  73. 127 0
      UAS_MES_HYSX/CustomControl/HeadBar/HeadBar.zu.resx
  74. 36 0
      UAS_MES_HYSX/CustomControl/ListViewExpand/ListViewExpand.Designer.cs
  75. 367 0
      UAS_MES_HYSX/CustomControl/ListViewExpand/ListViewExpand.cs
  76. 322 0
      UAS_MES_HYSX/CustomControl/Pagination/Pagination.Designer.cs
  77. 392 0
      UAS_MES_HYSX/CustomControl/Pagination/Pagination.cs
  78. 129 0
      UAS_MES_HYSX/CustomControl/Pagination/Pagination.resx
  79. 327 0
      UAS_MES_HYSX/CustomControl/Pagination/PaginationDbFind.Designer.cs
  80. 392 0
      UAS_MES_HYSX/CustomControl/Pagination/PaginationDbFind.cs
  81. 129 0
      UAS_MES_HYSX/CustomControl/Pagination/PaginationDbFind.resx
  82. 37 0
      UAS_MES_HYSX/CustomControl/PowerControlForm/PowerControlForm.Designer.cs
  83. 49 0
      UAS_MES_HYSX/CustomControl/PowerControlForm/PowerControlForm.cs
  84. 120 0
      UAS_MES_HYSX/CustomControl/PowerControlForm/PowerControlForm.resx
  85. 61 0
      UAS_MES_HYSX/CustomControl/ProcessBar/ProcessBar.Designer.cs
  86. 209 0
      UAS_MES_HYSX/CustomControl/ProcessBar/ProcessBar.cs
  87. 120 0
      UAS_MES_HYSX/CustomControl/ProcessBar/ProcessBar.resx
  88. 36 0
      UAS_MES_HYSX/CustomControl/RichText/RichTextAutoBottom.Designer.cs
  89. 149 0
      UAS_MES_HYSX/CustomControl/RichText/RichTextAutoBottom.cs
  90. 28 0
      UAS_MES_HYSX/CustomControl/SetLoading/LoadingCircle.Designer.cs
  91. 470 0
      UAS_MES_HYSX/CustomControl/SetLoading/LoadingCircle.cs
  92. 88 0
      UAS_MES_HYSX/CustomControl/TextBoxWithIcon/BlurSearch.Designer.cs
  93. 245 0
      UAS_MES_HYSX/CustomControl/TextBoxWithIcon/BlurSearch.cs
  94. 120 0
      UAS_MES_HYSX/CustomControl/TextBoxWithIcon/BlurSearch.resx
  95. 45 0
      UAS_MES_HYSX/CustomControl/TextBoxWithIcon/EnterTextBox.Designer.cs
  96. 101 0
      UAS_MES_HYSX/CustomControl/TextBoxWithIcon/EnterTextBox.cs
  97. 123 0
      UAS_MES_HYSX/CustomControl/TextBoxWithIcon/EnterTextBox.resx
  98. 89 0
      UAS_MES_HYSX/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.Designer.cs
  99. 364 0
      UAS_MES_HYSX/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.cs
  100. 120 0
      UAS_MES_HYSX/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.resx

+ 79 - 0
UAS_MES_HYSX/App.config

@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <configSections>
+    <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+      <section name="UAS_MES_NEW.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
+      <section name="UAS_MES.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
+    </sectionGroup>
+    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
+    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
+      <section name="UAS_MES_NEW.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
+      <section name="UAS_MES.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
+    </sectionGroup>
+  </configSections>
+  <startup useLegacyV2RuntimeActivationPolicy="true"> 
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
+    <supportedRuntime version="v2.0.50727" />
+  </startup>
+  <userSettings>
+    <UAS_MES_NEW.Properties.Settings>
+      <setting name="ProjectName" serializeAs="String">
+        <value>优软科技MES</value>
+      </setting>
+      <setting name="LastLoginUser" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="LastLoginSob" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="LastLoginResource" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="DefaultCollectionValue" serializeAs="String">
+        <value>DefaultValue</value>
+      </setting>
+      <setting name="PortName" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="BaudRate" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="FTPAddress" serializeAs="String">
+        <value>ftp://10.8.0.82|vsftpd|vsftpd</value>
+      </setting>
+    </UAS_MES_NEW.Properties.Settings>
+    <UAS_MES.Properties.Settings>
+      <setting name="ProjectName" serializeAs="String">
+        <value>优软科技MES</value>
+      </setting>
+      <setting name="LastLoginUser" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="LastLoginSob" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="LastLoginResource" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="DefaultCollectionValue" serializeAs="String">
+        <value>DefaultValue</value>
+      </setting>
+      <setting name="PortName" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="BaudRate" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="FTPAddress" serializeAs="String">
+        <value>\\172.16.66.51\lable</value>
+      </setting>
+    </UAS_MES.Properties.Settings>
+  </userSettings>
+  <applicationSettings>
+    <UAS_MES_NEW.Properties.Settings>
+      <setting name="MES" serializeAs="String">
+        <value />
+      </setting>
+    </UAS_MES_NEW.Properties.Settings>
+  </applicationSettings>
+</configuration>

+ 444 - 0
UAS_MES_HYSX/CustomControl/AccordionMenu/AccordionMenu.Designer.cs

@@ -0,0 +1,444 @@
+namespace UAS_MES_NEW.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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AccordionMenu));
+            this.SMT作业_lsv = new System.Windows.Forms.ListView();
+            this.timer1 = new System.Windows.Forms.Timer(this.components);
+            this.产线作业_lsv = new System.Windows.Forms.ListView();
+            this.特殊作业_lsv = new System.Windows.Forms.ListView();
+            this.仓库作业_lsv = new System.Windows.Forms.ListView();
+            this.查询分析_lsv = new System.Windows.Forms.ListView();
+            this.库存管理_lsv = new System.Windows.Forms.ListView();
+            this.系统设置_lsv = new System.Windows.Forms.ListView();
+            this.OQC作业_lsv = new System.Windows.Forms.ListView();
+            this.人员管理_lsv = new System.Windows.Forms.ListView();
+            this.库存管理 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.SMT作业 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.人员管理 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.OQC作业 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.系统设置 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.查询分析 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.仓库作业 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.特殊作业 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.产线作业 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.包装作业_lsv = new System.Windows.Forms.ListView();
+            this.包装作业 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.SuspendLayout();
+            // 
+            // SMT作业_lsv
+            // 
+            this.SMT作业_lsv.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.SMT作业_lsv.Location = new System.Drawing.Point(349, 108);
+            this.SMT作业_lsv.Margin = new System.Windows.Forms.Padding(4);
+            this.SMT作业_lsv.Name = "SMT作业_lsv";
+            this.SMT作业_lsv.Size = new System.Drawing.Size(160, 309);
+            this.SMT作业_lsv.TabIndex = 3;
+            this.SMT作业_lsv.UseCompatibleStateImageBehavior = false;
+            this.SMT作业_lsv.View = System.Windows.Forms.View.SmallIcon;
+            this.SMT作业_lsv.Visible = false;
+            // 
+            // 产线作业_lsv
+            // 
+            this.产线作业_lsv.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.产线作业_lsv.Location = new System.Drawing.Point(523, 108);
+            this.产线作业_lsv.Margin = new System.Windows.Forms.Padding(4);
+            this.产线作业_lsv.Name = "产线作业_lsv";
+            this.产线作业_lsv.Size = new System.Drawing.Size(160, 309);
+            this.产线作业_lsv.TabIndex = 4;
+            this.产线作业_lsv.UseCompatibleStateImageBehavior = false;
+            this.产线作业_lsv.View = System.Windows.Forms.View.SmallIcon;
+            this.产线作业_lsv.Visible = false;
+            // 
+            // 特殊作业_lsv
+            // 
+            this.特殊作业_lsv.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.特殊作业_lsv.Location = new System.Drawing.Point(700, 108);
+            this.特殊作业_lsv.Margin = new System.Windows.Forms.Padding(4);
+            this.特殊作业_lsv.Name = "特殊作业_lsv";
+            this.特殊作业_lsv.Size = new System.Drawing.Size(160, 309);
+            this.特殊作业_lsv.TabIndex = 0;
+            this.特殊作业_lsv.UseCompatibleStateImageBehavior = false;
+            this.特殊作业_lsv.View = System.Windows.Forms.View.SmallIcon;
+            this.特殊作业_lsv.Visible = false;
+            // 
+            // 仓库作业_lsv
+            // 
+            this.仓库作业_lsv.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.仓库作业_lsv.Location = new System.Drawing.Point(876, 108);
+            this.仓库作业_lsv.Margin = new System.Windows.Forms.Padding(4);
+            this.仓库作业_lsv.Name = "仓库作业_lsv";
+            this.仓库作业_lsv.Size = new System.Drawing.Size(160, 309);
+            this.仓库作业_lsv.TabIndex = 6;
+            this.仓库作业_lsv.UseCompatibleStateImageBehavior = false;
+            this.仓库作业_lsv.View = System.Windows.Forms.View.SmallIcon;
+            this.仓库作业_lsv.Visible = false;
+            // 
+            // 查询分析_lsv
+            // 
+            this.查询分析_lsv.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.查询分析_lsv.Location = new System.Drawing.Point(1047, 108);
+            this.查询分析_lsv.Margin = new System.Windows.Forms.Padding(4);
+            this.查询分析_lsv.Name = "查询分析_lsv";
+            this.查询分析_lsv.Size = new System.Drawing.Size(160, 309);
+            this.查询分析_lsv.TabIndex = 7;
+            this.查询分析_lsv.UseCompatibleStateImageBehavior = false;
+            this.查询分析_lsv.View = System.Windows.Forms.View.SmallIcon;
+            this.查询分析_lsv.Visible = false;
+            // 
+            // 库存管理_lsv
+            // 
+            this.库存管理_lsv.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.库存管理_lsv.Location = new System.Drawing.Point(5, 108);
+            this.库存管理_lsv.Margin = new System.Windows.Forms.Padding(4);
+            this.库存管理_lsv.Name = "库存管理_lsv";
+            this.库存管理_lsv.Size = new System.Drawing.Size(160, 309);
+            this.库存管理_lsv.TabIndex = 1;
+            this.库存管理_lsv.UseCompatibleStateImageBehavior = false;
+            this.库存管理_lsv.View = System.Windows.Forms.View.SmallIcon;
+            this.库存管理_lsv.Visible = false;
+            // 
+            // 系统设置_lsv
+            // 
+            this.系统设置_lsv.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.系统设置_lsv.Location = new System.Drawing.Point(177, 108);
+            this.系统设置_lsv.Margin = new System.Windows.Forms.Padding(4);
+            this.系统设置_lsv.Name = "系统设置_lsv";
+            this.系统设置_lsv.Size = new System.Drawing.Size(160, 309);
+            this.系统设置_lsv.TabIndex = 2;
+            this.系统设置_lsv.UseCompatibleStateImageBehavior = false;
+            this.系统设置_lsv.View = System.Windows.Forms.View.SmallIcon;
+            this.系统设置_lsv.Visible = false;
+            // 
+            // OQC作业_lsv
+            // 
+            this.OQC作业_lsv.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OQC作业_lsv.Location = new System.Drawing.Point(1217, 108);
+            this.OQC作业_lsv.Margin = new System.Windows.Forms.Padding(4);
+            this.OQC作业_lsv.Name = "OQC作业_lsv";
+            this.OQC作业_lsv.Size = new System.Drawing.Size(160, 309);
+            this.OQC作业_lsv.TabIndex = 11;
+            this.OQC作业_lsv.Tag = "OQC作业_lsv";
+            this.OQC作业_lsv.UseCompatibleStateImageBehavior = false;
+            this.OQC作业_lsv.View = System.Windows.Forms.View.SmallIcon;
+            this.OQC作业_lsv.Visible = false;
+            // 
+            // 人员管理_lsv
+            // 
+            this.人员管理_lsv.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.人员管理_lsv.Location = new System.Drawing.Point(1387, 108);
+            this.人员管理_lsv.Margin = new System.Windows.Forms.Padding(4);
+            this.人员管理_lsv.Name = "人员管理_lsv";
+            this.人员管理_lsv.Size = new System.Drawing.Size(160, 309);
+            this.人员管理_lsv.TabIndex = 13;
+            this.人员管理_lsv.Tag = "人员管理_lsv";
+            this.人员管理_lsv.UseCompatibleStateImageBehavior = false;
+            this.人员管理_lsv.View = System.Windows.Forms.View.SmallIcon;
+            this.人员管理_lsv.Visible = false;
+            // 
+            // 库存管理
+            // 
+            this.库存管理.AllPower = null;
+            this.库存管理.BackColor = System.Drawing.Color.Transparent;
+            this.库存管理.DownImage = ((System.Drawing.Image)(resources.GetObject("库存管理.DownImage")));
+            this.库存管理.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.库存管理.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.库存管理.Image = ((System.Drawing.Image)(resources.GetObject("库存管理.Image")));
+            this.库存管理.IsShowBorder = true;
+            this.库存管理.Location = new System.Drawing.Point(5, 30);
+            this.库存管理.Margin = new System.Windows.Forms.Padding(4);
+            this.库存管理.MoveImage = ((System.Drawing.Image)(resources.GetObject("库存管理.MoveImage")));
+            this.库存管理.Name = "库存管理";
+            this.库存管理.NormalImage = ((System.Drawing.Image)(resources.GetObject("库存管理.NormalImage")));
+            this.库存管理.Power = null;
+            this.库存管理.Size = new System.Drawing.Size(161, 50);
+            this.库存管理.TabIndex = 15;
+            this.库存管理.Text = "库存管理";
+            this.库存管理.UseVisualStyleBackColor = true;
+            this.库存管理.Visible = false;
+            // 
+            // SMT作业
+            // 
+            this.SMT作业.AllPower = null;
+            this.SMT作业.BackColor = System.Drawing.Color.Transparent;
+            this.SMT作业.DownImage = ((System.Drawing.Image)(resources.GetObject("SMT作业.DownImage")));
+            this.SMT作业.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.SMT作业.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.SMT作业.Image = ((System.Drawing.Image)(resources.GetObject("SMT作业.Image")));
+            this.SMT作业.IsShowBorder = true;
+            this.SMT作业.Location = new System.Drawing.Point(346, 30);
+            this.SMT作业.Margin = new System.Windows.Forms.Padding(4);
+            this.SMT作业.MoveImage = ((System.Drawing.Image)(resources.GetObject("SMT作业.MoveImage")));
+            this.SMT作业.Name = "SMT作业";
+            this.SMT作业.NormalImage = ((System.Drawing.Image)(resources.GetObject("SMT作业.NormalImage")));
+            this.SMT作业.Power = null;
+            this.SMT作业.Size = new System.Drawing.Size(161, 50);
+            this.SMT作业.TabIndex = 14;
+            this.SMT作业.Text = "SMT作业";
+            this.SMT作业.UseVisualStyleBackColor = true;
+            this.SMT作业.Visible = false;
+            // 
+            // 人员管理
+            // 
+            this.人员管理.AllPower = null;
+            this.人员管理.BackColor = System.Drawing.Color.Transparent;
+            this.人员管理.DownImage = ((System.Drawing.Image)(resources.GetObject("人员管理.DownImage")));
+            this.人员管理.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.人员管理.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.人员管理.Image = global::UAS_MES_NEW.Properties.Resources._2_0btn_36;
+            this.人员管理.IsShowBorder = true;
+            this.人员管理.Location = new System.Drawing.Point(1387, 30);
+            this.人员管理.Margin = new System.Windows.Forms.Padding(4);
+            this.人员管理.MoveImage = ((System.Drawing.Image)(resources.GetObject("人员管理.MoveImage")));
+            this.人员管理.Name = "人员管理";
+            this.人员管理.NormalImage = ((System.Drawing.Image)(resources.GetObject("人员管理.NormalImage")));
+            this.人员管理.Power = null;
+            this.人员管理.Size = new System.Drawing.Size(161, 50);
+            this.人员管理.TabIndex = 12;
+            this.人员管理.Text = "人员管理";
+            this.人员管理.UseVisualStyleBackColor = true;
+            this.人员管理.Visible = false;
+            // 
+            // OQC作业
+            // 
+            this.OQC作业.AllPower = null;
+            this.OQC作业.BackColor = System.Drawing.Color.Transparent;
+            this.OQC作业.DownImage = ((System.Drawing.Image)(resources.GetObject("OQC作业.DownImage")));
+            this.OQC作业.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OQC作业.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.OQC作业.Image = global::UAS_MES_NEW.Properties.Resources._2_0btn_36;
+            this.OQC作业.IsShowBorder = true;
+            this.OQC作业.Location = new System.Drawing.Point(1217, 30);
+            this.OQC作业.Margin = new System.Windows.Forms.Padding(4);
+            this.OQC作业.MoveImage = ((System.Drawing.Image)(resources.GetObject("OQC作业.MoveImage")));
+            this.OQC作业.Name = "OQC作业";
+            this.OQC作业.NormalImage = ((System.Drawing.Image)(resources.GetObject("OQC作业.NormalImage")));
+            this.OQC作业.Power = null;
+            this.OQC作业.Size = new System.Drawing.Size(161, 50);
+            this.OQC作业.TabIndex = 10;
+            this.OQC作业.Text = "OQC作业";
+            this.OQC作业.UseVisualStyleBackColor = true;
+            this.OQC作业.Visible = false;
+            // 
+            // 系统设置
+            // 
+            this.系统设置.AllPower = null;
+            this.系统设置.BackColor = System.Drawing.Color.Transparent;
+            this.系统设置.DownImage = ((System.Drawing.Image)(resources.GetObject("系统设置.DownImage")));
+            this.系统设置.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.系统设置.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.系统设置.Image = ((System.Drawing.Image)(resources.GetObject("系统设置.Image")));
+            this.系统设置.IsShowBorder = true;
+            this.系统设置.Location = new System.Drawing.Point(177, 30);
+            this.系统设置.Margin = new System.Windows.Forms.Padding(4);
+            this.系统设置.MoveImage = ((System.Drawing.Image)(resources.GetObject("系统设置.MoveImage")));
+            this.系统设置.Name = "系统设置";
+            this.系统设置.NormalImage = ((System.Drawing.Image)(resources.GetObject("系统设置.NormalImage")));
+            this.系统设置.Power = null;
+            this.系统设置.Size = new System.Drawing.Size(161, 50);
+            this.系统设置.TabIndex = 2;
+            this.系统设置.Text = "系统设置";
+            this.系统设置.UseVisualStyleBackColor = true;
+            this.系统设置.Visible = false;
+            // 
+            // 查询分析
+            // 
+            this.查询分析.AllPower = null;
+            this.查询分析.BackColor = System.Drawing.Color.Transparent;
+            this.查询分析.DownImage = ((System.Drawing.Image)(resources.GetObject("查询分析.DownImage")));
+            this.查询分析.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.查询分析.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.查询分析.Image = global::UAS_MES_NEW.Properties.Resources._2_0btn_36;
+            this.查询分析.IsShowBorder = true;
+            this.查询分析.Location = new System.Drawing.Point(1047, 30);
+            this.查询分析.Margin = new System.Windows.Forms.Padding(4);
+            this.查询分析.MoveImage = ((System.Drawing.Image)(resources.GetObject("查询分析.MoveImage")));
+            this.查询分析.Name = "查询分析";
+            this.查询分析.NormalImage = ((System.Drawing.Image)(resources.GetObject("查询分析.NormalImage")));
+            this.查询分析.Power = null;
+            this.查询分析.Size = new System.Drawing.Size(161, 50);
+            this.查询分析.TabIndex = 7;
+            this.查询分析.Text = "查询分析";
+            this.查询分析.UseVisualStyleBackColor = true;
+            this.查询分析.Visible = false;
+            // 
+            // 仓库作业
+            // 
+            this.仓库作业.AllPower = null;
+            this.仓库作业.BackColor = System.Drawing.Color.Transparent;
+            this.仓库作业.DownImage = ((System.Drawing.Image)(resources.GetObject("仓库作业.DownImage")));
+            this.仓库作业.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.仓库作业.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.仓库作业.Image = global::UAS_MES_NEW.Properties.Resources._2_0btn_36;
+            this.仓库作业.IsShowBorder = true;
+            this.仓库作业.Location = new System.Drawing.Point(876, 30);
+            this.仓库作业.Margin = new System.Windows.Forms.Padding(0);
+            this.仓库作业.MoveImage = ((System.Drawing.Image)(resources.GetObject("仓库作业.MoveImage")));
+            this.仓库作业.Name = "仓库作业";
+            this.仓库作业.NormalImage = ((System.Drawing.Image)(resources.GetObject("仓库作业.NormalImage")));
+            this.仓库作业.Power = null;
+            this.仓库作业.Size = new System.Drawing.Size(161, 50);
+            this.仓库作业.TabIndex = 6;
+            this.仓库作业.Text = "仓库作业";
+            this.仓库作业.UseVisualStyleBackColor = true;
+            this.仓库作业.Visible = false;
+            // 
+            // 特殊作业
+            // 
+            this.特殊作业.AllPower = null;
+            this.特殊作业.BackColor = System.Drawing.Color.Transparent;
+            this.特殊作业.DownImage = ((System.Drawing.Image)(resources.GetObject("特殊作业.DownImage")));
+            this.特殊作业.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.特殊作业.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.特殊作业.Image = global::UAS_MES_NEW.Properties.Resources._2_0btn_36;
+            this.特殊作业.IsShowBorder = true;
+            this.特殊作业.Location = new System.Drawing.Point(700, 30);
+            this.特殊作业.Margin = new System.Windows.Forms.Padding(4);
+            this.特殊作业.MoveImage = ((System.Drawing.Image)(resources.GetObject("特殊作业.MoveImage")));
+            this.特殊作业.Name = "特殊作业";
+            this.特殊作业.NormalImage = ((System.Drawing.Image)(resources.GetObject("特殊作业.NormalImage")));
+            this.特殊作业.Power = null;
+            this.特殊作业.Size = new System.Drawing.Size(161, 50);
+            this.特殊作业.TabIndex = 0;
+            this.特殊作业.Text = "特殊作业";
+            this.特殊作业.UseVisualStyleBackColor = true;
+            this.特殊作业.Visible = false;
+            // 
+            // 产线作业
+            // 
+            this.产线作业.AllPower = null;
+            this.产线作业.BackColor = System.Drawing.Color.Transparent;
+            this.产线作业.DownImage = ((System.Drawing.Image)(resources.GetObject("产线作业.DownImage")));
+            this.产线作业.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.产线作业.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.产线作业.Image = global::UAS_MES_NEW.Properties.Resources._2_0btn_36;
+            this.产线作业.IsShowBorder = true;
+            this.产线作业.Location = new System.Drawing.Point(523, 30);
+            this.产线作业.Margin = new System.Windows.Forms.Padding(4);
+            this.产线作业.MoveImage = ((System.Drawing.Image)(resources.GetObject("产线作业.MoveImage")));
+            this.产线作业.Name = "产线作业";
+            this.产线作业.NormalImage = ((System.Drawing.Image)(resources.GetObject("产线作业.NormalImage")));
+            this.产线作业.Power = null;
+            this.产线作业.Size = new System.Drawing.Size(161, 50);
+            this.产线作业.TabIndex = 4;
+            this.产线作业.Text = "产线作业";
+            this.产线作业.UseVisualStyleBackColor = true;
+            this.产线作业.Visible = false;
+            // 
+            // 包装作业_lsv
+            // 
+            this.包装作业_lsv.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.包装作业_lsv.Location = new System.Drawing.Point(1555, 108);
+            this.包装作业_lsv.Margin = new System.Windows.Forms.Padding(4);
+            this.包装作业_lsv.Name = "包装作业_lsv";
+            this.包装作业_lsv.Size = new System.Drawing.Size(160, 309);
+            this.包装作业_lsv.TabIndex = 17;
+            this.包装作业_lsv.Tag = "包装作业_lsv";
+            this.包装作业_lsv.UseCompatibleStateImageBehavior = false;
+            this.包装作业_lsv.View = System.Windows.Forms.View.SmallIcon;
+            this.包装作业_lsv.Visible = false;
+            // 
+            // 包装作业
+            // 
+            this.包装作业.AllPower = null;
+            this.包装作业.BackColor = System.Drawing.Color.Transparent;
+            this.包装作业.DownImage = ((System.Drawing.Image)(resources.GetObject("包装作业.DownImage")));
+            this.包装作业.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.包装作业.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.包装作业.Image = global::UAS_MES_NEW.Properties.Resources._2_0btn_36;
+            this.包装作业.IsShowBorder = true;
+            this.包装作业.Location = new System.Drawing.Point(1555, 30);
+            this.包装作业.Margin = new System.Windows.Forms.Padding(4);
+            this.包装作业.MoveImage = ((System.Drawing.Image)(resources.GetObject("包装作业.MoveImage")));
+            this.包装作业.Name = "包装作业";
+            this.包装作业.NormalImage = ((System.Drawing.Image)(resources.GetObject("包装作业.NormalImage")));
+            this.包装作业.Power = null;
+            this.包装作业.Size = new System.Drawing.Size(161, 50);
+            this.包装作业.TabIndex = 16;
+            this.包装作业.Text = "包装作业";
+            this.包装作业.UseVisualStyleBackColor = true;
+            this.包装作业.Visible = false;
+            // 
+            // AccordionMenu
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.包装作业_lsv);
+            this.Controls.Add(this.包装作业);
+            this.Controls.Add(this.库存管理);
+            this.Controls.Add(this.SMT作业);
+            this.Controls.Add(this.人员管理_lsv);
+            this.Controls.Add(this.人员管理);
+            this.Controls.Add(this.OQC作业_lsv);
+            this.Controls.Add(this.OQC作业);
+            this.Controls.Add(this.系统设置);
+            this.Controls.Add(this.系统设置_lsv);
+            this.Controls.Add(this.库存管理_lsv);
+            this.Controls.Add(this.查询分析_lsv);
+            this.Controls.Add(this.查询分析);
+            this.Controls.Add(this.仓库作业);
+            this.Controls.Add(this.仓库作业_lsv);
+            this.Controls.Add(this.特殊作业_lsv);
+            this.Controls.Add(this.产线作业_lsv);
+            this.Controls.Add(this.特殊作业);
+            this.Controls.Add(this.产线作业);
+            this.Controls.Add(this.SMT作业_lsv);
+            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Name = "AccordionMenu";
+            this.Size = new System.Drawing.Size(1741, 452);
+            this.Load += new System.EventHandler(this.AccordionMenu_Load);
+            this.ResumeLayout(true);
+
+        }
+
+        #endregion
+        private System.Windows.Forms.ListView SMT作业_lsv;
+        private System.Windows.Forms.Timer timer1;
+        private System.Windows.Forms.ListView 产线作业_lsv;
+        private System.Windows.Forms.ListView 特殊作业_lsv;
+        private System.Windows.Forms.ListView 仓库作业_lsv;
+        private System.Windows.Forms.ListView 查询分析_lsv;
+        private System.Windows.Forms.ListView 库存管理_lsv;
+        private System.Windows.Forms.ListView 系统设置_lsv;
+        private ButtonUtil.NormalButton 系统设置;
+        private System.Windows.Forms.ListView OQC作业_lsv;
+        private System.Windows.Forms.ListView 人员管理_lsv;
+        private ButtonUtil.NormalButton SMT作业;
+        private ButtonUtil.NormalButton 库存管理;
+        private ButtonUtil.NormalButton 产线作业;
+        private ButtonUtil.NormalButton 特殊作业;
+        private ButtonUtil.NormalButton 仓库作业;
+        private ButtonUtil.NormalButton 查询分析;
+        private ButtonUtil.NormalButton OQC作业;
+        private ButtonUtil.NormalButton 人员管理;
+        private System.Windows.Forms.ListView 包装作业_lsv;
+        private ButtonUtil.NormalButton 包装作业;
+    }
+}

+ 317 - 0
UAS_MES_HYSX/CustomControl/AccordionMenu/AccordionMenu.cs

@@ -0,0 +1,317 @@
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+using System.Collections;
+using System.Reflection;
+using System.Data;
+using System.Text;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using System.Collections.Generic;
+
+namespace UAS_MES_NEW.CustomControl.AccordionMenu
+{
+    public partial class AccordionMenu : UserControl
+    {
+        #region 变量
+        /// <summary>
+        /// 记录当前功能面板中的按钮
+        /// </summary>
+        private ArrayList ArrFunButton = new ArrayList();
+        /// <summary>
+        /// 记录当前功能面板中的listview
+        /// </summary>
+        private ArrayList ArrFunListView = new ArrayList();
+        /// <summary>
+        /// 已经打开的Form
+        /// </summary>
+        public static Dictionary<string, int> OpenedFormName = new Dictionary<string, int>();
+        /// <summary>
+        /// 功能面板的宽度
+        /// </summary>
+        private int m_nPanFunWidth = 160;
+        //功能面板隐藏后的宽度
+        private int m_nPanFunHideWidth = 0;
+        //Tabpage的索引
+        public static int WinIndex = 0;
+        /// <summary>
+        /// Button和ListView的个数,因为两者数量必相等,所以用一个变量代替
+        /// </summary>
+        private string[] Module;
+        #endregion
+        private DataHelper dh;
+
+        private StringBuilder sql = new StringBuilder();
+
+        public AccordionMenu()
+        {
+            InitializeComponent();
+        }
+
+        private void AccordionMenu_Load(object sender, EventArgs e)
+        {
+            //设置功能面板的位置和宽带
+            this.Width = m_nPanFunWidth;
+
+            //查询该用户所在的组别有权限查看的模块
+            dh = SystemInf.dh;
+
+            if (User.UserAccountType == "admin")
+            {
+                sql.Clear();
+                sql.Append("select distinct sn_detno,sn_module,sn_modulecode,sn_caller ugp_caller,1 ugp_ifdelete,1 ugp_ifread,1 ugp_ifspecial,1 ugp_ifall,");
+                sql.Append("1 ugp_ifwrite from CS$SYSNAVATION left join CS$USERGROUPPOWER on sn_caller=ugp_caller  where sn_using=1  order by sn_modulecode,sn_detno");
+            }
+            else
+            {
+                sql.Clear();
+                sql.Append("select  sn_detno,sn_module,sn_modulecode,ugp_caller,max(ugp_ifdelete)ugp_ifdelete,max(ugp_ifread)ugp_ifread");
+                sql.Append(",max(ugp_ifspecial)ugp_ifspecial,max(ugp_ifwrite)ugp_ifwrite,max(ugp_ifall)ugp_ifall from CS$USERGROUPPOWER ");
+                sql.Append("left join CS$SYSNAVATION on sn_caller=ugp_caller  where sn_using=1 and ugp_groupcode in ( select eg_groupcode from cs$empgroup ");
+                sql.Append("left join cs$userresource on ur_groupcode = eg_groupcode where eg_emcode = '" + User.UserCode + "') group by sn_detno,sn_module,sn_modulecode,ugp_caller order by sn_modulecode,sn_detno");
+            }
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
+            //查询到没有结果直接返回,避免后面处理空值
+            if (dt.Rows.Count == 0 && User.UserAccountType != "admin")
+            {
+                return;
+            }
+            //设置ListView的样式
+            foreach (Control c in this.Controls)
+            {
+                //设置ListView的格式和记录控件的个数
+                if (c is ListView)
+                {
+                    ListView ls = c as ListView;
+                    ls.View = View.SmallIcon;
+                    ls.SmallImageList = new ImageList();
+                    ls.SmallImageList.ImageSize = new Size(10, 30);
+                    ls.Height = 200;
+                }
+            }
+            //用于存储模块的数组
+            Module = new string[dt.Rows.Count];
+            //用于拼接模块名称的字符串 例如(a,b,c)
+            string Modules = "";
+            //查询出的用户可见的Caller
+            string[] Caller_List = new string[dt.Rows.Count];
+            string Callers = "";
+            //将查询出的数据添加到队列中
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                //在这个Caller范围内的是用户可见的导航
+                if (dt.Rows[i]["UGP_IFREAD"].ToString() == "1" || dt.Rows[i]["UGP_IFALL"].ToString() == "1")
+                {
+                    Callers += "'" + dt.Rows[i]["ugp_caller"].ToString() + "',";
+                }
+                //用一个数组记录所有的模块
+                Module[i] = dt.Rows[i]["sn_module"].ToString();
+                if (!Modules.Contains(dt.Rows[i]["sn_module"].ToString()))
+                    Modules += "'" + dt.Rows[i]["sn_module"].ToString() + "',";
+                this.Controls[dt.Rows[i]["sn_module"].ToString()].Visible = true;
+                this.Controls[dt.Rows[i]["sn_module"].ToString() + "_lsv"].Visible = true;
+                //添加权限
+                Dictionary<string, bool> dic = new Dictionary<string, bool>();
+                dic.Add("IFDELETE", dt.Rows[i]["UGP_IFDELETE"].ToString() != "1" ? false : true);
+                dic.Add("IFREAD", dt.Rows[i]["UGP_IFREAD"].ToString() != "1" ? false : true);
+                dic.Add("IFWRITE", dt.Rows[i]["UGP_IFWRITE"].ToString() != "1" ? false : true);
+                dic.Add("IFSPECIAL", dt.Rows[i]["UGP_IFSPECIAL"].ToString() != "1" ? false : true);
+                dic.Add("IFALL", dt.Rows[i]["UGP_IFALL"].ToString() != "1" ? false : true);
+                //之后通过Call来获取页面操作的权限
+                if (SystemInf.Caller.ContainsKey(dt.Rows[i]["ugp_caller"].ToString()))
+                {
+                    SystemInf.Caller.Remove(dt.Rows[i]["ugp_caller"].ToString());
+                }
+                SystemInf.Caller.Add(dt.Rows[i]["ugp_caller"].ToString(), dic);
+                //重复项目会导致导航栏出现展示空缺,如果包含有该项则不进行添加
+                //添加导航的按钮和对应的ListView
+                if (!ArrFunButton.Contains(this.Controls[dt.Rows[i]["sn_module"].ToString()]))
+                {
+                    ArrFunButton.Add(this.Controls[dt.Rows[i]["sn_module"].ToString()]);
+                    ArrFunListView.Add(this.Controls[dt.Rows[i]["sn_module"].ToString() + "_lsv"]);
+                }
+            }
+            if (Callers != "")
+            {
+                Callers = Callers.Substring(0, Callers.Length - 1);
+            }
+            else
+            {
+                Callers = "''";
+            }
+            //根据模块的名称查询出所有的子模块
+            sql.Clear();
+            sql.Append("select sn_id,sn_displayname,sn_classname,sn_module,sn_modulecode,sn_using,sn_caller,sn_detno from CS$SYSNAVATION where sn_using=1 and sn_caller in(" + Callers + ") order by sn_modulecode,sn_detno");
+            dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
+            sql.Clear();
+            //模块的数量,需要单独控制这个变量的增加
+            int Module_count = 0;
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                //如果查询的子栏目的所属模块和按钮之前的模块相等,并且启用了导航
+                if (Module[Module_count] == dt.Rows[i]["sn_module"].ToString())
+                {
+                    ListView lsv = this.Controls[Module[Module_count] + "_lsv"] as ListView;
+                    ListViewItem lsvi = new ListViewItem();
+                    lsvi.Tag = dt.Rows[i]["sn_classname"].ToString();
+                    lsvi.Text = dt.Rows[i]["sn_displayname"].ToString();
+                    lsvi.ToolTipText = dt.Rows[i]["sn_caller"].ToString();
+                    lsvi.Name = dt.Rows[i]["sn_id"].ToString();
+                    lsv.Items.Add(lsvi);
+                }
+                else
+                {
+                    //条件不相等的i+1用来做判断了,所以需要-1
+                    i = i - 1;
+                    Module_count++;
+                }
+            }
+            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 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.Click += lsvFun_DoubleClick;
+                    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;
+                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;
+
+                    for (int j = 0; j < lsv.Items.Count; j++)
+                    {
+                        lsv.Items[j].ImageIndex = 0;
+                    }
+                    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, EventArgs e)
+        {
+            //双击后执行一个功能
+            ListView lsv = sender as ListView;
+            if (lsv == null)
+                return;
+            if (lsv.SelectedItems.Count == 0)
+                return;
+            //ListView点击的数据
+            ListViewItem item = lsv.SelectedItems[0];
+            //利用反射根据类的名称创建实例
+            Form OpenForm = (Form)Assembly.GetExecutingAssembly().CreateInstance("UAS_MES." + item.Tag);
+            OpenForm.Text = item.Text;
+            //用Tag保存Caller
+            OpenForm.Tag = item.ToolTipText;
+            TabControl tc = (TabControl)this.Parent.Parent.Controls["MainTabControl"];
+            //如果窗体不存在进行打开,item.ToolTip是Caller
+            if (!OpenedFormName.ContainsKey(item.ToolTipText))
+            {
+                TabPage tb = new TabPage { Name = item.Name, Tag = item.ToolTipText, Text = OpenForm.Text };
+                OpenForm.TopLevel = false;
+                tc.TabPages.Add(tb);
+                //直接选中新打开的界面
+                tc.SelectedTab = tb;
+                tb.Controls.Add(OpenForm);
+                OpenedFormName.Add(item.ToolTipText, WinIndex);
+                tc.TabIndex = WinIndex;
+                WinIndex++;
+                OpenForm.Show();
+            }
+            //如果窗体已存在展示该窗体
+            else
+                tc.SelectTab(item.Name);
+        }
+    }
+}

+ 783 - 0
UAS_MES_HYSX/CustomControl/AccordionMenu/AccordionMenu.resx

@@ -0,0 +1,783 @@
+<?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>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="库存管理.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="库存管理.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        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
+</value>
+  </data>
+  <data name="库存管理.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="库存管理.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="SMT作业.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="SMT作业.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        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
+</value>
+  </data>
+  <data name="SMT作业.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="SMT作业.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="人员管理.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="人员管理.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="人员管理.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="OQC作业.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="OQC作业.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="OQC作业.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="系统设置.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="系统设置.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        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
+</value>
+  </data>
+  <data name="系统设置.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="系统设置.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="查询分析.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="查询分析.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="查询分析.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="仓库作业.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="仓库作业.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="仓库作业.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="特殊作业.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="特殊作业.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="特殊作业.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="产线作业.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="产线作业.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="产线作业.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="包装作业.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="包装作业.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="包装作业.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>

+ 74 - 0
UAS_MES_HYSX/CustomControl/AccordionMenu/NavagationBar.Designer.cs

@@ -0,0 +1,74 @@
+namespace UAS_MES_NEW.CustomControl.AccordionMenu
+{
+    partial class NavagationBar
+    {
+        /// <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 Component 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.ComponentModel.ISupportInitialize)(this)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // NavagationBar
+            // 
+            this.Appearance.Button.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.Appearance.Button.Options.UseFont = true;
+            this.Appearance.ButtonHotTracked.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.Appearance.ButtonHotTracked.Options.UseFont = true;
+            this.Appearance.ButtonPressed.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.Appearance.ButtonPressed.Options.UseFont = true;
+            this.Appearance.Hint.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.Appearance.Hint.Options.UseFont = true;
+            this.Appearance.Item.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.Appearance.Item.Options.UseFont = true;
+            this.Appearance.ItemActive.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.Appearance.ItemActive.Options.UseFont = true;
+            this.Appearance.ItemHotTracked.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.Appearance.ItemHotTracked.Options.UseFont = true;
+            this.Appearance.ItemPressed.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.Appearance.ItemPressed.Options.UseFont = true;
+            this.Appearance.NavigationPaneHeader.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.Appearance.NavigationPaneHeader.Options.UseFont = true;
+            this.Appearance.NavPaneContentButton.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.Appearance.NavPaneContentButton.Options.UseFont = true;
+            this.Appearance.NavPaneContentButtonHotTracked.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.Appearance.NavPaneContentButtonHotTracked.Options.UseFont = true;
+            this.Appearance.NavPaneContentButtonPressed.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.Appearance.NavPaneContentButtonPressed.Options.UseFont = true;
+            this.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.LinkInterval = 2;
+            this.NavigationPaneGroupClientHeight = 300;
+            this.OptionsNavPane.ExpandedWidth = 140;
+            this.ShowGroupHint = false;
+            this.ShowLinkHint = false;
+            this.Text = " ";
+            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
+            this.ResumeLayout(true);
+
+        }
+
+        #endregion
+    }
+}

+ 165 - 0
UAS_MES_HYSX/CustomControl/AccordionMenu/NavagationBar.cs

@@ -0,0 +1,165 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using DevExpress.XtraNavBar;
+using System.Collections;
+using System.Reflection;
+
+namespace UAS_MES_NEW.CustomControl.AccordionMenu
+{
+    public partial class NavagationBar : NavBarControl
+    {
+
+        StringBuilder sql = new StringBuilder();
+
+        public static int WinIndex = 0;
+        /// <summary>
+        /// 记录当前功能面板中的按钮
+        /// </summary>
+        private ArrayList ArrFunButton = new ArrayList();
+        /// <summary>
+        /// 记录当前功能面板中的listview
+        /// </summary>
+        private ArrayList ArrFunListView = new ArrayList();
+        /// <summary>
+        /// 已经打开的Form
+        /// </summary>
+        public static Dictionary<string, int> OpenedFormName = new Dictionary<string, int>();
+
+        public NavagationBar()
+        {
+            InitializeComponent();
+            DataHelper dh = SystemInf.dh;
+            if (dh == null)
+                return;
+            if (User.UserAccountType == "admin")
+            {
+                sql.Clear();
+                sql.Append("select distinct sn_id,sn_detno,sn_module,sn_modulecode,sn_classname,sn_displayname,sn_caller ugp_caller,1 ugp_ifdelete,1 ugp_ifread,1 ugp_ifspecial,1 ugp_ifall,");
+                sql.Append("1 ugp_ifwrite from CS$SYSNAVATION left join CS$USERGROUPPOWER on sn_caller=ugp_caller  where sn_using=1  order by sn_modulecode,sn_detno");
+            }
+            else
+            {
+                sql.Clear();
+                sql.Append("select  sn_id,sn_detno,sn_module,sn_displayname,sn_modulecode,sn_classname,ugp_caller,max(ugp_ifdelete)ugp_ifdelete,max(ugp_ifread)ugp_ifread");
+                sql.Append(",max(ugp_ifspecial)ugp_ifspecial,max(ugp_ifwrite)ugp_ifwrite,max(ugp_ifall)ugp_ifall from CS$USERGROUPPOWER ");
+                sql.Append("left join CS$SYSNAVATION on sn_caller=ugp_caller  where sn_using=1 and ugp_groupcode in ( select eg_groupcode from cs$empgroup ");
+                sql.Append("left join cs$userresource on ur_groupcode = eg_groupcode where eg_emcode = '" + User.UserCode + "') and (nvl(ugp_ifread,0)<>0 or nvl(ugp_ifall,0)<>0) group by sn_id,sn_caller,sn_detno,sn_modulecode,sn_classname,sn_module,sn_displayname,ugp_caller order by sn_modulecode,sn_detno");
+            }
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
+            if (dt.Rows.Count == 0 && User.UserAccountType != "admin")
+            {
+                return;
+            }
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                bool ContainGroup = false;
+                string module_name = dt.Rows[i]["sn_module"].ToString();
+                string caller = dt.Rows[i]["sn_displayname"].ToString();
+                NavBarItem nbi = new NavBarItem(caller);
+                nbi.Tag = dt.Rows[i]["sn_classname"].ToString();
+                nbi.LinkClicked += Nbi_LinkClicked;
+                nbi.Tag = dt.Rows[i]["sn_classname"].ToString();
+                nbi.Hint = dt.Rows[i]["ugp_caller"].ToString();
+                nbi.Name = dt.Rows[i]["sn_id"].ToString();
+                for (int j = 0; j < Groups.Count; j++)
+                {
+                    if (Groups[j].Caption == module_name)
+                    {
+                        ContainGroup = true;
+                        if (dt.Rows[i]["ugp_ifread"].ToString() != "0" || dt.Rows[i]["ugp_ifall"].ToString() != "0")
+                        {
+                            Groups[j].ItemLinks.Add(nbi);
+                        }
+                    }
+                    else
+                    {
+                        ContainGroup = false;
+                    }
+                }
+                if (!ContainGroup)
+                {
+                    NavBarGroup nbg = new NavBarGroup(module_name);
+                    //如果加载Icon失败则加载默认图片
+                    try
+                    {
+                        nbg.LargeImage = new Bitmap(@Application.StartupPath + "/Resources/" + dt.Rows[i]["sn_module"].ToString() + ".png");
+                    }
+                    catch (Exception)
+                    {
+                        try
+                        {
+                            nbg.LargeImage = new Bitmap(@Application.StartupPath + "/Resources/defaulticon.png");
+                        }
+                        catch (Exception)
+                        {
+                            nbg.ImageUri = null;
+                        }
+                    }
+                    Groups.Add(nbg);
+                    nbg.ItemLinks.Add(nbi);
+                }
+            }
+            //查询出的用户可见的Caller
+            //将查询出的数据添加到队列中
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                //添加权限
+                Dictionary<string, bool> dic = new Dictionary<string, bool>();
+                dic.Add("IFDELETE", dt.Rows[i]["UGP_IFDELETE"].ToString() != "1" ? false : true);
+                dic.Add("IFREAD", dt.Rows[i]["UGP_IFREAD"].ToString() != "1" ? false : true);
+                dic.Add("IFWRITE", dt.Rows[i]["UGP_IFWRITE"].ToString() != "1" ? false : true);
+                dic.Add("IFSPECIAL", dt.Rows[i]["UGP_IFSPECIAL"].ToString() != "1" ? false : true);
+                dic.Add("IFALL", dt.Rows[i]["UGP_IFALL"].ToString() != "1" ? false : true);
+                //之后通过Call来获取页面操作的权限
+                if (SystemInf.Caller.ContainsKey(dt.Rows[i]["ugp_caller"].ToString()))
+                {
+                    SystemInf.Caller.Remove(dt.Rows[i]["ugp_caller"].ToString());
+                }
+                SystemInf.Caller.Add(dt.Rows[i]["ugp_caller"].ToString(), dic);
+            }
+        }
+
+        private void Nbi_LinkClicked(object sender, NavBarLinkEventArgs e)
+        {
+            NavBarItem nbi = (sender as NavBarItem);
+            Form OpenForm = (Form)Assembly.GetExecutingAssembly().CreateInstance("UAS_MES_NEW." + nbi.Tag.ToString());
+            //if (nbi.Tag.ToString() != "Query.Query_MacAddress")
+            //{
+            //    DataTable dt = (DataTable)SystemInf.dh.ExecuteSql("select * from DeviceMacAddress where dma_mac='" + SystemInf.MacAddress + "'", "select");
+            //    if (dt.Rows.Count == 0)
+            //    {
+            //        MessageBox.Show("该设备不在作业设备清单中,请先上传MAC以及设备信息");
+            //        return;
+            //    }
+            //}
+            OpenForm.Dock = DockStyle.Fill;
+            OpenForm.Text = nbi.Caption;
+            //用Tag保存Caller
+            OpenForm.Tag = nbi.Hint;
+            TabControl tc = (TabControl)this.Parent.Controls["MainTabControl"];
+            //如果窗体不存在进行打开,item.ToolTip是Caller
+            if (!OpenedFormName.ContainsKey(nbi.Hint))
+            {
+                TabPage tb = new TabPage { Name = nbi.Name, Tag = nbi.Hint, Text = OpenForm.Text };
+                OpenForm.TopLevel = false;
+                tc.TabPages.Add(tb);
+                //直接选中新打开的界面
+                tc.SelectedTab = tb;
+                tb.Controls.Add(OpenForm);
+                OpenedFormName.Add(nbi.Hint, WinIndex);
+                tc.TabIndex = WinIndex;
+                WinIndex++;
+                OpenForm.Show();
+            }
+            //如果窗体已存在展示该窗体
+            else
+                tc.SelectTab(nbi.Name);
+        }
+    }
+}

+ 123 - 0
UAS_MES_HYSX/CustomControl/AccordionMenu/NavagationBar.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="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </metadata>
+</root>

+ 48 - 0
UAS_MES_HYSX/CustomControl/BaseForm/BaseForm.Designer.cs

@@ -0,0 +1,48 @@
+namespace UAS_MES_NEW.CustomControl.BaseForm
+{
+    partial class BaseForm
+    {
+        /// <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.SuspendLayout();
+            // 
+            // BaseForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(725, 425);
+            this.Name = "BaseForm";
+            this.Text = "BaseForm";
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.BaseForm_FormClosing);
+            this.Load += new System.EventHandler(this.BaseForm_Load);
+            this.ResumeLayout(true);
+
+        }
+
+        #endregion
+    }
+}

+ 37 - 0
UAS_MES_HYSX/CustomControl/BaseForm/BaseForm.cs

@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace UAS_MES_NEW.CustomControl.BaseForm
+{
+    public partial class BaseForm : Form
+    {
+        public BaseForm()
+        {
+            InitializeComponent();
+        }
+
+        private void BaseForm_Load(object sender, EventArgs e)
+        {
+            if (!DesignMode)
+            {
+                Main main = Application.OpenForms["Main"] as Main;
+                main.TopMost = false;
+            }
+        }
+
+        private void BaseForm_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            if (!DesignMode)
+            {
+                //Main main = Application.OpenForms["Main"] as Main;
+                //main.TopMost = (main.Controls["headBar1"].Controls["AlwaysTop"] as CheckBox).Checked;
+            }
+        }
+    }
+}

+ 120 - 0
UAS_MES_HYSX/CustomControl/BaseForm/BaseForm.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>

+ 37 - 0
UAS_MES_HYSX/CustomControl/ButtonUtil/ArrowLeftButton.Designer.cs

@@ -0,0 +1,37 @@
+namespace UAS_MES_NEW.CustomControl.ButtonUtil
+{
+    partial class ArrowLeftButton
+    {
+        /// <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();
+           // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+        }
+
+        #endregion
+    }
+}

+ 14 - 0
UAS_MES_HYSX/CustomControl/ButtonUtil/ArrowLeftButton.cs

@@ -0,0 +1,14 @@
+using System.Windows.Forms;
+using UAS_MES_NEW.Properties;
+
+namespace UAS_MES_NEW.CustomControl.ButtonUtil
+{
+    public partial class ArrowLeftButton : Button
+    {
+        public ArrowLeftButton()
+        {
+            InitializeComponent();
+            this.Image = Resources.two_arrow_left;
+        }
+    }
+}

+ 37 - 0
UAS_MES_HYSX/CustomControl/ButtonUtil/ArrowRightButton.Designer.cs

@@ -0,0 +1,37 @@
+namespace UAS_MES_NEW.CustomControl.ButtonUtil
+{
+    partial class ArrowRightButton
+    {
+        /// <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();
+            //this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+        }
+
+        #endregion
+    }
+}

+ 14 - 0
UAS_MES_HYSX/CustomControl/ButtonUtil/ArrowRightButton.cs

@@ -0,0 +1,14 @@
+using System.Windows.Forms;
+using UAS_MES_NEW.Properties;
+
+namespace UAS_MES_NEW.CustomControl.ButtonUtil
+{
+    public partial class ArrowRightButton : Button
+    {
+        public ArrowRightButton()
+        {
+            InitializeComponent();
+            this.Image = Resources.two_arrow_right;
+        }
+    }
+}

+ 36 - 0
UAS_MES_HYSX/CustomControl/ButtonUtil/ChooseAllButton.Designer.cs

@@ -0,0 +1,36 @@
+namespace UAS_MES_NEW.CustomControl.ButtonUtil
+{
+    partial class ChooseAllButton
+    {
+        /// <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
+    }
+}

+ 49 - 0
UAS_MES_HYSX/CustomControl/ButtonUtil/ChooseAllButton.cs

@@ -0,0 +1,49 @@
+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;
+
+namespace UAS_MES_NEW.CustomControl.ButtonUtil
+{
+    public partial class ChooseAllButton : Button
+    {
+        DataGridView DGV;
+        bool AllChecked = false;
+
+        public ChooseAllButton()
+        {
+            InitializeComponent();
+        }
+
+        public void ChooseAll(DataGridView dgv)
+        {
+            DGV = dgv;
+            Click += ChooseAll_Click;
+        }
+
+        private void ChooseAll_Click(object sender, EventArgs e)
+        {
+            if (AllChecked)
+            {
+                for (int i = 0; i < DGV.RowCount; i++)
+                {
+                    DGV.Rows[i].Cells[0].Value = false;
+                }
+                AllChecked = false;
+            }
+            else
+            {
+                for (int i = 0; i < DGV.RowCount; i++)
+                {
+                    DGV.Rows[i].Cells[0].Value = true;
+                }
+                AllChecked = true;
+            }
+        }
+    }
+}

+ 36 - 0
UAS_MES_HYSX/CustomControl/ButtonUtil/CloseButton.Designer.cs

@@ -0,0 +1,36 @@
+namespace UAS_MES_NEW.CustomControl.ButtonUtil
+{
+    partial class CloseButton
+    {
+        /// <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
+    }
+}

+ 25 - 0
UAS_MES_HYSX/CustomControl/ButtonUtil/CloseButton.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Windows.Forms;
+using UAS_MES_NEW.Properties;
+
+namespace UAS_MES_NEW.CustomControl.ButtonUtil
+{
+    public partial class CloseButton : Button
+    {
+
+        public CloseButton()
+        {
+            InitializeComponent();
+            this.Click += CloseButton_Click;
+            this.Image = Resources._2_0btn_36;
+        }
+
+        private void CloseButton_Click(object sender, EventArgs e)
+        {
+            //获取打开窗体的集合,找到当前的Form的名称然后关闭
+            FormCollection fmCollection = Application.OpenForms;
+            Control c = this.Parent;
+            fmCollection[c.Name].Close();
+        }
+    }
+}

+ 36 - 0
UAS_MES_HYSX/CustomControl/ButtonUtil/DeleteButton.Designer.cs

@@ -0,0 +1,36 @@
+namespace UAS_MES_NEW.CustomControl.ButtonUtil
+{
+    partial class DeleteButton
+    {
+        /// <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
+    }
+}

+ 52 - 0
UAS_MES_HYSX/CustomControl/ButtonUtil/DeleteButton.cs

@@ -0,0 +1,52 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.Properties;
+
+namespace UAS_MES_NEW.CustomControl.ButtonUtil
+{
+    public partial class DeleteButton : Button
+    {
+
+        private string Power1;
+
+        public DeleteButton()
+        {
+            InitializeComponent();
+            this.Image = Resources._2_0btn_36;
+        }
+
+        string AllPower1;
+
+        public string AllPower
+        {
+            get
+            {
+                return AllPower1;
+            }
+
+            set
+            {
+                AllPower1 = value;
+            }
+        }
+
+        public string Power
+        {
+            get
+            {
+                return Power1;
+            }
+
+            set
+            {
+                Power1 = value;
+            }
+        }
+    }
+}

+ 37 - 0
UAS_MES_HYSX/CustomControl/ButtonUtil/LockMakeCode.Designer.cs

@@ -0,0 +1,37 @@
+namespace UAS_MES_NEW.CustomControl.ButtonUtil
+{
+    partial class LockMakeCode
+    {
+        /// <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();
+           // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+        }
+
+        #endregion
+    }
+}

+ 411 - 0
UAS_MES_HYSX/CustomControl/ButtonUtil/LockMakeCode.cs

@@ -0,0 +1,411 @@
+using System;
+using System.ComponentModel;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Drawing.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.Enum;
+using UAS_MES_NEW.Properties;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.CustomControl.ButtonUtil
+{
+    public partial class LockMakeCode : Button
+    {
+        #region 变量
+        /// <summary>
+        /// 鼠标状态
+        /// </summary>
+        private EMouseState _mouseState = EMouseState.Normal;
+        /// <summary>
+        /// 文本对齐方式
+        /// </summary>
+        private TextFormatFlags _textAlign = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter;
+        /// <summary>
+        /// 默认时的按钮图片
+        /// </summary>
+        private Image _normalImage = null;
+        /// <summary>
+        /// 鼠标按下时的图片
+        /// </summary>
+        private Image _downImage = null;
+        /// <summary>
+        /// 鼠标划过时的图片
+        /// </summary>
+        private Image _moveImage = null;
+        /// <summary>
+        /// 是否按下了鼠标
+        /// </summary>
+        private bool _isShowBorder = true;
+        /// <summary>
+        /// 权限标识符
+        /// </summary>
+        string Power1;
+
+        public string Power
+        {
+            get
+            {
+                return Power1;
+            }
+
+            set
+            {
+                Power1 = value;
+            }
+        }
+        string AllPower1;
+
+        public string AllPower
+        {
+            get
+            {
+                return AllPower1;
+            }
+
+            set
+            {
+                AllPower1 = value;
+            }
+        }
+       
+        #endregion
+
+        #region 构造函数
+        public LockMakeCode()
+        {
+            InitializeComponent();
+            this.SetStyle(
+                  ControlStyles.AllPaintingInWmPaint |
+                  ControlStyles.OptimizedDoubleBuffer |
+                  ControlStyles.ResizeRedraw |
+                  ControlStyles.Selectable |
+                  ControlStyles.DoubleBuffer |
+                  ControlStyles.SupportsTransparentBackColor |
+                  ControlStyles.UserPaint, true);
+            this.SetStyle(ControlStyles.Opaque, false);
+            base.BackColor = Color.Transparent;
+            this.UpdateStyles();
+        }
+        #endregion
+
+        #region 属性
+        /// <summary>
+        /// 默认大小
+        /// </summary>
+        protected override Size DefaultSize
+        {
+            get { return new Size(75, 28); }
+        }
+        /// <summary>
+        /// 默认图片
+        /// </summary>
+        [Description("默认图片")]
+        public virtual Image NormalImage
+        {
+            get
+            {
+                if (this._normalImage == null)
+                    this._normalImage = Resources.normal;
+                return this._normalImage;
+            }
+            set
+            {
+                this._normalImage = value;
+                base.Invalidate();
+            }
+        }
+        /// <summary>
+        /// 鼠标按下时的图片
+        /// </summary>
+        [Description("鼠标按下时的图片")]
+        public virtual Image DownImage
+        {
+            get
+            {
+                if (this._downImage == null)
+                    this._downImage = Resources.down;
+                return this._downImage;
+            }
+            set
+            {
+                this._downImage = value;
+                base.Invalidate();
+            }
+        }
+        /// <summary>
+        /// 鼠标划过时的图片
+        /// </summary>
+        [Description("鼠标划过时的图片")]
+        public virtual Image MoveImage
+        {
+            get
+            {
+                if (this._moveImage == null)
+                    this._moveImage = Resources.highlight;
+                return this._moveImage;
+            }
+            set
+            {
+                this._moveImage = value;
+
+                base.Invalidate();
+            }
+        }
+        /// <summary>
+        /// 是否显示发光边框
+        /// </summary>
+        [Description("是否显示发光边框")]
+        public virtual bool IsShowBorder
+        {
+            get { return this._isShowBorder; }
+            set { this._isShowBorder = value; }
+        }
+        /// <summary>
+        /// 与控件相关的文本
+        /// </summary>
+        [DefaultValue("QQButton")]
+        public override string Text
+        {
+            get { return base.Text; }
+            set
+            {
+                base.Text = value;
+                base.Invalidate(this.TextRect);
+            }
+        }
+        /// <summary>
+        /// 按钮上显示的图片
+        /// </summary>
+        [Description("按钮上显示的图片")]
+        public virtual new Image Image
+        {
+            get { return base.Image; }
+            set
+            {
+                base.Image = value;
+                base.Invalidate();
+            }
+        }
+
+        /// <summary>
+        /// 按钮上文字的对齐方式
+        /// </summary>
+        [Description("按钮上文字的对齐方式")]
+        new public ContentAlignment TextAlign
+        {
+            get { return base.TextAlign; }
+            set
+            {
+                base.TextAlign = value;
+                switch (base.TextAlign)
+                {
+                    case ContentAlignment.BottomCenter:
+                        this._textAlign = TextFormatFlags.Bottom |
+                                          TextFormatFlags.HorizontalCenter |
+                                          TextFormatFlags.SingleLine;
+                        break;
+                    case ContentAlignment.BottomLeft:
+                        this._textAlign = TextFormatFlags.Bottom |
+                                          TextFormatFlags.Left |
+                                          TextFormatFlags.SingleLine;
+                        break;
+                    case ContentAlignment.BottomRight:
+                        this._textAlign = TextFormatFlags.Bottom |
+                                          TextFormatFlags.Right |
+                                          TextFormatFlags.SingleLine;
+                        break;
+                    case ContentAlignment.MiddleCenter:
+                        this._textAlign = TextFormatFlags.SingleLine |
+                                          TextFormatFlags.HorizontalCenter |
+                                          TextFormatFlags.VerticalCenter;
+                        break;
+                    case ContentAlignment.MiddleLeft:
+                        this._textAlign = TextFormatFlags.Left |
+                                          TextFormatFlags.VerticalCenter |
+                                          TextFormatFlags.SingleLine;
+                        break;
+                    case ContentAlignment.MiddleRight:
+                        this._textAlign = TextFormatFlags.Right |
+                                          TextFormatFlags.VerticalCenter |
+                                          TextFormatFlags.SingleLine;
+                        break;
+                    case ContentAlignment.TopCenter:
+                        this._textAlign = TextFormatFlags.Top |
+                                          TextFormatFlags.HorizontalCenter |
+                                          TextFormatFlags.SingleLine;
+                        break;
+                    case ContentAlignment.TopLeft:
+                        this._textAlign = TextFormatFlags.Top |
+                                          TextFormatFlags.Left |
+                                          TextFormatFlags.SingleLine;
+                        break;
+                    case ContentAlignment.TopRight:
+                        this._textAlign = TextFormatFlags.Top |
+                                          TextFormatFlags.Right |
+                                          TextFormatFlags.SingleLine;
+                        break;
+                }
+                base.Invalidate(this.TextRect);
+            }
+        }
+
+        /// <summary>
+        /// 整个按钮的区域
+        /// </summary>
+        internal Rectangle AllRect
+        {
+            get { return new Rectangle(0, 0, this.Width, this.Height); }
+        }
+        /// <summary>
+        /// 文字区域
+        /// </summary>
+        internal Rectangle TextRect
+        {
+            get { return new Rectangle(2, 2, this.AllRect.Width - 4, this.AllRect.Height - 4); }
+        }
+        /// <summary>
+        /// 鼠标状态
+        /// </summary>
+        internal EMouseState MouseState
+        {
+            get { return this._mouseState; }
+            set
+            {
+                this._mouseState = value;
+                base.Invalidate();
+            }
+        }
+
+ 
+
+        #endregion
+
+        #region Override 方法
+        /// <summary>
+        /// 引发 System.Windows.Forms.Form.Paint 事件。
+        /// </summary>
+        /// <param name="pevent">包含事件数据的 System.Windows.Forms.PaintEventArgs。</param>
+        protected override void OnPaint(PaintEventArgs pevent)
+        {
+            Graphics g = pevent.Graphics;
+            g.SmoothingMode = SmoothingMode.AntiAlias;
+            g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
+            //g.DrawImage(AssemblyHelper.GetAssemblyImage("Button.all_btn_White-side.png"), this.AllRect);
+            if (base.Enabled)
+            {
+                if (this.IsShowBorder)
+                {
+                    if (this.Focused)//得到焦点的时候,绘制边框
+                    {
+                        using (Image light = Resources.Light)
+                        {
+                            g.DrawImage(light, this.AllRect);
+                            //DrawHelper.RendererBackground(g, this.AllRect, light, true);
+                        }
+                    }
+                }
+
+                switch (this.MouseState)
+                {
+                    case EMouseState.Leave:
+                    case EMouseState.Normal:
+                        if (base.Focused)
+                        {
+                            if (this.IsShowBorder)
+                            {
+                                using (Image focus = Resources.focus)
+                                {
+                                    DrawHelper.RendererBackground(g, this.TextRect, focus, true);
+                                }
+                            }
+                            else
+                            {
+                                DrawHelper.RendererBackground(g, this.TextRect, this.NormalImage, true);
+                            }
+                        }
+                        else
+                        {
+                            DrawHelper.RendererBackground(g, this.TextRect, this.NormalImage, true);
+                        }
+                        break;
+                    case EMouseState.Up:
+                    case EMouseState.Move:
+                        DrawHelper.RendererBackground(g, this.TextRect, this.MoveImage, true);
+                        break;
+                    case EMouseState.Down:
+                        DrawHelper.RendererBackground(g, this.TextRect, this.DownImage, true);
+                        break;
+                }
+
+                //if (this.Image != null)
+                //{
+                //int y = (this.Height - this.Image.Height) / 2;
+                //int x = 10;
+
+                //if (!string.IsNullOrEmpty(this.Text))
+                //    x = (this.AllRect.Width - (TextHelper.GetStringLen(this.Text) * 6 + this.Image.Width)) / 2;
+                //else
+                //    x = (this.Width - this.Image.Width) / 2;//将图片绘制在按钮居中位置
+                //Rectangle rect = new Rectangle(x, y, this.Image.Width, this.Image.Height);
+                //Rectangle imgRect = new Rectangle(0, 0, this.Image.Width, this.Image.Height);
+                ////绘制图片
+                //g.DrawImage(this.Image, rect, imgRect, GraphicsUnit.Pixel);
+                ////绘制文字
+                //Rectangle textRect = new Rectangle(this.TextRect.X + this.Image.Width, this.TextRect.Y, this.TextRect.Width, this.TextRect.Height);
+                //TextRenderer.DrawText(g, this.Text, this.Font, textRect, this.ForeColor, _textAlign);
+                //}
+                //else
+                //{
+                //绘制按钮上的文字
+                TextRenderer.DrawText(g, this.Text, this.Font, this.TextRect, this.ForeColor, this._textAlign);
+                //}
+            }
+            else
+            {
+                using (Image gray = Resources.gray)
+                {
+                    DrawHelper.RendererBackground(g, this.TextRect, gray, true);
+                }
+                TextRenderer.DrawText(g, this.Text, this.Font, this.TextRect, Color.Gray, this._textAlign);
+            }
+        }
+        /// <summary>
+        /// 引发 System.Windows.Forms.Form.MouseEnter 事件。
+        /// </summary>
+        /// <param name="e">包含事件数据的 System.EventArgs。</param>
+        protected override void OnMouseEnter(EventArgs e)
+        {
+            base.OnMouseEnter(e);
+            this.MouseState = EMouseState.Move;
+        }
+        /// <summary>
+        /// 引发 System.Windows.Forms.Form.MouseLeave 事件。
+        /// </summary>
+        /// <param name="e">包含事件数据的 System.EventArgs。</param>
+        protected override void OnMouseLeave(EventArgs e)
+        {
+            base.OnMouseLeave(e);
+            this.MouseState = EMouseState.Leave;
+        }
+        /// <summary>
+        /// 引发 System.Windows.Forms.Form.MouseDown 事件。
+        /// </summary>
+        /// <param name="mevent">包含事件数据的 System.Windows.Forms.MouseEventArgs。</param>
+        protected override void OnMouseDown(MouseEventArgs mevent)
+        {
+            base.OnMouseDown(mevent);
+            this.MouseState = EMouseState.Down;
+        }
+        /// <summary>
+        /// 引发 System.Windows.Forms.Form.MouseUp 事件。
+        /// </summary>
+        /// <param name="mevent">包含事件数据的 System.Windows.Forms.MouseEventArgs。</param>
+        protected override void OnMouseUp(MouseEventArgs mevent)
+        {
+            base.OnMouseUp(mevent);
+            this.MouseState = EMouseState.Up;
+        }
+        #endregion
+    }
+}

+ 37 - 0
UAS_MES_HYSX/CustomControl/ButtonUtil/NormalButton.Designer.cs

@@ -0,0 +1,37 @@
+namespace UAS_MES_NEW.CustomControl.ButtonUtil
+{
+    partial class NormalButton
+    {
+        /// <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();
+           // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+        }
+
+        #endregion
+    }
+}

+ 414 - 0
UAS_MES_HYSX/CustomControl/ButtonUtil/NormalButton.cs

@@ -0,0 +1,414 @@
+using System;
+using System.ComponentModel;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Drawing.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.Enum;
+using UAS_MES_NEW.Properties;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.CustomControl.ButtonUtil
+{
+    public partial class NormalButton : Button
+    {
+
+        #region 变量
+        /// <summary>
+        /// 鼠标状态
+        /// </summary>
+        private EMouseState _mouseState = EMouseState.Normal;
+        /// <summary>
+        /// 文本对齐方式
+        /// </summary>
+        private TextFormatFlags _textAlign = TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter;
+        /// <summary>
+        /// 默认时的按钮图片
+        /// </summary>
+        private Image _normalImage = null;
+        /// <summary>
+        /// 鼠标按下时的图片
+        /// </summary>
+        private Image _downImage = null;
+        /// <summary>
+        /// 鼠标划过时的图片
+        /// </summary>
+        private Image _moveImage = null;
+        /// <summary>
+        /// 是否按下了鼠标
+        /// </summary>
+        private bool _isShowBorder = true;
+        /// <summary>
+        /// 权限标识符
+        /// </summary>
+        string Power1;
+
+        public string Power
+        {
+            get
+            {
+                return Power1;
+            }
+
+            set
+            {
+                Power1 = value;
+            }
+        }
+        string AllPower1;
+
+        public string AllPower
+        {
+            get
+            {
+                return AllPower1;
+            }
+
+            set
+            {
+                AllPower1 = value;
+            }
+        }
+       
+        #endregion
+
+        #region 构造函数
+        public NormalButton()
+        {
+            InitializeComponent();
+            this.SetStyle(
+                  ControlStyles.AllPaintingInWmPaint |
+                  ControlStyles.OptimizedDoubleBuffer |
+                  ControlStyles.ResizeRedraw |
+                  ControlStyles.Selectable |
+                  ControlStyles.DoubleBuffer |
+                  ControlStyles.SupportsTransparentBackColor |
+                  ControlStyles.UserPaint, true);
+            this.SetStyle(ControlStyles.Opaque, false);
+            base.BackColor = Color.Transparent;
+            this.UpdateStyles();
+        }
+        #endregion
+
+        #region 属性
+        /// <summary>
+        /// 默认大小
+        /// </summary>
+        protected override Size DefaultSize
+        {
+            get { return new Size(75, 28); }
+        }
+        /// <summary>
+        /// 默认图片
+        /// </summary>
+        [Description("默认图片")]
+        public virtual Image NormalImage
+        {
+            get
+            {
+                if (this._normalImage == null)
+                    this._normalImage = Resources.normal;
+                return this._normalImage;
+            }
+            set
+            {
+                this._normalImage = value;
+                base.Invalidate();
+            }
+        }
+        /// <summary>
+        /// 鼠标按下时的图片
+        /// </summary>
+        [Description("鼠标按下时的图片")]
+        public virtual Image DownImage
+        {
+            get
+            {
+                if (this._downImage == null)
+                    this._downImage = Resources.down;
+                return this._downImage;
+            }
+            set
+            {
+                this._downImage = value;
+                base.Invalidate();
+            }
+        }
+        /// <summary>
+        /// 鼠标划过时的图片
+        /// </summary>
+        [Description("鼠标划过时的图片")]
+        public virtual Image MoveImage
+        {
+            get
+            {
+                if (this._moveImage == null)
+                    this._moveImage = Resources.highlight;
+                return this._moveImage;
+            }
+            set
+            {
+                this._moveImage = value;
+
+                base.Invalidate();
+            }
+        }
+        /// <summary>
+        /// 是否显示发光边框
+        /// </summary>
+        [Description("是否显示发光边框")]
+        public virtual bool IsShowBorder
+        {
+            get { return this._isShowBorder; }
+            set { this._isShowBorder = value; }
+        }
+        /// <summary>
+        /// 与控件相关的文本
+        /// </summary>
+        [DefaultValue("QQButton")]
+        public override string Text
+        {
+            get { return base.Text; }
+            set
+            {
+                base.Text = value;
+                base.Invalidate(this.TextRect);
+            }
+        }
+        /// <summary>
+        /// 按钮上显示的图片
+        /// </summary>
+        [Description("按钮上显示的图片")]
+        public virtual new Image Image
+        {
+            get { return base.Image; }
+            set
+            {
+                base.Image = value;
+                base.Invalidate();
+            }
+        }
+
+        /// <summary>
+        /// 按钮上文字的对齐方式
+        /// </summary>
+        [Description("按钮上文字的对齐方式")]
+        new public ContentAlignment TextAlign
+        {
+            get { return base.TextAlign; }
+            set
+            {
+                base.TextAlign = value;
+                switch (base.TextAlign)
+                {
+                    case ContentAlignment.BottomCenter:
+                        this._textAlign = TextFormatFlags.Bottom |
+                                          TextFormatFlags.HorizontalCenter |
+                                          TextFormatFlags.SingleLine;
+                        break;
+                    case ContentAlignment.BottomLeft:
+                        this._textAlign = TextFormatFlags.Bottom |
+                                          TextFormatFlags.Left |
+                                          TextFormatFlags.SingleLine;
+                        break;
+                    case ContentAlignment.BottomRight:
+                        this._textAlign = TextFormatFlags.Bottom |
+                                          TextFormatFlags.Right |
+                                          TextFormatFlags.SingleLine;
+                        break;
+                    case ContentAlignment.MiddleCenter:
+                        this._textAlign = TextFormatFlags.SingleLine |
+                                          TextFormatFlags.HorizontalCenter |
+                                          TextFormatFlags.VerticalCenter;
+                        break;
+                    case ContentAlignment.MiddleLeft:
+                        this._textAlign = TextFormatFlags.Left |
+                                          TextFormatFlags.VerticalCenter |
+                                          TextFormatFlags.SingleLine;
+                        break;
+                    case ContentAlignment.MiddleRight:
+                        this._textAlign = TextFormatFlags.Right |
+                                          TextFormatFlags.VerticalCenter |
+                                          TextFormatFlags.SingleLine;
+                        break;
+                    case ContentAlignment.TopCenter:
+                        this._textAlign = TextFormatFlags.Top |
+                                          TextFormatFlags.HorizontalCenter |
+                                          TextFormatFlags.SingleLine;
+                        break;
+                    case ContentAlignment.TopLeft:
+                        this._textAlign = TextFormatFlags.Top |
+                                          TextFormatFlags.Left |
+                                          TextFormatFlags.SingleLine;
+                        break;
+                    case ContentAlignment.TopRight:
+                        this._textAlign = TextFormatFlags.Top |
+                                          TextFormatFlags.Right |
+                                          TextFormatFlags.SingleLine;
+                        break;
+                }
+                base.Invalidate(this.TextRect);
+            }
+        }
+
+        /// <summary>
+        /// 整个按钮的区域
+        /// </summary>
+        internal Rectangle AllRect
+        {
+            get { return new Rectangle(0, 0, this.Width, this.Height); }
+        }
+        /// <summary>
+        /// 文字区域
+        /// </summary>
+        internal Rectangle TextRect
+        {
+            get { return new Rectangle(2, 2, this.AllRect.Width - 4, this.AllRect.Height - 4); }
+        }
+        /// <summary>
+        /// 鼠标状态
+        /// </summary>
+        internal EMouseState MouseState
+        {
+            get { return this._mouseState; }
+            set
+            {
+                this._mouseState = value;
+                base.Invalidate();
+            }
+        }
+
+ 
+
+        #endregion
+
+        #region Override 方法
+        /// <summary>
+        /// 引发 System.Windows.Forms.Form.Paint 事件。
+        /// </summary>
+        /// <param name="pevent">包含事件数据的 System.Windows.Forms.PaintEventArgs。</param>
+        protected override void OnPaint(PaintEventArgs pevent)
+        {
+            Graphics g = pevent.Graphics;
+            g.SmoothingMode = SmoothingMode.AntiAlias;
+            g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
+            //g.DrawImage(AssemblyHelper.GetAssemblyImage("Button.all_btn_White-side.png"), this.AllRect);
+            if (base.Enabled)
+            {
+                if (this.IsShowBorder)
+                {
+                    if (this.Focused)//得到焦点的时候,绘制边框
+                    {
+                        using (Image light = Resources.Light)
+                        {
+                            //g.DrawImage(light, this.AllRect);
+                            //DrawHelper.RendererBackground(g, this.AllRect, light, true);
+                        }
+                    }
+                }
+
+                switch (this.MouseState)
+                {
+                    case EMouseState.Leave:
+                        DrawHelper.RendererBackground(g, this.TextRect, this.NormalImage, true);
+                        break;
+                    case EMouseState.Normal:
+                        if (base.Focused)
+                        {
+                            if (this.IsShowBorder)
+                            {
+                                using (Image focus = Resources.focus)
+                                {
+                                    DrawHelper.RendererBackground(g, this.TextRect, focus, true);
+                                }
+                            }
+                            else
+                            {
+                                DrawHelper.RendererBackground(g, this.TextRect, this.NormalImage, true);
+                            }
+                        }
+                        else
+                        {
+                            DrawHelper.RendererBackground(g, this.TextRect, this.NormalImage, true);
+                        }
+                        break;
+                    case EMouseState.Up:
+                    case EMouseState.Move:
+                        DrawHelper.RendererBackground(g, this.TextRect, this.MoveImage, true);
+                        break;
+                    case EMouseState.Down:
+                        DrawHelper.RendererBackground(g, this.TextRect, this.DownImage, true);
+                        break;
+                }
+
+                //if (this.Image != null)
+                //{
+                //int y = (this.Height - this.Image.Height) / 2;
+                //int x = 10;
+
+                //if (!string.IsNullOrEmpty(this.Text))
+                //    x = (this.AllRect.Width - (TextHelper.GetStringLen(this.Text) * 6 + this.Image.Width)) / 2;
+                //else
+                //    x = (this.Width - this.Image.Width) / 2;//将图片绘制在按钮居中位置
+                //Rectangle rect = new Rectangle(x, y, this.Image.Width, this.Image.Height);
+                //Rectangle imgRect = new Rectangle(0, 0, this.Image.Width, this.Image.Height);
+                ////绘制图片
+                //g.DrawImage(this.Image, rect, imgRect, GraphicsUnit.Pixel);
+                ////绘制文字
+                //Rectangle textRect = new Rectangle(this.TextRect.X + this.Image.Width, this.TextRect.Y, this.TextRect.Width, this.TextRect.Height);
+                //TextRenderer.DrawText(g, this.Text, this.Font, textRect, this.ForeColor, _textAlign);
+                //}
+                //else
+                //{
+                //绘制按钮上的文字
+                TextRenderer.DrawText(g, this.Text, this.Font, this.TextRect, this.ForeColor, this._textAlign);
+                //}
+            }
+            else
+            {
+                using (Image gray = Resources.gray)
+                {
+                    DrawHelper.RendererBackground(g, this.TextRect, gray, true);
+                }
+                TextRenderer.DrawText(g, this.Text, this.Font, this.TextRect, Color.Gray, this._textAlign);
+            }
+        }
+        /// <summary>
+        /// 引发 System.Windows.Forms.Form.MouseEnter 事件。
+        /// </summary>
+        /// <param name="e">包含事件数据的 System.EventArgs。</param>
+        protected override void OnMouseEnter(EventArgs e)
+        {
+            base.OnMouseEnter(e);
+            this.MouseState = EMouseState.Move;
+        }
+        /// <summary>
+        /// 引发 System.Windows.Forms.Form.MouseLeave 事件。
+        /// </summary>
+        /// <param name="e">包含事件数据的 System.EventArgs。</param>
+        protected override void OnMouseLeave(EventArgs e)
+        {
+            base.OnMouseLeave(e);
+            this.MouseState = EMouseState.Leave;
+        }
+        /// <summary>
+        /// 引发 System.Windows.Forms.Form.MouseDown 事件。
+        /// </summary>
+        /// <param name="mevent">包含事件数据的 System.Windows.Forms.MouseEventArgs。</param>
+        protected override void OnMouseDown(MouseEventArgs mevent)
+        {
+            base.OnMouseDown(mevent);
+            this.MouseState = EMouseState.Down;
+        }
+        /// <summary>
+        /// 引发 System.Windows.Forms.Form.MouseUp 事件。
+        /// </summary>
+        /// <param name="mevent">包含事件数据的 System.Windows.Forms.MouseEventArgs。</param>
+        protected override void OnMouseUp(MouseEventArgs mevent)
+        {
+            base.OnMouseUp(mevent);
+            this.MouseState = EMouseState.Up;
+        }
+        #endregion
+    }
+}

+ 43 - 0
UAS_MES_HYSX/CustomControl/ClickPicBox/ClickPicBox.Designer.cs

@@ -0,0 +1,43 @@
+namespace UAS_MES_NEW.CustomControl.ClickPicBox
+{
+    partial class ClickPicBox
+    {
+        /// <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();
+            // 
+            // ClickPicBox
+            // 
+            this.Name = "ClickPicBox";
+            this.Size = new System.Drawing.Size(280, 150);
+            this.ResumeLayout(true);
+
+        }
+
+        #endregion
+    }
+}

+ 43 - 0
UAS_MES_HYSX/CustomControl/ClickPicBox/ClickPicBox.cs

@@ -0,0 +1,43 @@
+using System.Windows.Forms;
+
+namespace UAS_MES_NEW.CustomControl.ClickPicBox
+{
+    public partial class ClickPicBox : PictureBox
+    {
+        private string Power1;
+
+        public string Power
+        {
+            get
+            {
+                return Power1;
+            }
+
+            set
+            {
+                Power1 = value;
+            }
+        }
+
+        string AllPower1;
+
+        public string AllPower
+        {
+            get
+            {
+                return AllPower1;
+            }
+
+            set
+            {
+                AllPower1 = value;
+            }
+        }
+
+
+        public ClickPicBox()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 120 - 0
UAS_MES_HYSX/CustomControl/ClickPicBox/ClickPicBox.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>

+ 37 - 0
UAS_MES_HYSX/CustomControl/ClickPicBox/LockIcon.Designer.cs

@@ -0,0 +1,37 @@
+namespace UAS_MES_NEW.CustomControl.ClickPicBox
+{
+    partial class LockIcon
+    {
+        /// <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();
+            Click += LockIcon_Click;
+        }
+
+        #endregion
+    }
+}

+ 46 - 0
UAS_MES_HYSX/CustomControl/ClickPicBox/LockIcon.cs

@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace UAS_MES_NEW.CustomControl.ClickPicBox
+{
+    public partial class LockIcon : PictureBox
+    {
+
+        static Control MaCtl;
+
+        private bool Locked = false;
+
+        public LockIcon()
+        {
+            InitializeComponent();
+            Image = Properties.Resources.lock_open_24px;
+        }
+
+        /// <summary>
+        /// 获取存放工单的控件
+        /// </summary>
+        public static void GetMakeCodeCtl(Control ctl)
+        {
+            MaCtl = ctl;
+        }
+
+        private void LockIcon_Click(object sender, EventArgs e)
+        {
+            if (Locked)
+            {
+                Image = Properties.Resources.lock_open_24px;
+                Locked = false;
+            }
+            else {
+                Image = Properties.Resources.lock_lock_24px ;
+                Locked = true;
+            }
+        }
+    }
+}

+ 37 - 0
UAS_MES_HYSX/CustomControl/ComBoxWithFocus/ComBoxWithFocus.Designer.cs

@@ -0,0 +1,37 @@
+namespace UAS_MES_NEW.CustomControl.ComBoxWithFocus
+{
+    partial class ComBoxWithFocus
+    {
+        /// <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();
+           // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+        }
+
+        #endregion
+    }
+}

+ 32 - 0
UAS_MES_HYSX/CustomControl/ComBoxWithFocus/ComBoxWithFocus.cs

@@ -0,0 +1,32 @@
+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;
+
+namespace UAS_MES_NEW.CustomControl.ComBoxWithFocus
+{
+    public partial class ComBoxWithFocus : ComboBox
+    {
+        public ComBoxWithFocus()
+        {
+            InitializeComponent();
+            this.Enter += this.ComBoxWithFocus_Enter;
+            this.Leave += this.ComBoxWithFocus_Leave;
+        }
+
+        private void ComBoxWithFocus_Enter(object sender, EventArgs e)
+        {
+            this.BackColor = Color.GreenYellow;
+        }
+
+        private void ComBoxWithFocus_Leave(object sender, EventArgs e)
+        {
+            this.BackColor = Color.White;
+        }
+    }
+}

+ 46 - 0
UAS_MES_HYSX/CustomControl/ComBoxWithFocus/ComboxWithTip.Designer.cs

@@ -0,0 +1,46 @@
+namespace UAS_MES_NEW.CustomControl.ComBoxWithFocus
+{
+    partial class ComboxWithTip
+    {
+        /// <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();
+            this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
+            this.SuspendLayout();
+            // 
+            // ComboxWithTip
+            // 
+            this.TextChanged += new System.EventHandler(this.ComboxWithTip_TextChanged);
+            this.ResumeLayout(true);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.ToolTip toolTip1;
+    }
+}

+ 29 - 0
UAS_MES_HYSX/CustomControl/ComBoxWithFocus/ComboxWithTip.cs

@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+
+namespace UAS_MES_NEW.CustomControl.ComBoxWithFocus
+{
+    public partial class ComboxWithTip : System.Windows.Forms.ComboBox
+    {
+        public ComboxWithTip()
+        {
+            InitializeComponent();
+        }
+
+        public ComboxWithTip(IContainer container)
+        {
+            container.Add(this);
+
+            InitializeComponent();
+        }
+
+        private void ComboxWithTip_TextChanged(object sender, EventArgs e)
+        {
+            toolTip1.SetToolTip(this, this.Text);
+        }
+    }
+}

+ 126 - 0
UAS_MES_HYSX/CustomControl/ComBoxWithFocus/ComboxWithTip.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="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>373, 214</value>
+  </metadata>
+  <metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </metadata>
+</root>

+ 62 - 0
UAS_MES_HYSX/CustomControl/ComBoxWithFocus/PrinterCombox.Designer.cs

@@ -0,0 +1,62 @@
+namespace UAS_MES_NEW.CustomControl.ComBoxWithFocus
+{
+    partial class PrinterCombox
+    {
+        /// <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.PrinterList = new System.Windows.Forms.ComboBox();
+            this.SuspendLayout();
+            // 
+            // PrinterList
+            // 
+            this.PrinterList.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.PrinterList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.PrinterList.FormattingEnabled = true;
+            this.PrinterList.Location = new System.Drawing.Point(0, 0);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.PrinterList.Name = "PrinterList";
+            this.PrinterList.Size = new System.Drawing.Size(252, 23);
+            this.PrinterList.TabIndex = 0;
+            this.Load += PrinterCombox_Load;
+            // 
+            // PrinterCombox
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.PrinterList);
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Name = "PrinterCombox";
+            this.Size = new System.Drawing.Size(252, 28);
+            this.ResumeLayout(true);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.ComboBox PrinterList;
+    }
+}

+ 53 - 0
UAS_MES_HYSX/CustomControl/ComBoxWithFocus/PrinterCombox.cs

@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.Drawing.Printing;
+
+namespace UAS_MES_NEW.CustomControl.ComBoxWithFocus
+{
+    public partial class PrinterCombox : UserControl
+    {
+        public PrinterCombox()
+        {
+            InitializeComponent();
+        }
+
+        public override string Text
+        {
+            get
+            {
+                return PrinterList.Text;
+            }
+
+            set
+            {
+                PrinterList.Text = value;
+            }
+        }
+
+        private void PrinterCombox_Load(object sender, EventArgs e)
+        {
+            try
+            {
+                PrintDocument print = new PrintDocument();
+                string sDefault = print.PrinterSettings.PrinterName;//默认打印机名
+
+                foreach (string sPrint in PrinterSettings.InstalledPrinters)//获取所有打印机名称
+                {
+                    PrinterList.Items.Add(sPrint);
+                    if (sPrint == sDefault)
+                        PrinterList.SelectedIndex = PrinterList.Items.IndexOf(sPrint);
+                }
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(ex.Message);
+            }
+        }
+    }
+}

+ 120 - 0
UAS_MES_HYSX/CustomControl/ComBoxWithFocus/PrinterCombox.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>

+ 62 - 0
UAS_MES_HYSX/CustomControl/ComBoxWithFocus/SerialPortCombox.Designer.cs

@@ -0,0 +1,62 @@
+namespace UAS_MES_NEW.CustomControl.ComBoxWithFocus
+{
+    partial class SerialPortCombox
+    {
+        /// <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.ComCombox = new System.Windows.Forms.ComboBox();
+            this.SuspendLayout();
+            // 
+            // ComCombox
+            // 
+            this.ComCombox.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.ComCombox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.ComCombox.FormattingEnabled = true;
+            this.ComCombox.Location = new System.Drawing.Point(0, 0);
+            this.ComCombox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.ComCombox.Name = "ComCombox";
+            this.ComCombox.Size = new System.Drawing.Size(279, 32);
+            this.ComCombox.TabIndex = 0;
+            // 
+            // SerialPortCombox
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.ComCombox);
+            this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.Name = "SerialPortCombox";
+            this.Size = new System.Drawing.Size(279, 40);
+            this.Load += new System.EventHandler(this.SerialPortCombox_Load);
+            this.ResumeLayout(true);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.ComboBox ComCombox;
+    }
+}

+ 43 - 0
UAS_MES_HYSX/CustomControl/ComBoxWithFocus/SerialPortCombox.cs

@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.IO.Ports;
+
+namespace UAS_MES_NEW.CustomControl.ComBoxWithFocus
+{
+    public partial class SerialPortCombox : UserControl
+    {
+        public SerialPortCombox()
+        {
+            InitializeComponent();
+        }
+
+        public override string Text
+        {
+            get
+            {
+                return ComCombox.Text;
+            }
+
+            set
+            {
+                ComCombox.Text = value;
+            }
+        }
+
+        private void SerialPortCombox_Load(object sender, EventArgs e)
+        {
+          string[] str= SerialPort.GetPortNames();
+            for (int i = 0; i < str.Length; i++)
+            {
+                Console.WriteLine(str[i]);
+            }
+            ComCombox.Items.AddRange(SerialPort.GetPortNames());
+        }
+    }
+}

+ 120 - 0
UAS_MES_HYSX/CustomControl/ComBoxWithFocus/SerialPortCombox.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>

+ 62 - 0
UAS_MES_HYSX/CustomControl/CustomCheckBox/AutoPrintCheckBox.Designer.cs

@@ -0,0 +1,62 @@
+namespace UAS_MES_NEW.CustomControl.CustomCheckBox
+{
+    partial class AutoPrintCheckBox
+    {
+        /// <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.AutoPrint = new System.Windows.Forms.CheckBox();
+            this.SuspendLayout();
+            // 
+            // AutoPrint
+            // 
+            this.AutoPrint.AutoSize = true;
+            this.AutoPrint.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.AutoPrint.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.AutoPrint.Location = new System.Drawing.Point(0, 0);
+            this.AutoPrint.Name = "AutoPrint";
+            this.AutoPrint.Size = new System.Drawing.Size(125, 34);
+            this.AutoPrint.TabIndex = 0;
+            this.AutoPrint.Text = "自动打印";
+            this.AutoPrint.UseVisualStyleBackColor = true;
+            // 
+            // AutoPrintCheckBox
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.AutoPrint);
+            this.Name = "AutoPrintCheckBox";
+            this.Size = new System.Drawing.Size(125, 34);
+            this.ResumeLayout(true);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.CheckBox AutoPrint;
+    }
+}

+ 63 - 0
UAS_MES_HYSX/CustomControl/CustomCheckBox/AutoPrintCheckBox.cs

@@ -0,0 +1,63 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.DataOperate;
+
+namespace UAS_MES_NEW.CustomControl.CustomCheckBox
+{
+    public partial class AutoPrintCheckBox : UserControl
+    {
+         
+        public AutoPrintCheckBox()
+        {
+            InitializeComponent();
+            this.Load += AutoPrintCheckBox_Load;
+        }
+
+        DataHelper dh;
+
+        private void AutoPrintCheckBox_Load(object sender, EventArgs e)
+        {
+            dh = SystemInf.dh;
+            if (FindForm().Tag != null)
+            {
+                if (dh.getFieldDataByCondition("CS$SYSNAVATION", "nvl(sn_defaultprint,0)", "sn_caller='" + FindForm().Tag.ToString() + "'").ToString() != "0")
+                    AutoPrint.Checked = true;
+                else
+                    AutoPrint.Checked = false;  
+            }
+        }
+
+        public bool Checked
+        {
+            get
+            {
+                return AutoPrint.Checked;
+            }
+
+            set
+            {
+                AutoPrint.Checked = value;
+            }
+        }
+
+        public override string Text
+        {
+            get
+            {
+                return AutoPrint.Text;
+            }
+
+            set
+            {
+                AutoPrint.Text = value;
+            }
+        }
+    }
+}

+ 120 - 0
UAS_MES_HYSX/CustomControl/CustomCheckBox/AutoPrintCheckBox.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_HYSX/CustomControl/CustomCheckBox/CustomCheckBox.Designer.cs

@@ -0,0 +1,36 @@
+namespace UAS_MES_NEW.CustomControl.CustomCheckBox
+{
+    partial class CustomCheckBox
+    {
+        /// <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
+    }
+}

+ 51 - 0
UAS_MES_HYSX/CustomControl/CustomCheckBox/CustomCheckBox.cs

@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace UAS_MES_NEW.CustomControl.CustomCheckBox
+{
+    public partial class CustomCheckBox : CheckBox
+    {
+
+        /// <summary>
+        /// 权限标识
+        /// </summary>
+        private string Power1;
+        public string Power
+        {
+            get
+            {
+                return Power1;
+            }
+
+            set
+            {
+                Power1 = value;
+            }
+        }
+
+        public string AllPower
+        {
+            get
+            {
+                return AllPower1;
+            }
+
+            set
+            {
+                AllPower1 = value;
+            }
+        }
+
+        private string AllPower1;
+        public CustomCheckBox()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 43 - 0
UAS_MES_HYSX/CustomControl/CustomCheckBox/LockCheckBox.Designer.cs

@@ -0,0 +1,43 @@
+namespace UAS_MES_NEW.CustomControl.CustomCheckBox
+{
+    partial class LockCheckBox
+    {
+        /// <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();
+            // 
+            // LockCheckBox
+            // 
+            this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.CheckStateChanged += new System.EventHandler(this.LockCheckBox_CheckStateChanged);
+            this.ResumeLayout(true);
+
+        }
+
+        #endregion
+    }
+}

+ 76 - 0
UAS_MES_HYSX/CustomControl/CustomCheckBox/LockCheckBox.cs

@@ -0,0 +1,76 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.PublicMethod;
+using UAS_MES_NEW.CustomControl.TextBoxWithIcon;
+
+namespace UAS_MES_NEW.CustomControl.CustomCheckBox
+{
+    public partial class LockCheckBox : CheckBox
+    {
+        /// <summary>
+        /// 存放工单的控件
+        /// </summary>
+        MaCodeSearchTextBox MaCtl;
+
+        bool LeaveEvent1;
+
+        public bool LeaveEvent
+        {
+            get
+            {
+                return LeaveEvent1;
+            }
+
+            set
+            {
+                LeaveEvent1 = value;
+            }
+        }
+
+        public LockCheckBox()
+        {
+            InitializeComponent();
+        }
+
+        public void GetMakeCodeCtl(MaCodeSearchTextBox ctl)
+        {
+            MaCtl = ctl;
+        }
+
+        private void LockCheckBox_CheckStateChanged(object sender, EventArgs e)
+        {
+            if (Checked)
+            {
+                if (MaCtl.Text != "")
+                {
+                    string ErrorMessage;
+                    if (LogicHandler.CheckMakeStatus(MaCtl.Text, out ErrorMessage))
+                        MaCtl.Enabled = false;
+                    else
+                    {
+                        Checked = false;
+                        MaCtl.Text = "";
+                        BaseUtil.ShowError(ErrorMessage);
+                    }
+                }
+                else
+                {
+                    Checked = false;
+                    MaCtl.Text = "";
+                    BaseUtil.ShowError("工单号不能为空");
+                }
+            }
+            else
+            {
+                MaCtl.Enabled = true;
+                MaCtl.Focus();
+            }
+        }
+    }
+}

+ 123 - 0
UAS_MES_HYSX/CustomControl/CustomCheckBox/LockCheckBox.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="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </metadata>
+</root>

+ 42 - 0
UAS_MES_HYSX/CustomControl/CustomCheckBox/ReSetCheckBox.Designer.cs

@@ -0,0 +1,42 @@
+namespace UAS_MES_NEW.CustomControl.CustomCheckBox
+{
+    partial class ReSetCheckBox
+    {
+        /// <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();
+            // 
+            // ReSetCheckBox
+            // 
+            this.Layout += new System.Windows.Forms.LayoutEventHandler(this.ReSetCheckBox_Layout);
+            this.ResumeLayout(true);
+
+        }
+
+        #endregion
+    }
+}

+ 31 - 0
UAS_MES_HYSX/CustomControl/CustomCheckBox/ReSetCheckBox.cs

@@ -0,0 +1,31 @@
+using System.Windows.Forms;
+using UAS_MES_NEW.Entity;
+
+namespace UAS_MES_NEW.CustomControl.CustomCheckBox
+{
+    public partial class ReSetCheckBox : CheckBox
+    {
+        DataOperate.DataHelper dh = SystemInf.dh;
+
+        public ReSetCheckBox()
+        {
+            InitializeComponent();
+
+        }
+
+        private void ReSetCheckBox_Layout(object sender, LayoutEventArgs e)
+        {
+            if (dh != null)
+            {
+                if (dh.getFieldDataByCondition("Step", "st_ifreset", "st_code='" + User.CurrentStepCode + "'").ToString() == "-1")
+                {
+                    Checked = true;
+                }
+                else
+                {
+                    Checked = false;
+                }
+            }
+        }
+    }
+}

+ 123 - 0
UAS_MES_HYSX/CustomControl/CustomCheckBox/ReSetCheckBox.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="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </metadata>
+</root>

+ 42 - 0
UAS_MES_HYSX/CustomControl/CustomTabControl/CustomTabControl.Designer.cs

@@ -0,0 +1,42 @@
+namespace UAS_MES_NEW.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(true);
+        }
+
+        #endregion
+    }
+}

+ 330 - 0
UAS_MES_HYSX/CustomControl/CustomTabControl/CustomTabControl.cs

@@ -0,0 +1,330 @@
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+using System.Drawing.Drawing2D;
+using UAS_MES_NEW;
+using System.Runtime.InteropServices;
+
+namespace UAS_MES_NEW.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_HYSX/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_HYSX/CustomControl/CustomTabControl/ThemedColors.cs

@@ -0,0 +1,91 @@
+using System.Windows.Forms;
+using System.Windows.Forms.VisualStyles;
+using System.Drawing;
+
+
+namespace UAS_MES_NEW
+{
+    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
+        }
+    }
+}

+ 42 - 0
UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewExpand.Designer.cs

@@ -0,0 +1,42 @@
+namespace UAS_MES_NEW.CustomControl.DataGrid_View
+{
+    partial class DataGridViewExpand
+    {
+        /// <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.ISupportInitialize)(this)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // DataGridViewExpand
+            // 
+            this.RowTemplate.Height = 23;
+            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
+            this.ResumeLayout(true);
+
+        }
+        #endregion
+    }
+}

+ 288 - 0
UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewExpand.cs

@@ -0,0 +1,288 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Windows.Forms;
+using UAS_MES_NEW.Properties;
+
+namespace UAS_MES_NEW.CustomControl.DataGrid_View
+{
+    public partial class DataGridViewExpand : DataGridView
+    {
+        public DataGridViewExpand()
+             : base()
+        {
+            this.RowHeadersVisible = true;
+            this.RowHeadersWidth = 20;
+        }
+        /// <summary>
+        /// 重写GridView的行被绘之后的方法,用于添加行前面的“+“,“-”
+        /// </summary>
+        /// <param name="e"></param>
+        protected override void OnRowPostPaint(DataGridViewRowPostPaintEventArgs e)
+        {
+            base.OnRowPostPaint(e);
+
+            DataGridViewRow row = this.Rows[e.RowIndex];
+            if (row is CollapseDataGridViewRow)
+            {
+                Rectangle rect = new Rectangle(e.RowBounds.Location.X + 5, e.RowBounds.Location.Y + 5, 12, 12);
+                Image img = null;
+                if ((row as CollapseDataGridViewRow).IsCollapse)
+                {
+                    img = Resources.plus;
+                }
+                else
+                {
+                    img = Resources.minus;
+                }
+                e.Graphics.DrawImage(img, rect);
+            }
+        }
+        /// <summary>
+        /// 重写行头被点击的方法
+        /// </summary>
+        /// <param name="e"></param>
+        protected override void OnRowHeaderMouseClick(DataGridViewCellMouseEventArgs e)
+        {
+            base.OnRowHeaderMouseClick(e);
+            DataGridViewRow row = this.Rows[e.RowIndex];
+            if (row is CollapseDataGridViewRow)
+            {
+                //如果是当前行是折叠状态"+",展开本行下的所有子行。“+”==》“-”
+                if ((row as CollapseDataGridViewRow).IsCollapse == true)
+                {
+                    //把当前点击的行,设为展开状态
+                    (row as CollapseDataGridViewRow).IsCollapse = false;
+
+                    if ((row as CollapseDataGridViewRow).Rows.Count != 0)
+                    {
+                        int idxOfNotCollapse = 0;//用于记录当前展开行的索引
+                        int delCount = 0;//用于记录当前展开行下的子行的数量
+
+                        //查找本DataGridView下是否已存在展开的行,如果有,则收缩
+                        foreach (DataGridViewRow dgvRow in this.Rows)
+                        {
+                            //如果此时有其他行展开,则将其设置为折叠,保证只有一个展开项
+                            if ((dgvRow is CollapseDataGridViewRow) &&
+                                (dgvRow as CollapseDataGridViewRow).IsCollapse == false &&
+                                 dgvRow != row)
+                            {
+                                //获取要删除的行数
+                                delCount = (dgvRow as CollapseDataGridViewRow).Rows.Count;
+                                //获取当前展开行的索引
+                                idxOfNotCollapse = (dgvRow as CollapseDataGridViewRow).Index;
+                                //从DataGridView中移除当前展开行的子行
+                                RemoveAllSubRow((CollapseDataGridViewRow)dgvRow, this, false);
+                                //设置为收缩
+                                (dgvRow as CollapseDataGridViewRow).IsCollapse = true;
+                            }
+                        }
+
+                        for (int i = 0; i < (row as CollapseDataGridViewRow).Rows.Count; i++)
+                        {
+                            if (e.RowIndex < idxOfNotCollapse)//当前点击的行在当前展开的行前面
+                            {
+                                this.Rows.Insert(e.RowIndex + 1 + i, (row as CollapseDataGridViewRow).Rows[i]);
+                            }
+                            else//当前点击的行在当前展开行的后面
+                            {
+                                this.Rows.Insert(e.RowIndex + 1 + i - delCount, (row as CollapseDataGridViewRow).Rows[i]);
+                            }
+                        }
+                    }
+                }
+                else     //如果是展开状态"-",则移除子行,将当前行折叠起来"-"。“-”==》“+”
+                {
+                    if ((row as CollapseDataGridViewRow).Rows.Count != 0)
+                    {
+                        RemoveAllSubRow((CollapseDataGridViewRow)row, this, false);
+                    }
+                    (row as CollapseDataGridViewRow).IsCollapse = true;
+                }
+            }
+        }
+        /// <summary>
+        /// 递归 移除折叠行的子行
+        /// </summary>
+        /// <param name="row">可折叠行</param>
+        /// <param name="grid"></param>
+        /// <param name="flag"></param>
+        private void RemoveAllSubRow(CollapseDataGridViewRow row, DataGridView grid, bool flag)
+        {
+            if (row.Rows.Count != 0)
+            {
+                if (!row.IsCollapse)
+                {
+                    for (int i = 0; i < row.Rows.Count; i++)
+                    {
+                        if (row.Rows[i] is CollapseDataGridViewRow)
+                        {
+                            RemoveAllSubRow((CollapseDataGridViewRow)row.Rows[i], grid, true);
+                        }
+                        else
+                        {
+                            grid.Rows.Remove(row.Rows[i]);
+                        }
+                    }
+                }
+                //是否移除本行
+                if (flag)
+                {
+                    row.IsCollapse = true;
+                    grid.Rows.Remove(row);
+                }
+            }
+        }
+    }
+    /// <summary>
+    /// 可折叠展开的行类,继承自DataGridView
+    /// </summary>
+    public class CollapseDataGridViewRow : DataGridViewRow
+    {
+        private CollapseDataGridViewRowCollection collectionRow = new CollapseDataGridViewRowCollection();
+        private bool isCollapse = false;
+        /// <summary>
+        /// 是否折叠显示
+        /// </summary>
+        public bool IsCollapse
+        {
+            get { return isCollapse; }
+            set { isCollapse = value; }
+        }
+        /// <summary>
+        /// 用于存储子行的集合属性
+        /// </summary>
+        public CollapseDataGridViewRowCollection Rows
+        {
+            get
+            {
+                return collectionRow;
+            }
+            set
+            {
+                collectionRow = value;
+            }
+        }
+
+    }
+    /// <summary>
+    /// 可折叠展开的行的集合类
+    /// </summary>
+    public class CollapseDataGridViewRowCollection : IEnumerable<DataGridViewRow>, ICollection<DataGridViewRow>
+    {
+        private List<DataGridViewRow> listRow = new List<DataGridViewRow>();
+        /// <summary>
+        /// 索引属性访问器
+        /// </summary>
+        /// <param name="index">索引值</param>
+        /// <returns></returns>
+        public DataGridViewRow this[int index]
+        {
+            get
+            {
+                if (index >= listRow.Count)
+                {
+                    throw new ArgumentOutOfRangeException("index");
+                }
+                return listRow[index];
+            }
+        }
+
+        #region IEnumerable<DataGridViewRow> 成员
+        /// <summary>
+        /// 系统生成
+        /// </summary>
+        /// <returns></returns>
+        public IEnumerator<DataGridViewRow> GetEnumerator()
+        {
+
+            if (listRow.Count == 0)
+            {
+                throw new ArgumentOutOfRangeException("集合为空");
+            }
+            for (int i = 0; i < listRow.Count; i++)
+            {
+                yield return listRow[i];
+
+            }
+
+        }
+
+        #endregion
+
+        #region IEnumerable 成员
+
+        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+        {
+            if (listRow.Count == 0)
+            {
+                throw new ArgumentOutOfRangeException("集合为空");
+            }
+            for (int i = 0; i < listRow.Count; i++)
+            {
+                yield return listRow[i];
+
+            }
+        }
+        #endregion
+
+        #region ICollection<DataGridViewRow> 成员
+        /// <summary>
+        /// 添加新行
+        /// </summary>
+        /// <param name="item"></param>
+        public void Add(DataGridViewRow item)
+        {
+            this.listRow.Add(item);
+        }
+        /// <summary>
+        /// 清空所有行
+        /// </summary>
+        public void Clear()
+        {
+            this.listRow.Clear();
+        }
+        /// <summary>
+        /// 是否包含当前行
+        /// </summary>
+        /// <param name="item"></param>
+        /// <returns></returns>
+        public bool Contains(DataGridViewRow item)
+        {
+            return this.listRow.Contains(item);
+        }
+        /// <summary>
+        /// 复制
+        /// </summary>
+        /// <param name="array">行数组</param>
+        /// <param name="arrayIndex">索引</param>
+        public void CopyTo(DataGridViewRow[] array, int arrayIndex)
+        {
+            this.listRow.CopyTo(array, arrayIndex);
+        }
+        /// <summary>
+        /// 行的数量
+        /// </summary>
+        public int Count
+        {
+            get { return this.listRow.Count; }
+        }
+        /// <summary>
+        /// 是否只读
+        /// </summary>
+        public bool IsReadOnly
+        {
+            get { return false; }
+        }
+        /// <summary>
+        /// 移除行
+        /// </summary>
+        /// <param name="item"></param>
+        /// <returns></returns>
+        public bool Remove(DataGridViewRow item)
+        {
+            return this.listRow.Remove(item);
+        }
+        #endregion
+    }
+}

+ 123 - 0
UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewExpand.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="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </metadata>
+</root>

+ 45 - 0
UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewWithCheckBox.Designer.cs

@@ -0,0 +1,45 @@
+namespace UAS_MES_NEW.CustomControl.DataGrid_View
+{
+    partial class DataGridViewWithCheckBox
+    {
+        /// <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.ISupportInitialize)(this)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // DataGridViewWithCheckBox
+            // 
+            this.RowTemplate.Height = 27;
+            this.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridViewWithCheckBox_CellContentClick);
+            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
+            this.ResumeLayout(true);
+
+        }
+
+        #endregion
+    }
+}

+ 129 - 0
UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewWithCheckBox.cs

@@ -0,0 +1,129 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace UAS_MES_NEW.CustomControl.DataGrid_View
+{
+    public partial class DataGridViewWithCheckBox : DataGridView
+    {
+        public DataGridViewWithCheckBox()
+        {
+            InitializeComponent();
+        }
+
+        private void DataGridViewWithCheckBox_CellContentClick(object sender, DataGridViewCellEventArgs e)
+        {
+            if (Columns[0] is DataGridViewCheckBoxColumn && e.ColumnIndex >= 0 && e.RowIndex >= 0)
+            {
+                if (!(Columns[e.ColumnIndex] is DataGridViewCheckBoxColumn) && !(Columns[e.ColumnIndex] is DataGridViewComboBoxColumn))
+                {
+                    if (Rows[e.RowIndex].Cells[0].Value != null)
+                    {
+                        if (Rows[e.RowIndex].Cells[0].Value.ToString() == "0")
+                        {
+                            Rows[e.RowIndex].Cells[0].Value = 1;
+                        }
+                        else
+                        {
+                            Rows[e.RowIndex].Cells[0].Value = 0;
+                        }
+                    }
+                    else
+                    {
+                        Rows[e.RowIndex].Cells[0].Value = 0;
+                    }
+                }
+            }
+        }
+    }
+
+    public class DataGridViewCheckBoxHeaderCell : DataGridViewColumnHeaderCell
+    {
+        /// <summary>
+        ///用于接收全选的一列
+        /// </summary>
+        /// <param name="dgvc"></param>
+        public DataGridViewCheckBoxHeaderCell(DataGridView dgv, DataGridViewCheckBoxColumn dgvc)
+        {
+            DGV = dgv;
+            DGVC = dgvc;
+        }
+        DataGridView DGV;
+        DataGridViewColumn DGVC;
+        Point checkBoxLocation;
+        Size checkBoxSize;
+        bool _checked = false;
+        Point _cellLocation = new Point();
+        System.Windows.Forms.VisualStyles.CheckBoxState _cbState = System.Windows.Forms.VisualStyles.CheckBoxState.UncheckedNormal;
+        //绘制列头checkbox  
+        protected override void Paint(System.Drawing.Graphics graphics,
+           System.Drawing.Rectangle clipBounds,
+           System.Drawing.Rectangle cellBounds,
+           int rowIndex,
+           DataGridViewElementStates dataGridViewElementState,
+           object value,
+           object formattedValue,
+           string errorText,
+           DataGridViewCellStyle cellStyle,
+           DataGridViewAdvancedBorderStyle advancedBorderStyle,
+           DataGridViewPaintParts paintParts)
+        {
+            base.Paint(graphics, clipBounds, cellBounds, rowIndex, dataGridViewElementState, value, formattedValue, errorText, cellStyle, advancedBorderStyle, paintParts);
+            Point p = new Point();
+            Size s = CheckBoxRenderer.GetGlyphSize(graphics,
+            System.Windows.Forms.VisualStyles.CheckBoxState.UncheckedNormal);
+            p.X = cellBounds.Location.X + (cellBounds.Width / 2) - (s.Width / 2) - 1;//列头checkbox的X坐标  
+            p.Y = cellBounds.Location.Y + (cellBounds.Height / 2) - (s.Height / 2);//列头checkbox的Y坐标  
+            _cellLocation = cellBounds.Location;
+            checkBoxLocation = p;
+            checkBoxSize = s;
+            if (_checked)
+                _cbState = System.Windows.Forms.VisualStyles.
+                    CheckBoxState.CheckedNormal;
+            else
+                _cbState = System.Windows.Forms.VisualStyles.
+                    CheckBoxState.UncheckedNormal;
+            CheckBoxRenderer.DrawCheckBox(graphics, checkBoxLocation, _cbState);
+        }
+
+        //定义触发单击事件的委托  
+        delegate void DataGridViewCheckBoxHeaderEventHander(object sender, DataGridViewCheckboxHeaderEventArgs e);
+        class DataGridViewCheckboxHeaderEventArgs : EventArgs
+        {
+            private bool checkedState = false;
+
+            public bool CheckedState
+            {
+                get { return checkedState; }
+                set { checkedState = value; }
+            }
+        }
+
+        /// <summary>
+        /// 根据点击的位置和CheckBox所在的位置重叠来进行状态的改变
+        /// </summary>
+        /// <param name="e"></param>
+        protected override void OnMouseClick(DataGridViewCellMouseEventArgs e)
+        {
+            Point p = new Point(e.X + _cellLocation.X, e.Y + _cellLocation.Y);
+            if (p.X >= checkBoxLocation.X && p.X <= checkBoxLocation.X + checkBoxSize.Width
+            && p.Y >= checkBoxLocation.Y && p.Y <= checkBoxLocation.Y + checkBoxSize.Height)
+            {
+                _checked = !_checked;
+                //获取列头checkbox的选择状态  
+                DataGridViewCheckboxHeaderEventArgs ex = new DataGridViewCheckboxHeaderEventArgs();
+                ex.CheckedState = _checked;
+                for (int i = 0; i < DGV.RowCount; i++)
+                {
+                    DGV.Rows[i].Cells[DGVC.Name].Value = ex.CheckedState;
+                }
+            }
+            base.OnMouseClick(e);
+        }
+    }
+}

+ 123 - 0
UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewWithCheckBox.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="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </metadata>
+</root>

+ 45 - 0
UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewWithFilter.Designer.cs

@@ -0,0 +1,45 @@
+namespace UAS_MES_NEW.CustomControl.DataGrid_View
+{
+    partial class DataGridViewWithFilter
+    {
+        /// <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.ISupportInitialize)(this)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // DataGridViewWithFilter
+            // 
+            this.RowTemplate.Height = 23;
+            this.Size = new System.Drawing.Size(616, 259);
+            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
+            this.ResumeLayout(true);
+
+        }
+
+        #endregion
+    }
+}

+ 29 - 0
UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewWithFilter.cs

@@ -0,0 +1,29 @@
+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;
+
+namespace UAS_MES_NEW.CustomControl.DataGrid_View
+{
+    public partial class DataGridViewWithFilter : DataGridView
+    {
+       
+        public DataGridViewWithFilter()
+        {
+            InitializeComponent();
+        }
+
+        public void addrow()
+        {
+            DataGridViewRow row = new DataGridViewRow();
+            DataGridViewTextBoxCell textboxcell = new DataGridViewTextBoxCell();
+            row.Cells.Add(textboxcell);
+            this.Rows.Add(row);
+        }
+    }
+}

+ 123 - 0
UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewWithFilter.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="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </metadata>
+</root>

+ 49 - 0
UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewWithSerialNum.Designer.cs

@@ -0,0 +1,49 @@
+using System.Windows.Forms;
+
+namespace UAS_MES_NEW.CustomControl.DataGrid_View
+{
+    partial class DataGridViewWithSerialNum
+    {
+       // private AutoScaleMode AutoScaleMode;
+
+        /// <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.ISupportInitialize)(this)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // DataGridViewWithSerialNum
+            // 
+            this.RowTemplate.Height = 27;
+            this.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridViewWithSerialNum_CellContentClick);
+            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
+            this.ResumeLayout(true);
+
+        }
+
+        #endregion
+    }
+}

+ 72 - 0
UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewWithSerialNum.cs

@@ -0,0 +1,72 @@
+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;
+
+namespace UAS_MES_NEW.CustomControl.DataGrid_View
+{
+    public partial class DataGridViewWithSerialNum : DataGridView
+    {
+        SolidBrush solidBrush;
+
+        bool EnableContentClick1 = true;
+
+        public bool EnableContentClick
+        {
+            get
+            {
+                return EnableContentClick1;
+            }
+
+            set
+            {
+                EnableContentClick1 = value;
+            }
+        }
+
+        public DataGridViewWithSerialNum()
+        {
+            InitializeComponent();
+            solidBrush = new SolidBrush(RowHeadersDefaultCellStyle.ForeColor);
+        }
+
+        protected override void OnRowPostPaint(DataGridViewRowPostPaintEventArgs e)
+        {
+            e.Graphics.DrawString((e.RowIndex + 1).ToString(), e.InheritedRowStyle.Font, solidBrush, e.RowBounds.Location.X + 15, e.RowBounds.Location.Y + 5);
+            base.OnRowPostPaint(e);
+        }
+
+        private void DataGridViewWithSerialNum_CellContentClick(object sender, DataGridViewCellEventArgs e)
+        {
+            if (EnableContentClick1)
+            {
+                if (Columns[0] is DataGridViewCheckBoxColumn && e.ColumnIndex >= 0 && e.RowIndex >= 0)
+                {
+                    if (!(Columns[e.ColumnIndex] is DataGridViewCheckBoxColumn) && !(Columns[e.ColumnIndex] is DataGridViewComboBoxColumn))
+                    {
+                        if (Rows[e.RowIndex].Cells[0].Value != null)
+                        {
+                            if (Rows[e.RowIndex].Cells[0].Value.ToString() == "0")
+                            {
+                                Rows[e.RowIndex].Cells[0].Value = 1;
+                            }
+                            else
+                            {
+                                Rows[e.RowIndex].Cells[0].Value = 0;
+                            }
+                        }
+                        else
+                        {
+                            Rows[e.RowIndex].Cells[0].Value = 0;
+                        }
+                    }
+                }
+            }
+        }
+    }
+}

+ 123 - 0
UAS_MES_HYSX/CustomControl/DataGrid_View/DataGridViewWithSerialNum.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="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </metadata>
+</root>

+ 44 - 0
UAS_MES_HYSX/CustomControl/GroupBoxWithBorder/GroupBoxWithBorder.Designer.cs

@@ -0,0 +1,44 @@
+namespace UAS_MES_NEW.CustomControl.GroupBoxWithBorder
+{
+    partial class GroupBoxWithBorder
+    {
+        /// <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();
+            }
+            try
+            {
+                base.Dispose(disposing);
+
+            }
+            catch (System.Exception)
+            {
+
+            }
+        }
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            components = new System.ComponentModel.Container();
+           // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+        }
+
+        #endregion
+    }
+}

+ 66 - 0
UAS_MES_HYSX/CustomControl/GroupBoxWithBorder/GroupBoxWithBorder.cs

@@ -0,0 +1,66 @@
+using System.ComponentModel;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace UAS_MES_NEW.CustomControl.GroupBoxWithBorder
+{
+    public partial class GroupBoxWithBorder : GroupBox
+    {
+        /// <summary>
+        /// 获取和设置控件高亮色
+        /// </summary>
+        /// <value>高亮色</value>
+        [TypeConverter("System.Drawing.ColorConverter"),
+        Category("LoadingCircle"),
+        Description("获取和设置控件高亮色")]
+        public Color TextColor
+        {
+            get
+            {
+                return textcolor;
+            }
+            set
+            {
+                textcolor = value;
+                Invalidate();
+            }
+        }
+
+        public Color BorderColor
+        {
+            get
+            {
+                return bordercolor;
+            }
+
+            set
+            {
+                bordercolor = value;
+                Invalidate();
+            }
+        }
+
+        private Color textcolor;
+
+        private Color bordercolor;
+
+        public GroupBoxWithBorder()
+        {
+            InitializeComponent();
+            this.Paint += this.groupBox1_Paint;
+        }
+
+        private void groupBox1_Paint(object sender, PaintEventArgs e)
+        {
+            e.Graphics.Clear(BackColor);
+            Brush br = new SolidBrush(textcolor);
+            e.Graphics.DrawString(Text, Font, br, 10, 1);
+            Pen LineColor = new Pen(bordercolor);
+            e.Graphics.DrawLine(LineColor, 1, 7, 8, 7);
+            e.Graphics.DrawLine(LineColor, e.Graphics.MeasureString(Text, Font).Width + 8, 7, Width - 2, 7);
+            e.Graphics.DrawLine(LineColor, 1, 7, 1, Height - 2);
+            e.Graphics.DrawLine(LineColor, 1, Height - 2, Width - 2, Height - 2);
+            e.Graphics.DrawLine(LineColor, Width - 2, 7, Width - 2, Height - 2);
+        }
+    }
+}

+ 152 - 0
UAS_MES_HYSX/CustomControl/HeadBar/HeadBar.Designer.cs

@@ -0,0 +1,152 @@
+namespace UAS_MES_NEW.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.TitleLabel = new System.Windows.Forms.Label();
+            this.MinWindow2 = new System.Windows.Forms.PictureBox();
+            this.MinWindow = new System.Windows.Forms.PictureBox();
+            this.MinWindow1 = new System.Windows.Forms.PictureBox();
+            this.CloseWindow = new System.Windows.Forms.PictureBox();
+            this.LoginOut = new DevExpress.XtraEditors.SimpleButton();
+            this.Change_psw = new DevExpress.XtraEditors.SimpleButton();
+            this.UpperCollection = new DevExpress.XtraEditors.ToggleSwitch();
+            ((System.ComponentModel.ISupportInitialize)(this.MinWindow2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.MinWindow)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.MinWindow1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.CloseWindow)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.UpperCollection.Properties)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // TitleLabel
+            // 
+            resources.ApplyResources(this.TitleLabel, "TitleLabel");
+            this.TitleLabel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
+            this.TitleLabel.ForeColor = System.Drawing.Color.RoyalBlue;
+            this.TitleLabel.Name = "TitleLabel";
+            // 
+            // MinWindow2
+            // 
+            resources.ApplyResources(this.MinWindow2, "MinWindow2");
+            this.MinWindow2.Name = "MinWindow2";
+            this.MinWindow2.TabStop = false;
+            // 
+            // MinWindow
+            // 
+            resources.ApplyResources(this.MinWindow, "MinWindow");
+            this.MinWindow.Image = global::UAS_MES_NEW.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);
+            // 
+            // MinWindow1
+            // 
+            resources.ApplyResources(this.MinWindow1, "MinWindow1");
+            this.MinWindow1.Name = "MinWindow1";
+            this.MinWindow1.TabStop = false;
+            this.MinWindow1.Click += new System.EventHandler(this.CloseWindow_Click);
+            // 
+            // CloseWindow
+            // 
+            resources.ApplyResources(this.CloseWindow, "CloseWindow");
+            this.CloseWindow.Image = global::UAS_MES_NEW.Properties.Resources.close_32px_1181428_easyicon_net;
+            this.CloseWindow.Name = "CloseWindow";
+            this.CloseWindow.TabStop = false;
+            this.CloseWindow.Click += new System.EventHandler(this.CloseWindow_Click);
+            // 
+            // LoginOut
+            // 
+            this.LoginOut.Appearance.Font = ((System.Drawing.Font)(resources.GetObject("LoginOut.Appearance.Font")));
+            this.LoginOut.Appearance.Options.UseFont = true;
+            this.LoginOut.ButtonStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
+            resources.ApplyResources(this.LoginOut, "LoginOut");
+            this.LoginOut.Image = global::UAS_MES_NEW.Properties.Resources.Logout_32px_581264_easyicon_net;
+            this.LoginOut.ImageLocation = DevExpress.XtraEditors.ImageLocation.MiddleLeft;
+            this.LoginOut.Name = "LoginOut";
+            this.LoginOut.Click += new System.EventHandler(this.LoginOut_Click);
+            // 
+            // Change_psw
+            // 
+            this.Change_psw.Appearance.Font = ((System.Drawing.Font)(resources.GetObject("Change_psw.Appearance.Font")));
+            this.Change_psw.Appearance.Options.UseFont = true;
+            this.Change_psw.ButtonStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
+            resources.ApplyResources(this.Change_psw, "Change_psw");
+            this.Change_psw.Image = global::UAS_MES_NEW.Properties.Resources.pwd;
+            this.Change_psw.ImageLocation = DevExpress.XtraEditors.ImageLocation.MiddleLeft;
+            this.Change_psw.Name = "Change_psw";
+            this.Change_psw.Click += new System.EventHandler(this.Change_psw_Click);
+            // 
+            // UpperCollection
+            // 
+            resources.ApplyResources(this.UpperCollection, "UpperCollection");
+            this.UpperCollection.Name = "UpperCollection";
+            this.UpperCollection.Properties.Appearance.Font = ((System.Drawing.Font)(resources.GetObject("UpperCollection.Properties.Appearance.Font")));
+            this.UpperCollection.Properties.Appearance.Options.UseFont = true;
+            this.UpperCollection.Properties.OffText = resources.GetString("UpperCollection.Properties.OffText");
+            this.UpperCollection.Properties.OnText = resources.GetString("UpperCollection.Properties.OnText");
+            this.UpperCollection.Toggled += new System.EventHandler(this.UpperCollection_Toggled);
+            // 
+            // HeadBar
+            // 
+            resources.ApplyResources(this, "$this");
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
+            this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.Controls.Add(this.UpperCollection);
+            this.Controls.Add(this.Change_psw);
+            this.Controls.Add(this.LoginOut);
+            this.Controls.Add(this.MinWindow2);
+            this.Controls.Add(this.TitleLabel);
+            this.Controls.Add(this.MinWindow);
+            this.Controls.Add(this.MinWindow1);
+            this.Controls.Add(this.CloseWindow);
+            this.Name = "HeadBar";
+            this.Load += new System.EventHandler(this.HeadBar_Load);
+            this.BackColorChanged += new System.EventHandler(this.HeadBar_BackColorChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.MinWindow2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.MinWindow)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.MinWindow1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.CloseWindow)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.UpperCollection.Properties)).EndInit();
+            this.ResumeLayout(true);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.PictureBox MinWindow1;
+        private System.Windows.Forms.PictureBox CloseWindow;
+        private System.Windows.Forms.PictureBox MinWindow;
+        private System.Windows.Forms.Label TitleLabel;
+        private System.Windows.Forms.PictureBox MinWindow2;
+        private DevExpress.XtraEditors.SimpleButton Change_psw;
+        private DevExpress.XtraEditors.SimpleButton LoginOut;
+        private DevExpress.XtraEditors.ToggleSwitch UpperCollection;
+    }
+}

+ 150 - 0
UAS_MES_HYSX/CustomControl/HeadBar/HeadBar.cs

@@ -0,0 +1,150 @@
+using System;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+using UAS_MES_NEW.PublicForm;
+
+namespace UAS_MES_NEW.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 delegate void OnHeadBarClick(object sender, EventArgs e);
+        //定义事件
+        public event OnHeadBarClick HeadBarDoubleClick;
+
+        string Title1;
+
+        public string Title
+        {
+            get
+            {
+                return Title1;
+            }
+
+            set
+            {
+                Title1 = value;
+            }
+        }
+
+        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.FindForm().Name))
+            {
+                string logout_confirm = MessageBox.Show(this.ParentForm, "是否退出程序", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+                if (logout_confirm == "Yes")
+                {
+                    this.FindForm().Close();
+                    Application.Exit();
+                }
+            }
+            else
+            {
+                this.FindForm().Close();
+            }
+        }
+
+        private void panel1_Click(object sender, EventArgs e)
+        {
+            HeadBarDoubleClick?.Invoke(sender, new EventArgs());
+        }
+
+        private void MinWindow_Click(object sender, EventArgs e)
+        {
+            this.FindForm().WindowState = FormWindowState.Minimized;
+        }
+
+        private void HeadBar_Load(object sender, EventArgs e)
+        {
+            TitleLabel.Text = Title1;
+            if (!NeedConfirm.Contains(this.FindForm().Name))
+            {
+                LoginOut.Visible = false;
+                Change_psw.Visible = false;
+                UpperCollection.Visible = false;
+            }
+        }
+
+        private void LoginOut_MouseEnter(object sender, EventArgs e)
+        {
+            this.Cursor = Cursors.Hand;
+        }
+
+        private void LoginOut_MouseLeave(object sender, EventArgs e)
+        {
+            this.Cursor = Cursors.Default;
+        }
+
+        private void Change_psw_Click(object sender, EventArgs e)
+        {
+            ChangePwd chagepwd = new ChangePwd();
+            BaseUtil.SetFormCenter(chagepwd);
+            chagepwd.ShowDialog();
+        }
+
+        private void HeadBar_BackColorChanged(object sender, EventArgs e)
+        {
+            Change_psw.BackColor = BackColor;
+            LoginOut.BackColor = BackColor;
+        }
+
+        private void LoginOut_Click(object sender, EventArgs e)
+        {
+            //判断是否需要关闭前的提示
+            if (NeedConfirm.Contains(this.FindForm().Name))
+            {
+                string logout_confirm = MessageBox.Show(this.ParentForm, "退出登录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+                if (logout_confirm == "Yes")
+                {
+                    //注销的时候切换回默认数据库
+                    SystemInf.ConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.30.253)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+                    DataHelper.DBConnectionString = SystemInf.ConnectionString;
+                    //清除上个用户的权限信息
+                    SystemInf.Caller.Clear();
+                    //清除已经打开过的窗口的信息
+                    AccordionMenu.NavagationBar.OpenedFormName.Clear();
+                    //注销的时候将除了登陆窗口之外的全部窗口关闭
+                    for (int i = 0; i < Application.OpenForms.Count; i++)
+                    {
+                        if (Application.OpenForms[i].Name != "Login")
+                            Application.OpenForms[i].Close();
+                    }
+                    this.FindForm().Hide();
+                    Login login = new Login();
+                    login.ShowDialog();
+                    this.FindForm().Close();
+                }
+            }
+        }
+
+        private void UpperCollection_Toggled(object sender, EventArgs e)
+        {
+            SystemInf.UpperCollection = UpperCollection.IsOn;
+        }
+    }
+}

+ 432 - 0
UAS_MES_HYSX/CustomControl/HeadBar/HeadBar.resx

@@ -0,0 +1,432 @@
+<?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="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="TitleLabel.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="TitleLabel.Font" type="System.Drawing.Font, System.Drawing">
+    <value>微软雅黑, 12pt, style=Bold</value>
+  </data>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="TitleLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="TitleLabel.Location" type="System.Drawing.Point, System.Drawing">
+    <value>8, 6</value>
+  </data>
+  <data name="TitleLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>2, 0, 2, 0</value>
+  </data>
+  <data name="TitleLabel.Size" type="System.Drawing.Size, System.Drawing">
+    <value>0, 22</value>
+  </data>
+  <data name="TitleLabel.TabIndex" type="System.Int32, mscorlib">
+    <value>7</value>
+  </data>
+  <data name="&gt;&gt;TitleLabel.Name" xml:space="preserve">
+    <value>TitleLabel</value>
+  </data>
+  <data name="&gt;&gt;TitleLabel.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;TitleLabel.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;TitleLabel.ZOrder" xml:space="preserve">
+    <value>4</value>
+  </data>
+  <data name="MinWindow2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Right</value>
+  </data>
+  <data name="MinWindow2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="MinWindow2.Location" type="System.Drawing.Point, System.Drawing">
+    <value>491, 0</value>
+  </data>
+  <data name="MinWindow2.Size" type="System.Drawing.Size, System.Drawing">
+    <value>15, 28</value>
+  </data>
+  <data name="MinWindow2.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
+    <value>StretchImage</value>
+  </data>
+  <data name="MinWindow2.TabIndex" type="System.Int32, mscorlib">
+    <value>8</value>
+  </data>
+  <data name="&gt;&gt;MinWindow2.Name" xml:space="preserve">
+    <value>MinWindow2</value>
+  </data>
+  <data name="&gt;&gt;MinWindow2.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;MinWindow2.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;MinWindow2.ZOrder" xml:space="preserve">
+    <value>3</value>
+  </data>
+  <data name="MinWindow.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Right</value>
+  </data>
+  <data name="MinWindow.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="MinWindow.Location" type="System.Drawing.Point, System.Drawing">
+    <value>506, 0</value>
+  </data>
+  <data name="MinWindow.Size" type="System.Drawing.Size, System.Drawing">
+    <value>30, 28</value>
+  </data>
+  <data name="MinWindow.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
+    <value>StretchImage</value>
+  </data>
+  <data name="MinWindow.TabIndex" type="System.Int32, mscorlib">
+    <value>6</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>5</value>
+  </data>
+  <data name="MinWindow1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Right</value>
+  </data>
+  <data name="MinWindow1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="MinWindow1.Location" type="System.Drawing.Point, System.Drawing">
+    <value>536, 0</value>
+  </data>
+  <data name="MinWindow1.Size" type="System.Drawing.Size, System.Drawing">
+    <value>15, 28</value>
+  </data>
+  <data name="MinWindow1.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
+    <value>StretchImage</value>
+  </data>
+  <data name="MinWindow1.TabIndex" type="System.Int32, mscorlib">
+    <value>5</value>
+  </data>
+  <data name="&gt;&gt;MinWindow1.Name" xml:space="preserve">
+    <value>MinWindow1</value>
+  </data>
+  <data name="&gt;&gt;MinWindow1.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;MinWindow1.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;MinWindow1.ZOrder" xml:space="preserve">
+    <value>6</value>
+  </data>
+  <data name="CloseWindow.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Right</value>
+  </data>
+  <data name="CloseWindow.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="CloseWindow.Location" type="System.Drawing.Point, System.Drawing">
+    <value>551, 0</value>
+  </data>
+  <data name="CloseWindow.Size" type="System.Drawing.Size, System.Drawing">
+    <value>30, 28</value>
+  </data>
+  <data name="CloseWindow.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
+    <value>StretchImage</value>
+  </data>
+  <data name="CloseWindow.TabIndex" type="System.Int32, mscorlib">
+    <value>4</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>7</value>
+  </data>
+  <data name="LoginOut.Appearance.Font" type="System.Drawing.Font, System.Drawing">
+    <value>微软雅黑, 12pt</value>
+  </data>
+  <data name="LoginOut.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Right</value>
+  </data>
+  <data name="LoginOut.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="LoginOut.Location" type="System.Drawing.Point, System.Drawing">
+    <value>411, 0</value>
+  </data>
+  <data name="LoginOut.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>2, 2, 2, 2</value>
+  </data>
+  <data name="LoginOut.Size" type="System.Drawing.Size, System.Drawing">
+    <value>80, 28</value>
+  </data>
+  <data name="LoginOut.TabIndex" type="System.Int32, mscorlib">
+    <value>9</value>
+  </data>
+  <data name="LoginOut.Text" xml:space="preserve">
+    <value>注销</value>
+  </data>
+  <data name="&gt;&gt;LoginOut.Name" xml:space="preserve">
+    <value>LoginOut</value>
+  </data>
+  <data name="&gt;&gt;LoginOut.Type" xml:space="preserve">
+    <value>DevExpress.XtraEditors.SimpleButton, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
+  </data>
+  <data name="&gt;&gt;LoginOut.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;LoginOut.ZOrder" xml:space="preserve">
+    <value>2</value>
+  </data>
+  <data name="Change_psw.Appearance.Font" type="System.Drawing.Font, System.Drawing">
+    <value>微软雅黑, 12pt</value>
+  </data>
+  <data name="Change_psw.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Right</value>
+  </data>
+  <data name="Change_psw.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="Change_psw.Location" type="System.Drawing.Point, System.Drawing">
+    <value>298, 0</value>
+  </data>
+  <data name="Change_psw.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>2, 2, 2, 2</value>
+  </data>
+  <data name="Change_psw.Size" type="System.Drawing.Size, System.Drawing">
+    <value>113, 28</value>
+  </data>
+  <data name="Change_psw.TabIndex" type="System.Int32, mscorlib">
+    <value>11</value>
+  </data>
+  <data name="Change_psw.Text" xml:space="preserve">
+    <value>修改密码</value>
+  </data>
+  <data name="&gt;&gt;Change_psw.Name" xml:space="preserve">
+    <value>Change_psw</value>
+  </data>
+  <data name="&gt;&gt;Change_psw.Type" xml:space="preserve">
+    <value>DevExpress.XtraEditors.SimpleButton, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
+  </data>
+  <data name="&gt;&gt;Change_psw.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;Change_psw.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="UpperCollection.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Right</value>
+  </data>
+  <data name="UpperCollection.EditValue" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="UpperCollection.Location" type="System.Drawing.Point, System.Drawing">
+    <value>166, 0</value>
+  </data>
+  <data name="UpperCollection.Properties.Appearance.Font" type="System.Drawing.Font, System.Drawing">
+    <value>微软雅黑, 9pt</value>
+  </data>
+  <data name="UpperCollection.Properties.OffText" xml:space="preserve">
+    <value>正常采集</value>
+  </data>
+  <data name="UpperCollection.Properties.OnText" xml:space="preserve">
+    <value>大写采集</value>
+  </data>
+  <data name="UpperCollection.Size" type="System.Drawing.Size, System.Drawing">
+    <value>132, 28</value>
+  </data>
+  <assembly alias="DevExpress.Utils.v15.2" name="DevExpress.Utils.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
+  <data name="UpperCollection.SuperTip" type="DevExpress.Utils.SuperToolTip, DevExpress.Utils.v15.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        AAEAAAD/////AQAAAAAAAAAMAgAAAFpEZXZFeHByZXNzLlV0aWxzLnYxNS4yLCBWZXJzaW9uPTE1LjIu
+        NC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI4OGQxNzU0ZDcwMGU0OWEMAwAAAFlE
+        ZXZFeHByZXNzLkRhdGEudjE1LjIsIFZlcnNpb249MTUuMi40LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVi
+        bGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURldkV4cHJlc3MuVXRpbHMuU3VwZXJUb29s
+        VGlwBwAAAA1BbGxvd0h0bWxUZXh0EUZpeGVkVG9vbFRpcFdpZHRoCkl0ZW1zQ291bnQJaXRlbVR5cGUw
+        BWl0ZW0wCWl0ZW1UeXBlMQVpdGVtMQQAAAQEBAQfRGV2RXhwcmVzcy5VdGlscy5EZWZhdWx0Qm9vbGVh
+        bgMAAAABCCVEZXZFeHByZXNzLlV0aWxzLlN1cGVyVG9vbFRpcEl0ZW1UeXBlAgAAACFEZXZFeHByZXNz
+        LlV0aWxzLlRvb2xUaXBUaXRsZUl0ZW0CAAAAJURldkV4cHJlc3MuVXRpbHMuU3VwZXJUb29sVGlwSXRl
+        bVR5cGUCAAAAHERldkV4cHJlc3MuVXRpbHMuVG9vbFRpcEl0ZW0CAAAAAgAAAAX8////H0RldkV4cHJl
+        c3MuVXRpbHMuRGVmYXVsdEJvb2xlYW4BAAAAB3ZhbHVlX18ACAMAAAACAAAAAAIAAAAF+////yVEZXZF
+        eHByZXNzLlV0aWxzLlN1cGVyVG9vbFRpcEl0ZW1UeXBlAQAAAAd2YWx1ZV9fAAgCAAAAAQAAAAkGAAAA
+        Afn////7////AAAAAAkIAAAADAkAAABRU3lzdGVtLkRyYXdpbmcsIFZlcnNpb249NC4wLjAuMCwgQ3Vs
+        dHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iMDNmNWY3ZjExZDUwYTNhBQYAAAAhRGV2RXhwcmVz
+        cy5VdGlscy5Ub29sVGlwVGl0bGVJdGVtCgAAAA1BbGxvd0h0bWxUZXh0BEljb24FSW1hZ2UKSW1hZ2VB
+        bGlnbgpJbWFnZUluZGV4E0ltYWdlVG9UZXh0RGlzdGFuY2UKTGVmdEluZGVudAhNYXhXaWR0aBJPd25l
+        ckFsbG93SHRtbFRleHQEVGV4dAQEBAQAAAAAAAEfRGV2RXhwcmVzcy5VdGlscy5EZWZhdWx0Qm9vbGVh
+        bgMAAAATU3lzdGVtLkRyYXdpbmcuSWNvbgkAAAAUU3lzdGVtLkRyYXdpbmcuSW1hZ2UJAAAAJkRldkV4
+        cHJlc3MuVXRpbHMuVG9vbFRpcEltYWdlQWxpZ25tZW50AgAAAAgICAgBAgAAAAH2/////P///wIAAAAK
+        CgX1////JkRldkV4cHJlc3MuVXRpbHMuVG9vbFRpcEltYWdlQWxpZ25tZW50AQAAAAd2YWx1ZV9fAAgC
+        AAAAAAAAAP////8OAAAAAAAAADwBAAAABgwAAAAb57O757uf5aSn5bCP5YaZ6YeH6ZuG6K6+572uBQgA
+        AAAcRGV2RXhwcmVzcy5VdGlscy5Ub29sVGlwSXRlbQoAAAANQWxsb3dIdG1sVGV4dARJY29uBUltYWdl
+        CkltYWdlQWxpZ24KSW1hZ2VJbmRleBNJbWFnZVRvVGV4dERpc3RhbmNlCkxlZnRJbmRlbnQITWF4V2lk
+        dGgST3duZXJBbGxvd0h0bWxUZXh0BFRleHQEBAQEAAAAAAABH0RldkV4cHJlc3MuVXRpbHMuRGVmYXVs
+        dEJvb2xlYW4DAAAAE1N5c3RlbS5EcmF3aW5nLkljb24JAAAAFFN5c3RlbS5EcmF3aW5nLkltYWdlCQAA
+        ACZEZXZFeHByZXNzLlV0aWxzLlRvb2xUaXBJbWFnZUFsaWdubWVudAIAAAAICAgIAQIAAAAB8/////z/
+        //8CAAAACgoB8v////X///8AAAAA/////w4AAAAGAAAAPAEAAAAGDwAAAFTlvIDlkK/ml7bvvIzmiavm
+        j4/mnqrml6Dorrrmiavmj4/liLDku4DkuYjlhoXlrrnov5vlhaXns7vnu5/ml7bpg73kvJrovazmjaLm
+        iJDlpKflhpkL
+</value>
+  </data>
+  <data name="UpperCollection.TabIndex" type="System.Int32, mscorlib">
+    <value>15</value>
+  </data>
+  <data name="&gt;&gt;UpperCollection.Name" xml:space="preserve">
+    <value>UpperCollection</value>
+  </data>
+  <data name="&gt;&gt;UpperCollection.Type" xml:space="preserve">
+    <value>DevExpress.XtraEditors.ToggleSwitch, DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
+  </data>
+  <data name="&gt;&gt;UpperCollection.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;UpperCollection.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>581, 28</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_HYSX/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>

+ 36 - 0
UAS_MES_HYSX/CustomControl/ListViewExpand/ListViewExpand.Designer.cs

@@ -0,0 +1,36 @@
+namespace UAS_MES_NEW.CustomControl.ListViewExpand
+{
+    partial class ListViewExpand
+    {
+        /// <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
+    }
+}

+ 367 - 0
UAS_MES_HYSX/CustomControl/ListViewExpand/ListViewExpand.cs

@@ -0,0 +1,367 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+namespace UAS_MES_NEW.CustomControl.ListViewExpand
+{
+    public partial class ListViewExpand : ListView
+    {
+            private const int LVM_FIRST = 0x1000;                    // ListView messages  
+            private const int LVM_SETGROUPINFO = (LVM_FIRST + 147);  // ListView messages Setinfo on Group  
+            private const int WM_LBUTTONUP = 0x0202;                 // Windows message left button  
+
+            private delegate void CallBackSetGroupState(ListViewGroup lstvwgrp, ListViewGroupState state);
+            private delegate void CallbackSetGroupString(ListViewGroup lstvwgrp, string value);
+
+            /// <summary>  
+            /// Sends the specified message to a window or windows. The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.   
+            /// To send a message and return immediately, use the SendMessageCallback or SendNotifyMessage function. To post a message to a thread's message queue and return immediately, use the PostMessage or PostThreadMessage function.  
+            /// </summary>  
+            /// <param name="hWnd">  
+            /// [in] Handle to the window whose window procedure will receive the message.   
+            /// If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows; but the message is not sent to child windows.   
+            /// Microsoft Windows Vista and later. Message sending is subject to User Interface Privilege Isolation (UIPI). The thread of a process can send messages only to message queues of threads in processes of lesser or equal integrity level.  
+            /// </param>  
+            /// <param name="uMsg">[in] Specifies the message to be sent.</param>  
+            /// <param name="wParam">[in] Specifies additional message-specific information.</param>  
+            /// <param name="lParam">[in] Type of LVGROUP, Specifies additional message-specific information.</param>  
+            /// <returns>  
+            /// Microsoft Windows Vista and later. When a message is blocked by UIPI the last error, retrieved with GetLastError, is set to 5 (access denied).  
+            /// Applications that need to communicate using HWND_BROADCAST should use the RegisterWindowMessage function to obtain a unique message for inter-application communication.  
+            /// The system only does marshalling for system messages (those in the range 0 to (WM_USER-1)). To send other messages (those >= WM_USER) to another process, you must do custom marshalling.  
+            /// If the specified window was created by the calling thread, the window procedure is called immediately as a subroutine. If the specified window was created by a different thread, the system switches to that thread and calls the appropriate window procedure. Messages sent between threads are processed only when the receiving thread executes message retrieval code. The sending thread is blocked until the receiving thread processes the message. However, the sending thread will process incoming nonqueued messages while waiting for its message to be processed. To prevent this, use SendMessageTimeout with SMTO_BLOCK set. For more information on nonqueued messages, see Nonqueued Messages.  
+            /// Windows 95/98/Me: SendMessageW is supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems.  
+            /// </returns>  
+            [DllImport("User32.dll"), Description("Sends the specified message to a window or windows. The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message. To send a message and return immediately, use the SendMessageCallback or SendNotifyMessage function. To post a message to a thread's message queue and return immediately, use the PostMessage or PostThreadMessage function.")]
+            private static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, IntPtr lParam);
+
+            private static int? GetGroupID(ListViewGroup lstvwgrp)
+            {
+                int? rtnval = null;
+                Type GrpTp = lstvwgrp.GetType();
+                if (GrpTp != null)
+                {
+                    PropertyInfo pi = GrpTp.GetProperty("ID", BindingFlags.NonPublic | BindingFlags.Instance);
+                    if (pi != null)
+                    {
+                        object tmprtnval = pi.GetValue(lstvwgrp, null);
+                        if (tmprtnval != null)
+                        {
+                            rtnval = tmprtnval as int?;
+                        }
+                    }
+                }
+                return rtnval;
+            }
+
+            private static void setGrpState(ListViewGroup lstvwgrp, ListViewGroupState state)
+            {
+                if (Environment.OSVersion.Version.Major < 6)   //Only Vista and forward allows collaps of ListViewGroups  
+                    return;
+                if (lstvwgrp == null || lstvwgrp.ListView == null)
+                    return;
+                if (lstvwgrp.ListView.InvokeRequired)
+                    lstvwgrp.ListView.Invoke(new CallBackSetGroupState(setGrpState), lstvwgrp, state);
+                else
+                {
+                    int? GrpId = GetGroupID(lstvwgrp);
+                    int gIndex = lstvwgrp.ListView.Groups.IndexOf(lstvwgrp);
+                    LVGROUP group = new LVGROUP();
+                    group.CbSize = Marshal.SizeOf(group);
+                    group.State = state;
+                    group.Mask = ListViewGroupMask.State;
+
+                    IntPtr ip = Marshal.AllocHGlobal(group.CbSize);
+                    Marshal.StructureToPtr(group, ip, false);
+
+                    if (GrpId != null)
+                    {
+                        group.IGroupId = GrpId.Value;
+                        SendMessage(lstvwgrp.ListView.Handle, LVM_SETGROUPINFO, GrpId.Value, ip);
+                        SendMessage(lstvwgrp.ListView.Handle, LVM_SETGROUPINFO, GrpId.Value, ip);
+                    }
+                    else
+                    {
+                        group.IGroupId = gIndex;
+                        SendMessage(lstvwgrp.ListView.Handle, LVM_SETGROUPINFO, gIndex, ip);
+                        SendMessage(lstvwgrp.ListView.Handle, LVM_SETGROUPINFO, gIndex, ip);
+                    }
+
+                    lstvwgrp.ListView.Refresh();
+                }
+            }
+
+
+            public void SetGroupState(ListViewGroupState state)
+            {
+                foreach (ListViewGroup lvg in this.Groups)
+                    setGrpState(lvg, state);
+            }
+
+
+            protected override void WndProc(ref Message m)
+            {
+                if (m.Msg == WM_LBUTTONUP)
+                    base.DefWndProc(ref m);
+                base.WndProc(ref m);
+            }
+        }
+
+
+        /// <summary>  
+        /// LVGROUP StructureUsed to set and retrieve groups.  
+        /// </summary>  
+        /// <example>  
+        /// LVGROUP myLVGROUP = new LVGROUP();  
+        /// myLVGROUP.CbSize    // is of managed type uint  
+        /// myLVGROUP.Mask  // is of managed type uint  
+        /// myLVGROUP.PszHeader // is of managed type string  
+        /// myLVGROUP.CchHeader // is of managed type int  
+        /// myLVGROUP.PszFooter // is of managed type string  
+        /// myLVGROUP.CchFooter // is of managed type int  
+        /// myLVGROUP.IGroupId  // is of managed type int  
+        /// myLVGROUP.StateMask // is of managed type uint  
+        /// myLVGROUP.State // is of managed type uint  
+        /// myLVGROUP.UAlign    // is of managed type uint  
+        /// myLVGROUP.PszSubtitle   // is of managed type IntPtr  
+        /// myLVGROUP.CchSubtitle   // is of managed type uint  
+        /// myLVGROUP.PszTask   // is of managed type string  
+        /// myLVGROUP.CchTask   // is of managed type uint  
+        /// myLVGROUP.PszDescriptionTop // is of managed type string  
+        /// myLVGROUP.CchDescriptionTop // is of managed type uint  
+        /// myLVGROUP.PszDescriptionBottom  // is of managed type string  
+        /// myLVGROUP.CchDescriptionBottom  // is of managed type uint  
+        /// myLVGROUP.ITitleImage   // is of managed type int  
+        /// myLVGROUP.IExtendedImage    // is of managed type int  
+        /// myLVGROUP.IFirstItem    // is of managed type int  
+        /// myLVGROUP.CItems    // is of managed type IntPtr  
+        /// myLVGROUP.PszSubsetTitle    // is of managed type IntPtr  
+        /// myLVGROUP.CchSubsetTitle    // is of managed type IntPtr  
+        /// </example>  
+        /// <remarks>  
+        /// The LVGROUP structure was created by Paw Jershauge  
+        /// Created: Jan. 2008.  
+        /// The LVGROUP structure code is based on information from Microsoft's MSDN2 website.  
+        /// The structure is generated via an automated converter and is as is.  
+        /// The structure may or may not hold errors inside the code, so use at own risk.  
+        /// Reference url: http://msdn.microsoft.com/en-us/library/bb774769(VS.85).aspx  
+        /// </remarks>  
+        [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode), Description("LVGROUP StructureUsed to set and retrieve groups.")]
+        public struct LVGROUP
+        {
+            /// <summary>  
+            /// Size of this structure, in bytes.  
+            /// </summary>  
+            [Description("Size of this structure, in bytes.")]
+            public int CbSize;
+
+            /// <summary>  
+            /// Mask that specifies which members of the structure are valid input. One or more of the following values:LVGF_NONENo other items are valid.  
+            /// </summary>  
+            [Description("Mask that specifies which members of the structure are valid input. One or more of the following values:LVGF_NONE No other items are valid.")]
+            public ListViewGroupMask Mask;
+
+            /// <summary>  
+            /// Pointer to a null-terminated string that contains the header text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the header text.  
+            /// </summary>  
+            [Description("Pointer to a null-terminated string that contains the header text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the header text.")]
+            [MarshalAs(UnmanagedType.LPWStr)]
+            public string PszHeader;
+
+            /// <summary>  
+            /// Size in TCHARs of the buffer pointed to by the pszHeader member. If the structure is not receiving information about a group, this member is ignored.  
+            /// </summary>  
+            [Description("Size in TCHARs of the buffer pointed to by the pszHeader member. If the structure is not receiving information about a group, this member is ignored.")]
+            public int CchHeader;
+
+            /// <summary>  
+            /// Pointer to a null-terminated string that contains the footer text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the footer text.  
+            /// </summary>  
+            [Description("Pointer to a null-terminated string that contains the footer text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the footer text.")]
+            [MarshalAs(UnmanagedType.LPWStr)]
+            public string PszFooter;
+
+            /// <summary>  
+            /// Size in TCHARs of the buffer pointed to by the pszFooter member. If the structure is not receiving information about a group, this member is ignored.  
+            /// </summary>  
+            [Description("Size in TCHARs of the buffer pointed to by the pszFooter member. If the structure is not receiving information about a group, this member is ignored.")]
+            public int CchFooter;
+
+            /// <summary>  
+            /// ID of the group.  
+            /// </summary>  
+            [Description("ID of the group.")]
+            public int IGroupId;
+
+            /// <summary>  
+            /// Mask used with LVM_GETGROUPINFO (Microsoft Windows XP and Windows Vista) and LVM_SETGROUPINFO (Windows Vista only) to specify which flags in the state value are being retrieved or set.  
+            /// </summary>  
+            [Description("Mask used with LVM_GETGROUPINFO (Microsoft Windows XP and Windows Vista) and LVM_SETGROUPINFO (Windows Vista only) to specify which flags in the state value are being retrieved or set.")]
+            public int StateMask;
+
+            /// <summary>  
+            /// Flag that can have one of the following values:LVGS_NORMALGroups are expanded, the group name is displayed, and all items in the group are displayed.  
+            /// </summary>  
+            [Description("Flag that can have one of the following values:LVGS_NORMAL Groups are expanded, the group name is displayed, and all items in the group are displayed.")]
+            public ListViewGroupState State;
+
+            /// <summary>  
+            /// Indicates the alignment of the header or footer text for the group. It can have one or more of the following values. Use one of the header flags. Footer flags are optional. Windows XP: Footer flags are reserved.LVGA_FOOTER_CENTERReserved.  
+            /// </summary>  
+            [Description("Indicates the alignment of the header or footer text for the group. It can have one or more of the following values. Use one of the header flags. Footer flags are optional. Windows XP: Footer flags are reserved.LVGA_FOOTER_CENTERReserved.")]
+            public uint UAlign;
+
+            /// <summary>  
+            /// Windows Vista. Pointer to a null-terminated string that contains the subtitle text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the subtitle text. This element is drawn under the header text.  
+            /// </summary>  
+            [Description("Windows Vista. Pointer to a null-terminated string that contains the subtitle text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the subtitle text. This element is drawn under the header text.")]
+            public IntPtr PszSubtitle;
+
+            /// <summary>  
+            /// Windows Vista. Size, in TCHARs, of the buffer pointed to by the pszSubtitle member. If the structure is not receiving information about a group, this member is ignored.  
+            /// </summary>  
+            [Description("Windows Vista. Size, in TCHARs, of the buffer pointed to by the pszSubtitle member. If the structure is not receiving information about a group, this member is ignored.")]
+            public uint CchSubtitle;
+
+            /// <summary>  
+            /// Windows Vista. Pointer to a null-terminated string that contains the text for a task link when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the task text. This item is drawn right-aligned opposite the header text. When clicked by the user, the task link generates an LVN_LINKCLICK notification.  
+            /// </summary>  
+            [Description("Windows Vista. Pointer to a null-terminated string that contains the text for a task link when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the task text. This item is drawn right-aligned opposite the header text. When clicked by the user, the task link generates an LVN_LINKCLICK notification.")]
+            [MarshalAs(UnmanagedType.LPWStr)]
+            public string PszTask;
+
+            /// <summary>  
+            /// Windows Vista. Size in TCHARs of the buffer pointed to by the pszTask member. If the structure is not receiving information about a group, this member is ignored.  
+            /// </summary>  
+            [Description("Windows Vista. Size in TCHARs of the buffer pointed to by the pszTask member. If the structure is not receiving information about a group, this member is ignored.")]
+            public uint CchTask;
+
+            /// <summary>  
+            /// Windows Vista. Pointer to a null-terminated string that contains the top description text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the top description text. This item is drawn opposite the title image when there is a title image, no extended image, and uAlign==LVGA_HEADER_CENTER.  
+            /// </summary>  
+            [Description("Windows Vista. Pointer to a null-terminated string that contains the top description text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the top description text. This item is drawn opposite the title image when there is a title image, no extended image, and uAlign==LVGA_HEADER_CENTER.")]
+            [MarshalAs(UnmanagedType.LPWStr)]
+            public string PszDescriptionTop;
+
+            /// <summary>  
+            /// Windows Vista. Size in TCHARs of the buffer pointed to by the pszDescriptionTop member. If the structure is not receiving information about a group, this member is ignored.  
+            /// </summary>  
+            [Description("Windows Vista. Size in TCHARs of the buffer pointed to by the pszDescriptionTop member. If the structure is not receiving information about a group, this member is ignored.")]
+            public uint CchDescriptionTop;
+
+            /// <summary>  
+            /// Windows Vista. Pointer to a null-terminated string that contains the bottom description text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the bottom description text. This item is drawn under the top description text when there is a title image, no extended image, and uAlign==LVGA_HEADER_CENTER.  
+            /// </summary>  
+            [Description("Windows Vista. Pointer to a null-terminated string that contains the bottom description text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the bottom description text. This item is drawn under the top description text when there is a title image, no extended image, and uAlign==LVGA_HEADER_CENTER.")]
+            [MarshalAs(UnmanagedType.LPWStr)]
+            public string PszDescriptionBottom;
+
+            /// <summary>  
+            /// Windows Vista. Size in TCHARs of the buffer pointed to by the pszDescriptionBottom member. If the structure is not receiving information about a group, this member is ignored.  
+            /// </summary>  
+            [Description("Windows Vista. Size in TCHARs of the buffer pointed to by the pszDescriptionBottom member. If the structure is not receiving information about a group, this member is ignored.")]
+            public uint CchDescriptionBottom;
+
+            /// <summary>  
+            /// Windows Vista. Index of the title image in the control imagelist.  
+            /// </summary>  
+            [Description("Windows Vista. Index of the title image in the control imagelist.")]
+            public int ITitleImage;
+
+            /// <summary>  
+            /// Windows Vista. Index of the extended image in the control imagelist.  
+            /// </summary>  
+            [Description("Windows Vista. Index of the extended image in the control imagelist.")]
+            public int IExtendedImage;
+
+            /// <summary>  
+            /// Windows Vista. Read-only.  
+            /// </summary>  
+            [Description("Windows Vista. Read-only.")]
+            public int IFirstItem;
+
+            /// <summary>  
+            /// Windows Vista. Read-only in non-owner data mode.  
+            /// </summary>  
+            [Description("Windows Vista. Read-only in non-owner data mode.")]
+            public IntPtr CItems;
+
+            /// <summary>  
+            /// Windows Vista. NULL if group is not a subset. Pointer to a null-terminated string that contains the subset title text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the subset title text.  
+            /// </summary>  
+            [Description("Windows Vista. NULL if group is not a subset. Pointer to a null-terminated string that contains the subset title text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the subset title text.")]
+            public IntPtr PszSubsetTitle;
+
+            /// <summary>  
+            /// Windows Vista. Size in TCHARs of the buffer pointed to by the pszSubsetTitle member. If the structure is not receiving information about a group, this member is ignored.  
+            /// </summary>  
+            [Description("Windows Vista. Size in TCHARs of the buffer pointed to by the pszSubsetTitle member. If the structure is not receiving information about a group, this member is ignored.")]
+            public IntPtr CchSubsetTitle;
+        }
+
+        public enum ListViewGroupMask
+        {
+            None = 0x00000,
+            Header = 0x00001,
+            Footer = 0x00002,
+            State = 0x00004,
+            Align = 0x00008,
+            GroupId = 0x00010,
+            SubTitle = 0x00100,
+            Task = 0x00200,
+            DescriptionTop = 0x00400,
+            DescriptionBottom = 0x00800,
+            TitleImage = 0x01000,
+            ExtendedImage = 0x02000,
+            Items = 0x04000,
+            Subset = 0x08000,
+            SubsetItems = 0x10000
+        }
+
+        public enum ListViewGroupState
+        {
+            /// <summary>  
+            /// Groups are expanded, the group name is displayed, and all items in the group are displayed.  
+            /// </summary>  
+            Normal = 0,
+            /// <summary>  
+            /// The group is collapsed.  
+            /// </summary>  
+            Collapsed = 1,
+            /// <summary>  
+            /// The group is hidden.  
+            /// </summary>  
+            Hidden = 2,
+            /// <summary>  
+            /// Version 6.00 and Windows Vista. The group does not display a header.  
+            /// </summary>  
+            NoHeader = 4,
+            /// <summary>  
+            /// Version 6.00 and Windows Vista. The group can be collapsed.  
+            /// </summary>  
+            Collapsible = 8,
+            /// <summary>  
+            /// Version 6.00 and Windows Vista. The group has keyboard focus.  
+            /// </summary>  
+            Focused = 16,
+            /// <summary>  
+            /// Version 6.00 and Windows Vista. The group is selected.  
+            /// </summary>  
+            Selected = 32,
+            /// <summary>  
+            /// Version 6.00 and Windows Vista. The group displays only a portion of its items.  
+            /// </summary>  
+            SubSeted = 64,
+            /// <summary>  
+            /// Version 6.00 and Windows Vista. The subset link of the group has keyboard focus.  
+            /// </summary>  
+            SubSetLinkFocused = 128,
+    }
+}

+ 322 - 0
UAS_MES_HYSX/CustomControl/Pagination/Pagination.Designer.cs

@@ -0,0 +1,322 @@
+namespace UAS_MES_NEW.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.components = new System.ComponentModel.Container();
+            this.panel1 = new System.Windows.Forms.Panel();
+            this.ShowItemsNum = new System.Windows.Forms.ComboBox();
+            this.UpLoadData = new UAS_MES_NEW.CustomControl.ClickPicBox.ClickPicBox();
+            this.DownLoadTemplet = new UAS_MES_NEW.CustomControl.ClickPicBox.ClickPicBox();
+            this.Add = new UAS_MES_NEW.CustomControl.ClickPicBox.ClickPicBox();
+            this.Delete = new UAS_MES_NEW.CustomControl.ClickPicBox.ClickPicBox();
+            this.ExportExcel = new UAS_MES_NEW.CustomControl.ClickPicBox.ClickPicBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.TotalPage = new System.Windows.Forms.Label();
+            this.CurrentPage = new System.Windows.Forms.TextBox();
+            this.PreviousPage = new UAS_MES_NEW.CustomControl.ClickPicBox.ClickPicBox();
+            this.LastPage = new UAS_MES_NEW.CustomControl.ClickPicBox.ClickPicBox();
+            this.NextPage = new UAS_MES_NEW.CustomControl.ClickPicBox.ClickPicBox();
+            this.FirstPage = new UAS_MES_NEW.CustomControl.ClickPicBox.ClickPicBox();
+            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
+            this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
+            this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
+            this.panel1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.UpLoadData)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.DownLoadTemplet)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.Add)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.Delete)).BeginInit();
+            ((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.BackColor = System.Drawing.SystemColors.Control;
+            this.panel1.Controls.Add(this.ShowItemsNum);
+            this.panel1.Controls.Add(this.UpLoadData);
+            this.panel1.Controls.Add(this.DownLoadTemplet);
+            this.panel1.Controls.Add(this.Add);
+            this.panel1.Controls.Add(this.Delete);
+            this.panel1.Controls.Add(this.ExportExcel);
+            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.Cursor = System.Windows.Forms.Cursors.Default;
+            this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.panel1.Location = new System.Drawing.Point(0, 0);
+            this.panel1.Margin = new System.Windows.Forms.Padding(4);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(724, 40);
+            this.panel1.TabIndex = 0;
+            // 
+            // ShowItemsNum
+            // 
+            this.ShowItemsNum.FormattingEnabled = true;
+            this.ShowItemsNum.Items.AddRange(new object[] {
+            "40",
+            "35",
+            "30",
+            "25",
+            "20",
+            "15",
+            "10",
+            "5"});
+            this.ShowItemsNum.Location = new System.Drawing.Point(364, 8);
+            this.ShowItemsNum.Margin = new System.Windows.Forms.Padding(4);
+            this.ShowItemsNum.Name = "ShowItemsNum";
+            this.ShowItemsNum.Size = new System.Drawing.Size(65, 23);
+            this.ShowItemsNum.TabIndex = 13;
+            this.ShowItemsNum.Text = "20";
+            this.ShowItemsNum.SelectedValueChanged += new System.EventHandler(this.ShowItemsNum_SelectedValueChanged);
+            // 
+            // UpLoadData
+            // 
+            this.UpLoadData.AllPower = null;
+            this.UpLoadData.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.UpLoadData.Image = global::UAS_MES_NEW.Properties.Resources.upload_icon1;
+            this.UpLoadData.Location = new System.Drawing.Point(628, 10);
+            this.UpLoadData.Margin = new System.Windows.Forms.Padding(4);
+            this.UpLoadData.Name = "UpLoadData";
+            this.UpLoadData.Power = null;
+            this.UpLoadData.Size = new System.Drawing.Size(21, 20);
+            this.UpLoadData.TabIndex = 12;
+            this.UpLoadData.TabStop = false;
+            this.UpLoadData.Click += new System.EventHandler(this.UpLoadData_Click);
+            // 
+            // DownLoadTemplet
+            // 
+            this.DownLoadTemplet.AllPower = null;
+            this.DownLoadTemplet.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.DownLoadTemplet.Image = global::UAS_MES_NEW.Properties.Resources.down_load1;
+            this.DownLoadTemplet.Location = new System.Drawing.Point(580, 10);
+            this.DownLoadTemplet.Margin = new System.Windows.Forms.Padding(4);
+            this.DownLoadTemplet.Name = "DownLoadTemplet";
+            this.DownLoadTemplet.Power = null;
+            this.DownLoadTemplet.Size = new System.Drawing.Size(21, 20);
+            this.DownLoadTemplet.TabIndex = 11;
+            this.DownLoadTemplet.TabStop = false;
+            this.DownLoadTemplet.Click += new System.EventHandler(this.DownLoadTemplet_Click);
+            // 
+            // Add
+            // 
+            this.Add.AllPower = null;
+            this.Add.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Add.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorAddNewItem_Image;
+            this.Add.Location = new System.Drawing.Point(484, 10);
+            this.Add.Margin = new System.Windows.Forms.Padding(4);
+            this.Add.Name = "Add";
+            this.Add.Power = null;
+            this.Add.Size = new System.Drawing.Size(21, 22);
+            this.Add.TabIndex = 10;
+            this.Add.TabStop = false;
+            this.Add.Click += new System.EventHandler(this.Add_Click);
+            // 
+            // Delete
+            // 
+            this.Delete.AllPower = null;
+            this.Delete.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Delete.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
+            this.Delete.Location = new System.Drawing.Point(437, 10);
+            this.Delete.Margin = new System.Windows.Forms.Padding(4);
+            this.Delete.Name = "Delete";
+            this.Delete.Power = null;
+            this.Delete.Size = new System.Drawing.Size(21, 22);
+            this.Delete.TabIndex = 9;
+            this.Delete.TabStop = false;
+            this.Delete.Tag = "IfDelete";
+            this.Delete.Click += new System.EventHandler(this.Delete_Click);
+            // 
+            // ExportExcel
+            // 
+            this.ExportExcel.AllPower = null;
+            this.ExportExcel.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.ExportExcel.Image = global::UAS_MES_NEW.Properties.Resources.Excel_2010_16px_1180011_easyicon_net;
+            this.ExportExcel.Location = new System.Drawing.Point(532, 10);
+            this.ExportExcel.Margin = new System.Windows.Forms.Padding(4);
+            this.ExportExcel.Name = "ExportExcel";
+            this.ExportExcel.Power = null;
+            this.ExportExcel.Size = new System.Drawing.Size(21, 22);
+            this.ExportExcel.TabIndex = 8;
+            this.ExportExcel.TabStop = false;
+            this.ExportExcel.Click += new System.EventHandler(this.ExportExcel_Click);
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Cursor = System.Windows.Forms.Cursors.Default;
+            this.label2.Location = new System.Drawing.Point(279, 12);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(82, 15);
+            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(116, 6);
+            this.TotalPage.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.TotalPage.Name = "TotalPage";
+            this.TotalPage.Size = new System.Drawing.Size(0, 24);
+            this.TotalPage.TabIndex = 5;
+            // 
+            // CurrentPage
+            // 
+            this.CurrentPage.AcceptsReturn = true;
+            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(75, 5);
+            this.CurrentPage.Margin = new System.Windows.Forms.Padding(4);
+            this.CurrentPage.Name = "CurrentPage";
+            this.CurrentPage.Size = new System.Drawing.Size(31, 27);
+            this.CurrentPage.TabIndex = 4;
+            this.CurrentPage.Text = "1";
+            this.CurrentPage.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.CurrentPage.KeyDown += new System.Windows.Forms.KeyEventHandler(this.CurrentPage_KeyDown);
+            // 
+            // PreviousPage
+            // 
+            this.PreviousPage.AllPower = null;
+            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::UAS_MES_NEW.Properties.Resources.bindingNavigatorMovePreviousItem_Image;
+            this.PreviousPage.Location = new System.Drawing.Point(48, 10);
+            this.PreviousPage.Margin = new System.Windows.Forms.Padding(4);
+            this.PreviousPage.Name = "PreviousPage";
+            this.PreviousPage.Power = null;
+            this.PreviousPage.Size = new System.Drawing.Size(20, 19);
+            this.PreviousPage.TabIndex = 3;
+            this.PreviousPage.TabStop = false;
+            this.PreviousPage.Click += new System.EventHandler(this.PreviousPage_Click);
+            // 
+            // LastPage
+            // 
+            this.LastPage.AllPower = null;
+            this.LastPage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.LastPage.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.LastPage.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorMoveLastItem_Image;
+            this.LastPage.Location = new System.Drawing.Point(241, 10);
+            this.LastPage.Margin = new System.Windows.Forms.Padding(4);
+            this.LastPage.Name = "LastPage";
+            this.LastPage.Power = null;
+            this.LastPage.Size = new System.Drawing.Size(20, 19);
+            this.LastPage.TabIndex = 2;
+            this.LastPage.TabStop = false;
+            this.LastPage.Click += new System.EventHandler(this.LastPage_Click);
+            // 
+            // NextPage
+            // 
+            this.NextPage.AllPower = null;
+            this.NextPage.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.NextPage.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorMoveNextItem_Image;
+            this.NextPage.Location = new System.Drawing.Point(209, 10);
+            this.NextPage.Margin = new System.Windows.Forms.Padding(4, 4, 4, 25);
+            this.NextPage.Name = "NextPage";
+            this.NextPage.Power = null;
+            this.NextPage.Size = new System.Drawing.Size(20, 19);
+            this.NextPage.TabIndex = 1;
+            this.NextPage.TabStop = false;
+            this.NextPage.Click += new System.EventHandler(this.NextPage_Click);
+            // 
+            // FirstPage
+            // 
+            this.FirstPage.AllPower = null;
+            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::UAS_MES_NEW.Properties.Resources.bindingNavigatorMoveFirstItem_Image;
+            this.FirstPage.Location = new System.Drawing.Point(19, 10);
+            this.FirstPage.Margin = new System.Windows.Forms.Padding(4);
+            this.FirstPage.Name = "FirstPage";
+            this.FirstPage.Power = null;
+            this.FirstPage.Size = new System.Drawing.Size(20, 19);
+            this.FirstPage.TabIndex = 0;
+            this.FirstPage.TabStop = false;
+            this.FirstPage.Click += new System.EventHandler(this.FirstPage_Click);
+            // 
+            // openFileDialog1
+            // 
+            this.openFileDialog1.FileName = "openFileDialog1";
+            // 
+            // Pagination
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.panel1);
+            this.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Name = "Pagination";
+            this.Size = new System.Drawing.Size(724, 40);
+            this.Load += new System.EventHandler(this.Pagination_Load);
+            this.panel1.ResumeLayout(true);
+            this.panel1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.UpLoadData)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.DownLoadTemplet)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.Add)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.Delete)).EndInit();
+            ((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(true);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Panel panel1;
+        private System.Windows.Forms.Label TotalPage;
+        private System.Windows.Forms.TextBox CurrentPage;
+        private ClickPicBox.ClickPicBox PreviousPage;
+        private ClickPicBox.ClickPicBox LastPage;
+        private ClickPicBox.ClickPicBox NextPage;
+        private ClickPicBox.ClickPicBox FirstPage;
+        private ClickPicBox.ClickPicBox ExportExcel;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
+        private ClickPicBox.ClickPicBox Add;
+        private ClickPicBox.ClickPicBox Delete;
+        private ClickPicBox.ClickPicBox DownLoadTemplet;
+        private ClickPicBox.ClickPicBox UpLoadData;
+        private System.Windows.Forms.ToolTip toolTip1;
+        private System.Windows.Forms.OpenFileDialog openFileDialog1;
+        private System.Windows.Forms.ComboBox ShowItemsNum;
+    }
+}

+ 392 - 0
UAS_MES_HYSX/CustomControl/Pagination/Pagination.cs

@@ -0,0 +1,392 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.IO;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+
+namespace UAS_MES_NEW.CustomControl.Pagination
+{
+    public partial class Pagination : UserControl
+    {
+        #region 变量
+        //申明一些全局变量用来在函数之间传递参数
+        int PageSize;
+        /// <summary>
+        /// 当前页码
+        /// </summary>
+        public int Current_Page;
+        /// <summary>
+        /// 总页数
+        /// </summary>
+        int TotalPageCount;
+        /// <summary>
+        /// 一页展示的行数
+        /// </summary>
+        int RowCount;
+        /// <summary>
+        /// 主表的ID
+        /// </summary>
+        string Table_ID;
+        /// <summary>
+        /// 查询的表名
+        /// </summary>
+        string TableName;
+        string Caller;
+        /// <summary>
+        /// 查询的字段
+        /// </summary>
+        string Field;
+        /// <summary>
+        /// 需要添加的图像操作列
+        /// </summary>
+        DataGridViewImageColumn dgic = null;
+        string Condition = "";
+        /// <summary>
+        /// 删除按钮是否能够点击
+        /// </summary>
+        bool DeleteEnable1;
+        /// <summary>
+        /// 添加按钮是否能够点击
+        /// </summary>
+        bool AddEnable1;
+        DataGridView Dgv;
+        DataTable dt;
+        DataHelper dh = SystemInf.dh;
+
+        public bool DeleteEnable
+        {
+            get
+            {
+                return DeleteEnable1;
+            }
+
+            set
+            {
+                DeleteEnable1 = value;
+            }
+        }
+
+        public bool AddEnable
+        {
+            get
+            {
+                return AddEnable1;
+            }
+
+            set
+            {
+                AddEnable1 = value;
+            }
+        }
+        #endregion
+
+
+
+        public Pagination()
+        {
+            InitializeComponent();
+            //鼠标经过控件的时候显示文字
+            toolTip1.SetToolTip(DownLoadTemplet, "下载模板");
+            toolTip1.SetToolTip(UpLoadData, "上传数据");
+            toolTip1.SetToolTip(ExportExcel, "导出数据");
+            toolTip1.SetToolTip(Delete, "删除数据");
+            toolTip1.SetToolTip(FirstPage, "第一页");
+            toolTip1.SetToolTip(PreviousPage, "上一页");
+            toolTip1.SetToolTip(NextPage, "下一页");
+            toolTip1.SetToolTip(LastPage, "最后一页");
+        }
+
+        public delegate void OnCheckedChange(object sender, EventArgs e);
+
+        //定义事件
+        public event OnCheckedChange UserControlCheckedChanged;
+
+        /// <summary>
+        /// 将数据绑定到数据源
+        /// </summary>
+        /// <param name="dgv"></param>
+        /// <param name="TableName"></param>
+        /// <param name="Field"></param>
+        public void BindDataToNavigator(DataGridView dgv, string tableName, string field, string ID, string caller, string condition, params DataGridViewImageColumn[] operate)
+        {
+            //将传来的值赋给全局变量
+            Dgv = dgv;
+            TableName = tableName;
+            Table_ID = ID;
+            Caller = caller;
+            Field = field;
+            Condition = condition;
+            //每页显示的数据数量
+            PageSize = int.Parse(this.ShowItemsNum.Text);
+            //当前在多少页
+            Current_Page = int.Parse(this.CurrentPage.Text);
+            //获取记录的总行数
+            RowCount = dh.getRowCount(TableName);
+            //分页获取数据,先取第一页的
+            dt = dh.getFieldsDatasByPageing(TableName, field, Current_Page, PageSize, Caller, condition);
+            //给BindingSource指定一个DataTable
+            RefreshTotalCount();
+            //给父控件的DataGridView绑定数据
+            dgv.DataSource = dt;
+            dt.Dispose();
+            for (int i = 0; i < operate.Length; i++)
+            {
+                dgic = operate[i];
+                AddOperateColumnToDgv();
+            }
+        }
+
+        //获取分页的数据
+        public void GetPageData()
+        {
+            this.TotalPage.Text = "/ " + TotalPageCount.ToString();
+            CurrentPage.Text = Current_Page.ToString();
+            //取分页数据
+            dt = dh.getFieldsDatasByPageing(TableName, Field, Current_Page, PageSize, Caller, Condition);
+            //赋值给父窗体的DataGridView
+            Dgv.DataSource = dt;
+            AddOperateColumnToDgv();
+        }
+
+        //判断是否需要添加操作列
+        private void AddOperateColumnToDgv()
+        {
+            if (dgic != null)
+            {
+                if (Dgv.Columns[dgic.Name] != null)
+                {
+                    Dgv.Columns.Remove(Dgv.Columns[dgic.Name]);
+                }
+                dgic.DisplayIndex = Dgv.Columns.Count;
+                Dgv.Columns.Add(dgic);
+            }
+        }
+
+        //第一页
+        private void FirstPage_Click(object sender, EventArgs e)
+        {
+            Current_Page = 1;
+            GetPageData();
+            RefreshTotalCount();
+        }
+
+        //往前翻一页
+        private void PreviousPage_Click(object sender, EventArgs e)
+        {
+            if (Current_Page > 1)
+            {
+                Current_Page--;
+            }
+            GetPageData();
+            RefreshTotalCount();
+        }
+
+        //往后翻一页
+        private void NextPage_Click(object sender, EventArgs e)
+        {
+            if (Current_Page < TotalPageCount)
+            {
+                Current_Page++;
+            }
+            GetPageData();
+            RefreshTotalCount();
+        }
+
+        //最后一页
+        private void LastPage_Click(object sender, EventArgs e)
+        {
+            Current_Page = TotalPageCount;
+            CurrentPage.Text = TotalPageCount.ToString();
+            GetPageData();
+            RefreshTotalCount();
+        }
+
+        private void ExportExcel_Click(object sender, EventArgs e)
+        {
+            ExcelExport("Data");
+        }
+
+        //用户手动输入页码的时候获取数据
+        private void CurrentPage_KeyDown(object sender, KeyEventArgs e)
+        {
+            //判断用户是否按下回车键
+            if (e.KeyValue == (int)Keys.Enter)
+            {
+                //判断是否是数字类型的
+                if (IsNumOrNull(CurrentPage.Text))
+                {
+                    Current_Page = int.Parse(CurrentPage.Text);
+                    //判断是否是合理的页码
+                    if (Current_Page >= 1 && Current_Page <= TotalPageCount)
+                    {
+                        GetPageData();
+                    }
+                    else
+                    {
+                        MessageBox.Show("请输入正确的页码");
+                    }
+                }
+                else
+                {
+                    CurrentPage.Text = "1";
+                    MessageBox.Show("页码必须是不为空的正整数");
+                }
+            }
+        }
+
+        //判断是不是数字或者空值
+        private bool IsNumOrNull(object Num)
+        {
+            //判断是否是数组
+            foreach (char c in Num.ToString())
+            {
+                if (!char.IsDigit(c))
+                {
+                    return false;
+                }
+            }
+            //判断是否为空值
+            if (Num.ToString() == "")
+            {
+                return false;
+            }
+            return true;
+        }
+
+        //刷新总页数
+        private void RefreshTotalCount()
+        {
+            //获取记录的总行数
+            if (Condition.Trim() != "")
+            {
+                RowCount = dh.getRowCount(TableName, Condition);
+            }
+            else
+            {
+                RowCount = dh.getRowCount(TableName);
+            }
+            //取模后+1来确定总的页数
+            TotalPageCount = RowCount / PageSize + 1;
+            //设置总页数Label显示的值
+            TotalPage.Text = "/ " + TotalPageCount.ToString();
+        }
+
+        //删除按钮
+        private void Delete_Click(object sender, EventArgs e)
+        {
+            //CheckBox需要失去焦点的时候值才变化,手动使焦点到按钮这
+            Delete.Focus();
+            UserControlCheckedChanged?.Invoke(sender, new EventArgs());
+            {
+                List<string> DeleteID = new List<string>();
+                for (int i = 0; i < Dgv.Rows.Count; i++)
+                {
+                    if (Dgv.Rows[i].Cells["Choose"].FormattedValue.ToString() == "True")
+                    {
+                        DeleteID.Add(Dgv.Rows[i].Cells[Table_ID].FormattedValue.ToString());
+                    }
+                }
+                if (DeleteID.ToArray().Length > 0)
+                {
+                    //取的配置的数据是从DataTable里面判断的,取的是固定字段的Dgv用第二种
+                    string tablename = TableName;
+                    if (TableName.Contains("join"))
+                    {
+                        tablename = TableName.Substring(0, TableName.IndexOf("left")).Trim();
+                    }
+                    dh.DeleteDataByID(tablename, Table_ID, DeleteID.ToArray());
+                    GetPageData();
+                    RefreshTotalCount();
+                }
+            }
+        }
+
+        //添加新的数据
+        private void Add_Click(object sender, EventArgs e)
+        {
+            ((DataTable)Dgv.DataSource).Rows.Add();
+        }
+
+        private void DownLoadTemplet_Click(object sender, EventArgs e)
+        {
+            ExcelExport("Templet");
+        }
+
+        //选择导出Excel时是选择导出数据的还是模板
+        private void ExcelExport(string DataOrTemplet)
+        {
+            //Data表示导出数据
+            //Templet表示导出模板
+            folderBrowserDialog1.Description = "选择导出的路径";
+            DialogResult result = folderBrowserDialog1.ShowDialog();
+            if (result == DialogResult.OK)
+            {
+                string FolderPath = folderBrowserDialog1.SelectedPath;
+                ExcelHandler eh = new ExcelHandler();
+                DataTable dt = new DataTable();
+                if (DataOrTemplet == "Data")
+                {
+                    dt = dh.getFieldsDatas(TableName, Field);
+                }
+                else
+                {
+                    //这是根据表名获取到的列和列的数据类型,是column的类型,需要手动转换成row类型
+                    dt = dh.GetColumnDataType(TableName);
+                    dt = dh.DataTypeColumnToDataTable(dt);
+                }
+                //导出Excel的时候返回一个文件名,用户选择是否打开
+                string filePath = eh.ExportExcel(dt, FolderPath);
+                //用户选择导出之后是否立即打开
+                MessageBoxButtons messButton = MessageBoxButtons.YesNo;
+                string openFile = MessageBox.Show(this.ParentForm, "是否打开文件", "提示", messButton).ToString();
+                if (openFile == "Yes")
+                {
+                    System.Diagnostics.Process.Start(filePath);
+                }
+            }
+        }
+
+        private void UpLoadData_Click(object sender, EventArgs e)
+        {
+            openFileDialog1.Title = "选择需要导入的Excel";
+            if (openFileDialog1.ShowDialog() == DialogResult.OK)
+            {
+                string ChoosedExcel = openFileDialog1.FileName;
+                ExcelHandler eh = new ExcelHandler();
+                Console.WriteLine(ChoosedExcel);
+                eh.ImportExcel(ChoosedExcel, "test");
+            }
+        }
+
+        private void ShowItemsNum_SelectedValueChanged(object sender, EventArgs e)
+        {
+            if (IsNumOrNull(ShowItemsNum.SelectedItem))
+            {
+                PageSize = int.Parse(ShowItemsNum.SelectedItem.ToString());
+                //推荐合理的行数
+                //int AdviceNum = DgvHeight / DgvRowHeight - 3;
+                if (PageSize >= 1)
+                {
+                    RefreshTotalCount();
+                    GetPageData();
+                }
+                else
+                {
+                    MessageBox.Show("请输入正确的数字");
+                }
+            }
+            else
+            {
+                MessageBox.Show("页码必须是不为空的正整数");
+            }
+        }
+
+        private void Pagination_Load(object sender, EventArgs e)
+        {
+            Delete.Enabled = DeleteEnable1;
+            Add.Enabled = AddEnable1;
+        }
+    }
+}

+ 129 - 0
UAS_MES_HYSX/CustomControl/Pagination/Pagination.resx

@@ -0,0 +1,129 @@
+<?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>
+  <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>197, 17</value>
+  </metadata>
+  <metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>298, 17</value>
+  </metadata>
+</root>

+ 327 - 0
UAS_MES_HYSX/CustomControl/Pagination/PaginationDbFind.Designer.cs

@@ -0,0 +1,327 @@
+namespace UAS_MES_NEW.CustomControl.Pagination
+{
+    partial class PaginationDbFind
+    {
+        /// <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();
+            this.panel1 = new System.Windows.Forms.Panel();
+            this.ShowItemsNum = new System.Windows.Forms.ComboBox();
+            this.UpLoadData = new UAS_MES_NEW.CustomControl.ClickPicBox.ClickPicBox();
+            this.DownLoadTemplet = new UAS_MES_NEW.CustomControl.ClickPicBox.ClickPicBox();
+            this.Add = new UAS_MES_NEW.CustomControl.ClickPicBox.ClickPicBox();
+            this.Delete = new UAS_MES_NEW.CustomControl.ClickPicBox.ClickPicBox();
+            this.ExportExcel = new UAS_MES_NEW.CustomControl.ClickPicBox.ClickPicBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.TotalPage = new System.Windows.Forms.Label();
+            this.CurrentPage = new System.Windows.Forms.TextBox();
+            this.PreviousPage = new UAS_MES_NEW.CustomControl.ClickPicBox.ClickPicBox();
+            this.LastPage = new UAS_MES_NEW.CustomControl.ClickPicBox.ClickPicBox();
+            this.NextPage = new UAS_MES_NEW.CustomControl.ClickPicBox.ClickPicBox();
+            this.FirstPage = new UAS_MES_NEW.CustomControl.ClickPicBox.ClickPicBox();
+            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
+            this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
+            this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
+            this.panel1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.UpLoadData)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.DownLoadTemplet)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.Add)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.Delete)).BeginInit();
+            ((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.BackColor = System.Drawing.SystemColors.Control;
+            this.panel1.Controls.Add(this.ShowItemsNum);
+            this.panel1.Controls.Add(this.UpLoadData);
+            this.panel1.Controls.Add(this.DownLoadTemplet);
+            this.panel1.Controls.Add(this.Add);
+            this.panel1.Controls.Add(this.Delete);
+            this.panel1.Controls.Add(this.ExportExcel);
+            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.Cursor = System.Windows.Forms.Cursors.Default;
+            this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.panel1.Location = new System.Drawing.Point(0, 0);
+            this.panel1.Margin = new System.Windows.Forms.Padding(4);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(724, 40);
+            this.panel1.TabIndex = 0;
+            // 
+            // ShowItemsNum
+            // 
+            this.ShowItemsNum.FormattingEnabled = true;
+            this.ShowItemsNum.Items.AddRange(new object[] {
+            "40",
+            "35",
+            "30",
+            "25",
+            "20",
+            "15",
+            "10",
+            "5"});
+            this.ShowItemsNum.Location = new System.Drawing.Point(364, 8);
+            this.ShowItemsNum.Margin = new System.Windows.Forms.Padding(4);
+            this.ShowItemsNum.Name = "ShowItemsNum";
+            this.ShowItemsNum.Size = new System.Drawing.Size(65, 23);
+            this.ShowItemsNum.TabIndex = 13;
+            this.ShowItemsNum.Text = "20";
+            this.ShowItemsNum.SelectedValueChanged += new System.EventHandler(this.ShowItemsNum_SelectedValueChanged);
+            // 
+            // UpLoadData
+            // 
+            this.UpLoadData.AllPower = null;
+            this.UpLoadData.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.UpLoadData.Image = global::UAS_MES_NEW.Properties.Resources.upload_icon1;
+            this.UpLoadData.Location = new System.Drawing.Point(628, 10);
+            this.UpLoadData.Margin = new System.Windows.Forms.Padding(4);
+            this.UpLoadData.Name = "UpLoadData";
+            this.UpLoadData.Power = null;
+            this.UpLoadData.Size = new System.Drawing.Size(21, 20);
+            this.UpLoadData.TabIndex = 12;
+            this.UpLoadData.TabStop = false;
+            this.UpLoadData.Visible = false;
+            this.UpLoadData.Click += new System.EventHandler(this.UpLoadData_Click);
+            // 
+            // DownLoadTemplet
+            // 
+            this.DownLoadTemplet.AllPower = null;
+            this.DownLoadTemplet.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.DownLoadTemplet.Image = global::UAS_MES_NEW.Properties.Resources.down_load1;
+            this.DownLoadTemplet.Location = new System.Drawing.Point(580, 10);
+            this.DownLoadTemplet.Margin = new System.Windows.Forms.Padding(4);
+            this.DownLoadTemplet.Name = "DownLoadTemplet";
+            this.DownLoadTemplet.Power = null;
+            this.DownLoadTemplet.Size = new System.Drawing.Size(21, 20);
+            this.DownLoadTemplet.TabIndex = 11;
+            this.DownLoadTemplet.TabStop = false;
+            this.DownLoadTemplet.Visible = false;
+            this.DownLoadTemplet.Click += new System.EventHandler(this.DownLoadTemplet_Click);
+            // 
+            // Add
+            // 
+            this.Add.AllPower = null;
+            this.Add.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Add.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorAddNewItem_Image;
+            this.Add.Location = new System.Drawing.Point(484, 10);
+            this.Add.Margin = new System.Windows.Forms.Padding(4);
+            this.Add.Name = "Add";
+            this.Add.Power = null;
+            this.Add.Size = new System.Drawing.Size(21, 22);
+            this.Add.TabIndex = 10;
+            this.Add.TabStop = false;
+            this.Add.Visible = false;
+            this.Add.Click += new System.EventHandler(this.Add_Click);
+            // 
+            // Delete
+            // 
+            this.Delete.AllPower = null;
+            this.Delete.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Delete.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorDeleteItem_Image;
+            this.Delete.Location = new System.Drawing.Point(437, 10);
+            this.Delete.Margin = new System.Windows.Forms.Padding(4);
+            this.Delete.Name = "Delete";
+            this.Delete.Power = null;
+            this.Delete.Size = new System.Drawing.Size(21, 22);
+            this.Delete.TabIndex = 9;
+            this.Delete.TabStop = false;
+            this.Delete.Tag = "IfDelete";
+            this.Delete.Visible = false;
+            this.Delete.Click += new System.EventHandler(this.Delete_Click);
+            // 
+            // ExportExcel
+            // 
+            this.ExportExcel.AllPower = null;
+            this.ExportExcel.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.ExportExcel.Image = Properties.Resources.Excel_2010_16px_1180011_easyicon_net;
+            this.ExportExcel.Location = new System.Drawing.Point(532, 10);
+            this.ExportExcel.Margin = new System.Windows.Forms.Padding(4);
+            this.ExportExcel.Name = "ExportExcel";
+            this.ExportExcel.Power = null;
+            this.ExportExcel.Size = new System.Drawing.Size(21, 22);
+            this.ExportExcel.TabIndex = 8;
+            this.ExportExcel.TabStop = false;
+            this.ExportExcel.Visible = false;
+            this.ExportExcel.Click += new System.EventHandler(this.ExportExcel_Click);
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Cursor = System.Windows.Forms.Cursors.Default;
+            this.label2.Location = new System.Drawing.Point(279, 12);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(82, 15);
+            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(116, 6);
+            this.TotalPage.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.TotalPage.Name = "TotalPage";
+            this.TotalPage.Size = new System.Drawing.Size(0, 24);
+            this.TotalPage.TabIndex = 5;
+            // 
+            // CurrentPage
+            // 
+            this.CurrentPage.AcceptsReturn = true;
+            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(75, 5);
+            this.CurrentPage.Margin = new System.Windows.Forms.Padding(4);
+            this.CurrentPage.Name = "CurrentPage";
+            this.CurrentPage.Size = new System.Drawing.Size(31, 27);
+            this.CurrentPage.TabIndex = 4;
+            this.CurrentPage.Text = "1";
+            this.CurrentPage.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.CurrentPage.KeyDown += new System.Windows.Forms.KeyEventHandler(this.CurrentPage_KeyDown);
+            // 
+            // PreviousPage
+            // 
+            this.PreviousPage.AllPower = null;
+            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::UAS_MES_NEW.Properties.Resources.bindingNavigatorMovePreviousItem_Image;
+            this.PreviousPage.Location = new System.Drawing.Point(48, 10);
+            this.PreviousPage.Margin = new System.Windows.Forms.Padding(4);
+            this.PreviousPage.Name = "PreviousPage";
+            this.PreviousPage.Power = null;
+            this.PreviousPage.Size = new System.Drawing.Size(20, 19);
+            this.PreviousPage.TabIndex = 3;
+            this.PreviousPage.TabStop = false;
+            this.PreviousPage.Click += new System.EventHandler(this.PreviousPage_Click);
+            // 
+            // LastPage
+            // 
+            this.LastPage.AllPower = null;
+            this.LastPage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.LastPage.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.LastPage.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorMoveLastItem_Image;
+            this.LastPage.Location = new System.Drawing.Point(241, 10);
+            this.LastPage.Margin = new System.Windows.Forms.Padding(4);
+            this.LastPage.Name = "LastPage";
+            this.LastPage.Power = null;
+            this.LastPage.Size = new System.Drawing.Size(20, 19);
+            this.LastPage.TabIndex = 2;
+            this.LastPage.TabStop = false;
+            this.LastPage.Click += new System.EventHandler(this.LastPage_Click);
+            // 
+            // NextPage
+            // 
+            this.NextPage.AllPower = null;
+            this.NextPage.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.NextPage.Image = global::UAS_MES_NEW.Properties.Resources.bindingNavigatorMoveNextItem_Image;
+            this.NextPage.Location = new System.Drawing.Point(209, 10);
+            this.NextPage.Margin = new System.Windows.Forms.Padding(4, 4, 4, 25);
+            this.NextPage.Name = "NextPage";
+            this.NextPage.Power = null;
+            this.NextPage.Size = new System.Drawing.Size(20, 19);
+            this.NextPage.TabIndex = 1;
+            this.NextPage.TabStop = false;
+            this.NextPage.Click += new System.EventHandler(this.NextPage_Click);
+            // 
+            // FirstPage
+            // 
+            this.FirstPage.AllPower = null;
+            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::UAS_MES_NEW.Properties.Resources.bindingNavigatorMoveFirstItem_Image;
+            this.FirstPage.Location = new System.Drawing.Point(19, 10);
+            this.FirstPage.Margin = new System.Windows.Forms.Padding(4);
+            this.FirstPage.Name = "FirstPage";
+            this.FirstPage.Power = null;
+            this.FirstPage.Size = new System.Drawing.Size(20, 19);
+            this.FirstPage.TabIndex = 0;
+            this.FirstPage.TabStop = false;
+            this.FirstPage.Click += new System.EventHandler(this.FirstPage_Click);
+            // 
+            // openFileDialog1
+            // 
+            this.openFileDialog1.FileName = "openFileDialog1";
+            // 
+            // PaginationDbFind
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.panel1);
+            this.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Name = "PaginationDbFind";
+            this.Size = new System.Drawing.Size(724, 40);
+            this.Load += new System.EventHandler(this.Pagination_Load);
+            this.panel1.ResumeLayout(true);
+            this.panel1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.UpLoadData)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.DownLoadTemplet)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.Add)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.Delete)).EndInit();
+            ((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(true);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Panel panel1;
+        private System.Windows.Forms.Label TotalPage;
+        private System.Windows.Forms.TextBox CurrentPage;
+        private ClickPicBox.ClickPicBox PreviousPage;
+        private ClickPicBox.ClickPicBox LastPage;
+        private ClickPicBox.ClickPicBox NextPage;
+        private ClickPicBox.ClickPicBox FirstPage;
+        private ClickPicBox.ClickPicBox ExportExcel;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
+        private ClickPicBox.ClickPicBox Add;
+        private ClickPicBox.ClickPicBox Delete;
+        private ClickPicBox.ClickPicBox DownLoadTemplet;
+        private ClickPicBox.ClickPicBox UpLoadData;
+        private System.Windows.Forms.ToolTip toolTip1;
+        private System.Windows.Forms.OpenFileDialog openFileDialog1;
+        private System.Windows.Forms.ComboBox ShowItemsNum;
+    }
+}

+ 392 - 0
UAS_MES_HYSX/CustomControl/Pagination/PaginationDbFind.cs

@@ -0,0 +1,392 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.IO;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+
+namespace UAS_MES_NEW.CustomControl.Pagination
+{
+    public partial class PaginationDbFind : UserControl
+    {
+        #region 变量
+        //申明一些全局变量用来在函数之间传递参数
+        int PageSize;
+        /// <summary>
+        /// 当前页码
+        /// </summary>
+        public int Current_Page;
+        /// <summary>
+        /// 总页数
+        /// </summary>
+        int TotalPageCount;
+        /// <summary>
+        /// 一页展示的行数
+        /// </summary>
+        int RowCount;
+        /// <summary>
+        /// 主表的ID
+        /// </summary>
+        string Table_ID;
+        /// <summary>
+        /// 查询的表名
+        /// </summary>
+        string TableName;
+        string Caller;
+        /// <summary>
+        /// 查询的字段
+        /// </summary>
+        string Field;
+        /// <summary>
+        /// 需要添加的图像操作列
+        /// </summary>
+        DataGridViewImageColumn dgic = null;
+        string Condition = "";
+        /// <summary>
+        /// 删除按钮是否能够点击
+        /// </summary>
+        bool DeleteEnable1;
+        /// <summary>
+        /// 添加按钮是否能够点击
+        /// </summary>
+        bool AddEnable1;
+        DataGridView Dgv;
+        DataTable dt;
+        DataHelper dh = SystemInf.dh;
+
+        public bool DeleteEnable
+        {
+            get
+            {
+                return DeleteEnable1;
+            }
+
+            set
+            {
+                DeleteEnable1 = value;
+            }
+        }
+
+        public bool AddEnable
+        {
+            get
+            {
+                return AddEnable1;
+            }
+
+            set
+            {
+                AddEnable1 = value;
+            }
+        }
+        #endregion
+
+
+
+        public PaginationDbFind()
+        {
+            InitializeComponent();
+            //鼠标经过控件的时候显示文字
+            toolTip1.SetToolTip(DownLoadTemplet, "下载模板");
+            toolTip1.SetToolTip(UpLoadData, "上传数据");
+            toolTip1.SetToolTip(ExportExcel, "导出数据");
+            toolTip1.SetToolTip(Delete, "删除数据");
+            toolTip1.SetToolTip(FirstPage, "第一页");
+            toolTip1.SetToolTip(PreviousPage, "上一页");
+            toolTip1.SetToolTip(NextPage, "下一页");
+            toolTip1.SetToolTip(LastPage, "最后一页");
+        }
+
+        public delegate void OnCheckedChange(object sender, EventArgs e);
+
+        //定义事件
+        public event OnCheckedChange UserControlCheckedChanged;
+
+        /// <summary>
+        /// 将数据绑定到数据源
+        /// </summary>
+        /// <param name="dgv"></param>
+        /// <param name="TableName"></param>
+        /// <param name="Field"></param>
+        public void BindDataToNavigator(DataGridView dgv, string tableName, string field, string ID, string caller, string condition, params DataGridViewImageColumn[] operate)
+        {
+            //将传来的值赋给全局变量
+            Dgv = dgv;
+            TableName = tableName;
+            Table_ID = ID;
+            Caller = caller;
+            Field = field;
+            Condition = condition;
+            //每页显示的数据数量
+            PageSize = int.Parse(this.ShowItemsNum.Text);
+            //当前在多少页
+            Current_Page = int.Parse(this.CurrentPage.Text);
+            //获取记录的总行数
+            RowCount = dh.getRowCount(TableName);
+            //分页获取数据,先取第一页的
+            dt = dh.getFieldsDatasByPageing(TableName, field, Current_Page, PageSize, Caller, condition);
+            //给BindingSource指定一个DataTable
+            RefreshTotalCount();
+            //给父控件的DataGridView绑定数据
+            dgv.DataSource = dt;
+            dt.Dispose();
+            for (int i = 0; i < operate.Length; i++)
+            {
+                dgic = operate[i];
+                AddOperateColumnToDgv();
+            }
+        }
+
+        //获取分页的数据
+        public void GetPageData()
+        {
+            this.TotalPage.Text = "/ " + TotalPageCount.ToString();
+            CurrentPage.Text = Current_Page.ToString();
+            //取分页数据
+            dt = dh.getFieldsDatasByPageing(TableName, Field, Current_Page, PageSize, Caller, Condition);
+            //赋值给父窗体的DataGridView
+            Dgv.DataSource = dt;
+            AddOperateColumnToDgv();
+        }
+
+        //判断是否需要添加操作列
+        private void AddOperateColumnToDgv()
+        {
+            if (dgic != null)
+            {
+                if (Dgv.Columns[dgic.Name] != null)
+                {
+                    Dgv.Columns.Remove(Dgv.Columns[dgic.Name]);
+                }
+                dgic.DisplayIndex = Dgv.Columns.Count;
+                Dgv.Columns.Add(dgic);
+            }
+        }
+
+        //第一页
+        private void FirstPage_Click(object sender, EventArgs e)
+        {
+            Current_Page = 1;
+            GetPageData();
+            RefreshTotalCount();
+        }
+
+        //往前翻一页
+        private void PreviousPage_Click(object sender, EventArgs e)
+        {
+            if (Current_Page > 1)
+            {
+                Current_Page--;
+            }
+            GetPageData();
+            RefreshTotalCount();
+        }
+
+        //往后翻一页
+        private void NextPage_Click(object sender, EventArgs e)
+        {
+            if (Current_Page < TotalPageCount)
+            {
+                Current_Page++;
+            }
+            GetPageData();
+            RefreshTotalCount();
+        }
+
+        //最后一页
+        private void LastPage_Click(object sender, EventArgs e)
+        {
+            Current_Page = TotalPageCount;
+            CurrentPage.Text = TotalPageCount.ToString();
+            GetPageData();
+            RefreshTotalCount();
+        }
+
+        private void ExportExcel_Click(object sender, EventArgs e)
+        {
+            ExcelExport("Data");
+        }
+
+        //用户手动输入页码的时候获取数据
+        private void CurrentPage_KeyDown(object sender, KeyEventArgs e)
+        {
+            //判断用户是否按下回车键
+            if (e.KeyValue == (int)Keys.Enter)
+            {
+                //判断是否是数字类型的
+                if (IsNumOrNull(CurrentPage.Text))
+                {
+                    Current_Page = int.Parse(CurrentPage.Text);
+                    //判断是否是合理的页码
+                    if (Current_Page >= 1 && Current_Page <= TotalPageCount)
+                    {
+                        GetPageData();
+                    }
+                    else
+                    {
+                        MessageBox.Show("请输入正确的页码");
+                    }
+                }
+                else
+                {
+                    CurrentPage.Text = "1";
+                    MessageBox.Show("页码必须是不为空的正整数");
+                }
+            }
+        }
+
+        //判断是不是数字或者空值
+        private bool IsNumOrNull(object Num)
+        {
+            //判断是否是数组
+            foreach (char c in Num.ToString())
+            {
+                if (!char.IsDigit(c))
+                {
+                    return false;
+                }
+            }
+            //判断是否为空值
+            if (Num.ToString() == "")
+            {
+                return false;
+            }
+            return true;
+        }
+
+        //刷新总页数
+        private void RefreshTotalCount()
+        {
+            //获取记录的总行数
+            if (Condition.Trim() != "")
+            {
+                RowCount = dh.getRowCount(TableName, Condition);
+            }
+            else
+            {
+                RowCount = dh.getRowCount(TableName);
+            }
+            //取模后+1来确定总的页数
+            TotalPageCount = RowCount / PageSize + 1;
+            //设置总页数Label显示的值
+            TotalPage.Text = "/ " + TotalPageCount.ToString();
+        }
+
+        //删除按钮
+        private void Delete_Click(object sender, EventArgs e)
+        {
+            //CheckBox需要失去焦点的时候值才变化,手动使焦点到按钮这
+            Delete.Focus();
+            UserControlCheckedChanged?.Invoke(sender, new EventArgs());
+            {
+                List<string> DeleteID = new List<string>();
+                for (int i = 0; i < Dgv.Rows.Count; i++)
+                {
+                    if (Dgv.Rows[i].Cells["Choose"].FormattedValue.ToString() == "True")
+                    {
+                        DeleteID.Add(Dgv.Rows[i].Cells[Table_ID].FormattedValue.ToString());
+                    }
+                }
+                if (DeleteID.ToArray().Length > 0)
+                {
+                    //取的配置的数据是从DataTable里面判断的,取的是固定字段的Dgv用第二种
+                    string tablename = TableName;
+                    if (TableName.Contains("join"))
+                    {
+                        tablename = TableName.Substring(0, TableName.IndexOf("left")).Trim();
+                    }
+                    dh.DeleteDataByID(tablename, Table_ID, DeleteID.ToArray());
+                    GetPageData();
+                    RefreshTotalCount();
+                }
+            }
+        }
+
+        //添加新的数据
+        private void Add_Click(object sender, EventArgs e)
+        {
+            ((DataTable)Dgv.DataSource).Rows.Add();
+        }
+
+        private void DownLoadTemplet_Click(object sender, EventArgs e)
+        {
+            ExcelExport("Templet");
+        }
+
+        //选择导出Excel时是选择导出数据的还是模板
+        private void ExcelExport(string DataOrTemplet)
+        {
+            //Data表示导出数据
+            //Templet表示导出模板
+            folderBrowserDialog1.Description = "选择导出的路径";
+            DialogResult result = folderBrowserDialog1.ShowDialog();
+            if (result == DialogResult.OK)
+            {
+                string FolderPath = folderBrowserDialog1.SelectedPath;
+                ExcelHandler eh = new ExcelHandler();
+                DataTable dt = new DataTable();
+                if (DataOrTemplet == "Data")
+                {
+                    dt = dh.getFieldsDatas(TableName, Field);
+                }
+                else
+                {
+                    //这是根据表名获取到的列和列的数据类型,是column的类型,需要手动转换成row类型
+                    dt = dh.GetColumnDataType(TableName);
+                    dt = dh.DataTypeColumnToDataTable(dt);
+                }
+                //导出Excel的时候返回一个文件名,用户选择是否打开
+                string filePath = eh.ExportExcel(dt, FolderPath);
+                //用户选择导出之后是否立即打开
+                MessageBoxButtons messButton = MessageBoxButtons.YesNo;
+                string openFile = MessageBox.Show(this.ParentForm, "是否打开文件", "提示", messButton).ToString();
+                if (openFile == "Yes")
+                {
+                    System.Diagnostics.Process.Start(filePath);
+                }
+            }
+        }
+
+        private void UpLoadData_Click(object sender, EventArgs e)
+        {
+            openFileDialog1.Title = "选择需要导入的Excel";
+            if (openFileDialog1.ShowDialog() == DialogResult.OK)
+            {
+                string ChoosedExcel = openFileDialog1.FileName;
+                ExcelHandler eh = new ExcelHandler();
+                Console.WriteLine(ChoosedExcel);
+                eh.ImportExcel(ChoosedExcel, "test");
+            }
+        }
+
+        private void ShowItemsNum_SelectedValueChanged(object sender, EventArgs e)
+        {
+            if (IsNumOrNull(ShowItemsNum.SelectedItem))
+            {
+                PageSize = int.Parse(ShowItemsNum.SelectedItem.ToString());
+                //推荐合理的行数
+                //int AdviceNum = DgvHeight / DgvRowHeight - 3;
+                if (PageSize >= 1)
+                {
+                    RefreshTotalCount();
+                    GetPageData();
+                }
+                else
+                {
+                    MessageBox.Show("请输入正确的数字");
+                }
+            }
+            else
+            {
+                MessageBox.Show("页码必须是不为空的正整数");
+            }
+        }
+
+        private void Pagination_Load(object sender, EventArgs e)
+        {
+            Delete.Enabled = DeleteEnable1;
+            Add.Enabled = AddEnable1;
+        }
+    }
+}

+ 129 - 0
UAS_MES_HYSX/CustomControl/Pagination/PaginationDbFind.resx

@@ -0,0 +1,129 @@
+<?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>
+  <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>197, 17</value>
+  </metadata>
+  <metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>298, 17</value>
+  </metadata>
+</root>

+ 37 - 0
UAS_MES_HYSX/CustomControl/PowerControlForm/PowerControlForm.Designer.cs

@@ -0,0 +1,37 @@
+namespace UAS_MES_NEW.CustomControl.PowerControlForm
+{
+    partial class PowerControlForm
+    {
+        /// <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();
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+        }
+
+        #endregion
+    }
+}

+ 49 - 0
UAS_MES_HYSX/CustomControl/PowerControlForm/PowerControlForm.cs

@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace UAS_MES_NEW.CustomControl.PowerControlForm
+{
+    public partial class PowerControlForm : Form
+    {
+        string PowerRead1;
+
+        public string PowerRead
+        {
+            get
+            {
+                return PowerRead1;
+            }
+
+            set
+            {
+                PowerRead1 = value;
+            }
+        }
+
+        string AllPower1;
+
+        public string AllPower
+        {
+            get
+            {
+                return AllPower1;
+            }
+
+            set
+            {
+                AllPower1 = value;
+            }
+        }
+
+        public PowerControlForm()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 120 - 0
UAS_MES_HYSX/CustomControl/PowerControlForm/PowerControlForm.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>

+ 61 - 0
UAS_MES_HYSX/CustomControl/ProcessBar/ProcessBar.Designer.cs

@@ -0,0 +1,61 @@
+namespace UAS_MES_NEW.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(true);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.PictureBox pictureBox1;
+    }
+}

+ 209 - 0
UAS_MES_HYSX/CustomControl/ProcessBar/ProcessBar.cs

@@ -0,0 +1,209 @@
+using System;
+using System.Drawing;
+using System.Threading;
+using System.Windows.Forms;
+
+namespace UAS_MES_NEW.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_HYSX/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_HYSX/CustomControl/RichText/RichTextAutoBottom.Designer.cs

@@ -0,0 +1,36 @@
+namespace UAS_MES_NEW.CustomControl.RichText
+{
+    partial class RichTextAutoBottom
+    {
+        /// <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
+    }
+}

+ 149 - 0
UAS_MES_HYSX/CustomControl/RichText/RichTextAutoBottom.cs

@@ -0,0 +1,149 @@
+using System;
+using System.Drawing;
+using System.Media;
+using System.Threading;
+using System.Windows.Forms;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.CustomControl.RichText
+{
+    public partial class RichTextAutoBottom : RichTextBox
+    {
+        Thread thread;
+        string FileName = "";
+        public RichTextAutoBottom()
+        {
+            InitializeComponent();
+            thread = new Thread(PlaySound);
+            TextChanged += RichTextBox_TextChange;
+        }
+
+        private void RichTextBox_TextChange(object sender, EventArgs e)
+        {
+            SelectionStart = Text.Length;
+            ScrollToCaret();
+        }
+
+        /// <summary>
+        /// color设置AppendText的颜色
+        /// </summary>
+        /// <param name="str"></param>
+        /// <param name="color"></param>
+        public void AppendText(string str, Color color)
+        {
+            SelectionColor = color;
+            base.AppendText(str);
+            //如果颜色是红色则进行提示音
+            if (color == Color.Red && Entity.SystemInf.CheckAudioEnable)
+            {
+                FileName = Application.StartupPath + @"\Resources\Sound\5185.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.DarkRed && Entity.SystemInf.CheckAudioEnable)
+            {
+                FileName = Application.StartupPath + @"\Resources\Sound\1454.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.Green && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\8378.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.GreenYellow && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\3285.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.LightGreen && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\3853.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.DarkGreen && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\PASS.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            LogManager.DoLog(FindForm().Tag + str);
+        }
+
+        /// <summary>
+        /// 提示错误信息清楚指定控件的值
+        /// </summary>
+        /// <param name="str"></param>
+        /// <param name="color"></param>
+        /// <param name="ctl"></param>
+        public void AppendText(string str, Color color, Control ctl)
+        {
+            SelectionColor = color;
+            base.AppendText(str);
+            ctl.Text = "";
+            //如果颜色是红色则进行提示音
+            if (color == Color.Red && Entity.SystemInf.CheckAudioEnable)
+            {
+                FileName = Application.StartupPath + @"\Resources\Sound\5185.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.DarkRed && Entity.SystemInf.CheckAudioEnable)
+            {
+                FileName = Application.StartupPath + @"\Resources\Sound\1454.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.Green && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\8378.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.GreenYellow && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\3285.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            else if (color == Color.LightGreen && Entity.SystemInf.CheckAudioEnable)
+            {
+                //颜色是绿色,进行正确提示音
+                FileName = Application.StartupPath + @"\Resources\Sound\3853.wav";
+                thread.Start();
+                thread = new Thread(PlaySound);
+            }
+            LogManager.DoLog(FindForm().Tag + str);
+        }
+
+        private void PlaySound()
+        {
+            //要加载COM组件:Microsoft speech object Library    
+            if (!System.IO.File.Exists(FileName))
+            {
+                return;
+            }
+            try
+            {
+                SoundPlayer player = new SoundPlayer();
+                player.SoundLocation = FileName;
+                player.Load();
+                player.Play();
+            }
+            catch (Exception e)
+            {
+                MessageBox.Show(e.Message);
+                Entity.SystemInf.CheckAudioEnable = false;
+            }
+        }
+    }
+}

+ 28 - 0
UAS_MES_HYSX/CustomControl/SetLoading/LoadingCircle.Designer.cs

@@ -0,0 +1,28 @@
+//#####################################################################################
+//★★★★★★★           http://www.cnpopsoft.com [华普软件]           ★★★★★★★
+//★★★★★★★           华普软件-VB、C#专业论文与源码荟萃!           ★★★★★★★
+//#####################################################################################
+
+namespace UAS_MES_NEW.CustomControl.SetLoading
+{
+    partial class LoadingCircle
+    {
+        /// <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);
+        }
+    }
+}

+ 470 - 0
UAS_MES_HYSX/CustomControl/SetLoading/LoadingCircle.cs

@@ -0,0 +1,470 @@
+//#####################################################################################
+//★★★★★★★           http://www.cnpopsoft.com [华普软件]           ★★★★★★★
+//★★★★★★★           华普软件-VB、C#专业论文与源码荟萃!           ★★★★★★★
+//#####################################################################################
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Text;
+using System.Windows.Forms;
+
+namespace UAS_MES_NEW.CustomControl.SetLoading
+{
+    public partial class LoadingCircle : Control
+    {
+        #region 常数
+        private const double NumberOfDegreesInCircle = 360;
+        private const double NumberOfDegreesInHalfCircle = NumberOfDegreesInCircle / 2;
+        private const int DefaultInnerCircleRadius = 8;
+        private const int DefaultOuterCircleRadius = 10;
+        private const int DefaultNumberOfSpoke = 10;
+        private const int DefaultSpokeThickness = 4;
+        private readonly Color DefaultColor = Color.DarkGray;
+
+        private const int MacOSXInnerCircleRadius = 5;
+        private const int MacOSXOuterCircleRadius = 11;
+        private const int MacOSXNumberOfSpoke = 12;
+        private const int MacOSXSpokeThickness = 2;
+
+        private const int FireFoxInnerCircleRadius = 6;
+        private const int FireFoxOuterCircleRadius = 7;
+        private const int FireFoxNumberOfSpoke = 9;
+        private const int FireFoxSpokeThickness = 4;
+
+        private const int IE7InnerCircleRadius = 8;
+        private const int IE7OuterCircleRadius = 9;
+        private const int IE7NumberOfSpoke = 24;
+        private const int IE7SpokeThickness = 4;
+
+        #endregion
+
+        #region 枚举
+
+        public enum StylePresets
+        {
+            MacOSX,
+            Firefox,
+            IE7,
+            Custom
+        }
+
+        #endregion
+
+        #region 局部变量
+
+        private Timer m_Timer;
+        private bool m_IsTimerActive;
+        private int m_NumberOfSpoke;
+        private int m_SpokeThickness;
+        private int m_ProgressValue;
+        private int m_OuterCircleRadius;
+        private int m_InnerCircleRadius;
+        private PointF m_CenterPoint;
+        private Color m_Color;
+        private Color[] m_Colors;
+        private double[] m_Angles;
+        private StylePresets m_StylePreset;
+
+        #endregion
+
+        #region 属性
+
+        /// <summary>
+        /// 获取和设置控件高亮色
+        /// </summary>
+        /// <value>高亮色</value>
+        [TypeConverter("System.Drawing.ColorConverter"),
+        Category("LoadingCircle"),
+        Description("获取和设置控件高亮色")]
+        public Color Color
+        {
+            get
+            {
+                return m_Color;
+            }
+            set
+            {
+                m_Color = value;
+
+                GenerateColorsPallet();
+                Invalidate();
+            }
+        }
+
+        /// <summary>
+        /// 获取和设置外围半径
+        /// </summary>
+        /// <value>外围半径</value>
+        [System.ComponentModel.Description("获取和设置外围半径"),
+         System.ComponentModel.Category("LoadingCircle")]
+        public int OuterCircleRadius
+        {
+            get
+            {
+                if (m_OuterCircleRadius == 0)
+                    m_OuterCircleRadius = DefaultOuterCircleRadius;
+
+                return m_OuterCircleRadius;
+            }
+            set
+            {
+                m_OuterCircleRadius = value;
+                Invalidate();
+            }
+        }
+
+        /// <summary>
+        /// 获取和设置内圆半径
+        /// </summary>
+        /// <value>内圆半径</value>
+        [System.ComponentModel.Description("获取和设置内圆半径"),
+         System.ComponentModel.Category("LoadingCircle")]
+        public int InnerCircleRadius
+        {
+            get
+            {
+                if (m_InnerCircleRadius == 0)
+                    m_InnerCircleRadius = DefaultInnerCircleRadius;
+
+                return m_InnerCircleRadius;
+            }
+            set
+            {
+                m_InnerCircleRadius = value;
+                Invalidate();
+            }
+        }
+
+        /// <summary>
+        /// 获取和设置辐条数量
+        /// </summary>
+        /// <value>辐条数量</value>
+        [System.ComponentModel.Description("获取和设置辐条数量"),
+        System.ComponentModel.Category("LoadingCircle")]
+        public int NumberSpoke
+        {
+            get
+            {
+                if (m_NumberOfSpoke == 0)
+                    m_NumberOfSpoke = DefaultNumberOfSpoke;
+                return m_NumberOfSpoke;
+            }
+            set
+            {
+                if (m_NumberOfSpoke != value && m_NumberOfSpoke > 0)
+                {
+                    m_NumberOfSpoke = value;
+                    GenerateColorsPallet();
+                    GetSpokesAngles();
+                    Invalidate();
+                }
+            }
+        }
+
+        /// <summary>
+        /// 获取和设置一个布尔值,表示当前控件<see cref="T:LoadingCircle"/>是否激活。
+        /// </summary>
+        /// <value><c>true</c> 表示激活;否则,为<c>false</c>。</value>
+        [System.ComponentModel.Description("获取和设置一个布尔值,表示当前控件是否激活。"),
+        System.ComponentModel.Category("LoadingCircle")]
+        public bool Active
+        {
+            get
+            {
+                return m_IsTimerActive;
+            }
+            set
+            {
+                m_IsTimerActive = value;
+                ActiveTimer();
+            }
+        }
+
+        /// <summary>
+        /// 获取和设置辐条粗细程度。
+        /// </summary>
+        /// <value>辐条粗细值</value>
+        [System.ComponentModel.Description("获取和设置辐条粗细程度。"),
+        System.ComponentModel.Category("LoadingCircle")]
+        public int SpokeThickness
+        {
+            get
+            {
+                if (m_SpokeThickness <= 0)
+                    m_SpokeThickness = DefaultSpokeThickness;
+                return m_SpokeThickness;
+            }
+            set
+            {
+                m_SpokeThickness = value;
+                Invalidate();
+            }
+        }
+
+        /// <summary>
+        /// 获取和设置旋转速度。
+        /// </summary>
+        /// <value>旋转速度</value>
+        [System.ComponentModel.Description("获取和设置旋转速度。"),
+        System.ComponentModel.Category("LoadingCircle")]
+        public int RotationSpeed
+        {
+            get
+            {
+                return m_Timer.Interval;
+            }
+            set
+            {
+                if (value > 0)
+                    m_Timer.Interval = value;
+            }
+        }
+
+        /// <summary>
+        /// 快速设置预定义风格。
+        /// </summary>
+        /// <value>风格的值</value>
+        [Category("LoadingCircle"),
+        Description("快速设置预定义风格。"),
+         DefaultValue(typeof(StylePresets), "Custom")]
+        public StylePresets StylePreset
+        {
+            get { return m_StylePreset; }
+            set
+            {
+                m_StylePreset = value;
+
+                switch (m_StylePreset)
+                {
+                    case StylePresets.MacOSX:
+                        SetCircleAppearance(MacOSXNumberOfSpoke,
+                            MacOSXSpokeThickness, MacOSXInnerCircleRadius,
+                            MacOSXOuterCircleRadius);
+                        break;
+                    case StylePresets.Firefox:
+                        SetCircleAppearance(FireFoxNumberOfSpoke,
+                            FireFoxSpokeThickness, FireFoxInnerCircleRadius,
+                            FireFoxOuterCircleRadius);
+                        break;
+                    case StylePresets.IE7:
+                        SetCircleAppearance(IE7NumberOfSpoke,
+                            IE7SpokeThickness, IE7InnerCircleRadius,
+                            IE7OuterCircleRadius);
+                        break;
+                    case StylePresets.Custom:
+                        SetCircleAppearance(DefaultNumberOfSpoke,
+                            DefaultSpokeThickness,
+                            DefaultInnerCircleRadius,
+                            DefaultOuterCircleRadius);
+                        break;
+                }
+            }
+        }
+
+        #endregion
+
+        #region 构造函数及事件处理
+
+        public LoadingCircle()
+        {
+            SetStyle(ControlStyles.UserPaint, true);
+            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
+            SetStyle(ControlStyles.ResizeRedraw, true);
+            SetStyle(ControlStyles.SupportsTransparentBackColor, true);
+
+            m_Color = DefaultColor;
+
+            GenerateColorsPallet();
+            GetSpokesAngles();
+            GetControlCenterPoint();
+
+            m_Timer = new Timer();
+            m_Timer.Tick += new EventHandler(aTimer_Tick);
+            ActiveTimer();
+
+            this.Resize += new EventHandler(LoadingCircle_Resize);
+        }
+
+        void LoadingCircle_Resize(object sender, EventArgs e)
+        {
+            GetControlCenterPoint();
+        }
+
+        void aTimer_Tick(object sender, EventArgs e)
+        {
+            m_ProgressValue = ++m_ProgressValue % m_NumberOfSpoke;
+            Invalidate();
+        }
+
+        protected override void OnPaint(PaintEventArgs e)
+        {
+            if (m_NumberOfSpoke > 0)
+            {
+                e.Graphics.SmoothingMode = SmoothingMode.HighQuality;
+
+                int intPosition = m_ProgressValue;
+                for (int intCounter = 0; intCounter < m_NumberOfSpoke; intCounter++)
+                {
+                    intPosition = intPosition % m_NumberOfSpoke;
+                    DrawLine(e.Graphics,
+                             GetCoordinate(m_CenterPoint, m_InnerCircleRadius, m_Angles[intPosition]),
+                             GetCoordinate(m_CenterPoint, m_OuterCircleRadius, m_Angles[intPosition]),
+                             m_Colors[intCounter], m_SpokeThickness);
+                    intPosition++;
+                }
+            }
+
+            base.OnPaint(e);
+        }
+
+        #endregion
+
+        #region 局部方法
+
+        private Color Darken(Color _objColor, int _intPercent)
+        {
+            int intRed = _objColor.R;
+            int intGreen = _objColor.G;
+            int intBlue = _objColor.B;
+            return Color.FromArgb(_intPercent, Math.Min(intRed, byte.MaxValue), Math.Min(intGreen, byte.MaxValue), Math.Min(intBlue, byte.MaxValue));
+        }
+
+        private void GenerateColorsPallet()
+        {
+            m_Colors = GenerateColorsPallet(m_Color, Active, m_NumberOfSpoke);
+        }
+
+        private Color[] GenerateColorsPallet(Color _objColor, bool _blnShadeColor, int _intNbSpoke)
+        {
+            Color[] objColors = new Color[NumberSpoke];
+
+            byte bytIncrement = (byte)(byte.MaxValue / NumberSpoke);
+
+            byte PERCENTAGE_OF_DARKEN = 0;
+
+            for (int intCursor = 0; intCursor < NumberSpoke; intCursor++)
+            {
+                if (_blnShadeColor)
+                {
+                    if (intCursor == 0 || intCursor < NumberSpoke - _intNbSpoke)
+                        objColors[intCursor] = _objColor;
+                    else
+                    {
+                        PERCENTAGE_OF_DARKEN += bytIncrement;
+
+                        if (PERCENTAGE_OF_DARKEN > byte.MaxValue)
+                            PERCENTAGE_OF_DARKEN = byte.MaxValue;
+
+                        objColors[intCursor] = Darken(_objColor, PERCENTAGE_OF_DARKEN);
+                    }
+                }
+                else
+                    objColors[intCursor] = _objColor;
+            }
+
+            return objColors;
+        }
+
+        private void GetControlCenterPoint()
+        {
+            m_CenterPoint = GetControlCenterPoint(this);
+        }
+
+        private PointF GetControlCenterPoint(Control _objControl)
+        {
+            return new PointF(_objControl.Width / 2, _objControl.Height / 2 - 1);
+        }
+
+        private void DrawLine(Graphics _objGraphics, PointF _objPointOne, PointF _objPointTwo,
+                              Color _objColor, int _intLineThickness)
+        {
+            using (Pen objPen = new Pen(new SolidBrush(_objColor), _intLineThickness))
+            {
+                objPen.StartCap = LineCap.Round;
+                objPen.EndCap = LineCap.Round;
+                _objGraphics.DrawLine(objPen, _objPointOne, _objPointTwo);
+            }
+        }
+
+        private PointF GetCoordinate(PointF _objCircleCenter, int _intRadius, double _dblAngle)
+        {
+            double dblAngle = Math.PI * _dblAngle / NumberOfDegreesInHalfCircle;
+
+            return new PointF(_objCircleCenter.X + _intRadius * (float)Math.Cos(dblAngle),
+                              _objCircleCenter.Y + _intRadius * (float)Math.Sin(dblAngle));
+        }
+
+        private void GetSpokesAngles()
+        {
+            m_Angles = GetSpokesAngles(NumberSpoke);
+        }
+
+        private double[] GetSpokesAngles(int _intNumberSpoke)
+        {
+            double[] Angles = new double[_intNumberSpoke];
+            double dblAngle = (double)NumberOfDegreesInCircle / _intNumberSpoke;
+
+            for (int shtCounter = 0; shtCounter < _intNumberSpoke; shtCounter++)
+                Angles[shtCounter] = (shtCounter == 0 ? dblAngle : Angles[shtCounter - 1] + dblAngle);
+
+            return Angles;
+        }
+
+        private void ActiveTimer()
+        {
+            if (m_IsTimerActive)
+                m_Timer.Start();
+            else
+            {
+                m_Timer.Stop();
+                m_ProgressValue = 0;
+            }
+
+            GenerateColorsPallet();
+            Invalidate();
+        }
+
+        #endregion
+
+        #region 全局方法
+
+        /// <summary>
+        /// 获取适合控件区域的矩形大小。
+        /// </summary>
+        /// <param name="proposedSize">The custom-sized area for a control.</param>
+        /// <returns>
+        /// An ordered pair of type <see cref="T:System.Drawing.Size"></see> representing the width and height of a rectangle.
+        /// </returns>
+        public override Size GetPreferredSize(Size proposedSize)
+        {
+            proposedSize.Width =
+                (m_OuterCircleRadius + m_SpokeThickness) * 2;
+
+            return proposedSize;
+        }
+
+        /// <summary>
+        /// 设置控件的外观
+        /// </summary>
+        /// <param name="numberSpoke">条数</param>
+        /// <param name="spokeThickness">粗细</param>
+        /// <param name="innerCircleRadius">内圆半径</param>
+        /// <param name="outerCircleRadius">外圆半径</param>
+        public void SetCircleAppearance(int numberSpoke, int spokeThickness,
+            int innerCircleRadius, int outerCircleRadius)
+        {
+            NumberSpoke = numberSpoke;
+            SpokeThickness = spokeThickness;
+            InnerCircleRadius = innerCircleRadius;
+            OuterCircleRadius = outerCircleRadius;
+
+            Invalidate();
+        }
+
+        #endregion
+    }
+}

+ 88 - 0
UAS_MES_HYSX/CustomControl/TextBoxWithIcon/BlurSearch.Designer.cs

@@ -0,0 +1,88 @@
+namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
+{
+    partial class BlurSearch
+    {
+        /// <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.ListBox = new System.Windows.Forms.ListBox();
+            this.EnterTextBox = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.SuspendLayout();
+            // 
+            // ListBox
+            // 
+            this.ListBox.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.ListBox.FormattingEnabled = true;
+            this.ListBox.ItemHeight = 12;
+            this.ListBox.Location = new System.Drawing.Point(0, 20);
+            this.ListBox.Margin = new System.Windows.Forms.Padding(2);
+            this.ListBox.Name = "ListBox";
+            this.ListBox.Size = new System.Drawing.Size(154, 100);
+            this.ListBox.TabIndex = 1;
+            this.ListBox.Click += new System.EventHandler(this.ListBox_Click);
+            // 
+            // EnterTextBox
+            // 
+            this.EnterTextBox.AllPower = null;
+            this.EnterTextBox.BackColor = System.Drawing.Color.White;
+            this.EnterTextBox.Dock = System.Windows.Forms.DockStyle.Top;
+            this.EnterTextBox.ID = null;
+            this.EnterTextBox.Location = new System.Drawing.Point(0, 0);
+            this.EnterTextBox.Margin = new System.Windows.Forms.Padding(2);
+            this.EnterTextBox.Name = "EnterTextBox";
+            this.EnterTextBox.Power = null;
+            this.EnterTextBox.Size = new System.Drawing.Size(154, 21);
+            this.EnterTextBox.Str = null;
+            this.EnterTextBox.Str1 = null;
+            this.EnterTextBox.Str2 = null;
+            this.EnterTextBox.TabIndex = 2;
+            this.EnterTextBox.TextChanged += new System.EventHandler(this.EnterTextBox_TextChanged);
+            this.EnterTextBox.Enter += new System.EventHandler(this.EnterTextBox_Enter);
+            this.EnterTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.EnterTextBox_KeyDown);
+            this.EnterTextBox.Leave += new System.EventHandler(this.EnterTextBox_Leave);
+            // 
+            // BlurSearch
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.EnterTextBox);
+            this.Controls.Add(this.ListBox);
+            this.Margin = new System.Windows.Forms.Padding(2);
+            this.Name = "BlurSearch";
+            this.Size = new System.Drawing.Size(154, 120);
+            this.Load += new System.EventHandler(this.BlurSearch_Load);
+            this.Leave += new System.EventHandler(this.BlurSearch_Leave);
+            this.ResumeLayout(true);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.ListBox ListBox;
+        private SnCollectionBox EnterTextBox;
+    }
+}

+ 245 - 0
UAS_MES_HYSX/CustomControl/TextBoxWithIcon/BlurSearch.cs

@@ -0,0 +1,245 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+
+namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
+{
+    public partial class BlurSearch : UserControl
+    {
+        DataHelper dh = SystemInf.dh;
+
+        public delegate void OnTextChange(object sender, EventArgs e);
+
+        public event OnTextChange UserControlTextChanged;
+
+        string TableName1;
+
+        string Field1;
+
+        int ItemSelectIndex = 0;
+        DataTable dt;
+
+        public override string Text
+        {
+            get
+            {
+                return EnterTextBox.Text;
+            }
+
+            set
+            {
+                EnterTextBox.Text = value;
+            }
+        }
+
+        public BlurSearch()
+        {
+            InitializeComponent();
+        }
+
+        public string TableName
+        {
+            get
+            {
+                return TableName1;
+            }
+
+            set
+            {
+                TableName1 = value;
+            }
+        }
+
+        private string value;
+
+        public string Field
+        {
+            get
+            {
+                return Field1;
+            }
+
+            set
+            {
+                Field1 = value;
+            }
+        }
+
+        public string Condition
+        {
+            get
+            {
+                return condition;
+            }
+
+            set
+            {
+                condition = value;
+            }
+        }
+
+        public string ValueField
+        {
+            get
+            {
+                return valueField;
+            }
+
+            set
+            {
+                valueField = value;
+            }
+        }
+
+        public string Value
+        {
+            get
+            {
+                return value;
+            }
+
+            set
+            {
+                this.value = value;
+            }
+        }
+
+        private string valueField;
+
+        private string condition;
+
+        private void TextBox_Leave(object sender, EventArgs e)
+        {
+            Height = EnterTextBox.Height;
+            ListBox.Visible = false;
+        }
+
+        private void BlurSearch_Load(object sender, EventArgs e)
+        {
+            Height = EnterTextBox.Height;
+            ListBox.Visible = false;
+        }
+
+        private void EnterTextBox_TextChanged(object sender, EventArgs e)
+        {
+            if (TableName1 != null && EnterTextBox.Focused)
+            {
+                string con = Field1 + " like '%" + EnterTextBox.Text + "%'  ";
+                if (condition != "" && condition != null)
+                {
+                    con = Field1 + " like '%" + EnterTextBox.Text + "%' and " + condition;
+                }
+                dt = dh.getFieldsDatasByCondition(TableName1, new string[] { Field1, valueField, "rownum" }, con.ToUpper());
+                if (dt.Rows.Count > 0)
+                {
+                    ListBox.Items.Clear();
+                    for (int i = 0; i < dt.Rows.Count; i++)
+                    {
+                        ListBox.Items.Add(dt.Rows[i][Field1]);
+                    }
+                    //每次数据查询之后将索引重置
+                    ItemSelectIndex = 0;
+                    ListBox.Height = ListBox.ItemHeight  *10;
+                    ListBox.Visible = true;
+                    Height = ListBox.Height + EnterTextBox.Height;
+                }
+                if (dt.Rows.Count == 1)
+                {
+                    value = dt.Rows[0][valueField].ToString();
+                }
+            }
+            else
+            {
+                ListBox.Visible = false;
+                Height = EnterTextBox.Height;
+            }
+            UserControlTextChanged?.Invoke(sender, new EventArgs());
+        }
+
+        private void ListBox_Click(object sender, EventArgs e)
+        {
+            value = dt.Select("rownum=" + (ListBox.SelectedIndex + 1))[0][1].ToString();
+            EnterTextBox.Text = ListBox.SelectedItem.ToString();
+            ListBox.Visible = false;
+            Height = EnterTextBox.Height;
+        }
+
+        private void EnterTextBox_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (ListBox.Items.Count > 0)
+            {
+                if (e.KeyCode == Keys.Down || e.KeyCode == Keys.Up)
+                {
+                    switch (e.KeyCode)
+                    {
+                        case Keys.Down:
+                            if (ListBox.Items.Count > ItemSelectIndex + 1)
+                                ItemSelectIndex = ItemSelectIndex + 1;
+                            break;
+                        case Keys.Up:
+                            if (ItemSelectIndex - 1 >= 0)
+                                ItemSelectIndex = ItemSelectIndex - 1;
+                            break;
+                        default:
+                            break;
+                    }
+                    ListBox.SelectedIndex = ItemSelectIndex;
+                }
+                if (e.KeyCode == Keys.Enter)
+                {
+                    try
+                    {
+                        EnterTextBox.Text = ListBox.SelectedItem.ToString();
+                        ListBox.Visible = false;
+                        Height = EnterTextBox.Height;
+                    }
+                    catch (Exception)
+                    {
+                    }
+                }
+            }
+        }
+
+        private void EnterTextBox_Enter(object sender, EventArgs e)
+        {
+            string con = Field1 + " like '%" + EnterTextBox.Text + "%' ";
+            if (condition != "" && condition != null)
+            {
+                con = Field1 + " like '%" + EnterTextBox.Text + "%' and " + condition;
+            }
+            dt = dh.getFieldsDatasByCondition(TableName1, new string[] { Field1, valueField, "rownum" }, con.ToUpper());
+            if (dt.Rows.Count > 0)
+            {
+                ListBox.Items.Clear();
+                for (int i = 0; i < dt.Rows.Count; i++)
+                {
+                    ListBox.Items.Add(dt.Rows[i][Field1]);
+                }
+                //每次数据查询之后将索引重置
+                ItemSelectIndex = 0;
+                ListBox.Height = ListBox.ItemHeight * 10;
+                ListBox.Visible = true;
+                Height = ListBox.Height + EnterTextBox.Height;
+            }
+        }
+
+        private void EnterTextBox_Leave(object sender, EventArgs e)
+        {
+            //ListBox.Visible = false;
+        }
+
+        private void BlurSearch_Leave(object sender, EventArgs e)
+        {
+            ListBox.Height = 0;
+            ListBox.Visible = false;
+            Height = ListBox.Height + EnterTextBox.Height;
+        }
+    }
+}

+ 120 - 0
UAS_MES_HYSX/CustomControl/TextBoxWithIcon/BlurSearch.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>

+ 45 - 0
UAS_MES_HYSX/CustomControl/TextBoxWithIcon/EnterTextBox.Designer.cs

@@ -0,0 +1,45 @@
+namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
+{
+    partial class EnterTextBox
+    {
+        /// <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();
+            // 
+            // EnterTextBox
+            // 
+            this.Size = new System.Drawing.Size(196, 28);
+            this.Enter += new System.EventHandler(this.EnterTextBox_Enter);
+            this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.EnterTextBox_KeyPress);
+            this.Leave += new System.EventHandler(this.EnterTextBox_Leave);
+            this.ResumeLayout(true);
+
+        }
+
+        #endregion
+    }
+}

+ 101 - 0
UAS_MES_HYSX/CustomControl/TextBoxWithIcon/EnterTextBox.cs

@@ -0,0 +1,101 @@
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
+{
+    public partial class EnterTextBox : TextBox
+    {
+        //传值的备用字符串
+        private string ID1;
+        private string Power1;
+        private string str;
+        private string str1;
+        private string str2;
+        /// <summary>
+        /// 设置锁定字段
+        /// </summary>
+        string AllPower1;
+
+        public override string Text
+        {
+            get
+            {
+                return base.Text.Trim();
+            }
+
+            set
+            {
+                base.Text = value;
+            }
+        }
+
+        public string AllPower
+        {
+            get { return AllPower1; }
+            set { AllPower1 = value; }
+        }
+
+        public string ID
+        {
+            get { return ID1; }
+            set { ID1 = value; }
+        }
+
+        public string Str
+        {
+            get { return str; }
+            set { str = value; }
+        }
+
+        public string Str1
+        {
+            get { return str1; }
+            set { str1 = value; }
+        }
+
+        public string Str2
+        {
+            get { return str2; }
+            set { str2 = value; }
+        }
+
+        public string Power
+        {
+            get { return Power1; }
+            set { Power1 = value; }
+        }
+
+        public EnterTextBox()
+        {
+            InitializeComponent();
+            this.KeyDown += EnterTextBox_KeyDown;
+            BackColor = System.Drawing.Color.White;
+        }
+
+        private void EnterTextBox_Enter(object sender, EventArgs e)
+        {
+            this.BackColor = Color.GreenYellow;
+        }
+
+        private void EnterTextBox_Leave(object sender, EventArgs e)
+        {
+            this.BackColor = Color.White;
+        }
+        //手动添加全选功能
+
+        private void EnterTextBox_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.Modifiers.CompareTo(Keys.Control) == 0 && e.KeyCode == Keys.A)
+                this.SelectAll();
+        }
+
+        private void EnterTextBox_KeyPress(object sender, KeyPressEventArgs e)
+        {
+            if (e.KeyChar == System.Convert.ToChar(13))
+            {
+                e.Handled = true;
+            }
+        }
+    }
+}

+ 123 - 0
UAS_MES_HYSX/CustomControl/TextBoxWithIcon/EnterTextBox.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="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </metadata>
+</root>

+ 89 - 0
UAS_MES_HYSX/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.Designer.cs

@@ -0,0 +1,89 @@
+namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
+{
+    partial class MaCodeSearchTextBox
+    {
+        /// <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.Search_Icon = new UAS_MES_NEW.CustomControl.ClickPicBox.ClickPicBox();
+            this.TextBox = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeTextBox();
+            ((System.ComponentModel.ISupportInitialize)(this.Search_Icon)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // Search_Icon
+            // 
+            this.Search_Icon.AllPower = null;
+            this.Search_Icon.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Search_Icon.Dock = System.Windows.Forms.DockStyle.Right;
+            this.Search_Icon.Image = global::UAS_MES_NEW.Properties.Resources.search_16px_1202802_easyicon_net;
+            this.Search_Icon.Location = new System.Drawing.Point(183, 0);
+            this.Search_Icon.Name = "Search_Icon";
+            this.Search_Icon.Power = "";
+            this.Search_Icon.Size = new System.Drawing.Size(21, 25);
+            this.Search_Icon.TabIndex = 1;
+            this.Search_Icon.TabStop = false;
+            this.Search_Icon.Click += new System.EventHandler(this.Search_Icon_Click);
+            // 
+            // TextBox
+            // 
+            this.TextBox.AllPower = null;
+            this.TextBox.BackColor = System.Drawing.Color.White;
+            this.TextBox.Dock = System.Windows.Forms.DockStyle.Left;
+            this.TextBox.ID = null;
+            this.TextBox.Location = new System.Drawing.Point(0, 0);
+            this.TextBox.Lock = false;
+            this.TextBox.Name = "TextBox";
+            this.TextBox.Power = null;
+            this.TextBox.Size = new System.Drawing.Size(178, 21);
+            this.TextBox.Str = null;
+            this.TextBox.Str1 = null;
+            this.TextBox.Str2 = null;
+            this.TextBox.TabIndex = 0;
+            this.TextBox.TextChanged += new System.EventHandler(this.TextBox_TextChanged);
+            this.TextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBox_KeyDown);
+            this.TextBox.Leave += new System.EventHandler(this.TextBox_Leave);
+            // 
+            // MaCodeSearchTextBox
+            // 
+            this.Controls.Add(this.Search_Icon);
+            this.Controls.Add(this.TextBox);
+            this.Name = "MaCodeSearchTextBox";
+            this.Size = new System.Drawing.Size(204, 25);
+            this.Load += new System.EventHandler(this.SearchTextBox_Load);
+            this.SizeChanged += new System.EventHandler(this.SearchTextBox_SizeChanged);
+            this.Leave += new System.EventHandler(this.MaCodeSearchTextBox_Leave);
+            ((System.ComponentModel.ISupportInitialize)(this.Search_Icon)).EndInit();
+            this.ResumeLayout(true);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private ClickPicBox.ClickPicBox Search_Icon;
+        public MaCodeTextBox TextBox;
+    }
+}

+ 364 - 0
UAS_MES_HYSX/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.cs

@@ -0,0 +1,364 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Windows.Forms;
+using UAS_MES_NEW.CustomControl.CustomCheckBox;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
+{
+    public partial class MaCodeSearchTextBox : UserControl
+    {
+        #region 构造函数
+        public MaCodeSearchTextBox()
+        {
+            InitializeComponent();
+        }
+        #endregion
+
+        #region 变量
+        /// <summary>
+        /// 是否通过Leave事件找到数据
+        /// </summary>
+        public bool LeaveFindData;
+        /// <summary>
+        /// DBFind窗体弹出的标题
+        /// </summary>
+        private string DBTitle1;
+        /// <summary>
+        /// 输入框是否可编辑
+        /// </summary>
+        private bool TextBoxEnable1;
+        /// <summary>
+        /// 业务逻辑的标识符
+        /// </summary>
+        private string caller;
+        /// <summary>
+        /// 发起DbFind的窗体
+        /// </summary>
+        private string formName;
+        /// <summary>
+        /// 需要赋值的字段
+        /// </summary>
+        private string[] setValueField;
+        /// <summary>
+        /// 初始的筛选条件
+        /// </summary>
+        private string condition;
+        /// <summary>
+        /// 权限标识
+        /// </summary>
+        private string Power1;
+        /// <summary>
+        /// 查询的表名
+        /// </summary>
+        private string tableName;
+        /// <summary>
+        /// 查询的字段
+        /// </summary>
+        private string selectField;
+
+        /// <summary>
+        /// 设置绑定的CheckBox
+        /// </summary>
+        LockCheckBox LockCheckBox;
+
+        public delegate void DBSourceChange(object sender, EventArgs e);
+
+        public event DBSourceChange DbChange;
+
+        DataTable dt = new DataTable();
+
+        DbFind db;
+
+        DataTable ReturnData1;
+
+        public override string Text
+        {
+            get
+            {
+                return TextBox.Text.ToUpper();
+            }
+            set
+            {
+                TextBox.Text = value;
+            }
+        }
+
+        string AllPower1;
+
+        public string AllPower
+        {
+            get
+            {
+                return AllPower1;
+            }
+
+            set
+            {
+                AllPower1 = value;
+            }
+        }
+
+        public string Caller
+        {
+            get
+            {
+                return caller;
+            }
+
+            set
+            {
+                caller = value;
+            }
+        }
+
+        public string FormName
+        {
+            get
+            {
+                return formName;
+            }
+
+            set
+            {
+                formName = value;
+            }
+        }
+
+        public string[] SetValueField
+        {
+            get
+            {
+                return setValueField;
+            }
+
+            set
+            {
+                setValueField = value;
+            }
+        }
+
+        public string Condition
+        {
+            get
+            {
+                return condition;
+            }
+
+            set
+            {
+                condition = value;
+            }
+        }
+
+        public string TableName
+        {
+            get
+            {
+                return tableName;
+            }
+
+            set
+            {
+                tableName = value;
+            }
+        }
+
+        public string SelectField
+        {
+            get
+            {
+                return selectField;
+            }
+
+            set
+            {
+                selectField = value;
+            }
+        }
+
+        public string Power
+        {
+            get
+            {
+                return Power1;
+            }
+
+            set
+            {
+                Power1 = value;
+            }
+        }
+
+        public string DBTitle
+        {
+            get
+            {
+                return DBTitle1;
+            }
+
+            set
+            {
+                DBTitle1 = value;
+            }
+        }
+
+        public bool TextBoxEnable
+        {
+            get
+            {
+                return TextBoxEnable1;
+            }
+
+            set
+            {
+                TextBoxEnable1 = value;
+            }
+        }
+
+        public DataTable ReturnData
+        {
+            get
+            {
+                return ReturnData1;
+            }
+
+            set
+            {
+                ReturnData1 = value;
+            }
+        }
+        #endregion
+
+        #region 自定义事件
+        public delegate void OnTextChange(object sender, EventArgs e);
+        //定义事件
+        public event OnTextChange UserControlTextChanged;
+        //定义委托
+        public delegate void Icon_Click(object sender, EventArgs e);
+        /// <summary>
+        /// 图标点击事件
+        /// </summary>
+        public event Icon_Click SearchIconClick;
+        #endregion
+        //定义委托
+
+        private void TextBox_TextChanged(object sender, EventArgs e)
+        {
+            UserControlTextChanged?.Invoke(sender, new EventArgs());
+        }
+
+        //Key先发起失去焦点事件,在执行用户自定义的事件
+        private void TextBox_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+                GetData(true);
+        }
+
+        public void SetLockCheckBox(LockCheckBox ctl)
+        {
+            LockCheckBox = ctl;
+        }
+
+        public void GetData(bool LeaveOrEnter)
+        {
+            DataHelper dh = SystemInf.dh;
+            string sql = "";
+            //将查询到的结果返回界面
+            if (TextBox.Text != "")
+            {
+                sql = "select " + BaseUtil.AddField(setValueField) + " from " + tableName + " where " + Name + "='" + TextBox.Text.ToUpper() + "'";
+            }
+            else if (db != null)
+            {
+                sql = "select " + BaseUtil.AddField(setValueField) + " from " + tableName + " where " + Name + "='" + db.TextBoxValue1 + "'";
+            }
+            if (condition != null)
+            {
+                sql += " and " + condition;
+            }
+            try
+            {
+                dt = (DataTable)dh.ExecuteSql(sql, "select");
+                if (dt.Rows.Count > 0)
+                    ReturnDataToFrom();
+            }
+            catch (Exception e)
+            {
+                LogManager.DoLog(e.Message);
+            }
+            if (LeaveOrEnter || TextBox.Text != "")
+                LockCheckBox.Checked = true;
+
+        }
+
+        private void fillControl(int i, Control ct)
+        {
+            for (int j = 0; j < setValueField.Length; j++)
+            {
+                if (ct.Controls.Count > 0 && ct.Name.ToString() != setValueField[j])
+                {
+                    Control.ControlCollection controls = ct.Controls;
+                    for (int k = 0; k < ct.Controls.Count; k++)
+                    {
+                        fillControl(i, controls[k]);
+                    }
+                }
+                else
+                {
+                    if ((setValueField[j] == dt.Columns[i].Caption.ToLower() || setValueField[j] == dt.Columns[i].ColumnName.ToLower() || setValueField[j].Contains(dt.Columns[i].Caption.ToLower()) || (ct != null && ct.Tag != null && ct.Tag.ToString() == dt.Columns[i].Caption.ToLower())) && ct.Name.ToString() == setValueField[j])
+                        ct.Text = dt.Rows[0][dt.Columns[i].ColumnName].ToString();
+                }
+            }
+        }
+
+        private void Search_Icon_Click(object sender, EventArgs e)
+        {
+            SearchIconClick?.Invoke(sender, new EventArgs());
+            db = new DbFind(Name, tableName, selectField, setValueField, caller, formName, condition);
+            db.Text = DBTitle1;
+            LogManager.DoLog("DbFind查询,发起窗口【" + formName + "】,查询表【" + tableName + "】,字段" + selectField + ",条件" + condition);
+            if (db.IsAbleDbFind1)
+            {
+                db.ShowDialog();
+                GetData(true);
+            }
+            else
+            {
+                MessageBox.Show("该字段未配置DbFind", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
+            }
+        }
+
+        private void ReturnDataToFrom()
+        {
+            ReturnData1 = dt;
+            DbChange?.Invoke(new object(), new EventArgs());
+        }
+
+        public void TextBox_Leave(object sender, EventArgs e)
+        {
+            //GetData(false);
+        }
+
+        private void SearchTextBox_Load(object sender, EventArgs e)
+        {
+            if (!TextBoxEnable1)
+                TextBox.BackColor = System.Drawing.Color.White;
+            TextBox.Enabled = TextBoxEnable1;
+        }
+
+        private void SearchTextBox_SizeChanged(object sender, EventArgs e)
+        {
+            TextBox.Width = this.Width - Search_Icon.Width - 3;
+        }
+
+        private void MaCodeSearchTextBox_Leave(object sender, EventArgs e)
+        {
+            if (TextBox.Text != "")
+                GetData(false);
+        }
+    }
+}

+ 120 - 0
UAS_MES_HYSX/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.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>

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff