Browse Source

入库条码打印项目提交

callm 1 year ago
parent
commit
bf4dcb5db2
100 changed files with 8063 additions and 0 deletions
  1. 48 0
      UAS_BARCODEIO/BaseForm.Designer.cs
  2. 37 0
      UAS_BARCODEIO/BaseForm.cs
  3. 120 0
      UAS_BARCODEIO/BaseForm.resx
  4. 1464 0
      UAS_BARCODEIO/BaseUtil.cs
  5. 43 0
      UAS_BARCODEIO/ClickPicBox.Designer.cs
  6. 43 0
      UAS_BARCODEIO/ClickPicBox.cs
  7. 120 0
      UAS_BARCODEIO/ClickPicBox.resx
  8. 1081 0
      UAS_BARCODEIO/DataHelper.cs
  9. 88 0
      UAS_BARCODEIO/DbFind.Designer.cs
  10. 295 0
      UAS_BARCODEIO/DbFind.cs
  11. 120 0
      UAS_BARCODEIO/DbFind.resx
  12. 45 0
      UAS_BARCODEIO/EnterTextBox.Designer.cs
  13. 101 0
      UAS_BARCODEIO/EnterTextBox.cs
  14. 123 0
      UAS_BARCODEIO/EnterTextBox.resx
  15. BIN
      UAS_BARCODEIO/FastReport.Bars.dll
  16. BIN
      UAS_BARCODEIO/FastReport.Editor.dll
  17. BIN
      UAS_BARCODEIO/FastReport.dll
  18. 42 0
      UAS_BARCODEIO/LockCheckBox.Designer.cs
  19. 75 0
      UAS_BARCODEIO/LockCheckBox.cs
  20. 123 0
      UAS_BARCODEIO/LockCheckBox.resx
  21. 89 0
      UAS_BARCODEIO/MaCodeSearchTextBox.Designer.cs
  22. 358 0
      UAS_BARCODEIO/MaCodeSearchTextBox.cs
  23. 120 0
      UAS_BARCODEIO/MaCodeSearchTextBox.resx
  24. 45 0
      UAS_BARCODEIO/MaCodeTextBox.Designer.cs
  25. 87 0
      UAS_BARCODEIO/MaCodeTextBox.cs
  26. 123 0
      UAS_BARCODEIO/MaCodeTextBox.resx
  27. 322 0
      UAS_BARCODEIO/Pagination.Designer.cs
  28. 354 0
      UAS_BARCODEIO/Pagination.cs
  29. 129 0
      UAS_BARCODEIO/Pagination.resx
  30. 327 0
      UAS_BARCODEIO/PaginationDbFind.Designer.cs
  31. 358 0
      UAS_BARCODEIO/PaginationDbFind.cs
  32. 129 0
      UAS_BARCODEIO/PaginationDbFind.resx
  33. 40 0
      UAS_BARCODEIO/Program.cs
  34. 36 0
      UAS_BARCODEIO/Properties/AssemblyInfo.cs
  35. 1053 0
      UAS_BARCODEIO/Properties/Resources.Designer.cs
  36. 418 0
      UAS_BARCODEIO/Properties/Resources.resx
  37. 86 0
      UAS_BARCODEIO/Properties/Settings.Designer.cs
  38. 21 0
      UAS_BARCODEIO/Properties/Settings.settings
  39. BIN
      UAS_BARCODEIO/Resources/07.gif
  40. BIN
      UAS_BARCODEIO/Resources/0802192135.png
  41. BIN
      UAS_BARCODEIO/Resources/15aedb5b-a345-48b6-8b81-784e410d7fd1.png
  42. BIN
      UAS_BARCODEIO/Resources/2-0btn_04.png
  43. BIN
      UAS_BARCODEIO/Resources/2-0btn_07.png
  44. BIN
      UAS_BARCODEIO/Resources/2-0btn_36.png
  45. BIN
      UAS_BARCODEIO/Resources/20130711113247276.png
  46. BIN
      UAS_BARCODEIO/Resources/46.gif
  47. BIN
      UAS_BARCODEIO/Resources/5600c803afc2d.png
  48. BIN
      UAS_BARCODEIO/Resources/83.gif
  49. BIN
      UAS_BARCODEIO/Resources/Barcode_48px_1072745_easyicon.net.png
  50. BIN
      UAS_BARCODEIO/Resources/CLOSE_24px_1115282_easyicon.net.png
  51. BIN
      UAS_BARCODEIO/Resources/Close_up_32px_1181430_easyicon.net.png
  52. BIN
      UAS_BARCODEIO/Resources/Excel_2010_16px_1180011_easyicon.net.png
  53. BIN
      UAS_BARCODEIO/Resources/Excel_2013_16px_1180012_easyicon.net.png
  54. BIN
      UAS_BARCODEIO/Resources/Image1.bmp
  55. BIN
      UAS_BARCODEIO/Resources/Light.png
  56. BIN
      UAS_BARCODEIO/Resources/LoadingError.gif
  57. BIN
      UAS_BARCODEIO/Resources/LoadingFormat.gif
  58. BIN
      UAS_BARCODEIO/Resources/Lock24px.png
  59. BIN
      UAS_BARCODEIO/Resources/LoginBG.jpg
  60. BIN
      UAS_BARCODEIO/Resources/Logout_32px_581264_easyicon.net.png
  61. BIN
      UAS_BARCODEIO/Resources/OQC作业.png
  62. BIN
      UAS_BARCODEIO/Resources/People_48px_500819_easyicon.net.png
  63. BIN
      UAS_BARCODEIO/Resources/White-side.png
  64. BIN
      UAS_BARCODEIO/Resources/WhiteImage.png
  65. BIN
      UAS_BARCODEIO/Resources/b473847f-a85b-400e-807a-4875c4c07ff1.png
  66. BIN
      UAS_BARCODEIO/Resources/bindingNavigatorAddNewItem.Image.png
  67. BIN
      UAS_BARCODEIO/Resources/bindingNavigatorDeleteItem.Image.png
  68. BIN
      UAS_BARCODEIO/Resources/bindingNavigatorMoveFirstItem.Image.png
  69. BIN
      UAS_BARCODEIO/Resources/bindingNavigatorMoveLastItem.Image.png
  70. BIN
      UAS_BARCODEIO/Resources/bindingNavigatorMoveNextItem.Image.png
  71. BIN
      UAS_BARCODEIO/Resources/bindingNavigatorMovePreviousItem.Image.png
  72. BIN
      UAS_BARCODEIO/Resources/box_17.453077699294px_1191579_easyicon.net.png
  73. BIN
      UAS_BARCODEIO/Resources/box_26.17961654894px_1191579_easyicon.net.png
  74. BIN
      UAS_BARCODEIO/Resources/btncheckoff1.png
  75. BIN
      UAS_BARCODEIO/Resources/btncheckoff2.png
  76. BIN
      UAS_BARCODEIO/Resources/btncheckoff3.png
  77. BIN
      UAS_BARCODEIO/Resources/btncheckoff4.png
  78. BIN
      UAS_BARCODEIO/Resources/btncheckoff5.png
  79. BIN
      UAS_BARCODEIO/Resources/btncheckoff6.png
  80. BIN
      UAS_BARCODEIO/Resources/btncheckon1.png
  81. BIN
      UAS_BARCODEIO/Resources/btncheckon2.png
  82. BIN
      UAS_BARCODEIO/Resources/btncheckon3.png
  83. BIN
      UAS_BARCODEIO/Resources/btncheckon4.png
  84. BIN
      UAS_BARCODEIO/Resources/btncheckon5.png
  85. BIN
      UAS_BARCODEIO/Resources/btncheckon6.png
  86. BIN
      UAS_BARCODEIO/Resources/change_password.png
  87. BIN
      UAS_BARCODEIO/Resources/close.png
  88. BIN
      UAS_BARCODEIO/Resources/close_16px_558195_easyicon.net.png
  89. BIN
      UAS_BARCODEIO/Resources/close_24px_1139093_easyicon.net.png
  90. BIN
      UAS_BARCODEIO/Resources/close_24px_1139293_easyicon.net.png
  91. BIN
      UAS_BARCODEIO/Resources/close_32px_1181428_easyicon.net.png
  92. BIN
      UAS_BARCODEIO/Resources/defaulticon.png
  93. BIN
      UAS_BARCODEIO/Resources/dialog_close_24px_1173781_easyicon.net.png
  94. BIN
      UAS_BARCODEIO/Resources/dialog_error_5_48px_542794_easyicon.net.png
  95. BIN
      UAS_BARCODEIO/Resources/down.png
  96. BIN
      UAS_BARCODEIO/Resources/download_14.926374650513px_1191613_easyicon.net.png
  97. BIN
      UAS_BARCODEIO/Resources/download_17.519713261649px_1200629_easyicon.net (1).png
  98. BIN
      UAS_BARCODEIO/Resources/download_17.519713261649px_1200629_easyicon.net.png
  99. BIN
      UAS_BARCODEIO/Resources/excel.png
  100. BIN
      UAS_BARCODEIO/Resources/file.png

+ 48 - 0
UAS_BARCODEIO/BaseForm.Designer.cs

@@ -0,0 +1,48 @@
+namespace UAS_BARCODEIO
+{
+    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(false);
+
+        }
+
+        #endregion
+    }
+}

+ 37 - 0
UAS_BARCODEIO/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_BARCODEIO
+{
+    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_BARCODEIO/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>

+ 1464 - 0
UAS_BARCODEIO/BaseUtil.cs

@@ -0,0 +1,1464 @@
+using Microsoft.Win32;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Diagnostics;
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Net.Sockets;
+using System.Reflection;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading;
+using System.Windows.Forms;
+using System.Xml;
+using static System.Windows.Forms.Control;
+
+namespace UAS_BARCODEIO
+{
+    class BaseUtil
+    {
+
+        /// <summary>
+        ///  检测TCP连接是否存在还是已经中断
+        /// </summary>
+        /// <param name="c"></param>
+        /// <returns></returns>
+        public static bool IsOnline(TcpClient c)
+        {
+            return !((c.Client.Poll(1000, SelectMode.SelectRead) && (c.Client.Available == 0)) || !c.Client.Connected);
+        }
+
+        public static Control GetControl(Control ctl,string Name) {
+            if (ctl.Name == Name)
+                return ctl;
+            else
+               return GetControl(ctl.Parent, Name);
+        }
+
+        public static string DToAny(double DB, int Type)
+        {
+            string H = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+            long D;
+            double B;
+            string tempD = "", tempB = "";
+            D = (long)DB;
+            B = DB - D;
+            if (D == 0)
+            {
+                tempD = "0";
+            }
+            while (D != 0)
+            {
+                tempD = H[(((int)D % Type))] + tempD;
+                D = D / Type;
+            }
+            for (int i = 0; i < 7; i++)
+            {
+                if (B == 0)
+                {
+                    break;
+                }
+                tempB += H[((int)(B * Type))];
+                B = B * Type - (int)(B * Type);
+            }
+            if (tempB == "")
+            {
+                return tempD;
+            }
+            else
+            {
+                return tempD + "." + tempB;
+            }
+        }
+
+
+        /// <summary>
+        /// 通过DataTable的ColumnName和Caption来拼接一条语句
+        /// </summary>
+        /// <param name=""></param>
+        /// <returns></returns>
+        public static string GetGridViewSelectContent(DataGridView d)
+        {
+            StringBuilder selectConetnt = new StringBuilder();
+            DataTable dt = (DataTable)d.DataSource;
+            if (dt == null)
+            {
+                foreach (DataGridViewColumn dc in d.Columns)
+                {
+                    if (dc.DataPropertyName != "" && dc.DataPropertyName != null)
+                    {
+                        selectConetnt.Append(dc.Name + " as " + dc.Name + ",");
+                    }
+                }
+            }
+            else
+            {
+                foreach (DataColumn dc in dt.Columns)
+                {
+                    selectConetnt.Append(dc.Caption + " as " + dc.ColumnName + ",");
+                }
+            }
+            return selectConetnt.Remove(selectConetnt.Length - 1, 1).ToString();
+        }
+
+        /// <summary>
+        /// 禁止DataGirdView排序
+        /// </summary>
+        /// <param name="Dgv"></param>
+        public static void DataGridViewNotSort(DataGridView Dgv)
+        {
+            foreach (DataGridViewColumn item in Dgv.Columns)
+                item.SortMode = DataGridViewColumnSortMode.NotSortable;
+        }
+
+        public static string GetLocalIP()
+        {
+            try
+            {
+                string HostName = Dns.GetHostName(); //得到主机名  
+                IPHostEntry IpEntry = Dns.GetHostEntry(HostName);
+                for (int i = 0; i < IpEntry.AddressList.Length; i++)
+                {
+                    //从IP地址列表中筛选出IPv4类型的IP地址  
+                    //AddressFamily.InterNetwork表示此IP为IPv4,  
+                    //AddressFamily.InterNetworkV6表示此地址为IPv6类型  
+                    if (IpEntry.AddressList[i].AddressFamily == AddressFamily.InterNetwork)
+                    {
+                        return IpEntry.AddressList[i].ToString();
+                    }
+                }
+                return "";
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show("获取本机IP出错:" + ex.Message);
+                return "";
+            }
+        }
+
+        /// <summary>
+        /// 通过字段和其展示的中文值获取查询的内容
+        /// </summary>
+        /// <param name="field"></param>
+        /// <param name="cnfield"></param>
+        /// <returns></returns>
+        public static string GetSelectContentByStringArray(string[] field, string[] cnfield)
+        {
+            StringBuilder sb = new StringBuilder();
+            for (int i = 0; i < field.Length; i++)
+            {
+                sb.Append(field[i] + " as " + cnfield[i] + ",");
+            }
+            //去掉多余的逗号
+            sb.Remove(sb.Length - 1, 1);
+            return sb.ToString();
+        }
+
+
+        static int SortByIndex(Control A, Control B)
+        {
+            return A.TabIndex.CompareTo(B.TabIndex);
+        }
+
+        public static bool CheckBarTenderEnable()
+        {
+            var reg = new string[] {
+                @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall",
+                @"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
+            };
+            string tempType = null;
+            int softNum = 0;//所有已经安装的程序数量
+            RegistryKey currentKey = null;
+            var ls = new List<Dictionary<string, string>>();
+
+            foreach (var item222 in reg)
+            {
+                object displayName = null, uninstallString = null, installLocation = null, releaseType = null;
+                RegistryKey pregkey = Registry.LocalMachine.OpenSubKey(item222);//获取指定路径下的键 
+                foreach (string item in pregkey.GetSubKeyNames())               //循环所有子键
+                {
+                    currentKey = pregkey.OpenSubKey(item);
+                    displayName = currentKey.GetValue("DisplayName");           //获取显示名称
+                    installLocation = currentKey.GetValue("InstallLocation");   //获取安装路径
+                    uninstallString = currentKey.GetValue("UninstallString");   //获取卸载字符串路径
+                    releaseType = currentKey.GetValue("ReleaseType");           //发行类型,值是Security Update为安全更新,Update为更新
+                    bool isSecurityUpdate = false;
+                    if (releaseType != null)
+                    {
+                        tempType = releaseType.ToString();
+                        if (tempType == "Security Update" || tempType == "Update")
+                        {
+                            isSecurityUpdate = true;
+                        }
+                    }
+                    if (!isSecurityUpdate && displayName != null && uninstallString != null)
+                    {
+                        softNum++;
+                        if (displayName.ToString() == "BarTender 10.1")
+                        {
+                            return true;
+                        }
+                    }
+                }
+            }
+            return false;
+        }
+
+
+        /// <summary>
+        ///  传入控件的集合和DataTable,通过判断控件的名称和数据源的列的描述来匹配,支持单层的GroupBox和Panel
+        /// </summary>
+        /// <param name="collection"></param>
+        /// <param name="dt"></param>
+        public static void SetFormValue(ControlCollection collection, DataTable dt)
+        {
+            List<Control> ctl = new List<Control>();
+            //将控件按照索引排序
+            for (int i = 0; i < collection.Count; i++)
+            {
+                for (int j = 0; j < ctl.Count; j++)
+                {
+                    if (!ctl.Contains(collection[i]))
+                    {
+
+                        if (collection[i].TabIndex > ctl[j].TabIndex)
+                        {
+                            ctl.Add(collection[i]);
+                            break;
+                        }
+                        else
+                        {
+                            ctl.Insert(j, collection[i]);
+                            break;
+                        }
+                    }
+                }
+                if (ctl.Count == 0)
+                {
+                    ctl.Add(collection[i]);
+                }
+            }
+            ctl.Sort(SortByIndex);
+            //DataTable存在数据才进行赋值操作
+            if (dt.Rows.Count > 0)
+            {
+                for (int i = 0; i < ctl.Count; i++)
+                {
+                    //如果含有子控件则进行递归调用
+                    if (ctl[i].Controls.Count > 0)
+                        SetFormValue(ctl[i].Controls, dt);
+                    string controlName = ctl[i].Name;
+                    string controlsTag = ctl[i].Tag == null ? "" : ctl[i].Tag.ToString();
+                    //默认给TextBox和Label赋值
+                    if (ctl[i] is TextBox || ctl[i] is Label || ctl[i] is SearchTextBox || ctl[i] is EnterTextBox  || ctl[i] is NumericUpDown  || ctl[i] is RichTextBox)
+                    {
+                        for (int j = 0; j < dt.Columns.Count; j++)
+                        {
+                            if (controlName.ToUpper() == dt.Columns[j].Caption.ToUpper() || controlsTag.ToUpper() == dt.Columns[j].Caption.ToUpper())
+                            {
+                                //字段含有Status内容的才进行转换
+                                if (controlName.ToUpper().Contains("STATUS") || controlsTag.ToUpper().Contains("STATUS"))
+                                {
+                                    //对审批状态进行判断
+                                    switch (dt.Rows[0][j].ToString().ToUpper())
+                                    {
+                                        case "ENTERING":
+                                            ctl[i].Text = "在录入";
+                                            break;
+                                        case "UNAPPROVED":
+                                            ctl[i].Text = "未批准";
+                                            break;
+                                        case "COMMITED":
+                                            ctl[i].Text = "已提交";
+                                            break;
+                                        case "APPROVE":
+                                            ctl[i].Text = "已批准";
+                                            break;
+                                        case "AUDITED":
+                                            ctl[i].Text = "已审核";
+                                            break;
+                                        case "STARTED":
+                                            ctl[i].Text = "已下放";
+                                            break;
+                                        case "UNCHECK":
+                                            ctl[i].Text = "待检验";
+                                            break;
+                                        case "CHECKING":
+                                            ctl[i].Text = "检验中";
+                                            break;
+                                        default:
+                                            ctl[i].Text = dt.Rows[0][j].ToString();
+                                            break;
+                                    }
+                                }
+                                else
+                                    ctl[i].Text = dt.Rows[0][j].ToString();
+                            }
+                        }
+                    }
+                    //对封装在GroupBox的和Panel的控件进行批量赋值
+                    if (ctl[i] is GroupBox || ctl[i] is Panel)
+                    {
+                        for (int j = 0; j < ctl[i].Controls.Count; j++)
+                        {
+                            controlName = ctl[i].Controls[j].Name;
+                            if (ctl[i].Controls[j] is TextBox || ctl[i].Controls[j] is Label || ctl[i].Controls[j] is SearchTextBox )
+                            {
+                                for (int k = 0; k < dt.Columns.Count; k++)
+                                {
+                                    if (controlName.ToUpper() == dt.Columns[k].Caption.ToUpper())
+                                    {
+                                        ctl[i].Controls[j].Text = dt.Rows[0][k].ToString();
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            //如果没有记录的话,将dt中含有的列的对应值设置为空
+            else
+            {
+                for (int i = 0; i < ctl.Count; i++)
+                {
+                    if (ctl[i] is TextBox || ctl[i] is Label || ctl[i] is SearchTextBox)
+                    {
+                        for (int j = 0; j < dt.Columns.Count; j++)
+                        {
+                            if (ctl[i].Name.ToUpper() == dt.Columns[j].Caption.ToUpper())
+                            {
+                                ctl[i].Text = "";
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        /// <summary>
+        /// 移除重复行
+        /// </summary>
+        /// <param name="dt"></param>
+        /// <param name="field"></param>
+        /// <returns></returns>
+        public static DataTable DeleteSameRow(DataTable dt, string field)
+        {
+            ArrayList indexList = new ArrayList();
+            // 找出待删除的行索引   
+            for (int i = 0; i < dt.Rows.Count - 1; i++)
+            {
+                if (!IsContain(indexList, i))
+                {
+                    for (int j = i + 1; j < dt.Rows.Count; j++)
+                    {
+                        if (dt.Rows[i][field].ToString() == dt.Rows[j][field].ToString())
+                        {
+                            indexList.Add(j);
+                        }
+                    }
+                }
+            }
+            indexList.Sort();
+            // 排序
+            for (int i = indexList.Count - 1; i >= 0; i--)// 根据待删除索引列表删除行  
+            {
+                int index = Convert.ToInt32(indexList[i]);
+                dt.Rows.RemoveAt(index);
+            }
+            return dt;
+        }
+
+        /// <summary>   
+        /// 判断数组中是否存在   
+        /// </summary>   
+        /// <param name="indexList">数组</param>   
+        /// <param name="index">索引</param>   
+        /// <returns></returns>   
+        public static bool IsContain(ArrayList indexList, int index)
+        {
+            for (int i = 0; i < indexList.Count; i++)
+            {
+                int tempIndex = Convert.ToInt32(indexList[i]);
+                if (tempIndex == index)
+                {
+                    return true;
+                }
+            }
+            return false;
+        }
+        /// <summary>
+        /// 从DGV获取指定的列的数据形式是数组的形式
+        /// </summary>
+        public static ArrayList[] GetColumnDataFromDGV(DataGridView dgv, string[] ColumnName)
+        {
+            ArrayList[] array = new ArrayList[ColumnName.Length];
+            //实例化和查询参数个数一样的ArrayList
+            for (int i = 0; i < ColumnName.Length; i++)
+            {
+                array[i] = new ArrayList();
+            }
+            DataTable dt = (DataTable)dgv.DataSource;
+            //如果第一列是否选框的话
+            if (dgv.Columns[0] is DataGridViewCheckBoxColumn)
+            {
+                for (int i = 0; i < dt.Rows.Count; i++)
+                {
+                    if (dgv.Rows[i].Cells[0].FormattedValue.ToString() == "True")
+                    {
+
+                        for (int j = 0; j < ColumnName.Length; j++)
+                        {
+                            array[j].Add(dt.Rows[i][ColumnName[j]]);
+                        }
+                    }
+                }
+            }
+            //否则直接获取全部的数据
+            else
+            {
+                for (int i = 0; i < dgv.RowCount; i++)
+                {
+                    for (int j = 0; j < ColumnName.Length; j++)
+                    {
+                        array[j].Add(dt.Rows[i][ColumnName[j]]);
+                    }
+                }
+            }
+            return array;
+        }
+
+        /// <summary>
+        /// 通过DataGridView和需要隐藏的字段的数组来对字段进行隐藏
+        /// </summary>
+        /// <param name="dgv"></param>
+        /// <param name="field"></param>
+        public static void HideField(DataGridView dgv, string[] field)
+        {
+            DataTable dt = (DataTable)dgv.DataSource;
+            foreach (DataColumn dc in dt.Columns)
+            {
+                foreach (string s in field)
+                {
+                    if (dc.Caption == s)
+                        dgv.Columns[dc.ColumnName].Visible = false;
+                }
+            }
+        }
+
+        
+
+        /// <summary>
+        /// 通过查询的内容获取到字段的描述
+        /// </summary>
+        /// <param name="field"></param>
+        /// <returns></returns>
+        public static string[] GetCaptionFromField(string field)
+        {
+            string[] caption = field.Split(',');
+            for (int i = 0; i < caption.Length; i++)
+            {
+                caption[i] = caption[i].Substring(0, caption[i].LastIndexOf("as")).Trim();
+            }
+            return caption;
+        }
+
+        /// <summary>
+        /// 通过查询的语句获取查询的字段
+        /// </summary>
+        /// <param name="field"></param>
+        /// <returns></returns>
+        public static string[] GetField(string field)
+        {
+            string[] fields = field.Split(',');
+            for (int i = 0; i < fields.Length; i++)
+            {
+                fields[i] = fields[i].Substring(fields[i].LastIndexOf("as") + 2, fields[i].Length - fields[i].LastIndexOf("as") - 2).Trim();
+            }
+            return fields;
+        }
+
+        /// <summary>
+        /// 通过描述取DataTable的列名,主要用于从配置中取数据
+        /// </summary>
+        /// <param name="dt"></param>
+        /// <param name="caption"></param>
+        /// <returns></returns>
+        public static string GetColumnNameByCaption(DataTable dt, string caption)
+        {
+            foreach (DataColumn dc in dt.Columns)
+            {
+                if (dc.Caption.ToLower() == caption)
+                {
+                    return dc.ColumnName;
+                }
+            }
+            return null;
+        }
+
+        //用于封装异常,也可以用于错误的提示
+        public static void ShowError(string errorMessage)
+        {
+            throw new Exception(errorMessage);
+        }
+
+        /// <summary>
+        /// 判断控件的某个事件是否已经绑定了方法
+        /// </summary> 
+        /// <param name="Control1"></param>
+        /// <param name="EventName"></param>
+        /// <returns></returns>
+        public static bool ControlHasEvent(Control Control1, string EventName)
+        {
+            //需要查询的内容
+            BindingFlags myBindingFlags = BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
+            Assembly a = Assembly.GetAssembly(Control1.GetType());
+            Type t = a.GetType(Control1.GetType().FullName, true);
+            //获取控件的事件
+            FieldInfo fi = t.GetField(EventName, myBindingFlags);
+            EventHandlerList ehl = Control1.GetType().GetProperty("Events", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy).GetValue(Control1, null) as EventHandlerList;
+            //判断事件的委托数量是否大于0
+            if (ehl != null)
+            {
+                Delegate d = ehl[fi.GetValue(Control1)];
+                if (d != null && d.GetInvocationList().Length > 0)
+                {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        /// <summary>
+        /// 获取控件的事件列表
+        /// </summary>
+        /// <param name="Control1"></param>
+        /// <returns></returns>
+        public static FieldInfo[] GetControlsEvent(Control Control1)
+        {
+            BindingFlags myBindingFlags = BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
+            Assembly a = Assembly.GetAssembly(Control1.GetType());
+            Type t = a.GetType(Control1.GetType().FullName, true);
+            FieldInfo[] finf = t.GetFields(myBindingFlags);
+            return finf;
+        }
+
+        /// <summary>
+        /// 清除DataTable的结构和数据,清除列结构时需要从最后的一列开始删
+        /// </summary>
+        /// <param name="dt"></param>
+        public static void CleanDataTable(DataTable dt)
+        {
+            for (int i = dt.Columns.Count - 1; i >= 0; i--)
+                dt.Columns.Remove(dt.Columns[i]);
+        }
+
+        /// <summary>
+        /// 往DataTable中添加数据
+        /// </summary>
+        public static void AddDataToDataTable(DataTable dt, params string[] param)
+        {
+            DataRow dr = dt.NewRow();
+            for (int i = 0; i < dt.Columns.Count; i++)
+            {
+                dr[dt.Columns[i].ColumnName] = param[i];
+            }
+        }
+
+        /// <summary>
+        /// 不清除表结构,只清除数据
+        /// </summary>
+        /// <param name="dt"></param>
+        public static void CleanDataTableData(DataTable dt)
+        {
+            for (int i = dt.Rows.Count - 1; i >= 0; i--)
+            {
+                dt.Rows.Remove(dt.Rows[i]);
+            }
+        }
+        /// <summary>
+        /// 获取拼接的字段
+        /// </summary>
+        /// <param name="dt"></param>
+        /// <returns></returns>
+        public static string GetFieldFromDataTable(DataTable dt)
+        {
+            StringBuilder sb = new StringBuilder();
+            foreach (DataColumn dc in dt.Columns)
+            {
+                sb.Append(dc.Caption + ",");
+            }
+            return sb.ToString().Substring(sb.ToString().Length - 1, 1);
+        }
+
+        /// <summary>
+        /// 已经定义好的DataGridView绑定数据,operate是用来添加操作列的
+        /// </summary>
+        /// <param name="dgv"></param>
+        /// <param name="dt"></param>
+        /// <param name="AddOpetateColumn"></param>
+        /// <param name="operate"></param>
+        public static void FillDgvWithDataTable(DataGridView dgv, DataTable dt, params DataGridViewImageColumn[] operate)
+        {
+            dgv.AutoGenerateColumns = false;
+            dgv.DataSource = dt;
+            if (operate.Length > 0)
+            {
+                if (dgv.Columns[operate[0].Name] != null)
+                {
+                    dgv.Columns.Remove(dgv.Columns[operate[0].Name]);
+                }
+                dgv.Columns.Add(operate[0]);
+            }
+            ////纯英文的列不予展示
+            //Regex regEnglish = new Regex("^[A-z]+$");
+            //foreach (DataGridViewColumn dgvc in dgv.Columns)
+            //{
+            //    if (regEnglish.IsMatch(dgvc.HeaderText))
+            //    {
+            //        dgvc.Visible = false;
+            //    }
+            //}
+        }
+
+        /// <summary>
+        /// 清除DataGridView的数据
+        /// </summary>
+        /// <param name="dgv"></param>
+        public static void CleanDGVData(DataGridView dgv)
+        {
+            for (int i = dgv.Rows.Count - 1; i >= 0; i--)
+            {
+                dgv.Rows.RemoveAt(i);
+            }
+            DataTable dt = dgv.DataSource as DataTable;
+            if (dt != null)
+            {
+                dt.AcceptChanges();
+            }
+        }
+
+        public static void CleanForm(Form Form)
+        {
+            for (int i = 0; i < Form.Controls.Count; i++)
+            {
+                if (Form.Controls[i].Controls.Count > 0)
+                {
+                    CleanControls(Form.Controls[i].Controls);
+                }
+                if (Form.Controls[i] is EnterTextBox || Form.Controls[i] is TextBox  || Form.Controls[i] is SearchTextBox)
+                    Form.Controls[i].Text = "";
+                if (Form.Controls[i] is DataGridView)
+                    CleanDGVData((DataGridView)Form.Controls[i]);
+            }
+        }
+
+        public static void CleanControls(ControlCollection collection)
+        {
+            for (int i = 0; i < collection.Count; i++)
+            {
+                if (collection[i].Controls.Count > 0)
+                    CleanControls(collection[i].Controls);
+                if (collection[i] is EnterTextBox || collection[i] is TextBox || collection[i] is SearchTextBox)
+                    collection[i].Text = "";
+                if (collection[i] is DataGridView)
+                    CleanDGVData((DataGridView)collection[i]);
+            }
+        }
+
+        public static void CleanControlsText(params Control[] ctl)
+        {
+            foreach (Control item in ctl)
+                item.Text = "";
+        }
+
+        /// <summary>
+        /// 用于给DGV中的Combox列赋静态值
+        /// </summary>
+        /// <param name="dgvc"></param>
+        /// <param name="displayField"></param>
+        /// <param name="valueField"></param>
+        /// <param name="Value"></param>
+        /// <returns></returns>
+        public static void SetDgvColumnComboxData(DataGridViewComboBoxColumn dgvc, string DataPropertyName, string displayField, string valueField, string[] Value)
+        {
+            DataTable dt = new DataTable();
+            dt.Columns.Add(displayField);
+            dt.Columns.Add(valueField);
+            for (int i = 0; i < Value.Length; i++)
+            {
+                DataGridViewRow row = new DataGridViewRow();
+                dt.Rows.Add(row);
+                dt.Rows[i][displayField] = Value[i].Split('#')[0];
+                dt.Rows[i][valueField] = Value[i].Split('#')[1];
+            }
+            dgvc.DataPropertyName = DataPropertyName;
+            dgvc.DataSource = dt;
+            dgvc.DisplayMember = displayField;
+            dgvc.ValueMember = valueField;
+        }
+
+        /// <summary>
+        /// 用于给DGV中的ComboxCell赋静态值
+        /// </summary>
+        /// <param name="dgvcc"></param>
+        /// <param name="displayField"></param>
+        /// <param name="valueField"></param>
+        /// <param name="Value"></param>
+        public static void SetDGVCellComboxData(DataGridViewComboBoxCell dgvcc, string displayField, string valueField, string[] Value)
+        {
+            DataTable dt = new DataTable();
+            dt.Columns.Add(displayField);
+            dt.Columns.Add(valueField);
+            for (int i = 0; i < Value.Length; i++)
+            {
+                DataRow dr = dt.NewRow();
+                dr[displayField] = Value[i].Split('#')[0];
+                dr[valueField] = Value[i].Split('#')[1];
+                dt.Rows.Add(dr);
+            }
+            dgvcc.DisplayMember = displayField;
+            dgvcc.ValueMember = valueField;
+            dgvcc.DataSource = dt;
+        }
+        /// <summary>
+        /// 获取刷选的SQL语句,传入的是TextBox的Control,传入的SQL不带Where条件
+        /// </summary>
+        /// <param name="SQL"></param>
+        /// <param name="Condition"></param>
+        /// <returns></returns>
+        public static string GetScreenSqlCondition(params Control[] Condition)
+        {
+            string condition = "";
+            //用于统计传入的控件的空值数
+            int EmptyControlCount = 0;
+            for (int i = 0; i < Condition.Length; i++)
+            {
+                //如果Text不为空再进行条件的拼接
+                if (Condition[i].Text != "")
+                {
+                    if (Condition[i] is ComboBox)
+                    {
+                        condition += "(" + Condition[i].Tag + " like " + "'%" + (Condition[i] as ComboBox).SelectedValue + "%' )";
+                    }
+                    else
+                    {
+                        condition += "(" + Condition[i].Tag + " like " + "'%" + Condition[i].Text + "%' )";
+                    }
+                    //如果不是最后要判断之后有没有空值的如果有一个Text的值不为空都需要添加and
+                    //添加了一次And之后跳出循环,因为如果后面多项有值会重复添加and
+                    for (int j = i + 1; j < Condition.Length; j++)
+                    {
+                        if (j < Condition.Length)
+                        {
+                            if (Condition[j].Text != "")
+                            {
+                                condition += " and ";
+                                break;
+                            }
+                        }
+                    }
+                }
+                else
+                {
+                    EmptyControlCount = EmptyControlCount + 1;
+                }
+            }
+            //如果所有的控件传入的都是空值则返回也为空
+            if (EmptyControlCount == Condition.Length)
+                return "";
+            else
+                condition = " where " + condition;
+            return condition;
+        }
+
+        public static void CleanDataGridView(DataGridView dgv)
+        {
+            for (int i = dgv.Columns.Count - 1; i >= 0; i--)
+            {
+                dgv.Columns.RemoveAt(i);
+            }
+        }
+
+        /// <summary>
+        /// 取出SQL中的参数占位符
+        /// </summary>
+        /// <param name="SQL"></param>
+        /// <returns></returns>
+        public static string[] GetParamFromSQL(string SQL)
+        {
+            string[] par = SQL.Split(':');
+            //用来存参数的数组
+            StringBuilder[] addpar = new StringBuilder[par.Length - 1];
+            string[] param = new string[par.Length - 1];
+            for (int i = 0; i < par.Length - 1; i++)
+            {
+                //新建一个char类型的数组用来存储每个字节的变量
+                char[] c = par[i + 1].ToCharArray();
+                addpar[i] = new StringBuilder();
+                for (int j = 0; j < c.Length; j++)
+                {
+                    if (c[j] != ' ' && c[j] != ',' && c[j] != ')')
+                    {
+                        addpar[i].Append(c[j]);
+                    }
+                    else
+                    {
+                        break;
+                    }
+                }
+            }
+
+            for (int i = 0; i < par.Length - 1; i++)
+            {
+                param[i] = addpar[i].ToString();
+            }
+            return param;
+        }
+
+        public static void SetFormCenter(Form form)
+        {
+            form.StartPosition = FormStartPosition.CenterParent;
+        }
+
+        /// <summary>
+        /// 设置DataGridView的指定列可编辑
+        /// </summary>
+        /// <param name="DGV"></param>
+        /// <param name="EditAbleField"></param>
+        public static void SetDataGridViewReadOnly(DataGridView DGV, string[] EditAbleField)
+        {
+            foreach (DataGridViewColumn dc in DGV.Columns)
+            {
+                dc.ReadOnly = true;
+                foreach (string s in EditAbleField)
+                {
+                    if (dc.Name.ToLower() == s.ToLower())
+                    {
+                        DGV.Columns[dc.Name].ReadOnly = false;
+                    }
+                }
+            }
+        }
+
+        //判断带有CheckBox的DGV是否有项目勾选了
+        public static DataTable DGVIfChecked(DataGridView dgv)
+        {
+            int CheckCount = 0;
+            DataTable dt = new DataTable();
+            //第一列是勾选框,排除在循环之外
+            for (int i = 1; i < dgv.Columns.Count; i++)
+            {
+                dt.Columns.Add(dgv.Columns[i].Name);
+            }
+            for (int i = 0; i < dgv.RowCount; i++)
+            {
+                if (dgv.Rows[i].Cells[0].Value != null)
+                {
+                    if (dgv.Rows[i].Cells[0].FormattedValue.ToString() == "True")
+                    {
+                        if (dgv.Rows[i].Tag.ToString() == "SonRow")
+                        {
+                            DataRow dr = dt.NewRow();
+                            for (int j = 1; j < dgv.ColumnCount; j++)
+                            {
+                                dr[dgv.Columns[j].Name] = dgv.Rows[i].Cells[j].FormattedValue;
+                            }
+                            dt.Rows.Add(dr);
+                            CheckCount++;
+                        }
+                    }
+                }
+            }
+            //判断是否勾选了明细
+            if (CheckCount == 0)
+                return null;
+            return dt;
+        }
+
+        public static void GetExpandDGVCheckedRow(DataGridView dgv, DataTable dt, int RowIndex, int DistinctColumnIndex)
+        {
+            //第一列是勾选框,排除在循环之外
+            if (dt.Columns.Count == 0)
+            {
+                for (int i = 0; i < dgv.Columns.Count; i++)
+                    dt.Columns.Add(dgv.Columns[i].Name);
+            }
+            //是展开的子行的数据
+            if (dgv.Rows[RowIndex].Tag != null && dgv.Rows[RowIndex].Tag.ToString() == "SonRow")
+            {
+                DataRow dr = dt.NewRow();
+                DataRow[] datarow = (dt.Select(dgv.Columns[DistinctColumnIndex].Name + " ='" + dgv.Rows[RowIndex].Cells[DistinctColumnIndex].FormattedValue + "'"));
+                //判断值是否存在,存在移除重新添加
+                if (datarow.Length > 0)
+                {
+                    dt.Rows.Remove(datarow[0]);
+                }
+                for (int j = 0; j < dgv.ColumnCount; j++)
+                {
+                    dr[dgv.Columns[j].Name] = dgv.Rows[RowIndex].Cells[j].FormattedValue;
+                }
+                dt.Rows.Add(dr);
+            }
+        }
+
+        /// <summary>
+        /// 设置只允许输入数字
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        public static void NumOnly(object sender, KeyPressEventArgs e)
+        {
+            if (e.KeyChar != '\b')//这是允许输入退格键
+            {
+                if ((e.KeyChar < '0') || (e.KeyChar > '9'))//这是允许输入0-9数字
+                {
+                    e.Handled = true;
+                }
+            }
+        }
+
+        public static string AddField(string[] Fields)
+        {
+            string sql = " ";
+            foreach (string field in Fields)
+                sql += field + ",";
+            return sql.Substring(0, sql.Length - 1);
+        }
+        /// <summary>
+        /// 筛选DataTable
+        /// </summary>
+        /// <param name="dt"></param>
+        /// <param name="condition"></param>
+        /// <returns></returns>
+        public static DataTable filterDataTable(DataTable dt, String condition)
+        {
+            if (dt == null)
+                return new DataTable();
+            //获取筛选条件中的列名,值
+            DataRow[] dataRows = dt.Select(condition);
+            DataTable ndt = dt.Clone();
+            for (int i = 0; i < dataRows.Length; i++)
+            {
+                ndt.Rows.Add(dataRows[i].ItemArray);
+            }
+            return ndt;
+        }
+
+
+        public static void WriteLbl()
+        {
+            //Process[] processes = System.Diagnostics.Process.GetProcessesByName("lppa");
+            //Dictionary<string, int> ProInf = new Dictionary<string, int>();
+            //for (int i = 0; i < processes.Length; i++)
+            //{
+            //    try
+            //    {
+            //        if (processes[i].ProcessName == "lppa")
+            //        {
+            //            ProInf.Add(processes[i].StartTime.ToString(), processes[i].Id);
+            //        }
+            //    }
+            //    catch
+            //    {
+            //    }
+            //}
+            //var temp = ProInf.Keys.Max();
+            //String str = SystemInf.ProcessesID + "|" + ProInf[temp];
+            //FileStream fs = new FileStream(SystemInf.CacheFolder + "lblprocess.txt", FileMode.Append, FileAccess.Write);
+            //StreamWriter sw = new StreamWriter(fs);
+            //sw.WriteLine(str, Encoding.UTF8);
+            //sw.Close();
+            //fs.Close();
+        }
+
+        public static Object GetCacheData(string ParamName)
+        {
+            try
+            {
+                Object o = null;
+                //根据地址读取xml文件
+                XmlDocument doc = new XmlDocument();
+                XmlReaderSettings settings = new XmlReaderSettings { CheckCharacters = false };
+                //忽略文档里面的注释
+                settings.IgnoreComments = true;
+                XmlReader reader = XmlReader.Create(SystemInf.CacheFilePath, settings);
+                doc.Load(reader);
+                //先得到根节点
+                XmlNode rootNode = doc.SelectSingleNode("cacheInfo");
+                //再由根节点去找制定的节点
+                XmlNodeList nodeList = rootNode.ChildNodes;
+                foreach (XmlNode node in nodeList)
+                {
+                    //找到了这个节点名字
+                    if (node.Name == ParamName)
+                    {
+                        //返回节点的内容
+                        switch (((XmlElement)node).GetAttribute("Type"))
+                        {
+                            case "System.String":
+                                o = node.InnerText;
+                                break;
+                            case "System.Int32":
+                                o = int.Parse(node.InnerText);
+                                break;
+                            case "System.Boolean":
+                                o = node.InnerText == "True" ? true : false;
+                                break;
+                            default:
+                                break;
+                        }
+                        break;
+                    }
+                }
+                //关闭reader
+                reader.Close();
+                if (o == null)
+                    return "";
+                else
+                    return o;
+            }
+            catch (Exception e)
+            {
+              
+                return "";
+            }
+        }
+
+        public static void SetCacheData(string ParamName, object Value)
+        {
+            try
+            {
+                //根据地址读取xml文件
+                XmlDocument doc = new XmlDocument();
+                XmlReaderSettings settings = new XmlReaderSettings { CheckCharacters = false };
+                //忽略文档里面的注释
+                settings.IgnoreComments = true;
+                XmlReader reader = XmlReader.Create(SystemInf.CacheFilePath, settings);
+                doc.Load(reader);
+                //先得到根节点
+                XmlNode rootNode = doc.SelectSingleNode("cacheInfo");
+                //再由根节点去找制定的节点
+                XmlNodeList nodeList = rootNode.ChildNodes;
+                bool flag = false;
+                foreach (XmlNode node in nodeList)
+                {
+                    //找到了这个节点名字
+                    if (node.Name == ParamName)
+                    {
+                        //就直接赋值
+                        node.InnerText = Value.ToString();
+                        flag = true;
+                    }
+                }
+                //如果没有该节点,就创建节点保存结果
+                if (!flag)
+                {
+                    //创建节点
+                    XmlElement newNode = doc.CreateElement(ParamName);
+                    XmlAttribute attr = doc.CreateAttribute("Type");
+                    attr.InnerText = Value.GetType().ToString();
+                    newNode.InnerText = Value.ToString();
+                    newNode.SetAttributeNode(attr);
+                    //讲新建的节点挂到根节点上
+                    rootNode.AppendChild(newNode);
+                }
+                //关闭Reader
+                reader.Close();
+                doc.Save(SystemInf.CacheFilePath);
+            }
+            catch (Exception e)
+            {
+             
+            }
+        }
+
+
+        public static bool connectState(string path)
+        {
+            return connectState(path, "vsftpd", "vsftpd");
+        }
+        /// <summary>
+        /// 连接远程共享文件夹
+        /// </summary>
+        /// <param name="path">远程共享文件夹的路径</param>
+        /// <param name="userName">用户名</param>
+        /// <param name="passWord">密码</param>
+        /// <returns></returns>
+        public static bool connectState(string path, string userName, string passWord)
+        {
+            bool Flag = false;
+            Process proc = new Process();
+            try
+            {
+                proc.StartInfo.FileName = "cmd.exe";
+                proc.StartInfo.UseShellExecute = false;
+                proc.StartInfo.RedirectStandardInput = true;
+                proc.StartInfo.RedirectStandardOutput = true;
+                proc.StartInfo.RedirectStandardError = true;
+                proc.StartInfo.CreateNoWindow = true;
+                proc.Start();
+                string dosLine = "net use " + path + " " + passWord + " /user:" + userName;
+                proc.StandardInput.WriteLine(dosLine);
+                proc.StandardInput.WriteLine("exit");
+                while (!proc.HasExited)
+                {
+                    proc.WaitForExit(1);
+                }
+                string errormsg = proc.StandardError.ReadToEnd();
+                proc.StandardError.Close();
+                if (string.IsNullOrEmpty(errormsg))
+                {
+                    Flag = true;
+                }
+                else
+                {
+                    throw new Exception(errormsg);
+                }
+            }
+            catch (Exception ex)
+            {
+             
+            }
+            finally
+            {
+                proc.Close();
+                proc.Dispose();
+            }
+            return Flag;
+        }
+
+        /// <summary>
+        /// 向远程文件夹保存本地内容,或者从远程文件夹下载文件到本地
+        /// </summary>
+        /// <param name="src">要保存的文件的路径,如果保存文件到共享文件夹,这个路径就是本地文件路径如:@"D:\1.avi"</param>
+        /// <param name="dst">保存文件的路径,不含名称及扩展名</param>
+        /// <param name="fileName">保存文件的名称以及扩展名</param>
+        public static void Transport(string src, string dst, string fileName)
+        {
+
+            FileStream inFileStream = new FileStream(src, FileMode.Open);
+            if (!Directory.Exists(dst))
+            {
+                Directory.CreateDirectory(dst);
+            }
+            dst = dst + fileName;
+            FileStream outFileStream = new FileStream(dst, FileMode.OpenOrCreate);
+
+            byte[] buf = new byte[inFileStream.Length];
+
+            int byteCount;
+
+            while ((byteCount = inFileStream.Read(buf, 0, buf.Length)) > 0)
+            {
+
+                outFileStream.Write(buf, 0, byteCount);
+
+            }
+
+            inFileStream.Flush();
+
+            inFileStream.Close();
+
+            outFileStream.Flush();
+
+            outFileStream.Close();
+
+        }
+
+
+
+        /// <summary>
+        /// 取两个DataTable的交集,删除重复数据
+        /// </summary>
+        /// <param name="sourceDataTable"></param>
+        /// <param name="targetDataTable"></param>
+        /// <param name="primaryKey"></param>
+        /// <returns></returns>
+        public static DataTable DataTableMerge(DataTable sourceDataTable, DataTable targetDataTable, string primaryKey)
+        {
+            if (sourceDataTable != null || targetDataTable != null || !sourceDataTable.Equals(targetDataTable))
+            {
+                sourceDataTable.PrimaryKey = new DataColumn[] { sourceDataTable.Columns[primaryKey] };
+                DataTable dt = targetDataTable.Copy();
+                foreach (DataRow tRow in dt.Rows)
+                {
+                    try
+                    {
+                        //拒绝自上次调用 System.Data.DataRow.AcceptChanges() 以来对该行进行的所有更改。
+                        //因为行状态为DataRowState.Deleted时无法访问ItemArray的值
+                        tRow.RejectChanges();
+                        //在加载数据时关闭通知、索引维护和约束。
+                        sourceDataTable.BeginLoadData();
+                        //查找和更新特定行。如果找不到任何匹配行,则使用给定值创建新行。
+                        DataRow temp = sourceDataTable.LoadDataRow(tRow.ItemArray, false);
+                        sourceDataTable.EndLoadData();
+                        sourceDataTable.Rows.Remove(temp);
+                    }
+                    catch
+                    {
+                    }
+                }
+            }
+            sourceDataTable.AcceptChanges();
+            return sourceDataTable;
+        }
+
+        //将DataRow[] 转换成DataTable
+        public static DataTable ToDataTable(DataRow[] rows)
+        {
+            if (rows == null || rows.Length == 0) return new DataTable();
+            DataTable tmp = rows[0].Table.Clone();  // 复制DataRow的表结构  
+            foreach (DataRow row in rows)
+                tmp.Rows.Add(row.ItemArray);  // 将DataRow添加到DataTable中  
+            return tmp;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="form"></param>
+        /// <param name="InOrOut">True表示打开窗体,False表示关闭窗体</param>
+        public static void FormStepInOrOut(Form form, bool InOrOut)
+        {
+            if (InOrOut)
+            {
+                for (int iNum = 0; iNum <= 10; iNum++)
+                {
+                    //变更窗体的不透明度
+                    form.Opacity = 0.1 * iNum;
+                    //暂停
+                    System.Threading.Thread.Sleep(20);
+                }
+            }
+            else
+            {
+                for (int iNum = 10; iNum >= 0; iNum--)
+                {
+                    //变更窗体的不透明度
+                    form.Opacity = 0.1 * iNum;
+                    //暂停
+                    System.Threading.Thread.Sleep(20);
+                }
+            }
+        }
+
+        public static string GetDataFromDevice(string Param)
+        {
+            String cmd = System.Windows.Forms.Application.StartupPath + "\\adb.exe";
+            Process p = new Process();
+            p.StartInfo = new System.Diagnostics.ProcessStartInfo();
+            p.StartInfo.FileName = cmd;//设定程序名
+            p.StartInfo.UseShellExecute = false; //关闭shell的使用
+            p.StartInfo.RedirectStandardInput = true; //重定向标准输入
+            p.StartInfo.RedirectStandardOutput = true; //重定向标准输出
+            p.StartInfo.RedirectStandardError = true; //重定向错误输出
+            p.StartInfo.CreateNoWindow = true;//设置不显示窗口
+            string value = "";
+            switch (Param)
+            {
+                case "IMEI":
+                    p.StartInfo.Arguments = " shell \n su \n service call iphonesubinfo 1";
+                    p.Start();
+                    try
+                    {
+                        p.StandardInput.Close();
+                        string IMEI = p.StandardOutput.ReadToEnd();
+                        foreach (Match item in Regex.Matches(IMEI, "'\\S+"))
+                        {
+                            value += item.Value.Replace(".", "").Replace("'", "").Replace(")", "");
+                        }
+                        p.Close();
+                    }
+                    catch (Exception ex)
+                    {
+                        Console.WriteLine(ex.Message);
+                    }
+                    break;
+                case "POWER":
+                    p.StartInfo.Arguments = "  shell dumpsys battery";
+                    p.Start();
+                    value = Regex.Match(p.StandardOutput.ReadToEnd().ToUpper(), "LEVEL: \\d+").Value.Replace("LEVEL: ", "");
+                    p.Close();
+                    break;
+                case "MAC":
+                    p.StartInfo.Arguments = "  shell cat /sys/class/net/wlan0/address";
+                    p.Start();
+                    value = p.StandardOutput.ReadToEnd().Replace(":", "").ToUpper();
+                    p.Close();
+                    break;
+                case "BT":
+                    p.StartInfo.Arguments = "  shell  settings get secure bluetooth_address";
+                    p.Start();
+                    value = p.StandardOutput.ReadToEnd().Replace(":", "").ToUpper();
+                    p.Close();
+                    break;
+                case "SPEC":
+                    p.StartInfo.Arguments = "  -d shell getprop ro.product.model";
+                    p.Start();
+                    value = p.StandardOutput.ReadToEnd().Replace(":", "").ToUpper();
+                    p.Close();
+                    break;
+                case "VERSION":
+                    p.StartInfo.Arguments = "  shell getprop ro.build.display.id";
+                    p.Start();
+                    value = p.StandardOutput.ReadToEnd().Replace(":", "").ToUpper();
+                    p.Close();
+                    break;
+                case "CUS_VERSION":
+                    p.StartInfo.Arguments = "  shell getprop ro.elinktek.version.release";
+                    p.Start();
+                    value = p.StandardOutput.ReadToEnd().Replace(":", "").ToUpper();
+                    p.Close();
+                    break;
+                case "SN":
+                    p.StartInfo.Arguments = " shell getprop ro.serialno";
+                    p.Start();
+                    value = p.StandardOutput.ReadToEnd().Replace(":", "").ToUpper();
+                    p.Close();
+                    break;
+                case "RESET":
+                    p.StartInfo.Arguments = " reboot recovery";
+                    p.Start();
+                    value = p.StandardOutput.ReadToEnd().Replace(":", "").ToUpper();
+                    p.Close();
+                    break;
+                default:
+                    break;
+            }
+            Console.WriteLine(Param + " : " + value.Trim());
+            return value.Trim();
+        }
+
+        public static string GetDataFromDevice(string Param, string Path)
+        {
+            String cmd = System.Windows.Forms.Application.StartupPath + "\\adb.exe";
+            Process p = new Process();
+            p.StartInfo = new System.Diagnostics.ProcessStartInfo();
+            p.StartInfo.FileName = cmd;//设定程序名
+            p.StartInfo.UseShellExecute = false; //关闭shell的使用
+            p.StartInfo.RedirectStandardInput = true; //重定向标准输入
+            p.StartInfo.RedirectStandardOutput = true; //重定向标准输出
+            p.StartInfo.RedirectStandardError = true; //重定向错误输出
+            p.StartInfo.CreateNoWindow = true;//设置不显示窗口
+            string value = "";
+            switch (Param)
+            {
+                case "GETFILE":
+                    p.StartInfo.Arguments = " pull " + Path;
+                    p.Start();
+                    value = p.StandardOutput.ReadToEnd().Replace(":", "").ToUpper();
+                    p.Close();
+                    break;
+                case "INSTALL":
+                    p.StartInfo.Arguments = " install  " + Path;
+                    p.Start();
+                    value = p.StandardOutput.ReadToEnd().Replace(":", "").ToUpper();
+                    p.Close();
+                    break;
+                default:
+                    break;
+            }
+            Console.WriteLine(Param + " : " + value.Trim());
+            return value.Trim();
+        }
+
+        public static void GetWriteInfo(string FilePath, out string BARCODE, out string MAC, out string BT, out string IMEI0, out string IMEI1)
+        {
+            MAC = "";
+            BT = "";
+            IMEI0 = "";
+            IMEI1 = "";
+            BARCODE = "";
+            string txt = "";
+
+            while (true)
+            {
+                try
+                {
+                    StreamReader sr = new StreamReader(FilePath);
+                    while (!sr.EndOfStream)
+                    {
+                        string str = sr.ReadLine().ToUpper();
+                        txt += str + "\n";
+                    }
+                    IMEI0 = Regex.Match(txt, "IMEI[0] = \\S[0-9]{15}\\S").Value.Replace("IMEI[", "").Replace("]", "");
+                    IMEI1 = Regex.Match(txt, "IMEI[1] = \\S[0-9]{15}\\S").Value.Replace("IMEI[", "").Replace("]", "");
+                    MAC = Regex.Match(txt, "WIFIADDRESS = \\[\\S+\\]").Value.Replace("WIFIADDRESS = [", "").Replace("]", "").Replace(":", "");
+                    BT = Regex.Match(txt, "BTADDRESS = \\[\\S+\\]").Value.Replace("BTADDRESS = [", "").Replace("]", "").Replace(":", "");
+                    BARCODE = Regex.Match(txt, "BARCODE = \\[\\S+\\]").Value.Replace("BARCODE = [", "").Replace("]", "").Replace(":", "");
+
+                    if (BARCODE == "")
+                    {
+                        IMEI0 = Regex.Match(txt, "IMEI1\\s+'\\d+'").Value.Replace("IMEI1", "").Replace("'", "").Trim();
+                        MAC = Regex.Match(txt, "WIFI\\s+'\\S+'").Value.Replace("WIFI", "").Replace("'", "").Trim();
+                        BT = Regex.Match(txt, "BT\\s+'\\S+'").Value.Replace("BT", "").Replace("'", "").Trim();
+                        BARCODE = Regex.Match(txt, "SN1\\s+'\\S+'").Value.Replace("SN1", "").Replace("'", "").Trim();
+                    }
+                    break;
+                }
+                catch (Exception e)
+                {
+                    Console.WriteLine(e.Message);
+                    Thread.Sleep(1000);
+                }
+            }
+        }
+
+        public static bool OpenCSVFile(ref DataTable mycsvdt, string filepath)
+        {
+            string strpath = filepath; //csv文件的路径
+            try
+            {
+                int intColCount = 0;
+                bool blnFlag = true;
+
+                DataColumn mydc;
+                DataRow mydr;
+
+                string strline;
+                string[] aryline;
+                StreamReader mysr = new StreamReader(strpath, System.Text.Encoding.UTF8);
+
+                while ((strline = mysr.ReadLine()) != null)
+                {
+                    aryline = strline.Split(new char[] { ',' });
+
+                    //给datatable加上列名
+                    if (blnFlag)
+                    {
+                        blnFlag = false;
+                        intColCount = aryline.Length;
+                        int col = 0;
+                        for (int i = 0; i < aryline.Length; i++)
+                        {
+                            col = i + 1;
+                            mydc = new DataColumn(col.ToString());
+                            mycsvdt.Columns.Add(mydc);
+                        }
+                    }
+
+                    //填充数据并加入到datatable中
+                    mydr = mycsvdt.NewRow();
+                    for (int i = 0; i < aryline.Length; i++)
+                    {
+                        mydr[i] = aryline[i];
+                    }
+                    if (mydr[0].ToString() != "")
+                        mycsvdt.Rows.Add(mydr);
+                }
+                mysr.Close();
+                return true;
+            }
+            catch (Exception ex)
+            {
+                Console.WriteLine(ex.Message + ex.StackTrace);
+                return false;
+            }
+        }
+    }
+}

+ 43 - 0
UAS_BARCODEIO/ClickPicBox.Designer.cs

@@ -0,0 +1,43 @@
+namespace UAS_BARCODEIO
+{
+    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(false);
+
+        }
+
+        #endregion
+    }
+}

+ 43 - 0
UAS_BARCODEIO/ClickPicBox.cs

@@ -0,0 +1,43 @@
+using System.Windows.Forms;
+
+namespace UAS_BARCODEIO
+{
+    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_BARCODEIO/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>

+ 1081 - 0
UAS_BARCODEIO/DataHelper.cs

@@ -0,0 +1,1081 @@
+using Oracle.ManagedDataAccess.Client;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Text;
+
+namespace UAS_BARCODEIO
+{
+    public class DataHelper
+    {
+        //系统默认的的连接字符串
+        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=SENGWILL;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.81.208)(PORT=11598)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        //用户选择的数据库的连接字符串
+        public static string DBConnectionString= "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=SENGWILL;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.81.208)(PORT=11598)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        public static OracleConnection connection = null;
+        OracleCommand command = null;
+        int ReconnectTime = 0;
+        /// <summary>
+        /// 执行构造函数的时候打开数据库的链接
+        /// </summary>
+        public DataHelper()
+        {
+            try
+            {
+                //如果选择的是默认数据则直接用配置文件的信息连接,否则选择数据库的账套信息
+                if (DBConnectionString == null || DBConnectionString == ConnectionStrings)
+                    connection = new OracleConnection(ConnectionStrings);
+                else
+                    connection = new OracleConnection(DBConnectionString);
+                connection.Open();
+            }
+            catch (Exception e) {
+
+            }
+        }
+
+        /// <summary>
+        /// 根据表名获取该表字段数据类型
+        /// </summary>
+        public DataTable GetColumnDataType(string TableName)
+        {
+            DataTable dt = new DataTable();
+            command = new OracleCommand("select Column_Name,Data_Type from cols where TABLE_name=upper('" + TableName + "')", connection);
+            Reconnect(command);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.Fill(dt);
+            ad.Dispose();
+            command.Dispose();
+            return dt;
+        }
+
+        /// <summary>
+        /// 获取第一行第一列的信息
+        /// </summary>
+        public object getFieldDataByCondition(string TableName, string Field, string Condition)
+        {
+            DataTable dt = new DataTable();
+            string sql = "select " + Field + " from " + TableName + " where " + Condition;
+            command = new OracleCommand(sql, connection);
+            Reconnect(command);
+            OracleDataAdapter ad = new OracleDataAdapter();
+            ad.SelectCommand = command;
+            try
+            {
+                ad.Fill(dt);
+            }
+            catch (Exception)
+            {
+                connection = new OracleConnection(DBConnectionString);
+                connection.Open();
+                command = new OracleCommand(sql, connection);
+                ad = new OracleDataAdapter();
+                ad.SelectCommand = command;
+                ad.Fill(dt);
+            }
+            ad.Dispose();
+            command.Dispose();
+            if (dt.Rows.Count > 0)
+            {
+                return dt.Rows[0][0];
+            }
+            else
+            {
+                return "";
+            }
+        }
+
+        /// <summary>
+        /// 执行打印的SQL
+        /// </summary>
+        /// <param name="SQL">SQL语句</param>
+        /// <param name="Parameters">动态添加的参数,主要根据条码枪扫描获取</param>
+        /// <returns></returns>
+        public object ExecutePrintSQL(string SQL, params string[] Parameters)
+        {
+            //按照?拆分数据,然后以:Param替换问号,同时添加参数
+            string[] Param = SQL.Split('?');
+            int ParamNum = Param.Length - 1;
+            //条码打印必然存在需要维护的参数
+            if (ParamNum > 0)
+            {
+                StringBuilder sb = new StringBuilder();
+                for (int i = 0; i < ParamNum; i++)
+                {
+                    sb.Append(Param[i] + ":Param" + i);
+                }
+                command = new OracleCommand(sb.ToString(), connection);
+
+                for (int i = 0; i < ParamNum; i++)
+                {
+                    command.Parameters.Add("Param" + i, OracleDbType.Varchar2, Parameters[i], ParameterDirection.Input);
+                }
+                OracleDataAdapter ad = new OracleDataAdapter(command);
+                DataTable dt = new DataTable();
+                ad.Fill(dt);
+                ad.Dispose();
+                command.Dispose();
+                return dt;
+            }
+            return "参数错误,请检查SQL语句";
+        }
+
+        /// <summary>
+        /// 获取指定表的记录的条数 ,带条件
+        /// </summary>
+        /// <returns></returns>
+        public int getRowCount(string TableName, string Condition)
+        {
+            DataTable dt = new DataTable();
+            string sql = "select count(1) from " + TableName + " where " + Condition;
+            command = new OracleCommand(sql, connection);
+            Reconnect(command);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.Fill(dt);
+            ad.Dispose();
+            command.Dispose();
+            return int.Parse(dt.Rows[0][0].ToString());
+        }
+
+        /// <summary>
+        /// 获取指定表的记录的条数 ,不带条件
+        /// </summary>
+        /// <param name="TableName"></param>
+        /// <returns></returns>
+        public int getRowCount(string TableName)
+        {
+            DataTable dt = new DataTable();
+            string sql = "select count(1) from " + TableName;
+            command = new OracleCommand(sql, connection);
+            Reconnect(command);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+
+            ad.Fill(dt);
+            ad.Dispose();
+            command.Dispose();
+            return int.Parse(dt.Rows[0][0].ToString());
+        }
+
+        /// <summary>
+        /// 通过表名和获取单行的记录
+        /// </summary>
+        public DataTable getFieldsDataByCondition(string TableName, string[] Fields, string Condition)
+        {
+            DataTable dt = new DataTable();
+            string sql = "select ";
+            sql += AddField(Fields);
+            sql += " from " + TableName + " where " + Condition + " and rownum=1";
+            command = new OracleCommand(sql, connection);
+            Reconnect(command);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            try
+            {
+                ad.Fill(dt);
+            }
+            catch (Exception)
+            {
+                connection = new OracleConnection(DBConnectionString);
+                connection.Open();
+                command = new OracleCommand(sql, connection);
+                ad = new OracleDataAdapter();
+                ad.SelectCommand = command;
+                ad.Fill(dt);
+            }
+            ad.Dispose();
+            command.Dispose();
+            return dt;
+        }
+
+        /// <summary>
+        /// 将DataTable导入到指定的表中
+        /// </summary>
+        /// <param name="DataTable"></param>
+        /// <param name="TableName"></param>
+        public void InsertDataTable(DataTable DataTable, string TableName)
+        {
+            for (int i = 0; i < DataTable.Rows.Count; i++)
+            {
+                for (int j = 0; j < DataTable.Columns.Count; j++)
+                {
+
+                }
+            }
+        }
+
+        /// <summary>
+        /// 按分页获取数据
+        /// </summary>
+        /// <param name="TableName">表名</param>
+        /// <param name="Fields">查询字段</param>
+        /// <param name="CurrentPage">当前页面</param>
+        /// <param name="PageSize">页面展示条数</param>
+        /// <param name="Caller"></param>
+        /// <returns></returns>
+        // SELECT * FROM (SELECT   A.*  FROM (SELECT* FROM datalist) A WHERE ROWNUM <= 50) WHERE ROWNUM >= 21
+        public DataTable getFieldsDatasByPageing(string TableName, string Fields, int CurrentPage, int PageSize, string Caller, params string[] condition)
+        {
+            DataTable dt = new DataTable();
+            StringBuilder sql = new StringBuilder();
+            //先查询出配置出去的列
+            //获取查询的列
+            string[] caption = GetCaptionFromField(Fields);
+            //获取对应列的描述
+            string[] field = GetField(Fields);
+            sql.Append(" select * from (select RowNum RN, A.* from (select ");
+            sql.Append(AddField(caption));
+            if (condition.Length > 0)
+            {
+                if (condition[0] != null && condition[0].Trim() != "")
+                    sql.Append(" from " + TableName + " where " + condition[0] + " ) A where ROWNUM <=" + CurrentPage * PageSize + ") where RN>" + (CurrentPage - 1) * PageSize);
+                else
+                    sql.Append(" from " + TableName + ") A where ROWNUM <= " + CurrentPage * PageSize + ") where RN> " + (CurrentPage - 1) * PageSize);
+            }
+            command = new OracleCommand(sql.ToString(), connection);
+            Reconnect(command);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.Fill(dt);
+            ad.Dispose();
+            command.Dispose();
+            dt.Columns.RemoveAt(0);
+            foreach (DataColumn dc in dt.Columns)
+            {
+                dc.ColumnName = field[dt.Columns.IndexOf(dc)];
+                dc.Caption = caption[dt.Columns.IndexOf(dc)];
+            }
+            return dt;
+        }
+
+        /// <summary>
+        /// 通过表名,字段和条件获取DataTable类型的数据
+        /// </summary>
+        public DataTable getFieldsDatasByCondition(string TableName, string[] Fields, string Condition)
+        {
+            DataTable dt = new DataTable();
+            string sql = "select ";
+            sql += AddField(Fields);
+            sql += " from " + TableName + " where " + Condition;
+
+            command = new OracleCommand(sql, connection);
+            Reconnect(command);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            try
+            {
+                ad.Fill(dt);
+            }
+            catch (Exception)
+            {
+                connection = new OracleConnection(DBConnectionString);
+                connection.Open();
+                command = new OracleCommand(sql, connection);
+                ad = new OracleDataAdapter();
+                ad.SelectCommand = command;
+                ad.Fill(dt);
+            }
+            ad.Dispose();
+            command.Dispose();
+            return dt;
+        }
+
+        /// <summary>
+        /// 通过表名,字段获取DataTable类型的数据
+        /// </summary>
+        public DataTable getFieldsDatas(string TableName, string Fields)
+        {
+            DataTable dt = new DataTable();
+            string sql = "select ";
+            sql += Fields;
+            sql += " from " + TableName;
+            command = new OracleCommand(sql, connection);
+            Reconnect(command);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            ad.SelectCommand = command;
+            try
+            {
+                ad.Fill(dt);
+            }
+            catch (Exception)
+            {
+                connection = new OracleConnection(DBConnectionString);
+                connection.Open();
+                command = new OracleCommand(sql, connection);
+                ad = new OracleDataAdapter();
+                ad.SelectCommand = command;
+                ad.Fill(dt);
+            }
+            ad.Dispose();
+            command.Dispose();
+            return dt;
+        }
+
+        /// <summary>
+        /// 根据DataTable和指定的表名更新数据,如果需要保存新增的数据则需要传递一条Insert的SQL
+        /// </summary>
+        /// <param name="DataTable"></param>
+        /// <param name="TableName"></param>
+        /// <param name="Condition"></param>
+        public void UpDateTableByCondition(DataTable DataTable, string TableName, string PrimaryKey, params string[] sql)
+        {
+            if (DataTable == null)
+            {
+                return;
+            }
+            StringBuilder sb = new StringBuilder();
+            //预防插入的DataTable中存在不属于该表的列,在进行下一步操作之前全部剔除
+            DataTable data = (DataTable)ExecuteSql("select Column_Name,Data_Type from cols where TABLE_name=upper('" + TableName + "')", "select");
+            //将所有的字段拼接起来
+            for (int i = 0; i < data.Rows.Count; i++)
+            {
+                sb.Append("#" + data.Rows[i]["Column_Name"].ToString());
+            }
+            //移除掉所有不属于该表的列
+            for (int i = DataTable.Columns.Count - 1; i >= 0; i--)
+            {
+                if (!sb.ToString().Contains(DataTable.Columns[i].ColumnName.ToUpper()))
+                {
+                    DataTable.Columns.RemoveAt(i);
+                }
+            }
+            sb.Clear();
+            //计算有多少个是新加的行,根据主键为空来进行判断
+            int NewRowCount = 0;
+            for (int i = 0; i < DataTable.Rows.Count; i++)
+            {
+                if (DataTable.Rows[i][PrimaryKey] == null || DataTable.Rows[i][PrimaryKey].ToString() == "")
+                {
+                    NewRowCount = NewRowCount + 1;
+                }
+            }
+            if (sql.Length > 0)
+            {
+                if (NewRowCount > 0)
+                {
+                    //获取参数的个数
+                    int paramsNum = sql[0].Split(':').Length - 1;
+                    //解析参数的数据
+                    string[] param = GetParamFromSQL(sql[0]);
+                    //新建一个二维数组去
+                    string[][] param_array = new string[paramsNum][];
+                    //实例化每个一维数组
+                    for (int i = 0; i < paramsNum; i++)
+                    {
+                        param_array[i] = new string[NewRowCount];
+                    }
+                    //设置每列参数的索引
+                    int num = 0;
+                    //变量所有的行,如果有主键为空的则移除,不为空的进行参数的拼接
+                    for (int i = DataTable.Rows.Count - 1; i >= 0; i--)
+                    {
+                        if (DataTable.Rows[i][PrimaryKey] == null || DataTable.Rows[i][PrimaryKey].ToString() == "")
+                        {
+                            //当为新添加行的时候才去设置参数,设置过后索引+1
+                            for (int j = 0; j < paramsNum; j++)
+                            {
+                                param_array[j][num] = DataTable.Rows[i][param[j]].ToString();
+                            }
+                            DataTable.Rows.RemoveAt(i);
+                            num++;
+                        }
+                    }
+                    BatchInsertDataTable(sql[0], param, param_array);
+                }
+            }
+            //不是新增行的启用更新的方法
+            sb.Append("update " + TableName + " set ");
+            //拼接语句,特殊处理日期
+
+            foreach (DataColumn dc in DataTable.Columns)
+            {
+                if (!dc.DataType.ToString().Equals("System.DateTime"))
+                {
+                    sb.Append(dc.Caption + "=:" + dc.Caption + ",");
+                }
+                else
+                {
+                    sb.Append(dc.Caption + "=:" + dc.Caption + ",");
+                }
+            }
+            sb.Remove(sb.Length - 1, 1);
+            sb.Append(" where " + PrimaryKey + "=:" + PrimaryKey);
+            command = new OracleCommand(sb.ToString(), connection);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            // 参数的长度是DataTable的行数决定的
+            command.ArrayBindCount = DataTable.Rows.Count;
+            //默认全部是Varchar2类型的
+            OracleDbType ob = OracleDbType.Varchar2;
+            for (int i = 0; i < DataTable.Columns.Count; i++)
+            {
+                object[] param = new object[DataTable.Rows.Count];
+                for (int j = 0; j < DataTable.Rows.Count; j++)
+                {
+                    DateTime dt = DateTime.Now;
+                    if (DateTime.TryParse(DataTable.Rows[j][i].ToString(), out dt))
+                    {
+                        param[j] = dt;
+                        ob = OracleDbType.Date;
+                    }
+                    else
+                    {
+                        ob = OracleDbType.Varchar2;
+                        param[j] = DataTable.Rows[j][i];
+                    }
+                }
+                //添加批量更新的参数
+                command.Parameters.Add(new OracleParameter(DataTable.Columns[i].Caption, ob, param, ParameterDirection.Input));
+            }
+            ad.UpdateCommand = command;
+            ad.Update(DataTable);
+            ad.Dispose();
+            command.Dispose();
+        }
+
+        /// <summary>
+        /// 获取DbFind的数据的DataTable的结构
+        /// </summary>
+        /// <param name="field"></param>
+        /// <param name="caller"></param>
+        /// <returns></returns>
+        public DataTable GetDbFindDataTable(string field, string caller)
+        {
+            string sql = "select * from dbfindsetui where ds_caller='" + caller + "' and ds_whichui='" + field + "'";
+            DataTable dt = (DataTable)ExecuteSql(sql, "select");
+            if (dt.Rows.Count != 0)
+            {
+                //通过#号分割字段
+                string[] dbfield = dt.Rows[0]["ds_findtoui"].ToString().Split('#');
+                string[] cnfield = dt.Rows[0]["ds_dbcaption"].ToString().Split('#');
+                //获取查询要查询的Table
+                string dbtable = dt.Rows[0]["ds_tables"].ToString();
+                //拼接查询的字段
+                for (int i = 0; i < dbfield.Length; i++)
+                {
+                    dbfield[i] = dbfield[i].Split(',')[0];
+                }
+                //新建一个空的DataTable
+                DataTable dt1 = new DataTable();
+                //往空的DataTable添加结构,ColumnName是中文,Caption是实际的字段名称
+                for (int i = 0; i < cnfield.Length; i++)
+                {
+                    dt1.Columns.Add(cnfield[i]);
+                    dt1.Columns[i].Caption = dbfield[i];
+                }
+                //返回一个带有结构的空的DataTable
+                //DbFind.BindTable1 = dbtable;
+                return dt1;
+            }
+            else
+            {
+                return null;
+            }
+        }
+
+        /// <summary>
+        /// 检测内容是否存在
+        /// </summary>
+        /// <param name="TableName"></param>
+        /// <param name="Condition"></param>
+        /// <returns></returns>
+        public bool CheckExist(string TableName, string Condition)
+        {
+            string sql = "select count(1) from " + TableName + " where " + Condition;
+            command = new OracleCommand(sql, connection);
+            Reconnect(command);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            DataTable dt = new DataTable();
+            try
+            {
+                ad.Fill(dt);
+            }
+            catch (Exception)
+            {
+                connection = new OracleConnection(DBConnectionString);
+                connection.Open();
+                command = new OracleCommand(sql, connection);
+                ad = new OracleDataAdapter();
+                ad.SelectCommand = command;
+                ad.Fill(dt);
+            }
+            ad.Dispose();
+            command.Dispose();
+            return int.Parse(dt.Rows[0][0].ToString()) > 0;
+        }
+
+        /// <summary>
+        /// 直接执行SQL,同时传入SQL的类型
+        /// </summary>
+        /// <param name="SQL"></param>
+        /// <param name="Type"></param>
+        /// <returns></returns>
+        public object ExecuteSql(string SQL, string Type, params object[] names)
+        {
+            object result = null;
+            //Console.WriteLine(SQL);
+            command = new OracleCommand(SQL, connection);
+            Reconnect(command);
+            //用来拼接参数的
+            if (names.Length > 0)
+            {
+                string[] par = SQL.Split(':');
+                //用来存参数的数组
+                StringBuilder[] addpar = new StringBuilder[par.Length - 1];
+                for (int i = 0; i < par.Length - 1; i++)
+                {
+                    //新建一个char类型的数组用来存储每个字节的变量
+                    char[] c = par[i + 1].ToCharArray();
+                    addpar[i] = new StringBuilder();
+                    for (int j = 0; j < c.Length; j++)
+                    {
+                        if (c[j] != ' ' && c[j] != ',' && c[j] != ')')
+                        {
+                            addpar[i].Append(c[j]);
+                        }
+                        else
+                        {
+                            break;
+                        }
+                    }
+                }
+                for (int i = 0; i < addpar.Length; i++)
+                    command.Parameters.Add(new OracleParameter(addpar[i].ToString(), OracleDbType.Varchar2, names[i], ParameterDirection.Input));
+            }
+
+            switch (Type.ToUpper())
+            {
+                case "SELECT":
+                    OracleDataAdapter ad = new OracleDataAdapter(command);
+                    result = new DataTable();
+                    try
+                    {
+                        ad.Fill((DataTable)result);
+                    }
+                    catch (Exception)
+                    {
+                        connection = new OracleConnection(DBConnectionString);
+                        connection.Open();
+                        command = new OracleCommand(SQL, connection);
+                        ad = new OracleDataAdapter();
+                        ad.SelectCommand = command;
+                        ad.Fill((DataTable)result);
+                    }
+                    break;
+                case "DELETE":
+                    try
+                    {
+                        result = command.ExecuteNonQuery();
+                    }
+                    catch (Exception)
+                    {
+                        command.Connection = new OracleConnection(DBConnectionString);
+                        command.Connection.Open();
+                        result = command.ExecuteNonQuery();
+                    }
+                    break;
+                case "UPDATE":
+                    try
+                    {
+                        result = command.ExecuteNonQuery();
+                    }
+                    catch (Exception)
+                    {
+                        command.Connection = new OracleConnection(DBConnectionString);
+                        command.Connection.Open();
+                        result = command.ExecuteNonQuery();
+                    }
+                    break;
+                case "INSERT":
+                    try
+                    {
+                        result = command.ExecuteNonQuery();
+                    }
+                    catch (Exception)
+                    {
+                        command.Connection = new OracleConnection(DBConnectionString);
+                        command.Connection.Open();
+                        result = command.ExecuteNonQuery();
+                    }
+                    break;
+            }
+            command.Dispose();
+            return result;
+        }
+
+        /// <summary>
+        /// 为了同步BS端的条码维护,检测时允许问号的存在,在检测时默认将问号换成:Param参数
+        /// </summary>
+        /// <param name="SQL"></param>
+        public void CheckSQL(string SQL)
+        {
+            SQL = SQL.Replace("?", ":Param");
+            command = new OracleCommand(SQL, connection);
+            command.ExecuteNonQuery();
+            command.Dispose();
+        }
+
+        public int GetDistinctRowCount(string TableName, string Field)
+        {
+            DataTable dt = new DataTable();
+            string sql = "select distinct count('" + Field + "') from " + TableName;
+            command = new OracleCommand(sql, connection);
+            Reconnect(command);
+            OracleDataAdapter ad = new OracleDataAdapter(command);
+            try
+            {
+                ad.Fill(dt);
+            }
+            catch (Exception)
+            {
+                connection = new OracleConnection(DBConnectionString);
+                connection.Open();
+                command = new OracleCommand(sql, connection);
+                ad = new OracleDataAdapter();
+                ad.SelectCommand = command;
+                ad.Fill(dt);
+            }
+            ad.Dispose();
+            command.Dispose();
+            return int.Parse(dt.Rows[0][0].ToString());
+        }
+
+        /// <summary>
+        /// 根据Caller获取流水号
+        /// </summary>
+        /// <param name="Caller"></param>
+        /// <returns></returns>
+        public string GetSerialNumberByCaller(string Caller)
+        {
+            string SerialNumber = getFieldDataByCondition("MaxNumbers", "mn_number", "mn_tablename='" + Caller + "'").ToString();
+            UpdateByCondition("MaxNumbers", "mn_number=mn_number+1", "mn_tablename='" + Caller + "'");
+            return SerialNumber;
+        }
+
+        /// <summary>
+        /// 根据主键ID删除表的数据
+        /// </summary>
+        /// <param name="TableName">表名</param>
+        /// <param name="ID">主键</param>
+        /// <param name="DeleteID">需要删除主键ID的数组</param>
+        public void DeleteDataByID(string TableName, string ID, string[] DeleteID)
+        {
+            string sql = "delete from " + TableName + " where " + ID + " =:DeleteID";
+
+            command = new OracleCommand(sql, connection);
+            Reconnect(command);
+            command.ArrayBindCount = DeleteID.Length;
+            command.Parameters.Add(new OracleParameter("DeleteID", OracleDbType.Long, DeleteID, ParameterDirection.Input));
+            try
+            {
+                command.ExecuteNonQuery();
+            }
+            catch (Exception)
+            {
+                command.Connection = new OracleConnection(DBConnectionString);
+                command.Connection.Open();
+                command.ExecuteNonQuery();
+            }
+            command.Dispose();
+        }
+
+        /// <summary>
+        /// 通过序列的名称获取序列
+        /// </summary>
+        /// <param name="SeqName"></param>
+        /// <returns></returns>
+        public string GetSEQ(string SeqName)
+        {
+            DataTable dt = new DataTable();
+            dt = (DataTable)ExecuteSql("SELECT " + SeqName + ".NEXTVAL FROM DUAL", "select");
+            return dt.Rows[0][0].ToString();
+        }
+
+        /// <summary>
+        /// 通过序列的名称获取序列
+        /// </summary>
+        /// <param name="SeqName"></param>
+        /// <returns></returns>
+        public string[] GetSEQ(string SeqName, int Num)
+        {
+            DataTable dt = new DataTable();
+            dt = (DataTable)ExecuteSql("SELECT " + SeqName + ".nextval  FROM DUAL CONNECT BY LEVEL<=" + Num, "select");
+            string[] SerialNum = new string[dt.Rows.Count];
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                SerialNum[i] = dt.Rows[i][0].ToString();
+            }
+            return SerialNum;
+        }
+
+        public void SaveDataTable(DataTable dt, string TableName, string ID, params string[] sql)
+        {
+            if (dt == null)
+            {
+                return;
+            }
+            StringBuilder sb = new StringBuilder();
+            //预防插入的DataTable中存在不属于该表的列,在进行下一步操作之前全部剔除
+            DataTable data = (DataTable)ExecuteSql("select Column_Name,Data_Type from cols where TABLE_name=upper('" + TableName + "')", "select");
+            //将所有的字段拼接起来
+            for (int i = 0; i < data.Rows.Count; i++)
+            {
+                sb.Append("#" + data.Rows[i]["Column_Name"].ToString());
+            }
+            //移除掉所有不属于该表的列
+            for (int i = dt.Columns.Count - 1; i >= 0; i--)
+            {
+                if (!sb.ToString().Contains(dt.Columns[i].ColumnName.ToUpper()))
+                {
+                    dt.Columns.RemoveAt(i);
+                }
+            }
+            sb.Clear();
+            //计算有多少个是新加的行,根据主键为空来进行判断
+            int NewRowCount = 0;
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                if (dt.Rows[i][ID] == null || dt.Rows[i][ID].ToString() == "")
+                {
+                    NewRowCount = NewRowCount + 1;
+                }
+            }
+            if (sql.Length > 0)
+            {
+                if (NewRowCount > 0)
+                {
+                    //获取参数的个数
+                    int paramsNum = sql[0].Split(':').Length - 1;
+                    //解析参数的数据
+                    string[] param = GetParamFromSQL(sql[0]);
+                    //新建一个二维数组去
+                    string[][] param_array = new string[paramsNum][];
+                    //实例化每个一维数组
+                    for (int i = 0; i < paramsNum; i++)
+                    {
+                        param_array[i] = new string[NewRowCount];
+                    }
+                    //设置每列参数的索引
+                    int num = 0;
+                    //变量所有的行,如果有主键为空的则移除,不为空的进行参数的拼接
+                    for (int i = dt.Rows.Count - 1; i >= 0; i--)
+                    {
+                        if (dt.Rows[i][ID] == null || dt.Rows[i][ID].ToString() == "")
+                        {
+                            //当为新添加行的时候才去设置参数,设置过后索引+1
+                            for (int j = 0; j < paramsNum; j++)
+                            {
+                                param_array[j][num] = dt.Rows[i][param[j]].ToString();
+                            }
+                            dt.Rows.RemoveAt(i);
+                            num++;
+                        }
+                    }
+                    BatchInsertDataTable(sql[0], param, param_array);
+                }
+            }
+            sb.Clear();
+            sb.Append("update " + TableName + " set ");
+            int ColumnCount = dt.Columns.Count;
+            int RowCount = dt.Rows.Count;
+            //存数据的参数
+            List<string[]> Parameter = new List<string[]>();
+            //存参数名的参数
+            string[] ParName = new string[ColumnCount];
+            for (int i = 0; i < ColumnCount; i++)
+            {
+                ParName[i] = dt.Columns[i].ColumnName;
+                if (i == dt.Columns.Count - 1)
+                    sb.Append(dt.Columns[i].ColumnName + "=:" + dt.Columns[i].ColumnName);
+                else
+                    sb.Append(dt.Columns[i].ColumnName + "=:" + dt.Columns[i].ColumnName + ",");
+            }
+            sb.Append(" where " + ID + " =:" + ID);
+            //先添加参数
+            Parameter.Add(ParName);
+            //添加参数的具体内容
+            for (int i = 0; i < ColumnCount; i++)
+            {
+                string[] par = new string[RowCount];
+                for (int j = 0; j < RowCount; j++)
+                {
+                    par[j] = dt.Rows[j][i].ToString();
+                }
+                Parameter.Add(par);
+            }
+            BatchInsert(sb.ToString(), Parameter.ToArray());
+        }
+
+        /// <summary>
+        /// 批量通过SQL来执行插入操作 ,参数的第一个数一个string[]数组,用来传递需要添加的参数的名称
+        /// 之后的是名称参数数组对应的 ,所有的插入参数数据长度必须是一致的
+        /// </summary>
+        /// <param name="sql"></param>
+        /// <param name="names"></param>
+        public void BatchInsert(string sql, params object[][] names)
+        {
+            command = new OracleCommand(sql, connection);
+            Reconnect(command);
+            command.ArrayBindCount = names[1].Length;
+            //因为第一个数组保存的是参数的名称,所以循环从1而不是0开始
+            //将第一个数组的下标固定为0作为循环添加的参数的名称
+            for (int i = 1; i <= names[0].Length; i++)
+            {
+                command.Parameters.Add(new OracleParameter(names[0][i - 1].ToString(), OracleDbType.Varchar2, names[i], ParameterDirection.Input));
+            }
+            command.ExecuteNonQuery();
+            command.Dispose();
+        }
+
+        public void BatchInsertDataTable(string sql, string[] param, params object[][] param1)
+        {
+            command = new OracleCommand(sql, connection);
+            Reconnect(command);
+            command.ArrayBindCount = param1[0].Length;
+            //因为第一个数组保存的是参数的名称,所以循环从1而不是0开始
+            //将第一个数组的下标固定为0作为循环添加的参数的名称
+            for (int i = 0; i < param.Length; i++)
+            {
+                command.Parameters.Add(new OracleParameter(param[i].ToString(), OracleDbType.Varchar2, param1[i], ParameterDirection.Input));
+            }
+            try
+            {
+                command.ExecuteNonQuery();
+            }
+            catch (Exception)
+            {
+                command.Connection = new OracleConnection(DBConnectionString);
+                command.Connection.Open();
+                command.ExecuteNonQuery();
+            }
+            command.Dispose();
+        }
+
+        /// <summary>
+        /// 取Configs表中的配置,进行该客户是否执行某个操作
+        /// </summary>
+        /// <param name="Code"></param>
+        /// <param name="Caller"></param>
+        /// <returns></returns>
+        public object GetConfig(string Code, string Caller)
+        {
+            DataTable dt = new DataTable();
+            string sql = "select Data from configs where code='" + Code + "' and caller='" + Caller + "'";
+            dt = (DataTable)ExecuteSql(sql, "select");
+            if (dt.Rows.Count == 0)
+            {
+                return "";
+            }
+            else
+            {
+                return dt.Rows[0]["Data"];
+            }
+        }
+
+
+        //将数据类型的列类型转换为DataTable
+        public DataTable DataTypeColumnToDataTable(DataTable dt)
+        {
+            DataTable dt1 = new DataTable();
+            dt1.Rows.Add();
+            foreach (DataRow dr in dt.Rows)
+            {
+                dt1.Columns.Add(dr[0].ToString());
+                int index = dt.Rows.IndexOf(dr);
+                if (dr[1].ToString() == "NUMBER")
+                {
+                    dt1.Rows[0][index] = 0;
+                }
+                if (dr[1].ToString() == "VARCHAR2")
+                {
+                    dt1.Rows[0][index] = "这是一段文字";
+                }
+                if (dr[1].ToString() == "DATE")
+                {
+                    dt1.Rows[0][index] = DateTime.Now.ToString("yyyy-MM-dd");
+                }
+                if (dr[1].ToString() == "FLOAT")
+                {
+                    dt1.Rows[0][index] = 1.0;
+                }
+                if (dr[1].ToString() == "CLOB")
+                {
+                    dt1.Rows[0][index] = "一段长文字";
+                }
+            }
+            return dt1;
+        }
+
+
+        /// <summary>
+        /// 通过条件更新
+        /// </summary>
+        /// <param name="TableName"></param>
+        /// <param name="update"></param>
+        /// <param name="condition"></param>
+        public string UpdateByCondition(string TableName, string update, string condition)
+        {
+            string sql = "update " + TableName + " set " + update + " where " + condition;
+            command = new OracleCommand(sql, connection);
+
+            Reconnect(command);
+            try
+            {
+                command.ExecuteNonQuery();
+            }
+            catch (Exception)
+            {
+                command.Connection = new OracleConnection(DBConnectionString);
+                command.Connection.Open();
+                command.ExecuteNonQuery();
+            }
+            command.Dispose();
+            return sql;
+        }
+
+        /// <summary>
+        /// 调用存储过程
+        /// </summary>
+        /// <param name="ProcedureName"></param>    
+        /// <param name="param"></param>
+        public void CallProcedure(string ProcedureName, ref string[] param)
+        {
+            command = new OracleCommand(ProcedureName);
+            command.Connection = connection;
+            Reconnect(command);
+            command.CommandText = ProcedureName;
+            command.CommandType = CommandType.StoredProcedure;
+            for (int i = 0; i < param.Length; i++)
+                command.Parameters.Add(new OracleParameter(param[i].ToString(), OracleDbType.Varchar2, 2000, param[i], ParameterDirection.InputOutput));
+            try
+            {
+                command.ExecuteNonQuery();
+            }
+            catch (Exception)
+            {
+                command.Connection = new OracleConnection(DBConnectionString);
+                command.Connection.Open();
+                command.ExecuteNonQuery();
+            }
+            for (int i = 0; i < command.Parameters.Count; i++)
+                param[i] = command.Parameters[i].Value.ToString();
+            command.Dispose();
+        }
+
+        /// <summary>
+        /// 用于将string 的数组转换成SQL的查询内容
+        /// </summary>
+        /// <param name="Fields"></param>
+        /// <returns></returns>
+        private string AddField(string[] Fields)
+        {
+            string sql = " ";
+            foreach (string field in Fields)
+            {
+                sql += field + ",";
+            }
+            return sql.Substring(0, sql.Length - 1);
+        }
+        /// <summary>
+        /// 通过查询的内容获取到字段的描述
+        /// </summary>
+        /// <param name="field"></param>
+        /// <returns></returns>
+        private static string[] GetCaptionFromField(string field)
+        {
+            string[] caption = field.Split(',');
+            for (int i = 0; i < caption.Length; i++)
+            {
+                caption[i] = caption[i].Substring(0, caption[i].LastIndexOf(" as ")).Trim();
+            }
+            return caption;
+        }
+
+        /// <summary>
+        /// 通过查询的语句获取查询的字段
+        /// </summary>
+        /// <param name="field"></param>
+        /// <returns></returns>
+        private static string[] GetField(string field)
+        {
+            string[] fields = field.Split(',');
+            for (int i = 0; i < fields.Length; i++)
+            {
+                fields[i] = fields[i].Substring(fields[i].LastIndexOf(" as ") + 4, fields[i].Length - fields[i].LastIndexOf(" as ") - 4).Trim();
+            }
+            return fields;
+        }
+
+        public object GetLabelParam(string sql)
+        {
+            DataTable dt = new DataTable();
+            command = new OracleCommand(sql, connection);
+            Reconnect(command);
+            OracleDataAdapter ad = new OracleDataAdapter();
+            ad.SelectCommand = command;
+            try
+            {
+                ad.Fill(dt);
+            }
+            catch (Exception)
+            {
+                connection = new OracleConnection(DBConnectionString);
+                connection.Open();
+                command = new OracleCommand(sql, connection);
+                ad = new OracleDataAdapter();
+                ad.SelectCommand = command;
+                ad.Fill(dt);
+            }
+            if (dt.Rows.Count > 0)
+            {
+                ad.Dispose();
+                command.Dispose();
+                return dt.Rows[0][0];
+            }
+            else
+            {
+                command.Dispose();
+                return "";
+            }
+        }
+
+        public static string[] GetParamFromSQL(string SQL)
+        {
+            string[] par = SQL.Split(':');
+            //用来存参数的数组
+            StringBuilder[] addpar = new StringBuilder[par.Length - 1];
+            string[] param = new string[par.Length - 1];
+            for (int i = 0; i < par.Length - 1; i++)
+            {
+                //新建一个char类型的数组用来存储每个字节的变量
+                char[] c = par[i + 1].ToCharArray();
+                addpar[i] = new StringBuilder();
+
+                for (int j = 0; j < c.Length; j++)
+                {
+                    if (c[j] != ' ' && c[j] != ',' && c[j] != ')')
+                    {
+                        addpar[i].Append(c[j]);
+                    }
+                    else
+                    {
+                        break;
+                    }
+                }
+            }
+            for (int i = 0; i < par.Length - 1; i++)
+            {
+                param[i] = addpar[i].ToString();
+            }
+            return param;
+        }
+
+        public void Dispose()
+        {
+
+        }
+
+        private void Reconnect(OracleCommand cmd)
+        {
+            if (cmd.Connection.State == ConnectionState.Closed)
+            {
+                cmd.Connection.Open();
+            }
+        }
+    }
+}

+ 88 - 0
UAS_BARCODEIO/DbFind.Designer.cs

@@ -0,0 +1,88 @@
+using UAS_BARCODEIO;
+
+namespace UAS_BARCODEIO
+{
+    partial class DbFind
+    {
+        /// <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.DbFindGridView = new System.Windows.Forms.DataGridView();
+            this.pagination1 = new UAS_BARCODEIO.PaginationDbFind();
+            ((System.ComponentModel.ISupportInitialize)(this.DbFindGridView)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // DbFindGridView
+            // 
+            this.DbFindGridView.AllowUserToAddRows = false;
+            this.DbFindGridView.BackgroundColor = System.Drawing.SystemColors.Window;
+            this.DbFindGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.DbFindGridView.Location = new System.Drawing.Point(0, 22);
+            this.DbFindGridView.Name = "DbFindGridView";
+            this.DbFindGridView.ReadOnly = true;
+            this.DbFindGridView.RowTemplate.Height = 23;
+            this.DbFindGridView.Size = new System.Drawing.Size(740, 408);
+            this.DbFindGridView.TabIndex = 0;
+            this.DbFindGridView.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DbFindGridView_CellDoubleClick);
+            this.DbFindGridView.ColumnWidthChanged += new System.Windows.Forms.DataGridViewColumnEventHandler(this.DbFindGridView_ColumnWidthChanged);
+            this.DbFindGridView.Scroll += new System.Windows.Forms.ScrollEventHandler(this.DbFindGridView_Scroll);
+            this.DbFindGridView.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.DbFindGridView_KeyPress);
+            // 
+            // pagination1
+            // 
+            this.pagination1.AddEnable = false;
+            this.pagination1.Cursor = System.Windows.Forms.Cursors.Arrow;
+            this.pagination1.DeleteEnable = false;
+            this.pagination1.Location = new System.Drawing.Point(0, 432);
+            this.pagination1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pagination1.Name = "pagination1";
+            this.pagination1.Size = new System.Drawing.Size(740, 32);
+            this.pagination1.TabIndex = 1;
+            // 
+            // DbFind
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(741, 464);
+            this.Controls.Add(this.pagination1);
+            this.Controls.Add(this.DbFindGridView);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+            this.Name = "DbFind";
+            this.Tag = "ShowDialogWindow";
+            this.Text = "放大镜";
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DbFind_FormClosing);
+            this.Load += new System.EventHandler(this.DbFind_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.DbFindGridView)).EndInit();
+            this.ResumeLayout(true);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.DataGridView DbFindGridView;
+        private PaginationDbFind pagination1;
+    }
+}

+ 295 - 0
UAS_BARCODEIO/DbFind.cs

@@ -0,0 +1,295 @@
+using System;
+using System.Data;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace UAS_BARCODEIO
+{
+    public partial class DbFind : BaseForm
+    {
+        //判断是否配置了DbFind
+        bool IsAbleDbFind;
+
+        //双击选择的工单号
+        string TextBoxValue = "";
+
+        DataHelper dh = SystemInf.dh;
+
+        DataTable dt = new DataTable();
+
+        Control[] ctl;
+        //DBFind查询的字段
+        string MainField;
+        //需要赋值的字段
+        string[] SetValueField;
+        //需要查询的全部字段
+        string SelectField;
+        //发起DbFind请求的窗口
+        string FormName;
+        //是否配置了DBfind
+        string Caller;
+        //需要查询的表
+        string BindTable;
+
+        string Condition = "";
+
+        Control MainControl;
+
+        public bool SuccessReturnData = false;
+
+        int ScrollNewValue = 0;
+
+        public bool IsAbleDbFind1
+        {
+            get
+            {
+                return IsAbleDbFind;
+            }
+            set
+            {
+                IsAbleDbFind = value;
+            }
+        }
+
+        public string TextBoxValue1
+        {
+            get
+            {
+                return TextBoxValue;
+            }
+            set
+            {
+                TextBoxValue = value;
+            }
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="field"></param>
+        /// <param name="setValueField"></param>
+        /// <param name="caller"></param>
+        /// <param name="formname"></param>
+        public DbFind(string field, string tablename, string selectfield, string[] setValueField, string caller, string formname, string condition)
+        {
+            InitializeComponent();
+            DoubleBuffered = true;
+            try
+            {
+                StartPosition = FormStartPosition.CenterParent;
+                MainField = field;
+                FormName = formname;
+                SetValueField = setValueField;
+                Caller = caller;
+                Condition = condition + "";
+                BindTable = tablename;
+                SelectField = selectfield.Replace("#", " as ");
+                //返回一个带有结构的空的DataTable
+                dt = (DataTable)dh.ExecuteSql("select " + SelectField + " from " + tablename + " where ROWNUM<20", "select");
+                //设置DataTable的描述和列名,为了字段赋值
+                selectfield = selectfield.Replace(",", "#");
+                string[] NameAndCapation = selectfield.Split('#');
+                int index = 0;
+                //设置列的描述和名称
+                for (int i = 0; i < dt.Columns.Count; i++)
+                {
+                    dt.Columns[i].Caption = NameAndCapation[index].Trim();
+                    index = index + 1;
+                    dt.Columns[i].ColumnName = NameAndCapation[index].Trim();
+                    index = index + 1;
+                }
+                if (dt != null)
+                {
+                    //先绑定空的结构
+                    DbFindGridView.DataSource = dt;
+                    for (int i = 0; i < DbFindGridView.Columns.Count; i++)
+                    {
+                        DbFindGridView.Columns[i].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
+                    }
+                    //获取查询的字段的拼接语句
+                    pagination1.BindDataToNavigator(DbFindGridView, tablename, SelectField, "ID", caller, Condition == null ? "" : Condition);
+                    IsAbleDbFind = true;
+                }
+            }
+            catch (Exception EB)
+            {
+                IsAbleDbFind = false;
+            }
+        }
+
+        protected override void WndProc(ref Message m)
+        {
+            //拦截双击标题栏、移动窗体的系统消息  
+            if (m.Msg != 0xA3)
+                base.WndProc(ref m);
+        }
+
+        private void DbFind_Load(object sender, EventArgs e)
+        {
+            //用来存放过滤的TextBox的控件
+            ctl = new Control[dt.Columns.Count];
+            //Dock是添加的越后面展示时越前面,所以需要从大到小排放
+            for (int i = dt.Columns.Count - 1; i >= 0; i--)
+            {
+                EnterTextBox etb = new EnterTextBox();
+                etb.Dock = DockStyle.Left;
+                etb.Location = new Point(DbFindGridView.RowHeadersWidth, DbFindGridView.Columns[i].Width);
+                etb.Name = dt.Columns[i].Caption;
+                etb.Tag = dt.Columns[i].Caption;
+                etb.Size = new Size(DbFindGridView.Columns[i].Width, 22);
+                etb.KeyDown += FilterData;
+                this.Controls.Add(etb);
+                //记录这个生成的控件,后续用于拼接条件
+                ctl[i] = etb;
+            }
+            //最后用一个不可编辑的占住头部长度
+            EnterTextBox Head = new EnterTextBox();
+            Head.Name = "PlaceHolder";
+            Head.Enabled = false;
+            Head.Dock = DockStyle.Left;
+            Head.Location = new Point(0, DbFindGridView.RowHeadersWidth);
+            Head.Size = new Size(DbFindGridView.RowHeadersWidth, 22);
+            this.Controls.Add(Head);
+        }
+
+        /// <summary>
+        /// 过滤条件
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void FilterData(object sender, KeyEventArgs e)
+        {
+            //筛选数据需要将当前页重置到1
+            //并且手动执行一次刷新
+            if (e.KeyCode == Keys.Enter)
+            {
+                pagination1.Current_Page = 1;
+                pagination1.GetPageData();
+                //所有输入框的条件拼接
+                string filterCondition = BaseUtil.GetScreenSqlCondition(ctl).Replace("where", "").Trim();
+                //拼接条件为空初始条件不为空
+                if (filterCondition == "" && Condition != "")
+                    filterCondition = Condition;
+                //拼接和初始条件都不为空
+                else if (filterCondition != "" && Condition.Trim() != "")
+                    filterCondition = filterCondition + " and " + Condition;
+                pagination1.BindDataToNavigator(DbFindGridView, BindTable, SelectField, "ID", Caller, filterCondition);
+            }
+        }
+
+        //给打开窗体的对应字段赋值
+        private void DbFindGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
+        {
+            if (e.RowIndex >= 0)
+            {
+                FormCollection fmCollection = Application.OpenForms;
+                ControlCollection controls = (ControlCollection)fmCollection[FormName].Controls;
+                try
+                {
+                    //先判断DataTable里面是否有这个字段,然后从打开的窗口里面去获取到这个Form,从Form中的指定Panel获取到指定字段的控件
+                    for (int i = 0; i < dt.Columns.Count; i++)
+                    {
+                        fillControl(e, i, fmCollection[FormName]);
+                    }
+                    //发起DBFind的控件
+                    SuccessReturnData = true;
+                    if (MainControl is MaCodeSearchTextBox)
+                    {
+                        MaCodeSearchTextBox ctl = (MainControl as MaCodeSearchTextBox);
+                        ctl.GetData(true);
+                    }
+                    if (MainControl is SearchTextBox)
+                    {
+                        SearchTextBox ctl = (MainControl as SearchTextBox);
+                        ctl.GetData();
+                    }
+                    MainControl.Focus();
+                }
+                catch (Exception ea)
+                {
+                    SuccessReturnData = false;
+                }
+                dt = (DataTable)DbFindGridView.DataSource;
+                for (int i = 0; i < dt.Columns.Count; i++)
+                {
+                    if (MainControl.Name == dt.Columns[i].Caption)
+                    {
+                        TextBoxValue = dt.Rows[e.RowIndex][i].ToString();
+                        break;
+                    }
+                }
+                Dispose();
+                Close();
+            }
+        }
+
+
+        private void fillControl(DataGridViewCellEventArgs e, 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(e, i, controls[k]);
+                    }
+                }
+                else
+                {
+                    if (ct.Name == MainField)
+                    {
+                        MainControl = ct;
+                    }
+                    if ((SetValueField[j] == dt.Columns[i].Caption || SetValueField[j] == dt.Columns[i].ColumnName || SetValueField[j].Contains(dt.Columns[i].Caption) || (ct != null && ct.Tag != null && ct.Tag.ToString() == dt.Columns[i].Caption)) && ct.Name.ToString().ToUpper() == SetValueField[j].ToUpper())
+                        ct.Text = DbFindGridView.Rows[e.RowIndex].Cells[dt.Columns[i].ColumnName].Value.ToString();
+                }
+            }
+        }
+
+        //按下Esc键的时候关闭当前的界面,用于DbFind
+        private void DbFindGridView_KeyPress(object sender, KeyPressEventArgs e)
+        {
+            if (e.KeyChar == (char)Keys.Escape)
+            {
+                Dispose();
+                Close();
+            }
+        }
+
+        //列宽发生变化的时候TextBox的宽度也发生变化
+        private void DbFindGridView_ColumnWidthChanged(object sender, DataGridViewColumnEventArgs e)
+        {
+            if (ctl != null)
+                ctl[DbFindGridView.Columns.IndexOf(e.Column)].Width = e.Column.Width;
+        }
+
+        private void DbFindGridView_Scroll(object sender, ScrollEventArgs e)
+        {
+            //结合已拖动的长度和列宽计算此列当前展示的长度
+            ScrollNewValue = e.NewValue;
+            if (e.ScrollOrientation == ScrollOrientation.HorizontalScroll)
+            {
+                int ColumnWidth = 0;
+                for (int i = 0; i < dt.Columns.Count; i++)
+                {
+                    ColumnWidth += DbFindGridView.Columns[i].Width;
+                    //如果有列被完全遮蔽,设置对应的输入框宽度为0
+                    if (ColumnWidth < ScrollNewValue)
+                        Controls[dt.Columns[i].Caption].Width = 0;
+                    else if (ColumnWidth > ScrollNewValue)
+                    {
+                        Controls[dt.Columns[i].Caption].Width = ColumnWidth - ScrollNewValue;
+                        break;
+                    }
+                }
+            }
+        }
+
+        private void DbFind_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            dh.Dispose();
+        }
+    }
+}

+ 120 - 0
UAS_BARCODEIO/DbFind.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_BARCODEIO/EnterTextBox.Designer.cs

@@ -0,0 +1,45 @@
+namespace UAS_BARCODEIO
+{
+    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(false);
+
+        }
+
+        #endregion
+    }
+}

+ 101 - 0
UAS_BARCODEIO/EnterTextBox.cs

@@ -0,0 +1,101 @@
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace UAS_BARCODEIO
+{
+    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_BARCODEIO/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>

BIN
UAS_BARCODEIO/FastReport.Bars.dll


BIN
UAS_BARCODEIO/FastReport.Editor.dll


BIN
UAS_BARCODEIO/FastReport.dll


+ 42 - 0
UAS_BARCODEIO/LockCheckBox.Designer.cs

@@ -0,0 +1,42 @@
+namespace UAS_BARCODEIO { 
+    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(false);
+
+        }
+
+        #endregion
+    }
+}

+ 75 - 0
UAS_BARCODEIO/LockCheckBox.cs

@@ -0,0 +1,75 @@
+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_BARCODEIO
+{
+    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_BARCODEIO/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>

+ 89 - 0
UAS_BARCODEIO/MaCodeSearchTextBox.Designer.cs

@@ -0,0 +1,89 @@
+namespace UAS_BARCODEIO
+{
+    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 ClickPicBox();
+            this.TextBox = new 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_BARCODEIO.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(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private ClickPicBox Search_Icon;
+        public MaCodeTextBox TextBox;
+    }
+}

+ 358 - 0
UAS_BARCODEIO/MaCodeSearchTextBox.cs

@@ -0,0 +1,358 @@
+using System;
+using System.Data;
+using System.Windows.Forms;
+
+namespace UAS_BARCODEIO
+{
+    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)
+            {
+               
+            }
+            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;
+            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_BARCODEIO/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>

+ 45 - 0
UAS_BARCODEIO/MaCodeTextBox.Designer.cs

@@ -0,0 +1,45 @@
+namespace UAS_BARCODEIO
+{
+    partial class MaCodeTextBox
+    {
+        /// <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();
+            // 
+            // MaCodeTextBox
+            // 
+            this.Size = new System.Drawing.Size(196, 25);
+            this.Enter += new System.EventHandler(this.EnterTextBox_Enter);
+            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MaCodeTextBox_KeyDown);
+            this.Leave += new System.EventHandler(this.EnterTextBox_Leave);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+    }
+}

+ 87 - 0
UAS_BARCODEIO/MaCodeTextBox.cs

@@ -0,0 +1,87 @@
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace UAS_BARCODEIO
+{
+    public partial class MaCodeTextBox : TextBox
+    {
+        //传值的备用字符串
+        private string ID1;
+        private string Power1;
+        private string str;
+        private string str1;
+        private string str2;
+        /// <summary>
+        /// 设置锁定字段
+        /// </summary>
+        private bool Lock1;
+        string AllPower1;
+
+        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 bool Lock
+        {
+            get { return Lock1; }
+            set { Lock1 = value; }
+        }
+
+        public MaCodeTextBox()
+        {
+            InitializeComponent();
+            this.KeyDown += MaCodeTextBox_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 MaCodeTextBox_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.Modifiers.CompareTo(Keys.Control) == 0 && e.KeyCode == Keys.A)
+                this.SelectAll();
+        }
+    }
+}

+ 123 - 0
UAS_BARCODEIO/MaCodeTextBox.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>

+ 322 - 0
UAS_BARCODEIO/Pagination.Designer.cs

@@ -0,0 +1,322 @@
+namespace UAS_BARCODEIO
+{
+    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_BARCODEIO.ClickPicBox();
+            this.DownLoadTemplet = new UAS_BARCODEIO.ClickPicBox();
+            this.Add = new UAS_BARCODEIO.ClickPicBox();
+            this.Delete = new UAS_BARCODEIO.ClickPicBox();
+            this.ExportExcel = new UAS_BARCODEIO.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_BARCODEIO.ClickPicBox();
+            this.LastPage = new UAS_BARCODEIO.ClickPicBox();
+            this.NextPage = new UAS_BARCODEIO.ClickPicBox();
+            this.FirstPage = new UAS_BARCODEIO.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_BARCODEIO.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_BARCODEIO.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_BARCODEIO.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_BARCODEIO.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_BARCODEIO.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_BARCODEIO.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_BARCODEIO.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_BARCODEIO.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_BARCODEIO.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(false);
+            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(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Panel panel1;
+        private System.Windows.Forms.Label TotalPage;
+        private System.Windows.Forms.TextBox CurrentPage;
+        private ClickPicBox PreviousPage;
+        private ClickPicBox LastPage;
+        private ClickPicBox NextPage;
+        private ClickPicBox FirstPage;
+        private ClickPicBox ExportExcel;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
+        private ClickPicBox Add;
+        private ClickPicBox Delete;
+        private ClickPicBox DownLoadTemplet;
+        private ClickPicBox UpLoadData;
+        private System.Windows.Forms.ToolTip toolTip1;
+        private System.Windows.Forms.OpenFileDialog openFileDialog1;
+        private System.Windows.Forms.ComboBox ShowItemsNum;
+    }
+}

+ 354 - 0
UAS_BARCODEIO/Pagination.cs

@@ -0,0 +1,354 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Windows.Forms;
+
+namespace UAS_BARCODEIO
+{
+    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)
+        {
+           
+        }
+
+        private void UpLoadData_Click(object sender, EventArgs e)
+        {
+            
+        }
+
+        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_BARCODEIO/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_BARCODEIO/PaginationDbFind.Designer.cs

@@ -0,0 +1,327 @@
+namespace UAS_BARCODEIO
+{
+    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_BARCODEIO.ClickPicBox();
+            this.DownLoadTemplet = new UAS_BARCODEIO.ClickPicBox();
+            this.Add = new UAS_BARCODEIO.ClickPicBox();
+            this.Delete = new UAS_BARCODEIO.ClickPicBox();
+            this.ExportExcel = new UAS_BARCODEIO.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_BARCODEIO.ClickPicBox();
+            this.LastPage = new UAS_BARCODEIO.ClickPicBox();
+            this.NextPage = new UAS_BARCODEIO.ClickPicBox();
+            this.FirstPage = new UAS_BARCODEIO.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_BARCODEIO.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_BARCODEIO.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_BARCODEIO.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_BARCODEIO.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_BARCODEIO.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_BARCODEIO.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_BARCODEIO.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_BARCODEIO.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(false);
+            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(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Panel panel1;
+        private System.Windows.Forms.Label TotalPage;
+        private System.Windows.Forms.TextBox CurrentPage;
+        private ClickPicBox PreviousPage;
+        private ClickPicBox LastPage;
+        private ClickPicBox NextPage;
+        private ClickPicBox FirstPage;
+        private ClickPicBox ExportExcel;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
+        private ClickPicBox Add;
+        private ClickPicBox Delete;
+        private ClickPicBox DownLoadTemplet;
+        private ClickPicBox UpLoadData;
+        private System.Windows.Forms.ToolTip toolTip1;
+        private System.Windows.Forms.OpenFileDialog openFileDialog1;
+        private System.Windows.Forms.ComboBox ShowItemsNum;
+    }
+}

+ 358 - 0
UAS_BARCODEIO/PaginationDbFind.cs

@@ -0,0 +1,358 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Windows.Forms;
+
+namespace UAS_BARCODEIO
+{
+    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)
+        {
+          
+        }
+
+        private void UpLoadData_Click(object sender, EventArgs e)
+        {
+            openFileDialog1.Title = "选择需要导入的Excel";
+            if (openFileDialog1.ShowDialog() == DialogResult.OK)
+            {
+             
+            }
+        }
+
+        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_BARCODEIO/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>

+ 40 - 0
UAS_BARCODEIO/Program.cs

@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Security.Principal;
+using System.Windows.Forms;
+
+namespace UAS_BARCODEIO
+{
+    static class Program
+    {
+        /// <summary>
+        /// 应用程序的主入口点。
+        /// </summary>
+        [STAThread]
+        static void Main()
+        {
+            WindowsIdentity identity = WindowsIdentity.GetCurrent();
+            WindowsPrincipal principal = new WindowsPrincipal(identity);
+            Application.EnableVisualStyles();
+            Application.SetCompatibleTextRenderingDefault(false);
+            //如果是管理员的身份
+            if (principal.IsInRole(WindowsBuiltInRole.Administrator))
+            {
+                Application.Run(new 入库条码规则解析());
+            }
+            else
+            {
+                //创建启动对象 
+                System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
+                // 设置运行文件
+                startInfo.FileName = Application.ExecutablePath;
+                //设置启动动作,确保以管理员身份运行
+                startInfo.Verb = "runas";
+                //如果不是管理员,则启动UAC 
+                System.Diagnostics.Process.Start(startInfo);
+                //退出 System.Windows.Forms.Application.Exit(); 
+            }
+        }
+    }
+}

+ 36 - 0
UAS_BARCODEIO/Properties/AssemblyInfo.cs

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

+ 1053 - 0
UAS_BARCODEIO/Properties/Resources.Designer.cs

@@ -0,0 +1,1053 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     此代码由工具生成。
+//     运行时版本:4.0.30319.42000
+//
+//     对此文件的更改可能会导致不正确的行为,并且如果
+//     重新生成代码,这些更改将会丢失。
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace UAS_BARCODEIO{
+    using System;
+    
+    
+    /// <summary>
+    ///   一个强类型的资源类,用于查找本地化的字符串等。
+    /// </summary>
+    // 此类是由 StronglyTypedResourceBuilder
+    // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+    // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+    // (以 /str 作为命令选项),或重新生成 VS 项目。
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    public class Resources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources() {
+        }
+        
+        /// <summary>
+        ///   返回此类使用的缓存的 ResourceManager 实例。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        public static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("UAS_BARCODEIO.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   重写当前线程的 CurrentUICulture 属性,对
+        ///   使用此强类型资源类的所有资源查找执行重写。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        public static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap _07 {
+            get {
+                object obj = ResourceManager.GetObject("_07", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap _0802192135 {
+            get {
+                object obj = ResourceManager.GetObject("_0802192135", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap _2_0btn_04 {
+            get {
+                object obj = ResourceManager.GetObject("_2_0btn_04", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap _2_0btn_07 {
+            get {
+                object obj = ResourceManager.GetObject("_2_0btn_07", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap _2_0btn_36 {
+            get {
+                object obj = ResourceManager.GetObject("_2_0btn_36", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap _20130711113247276 {
+            get {
+                object obj = ResourceManager.GetObject("_20130711113247276", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap _46 {
+            get {
+                object obj = ResourceManager.GetObject("_46", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap _5600c803afc2d {
+            get {
+                object obj = ResourceManager.GetObject("_5600c803afc2d", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap _83 {
+            get {
+                object obj = ResourceManager.GetObject("_83", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap Barcode_48px_1072745_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("Barcode_48px_1072745_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap bindingNavigatorAddNewItem_Image {
+            get {
+                object obj = ResourceManager.GetObject("bindingNavigatorAddNewItem_Image", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap bindingNavigatorDeleteItem_Image {
+            get {
+                object obj = ResourceManager.GetObject("bindingNavigatorDeleteItem_Image", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap bindingNavigatorMoveFirstItem_Image {
+            get {
+                object obj = ResourceManager.GetObject("bindingNavigatorMoveFirstItem_Image", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap bindingNavigatorMoveLastItem_Image {
+            get {
+                object obj = ResourceManager.GetObject("bindingNavigatorMoveLastItem_Image", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap bindingNavigatorMoveNextItem_Image {
+            get {
+                object obj = ResourceManager.GetObject("bindingNavigatorMoveNextItem_Image", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap bindingNavigatorMovePreviousItem_Image {
+            get {
+                object obj = ResourceManager.GetObject("bindingNavigatorMovePreviousItem_Image", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap box_17_453077699294px_1191579_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("box_17_453077699294px_1191579_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap box_26_17961654894px_1191579_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("box_26_17961654894px_1191579_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap btncheckoff1 {
+            get {
+                object obj = ResourceManager.GetObject("btncheckoff1", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap btncheckoff2 {
+            get {
+                object obj = ResourceManager.GetObject("btncheckoff2", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap btncheckoff3 {
+            get {
+                object obj = ResourceManager.GetObject("btncheckoff3", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap btncheckoff4 {
+            get {
+                object obj = ResourceManager.GetObject("btncheckoff4", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap btncheckoff5 {
+            get {
+                object obj = ResourceManager.GetObject("btncheckoff5", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap btncheckoff6 {
+            get {
+                object obj = ResourceManager.GetObject("btncheckoff6", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap btncheckon1 {
+            get {
+                object obj = ResourceManager.GetObject("btncheckon1", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap btncheckon2 {
+            get {
+                object obj = ResourceManager.GetObject("btncheckon2", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap btncheckon3 {
+            get {
+                object obj = ResourceManager.GetObject("btncheckon3", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap btncheckon4 {
+            get {
+                object obj = ResourceManager.GetObject("btncheckon4", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap btncheckon5 {
+            get {
+                object obj = ResourceManager.GetObject("btncheckon5", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap btncheckon6 {
+            get {
+                object obj = ResourceManager.GetObject("btncheckon6", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap change_password {
+            get {
+                object obj = ResourceManager.GetObject("change_password", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap close {
+            get {
+                object obj = ResourceManager.GetObject("close", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap close_16px_558195_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("close_16px_558195_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap CLOSE_24px_1115282_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("CLOSE_24px_1115282_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap close_24px_1139093_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("close_24px_1139093_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap close_32px_1181428_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("close_32px_1181428_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap Close_up_32px_1181430_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("Close_up_32px_1181430_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap defaulticon {
+            get {
+                object obj = ResourceManager.GetObject("defaulticon", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap dialog_close_24px_1173781_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("dialog_close_24px_1173781_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap dialog_error_5_48px_542794_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("dialog_error_5_48px_542794_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap down {
+            get {
+                object obj = ResourceManager.GetObject("down", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap down_load1 {
+            get {
+                object obj = ResourceManager.GetObject("down_load1", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap download_14_926374650513px_1191613_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("download_14_926374650513px_1191613_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap download_17_519713261649px_1200629_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("download_17_519713261649px_1200629_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap excel {
+            get {
+                object obj = ResourceManager.GetObject("excel", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap Excel_2010_16px_1180011_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("Excel_2010_16px_1180011_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap Excel_2013_16px_1180012_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("Excel_2013_16px_1180012_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap file {
+            get {
+                object obj = ResourceManager.GetObject("file", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap file_24px_1133611_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("file_24px_1133611_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap file_24px_1175380_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("file_24px_1175380_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap file_info_64px_1176626_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("file_info_64px_1176626_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap file_manager_24px_1145241_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("file_manager_24px_1145241_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap focus {
+            get {
+                object obj = ResourceManager.GetObject("focus", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap gray {
+            get {
+                object obj = ResourceManager.GetObject("gray", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap highlight {
+            get {
+                object obj = ResourceManager.GetObject("highlight", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap icon_title {
+            get {
+                object obj = ResourceManager.GetObject("icon_title", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap Image1 {
+            get {
+                object obj = ResourceManager.GetObject("Image1", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap Light {
+            get {
+                object obj = ResourceManager.GetObject("Light", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap LoadingError {
+            get {
+                object obj = ResourceManager.GetObject("LoadingError", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap LoadingFormat {
+            get {
+                object obj = ResourceManager.GetObject("LoadingFormat", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap lock_lock_24px {
+            get {
+                object obj = ResourceManager.GetObject("lock_lock_24px", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap lock_open_24px {
+            get {
+                object obj = ResourceManager.GetObject("lock_open_24px", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap Lock24px {
+            get {
+                object obj = ResourceManager.GetObject("Lock24px", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap LoginBG {
+            get {
+                object obj = ResourceManager.GetObject("LoginBG", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap LoginCloseIcon {
+            get {
+                object obj = ResourceManager.GetObject("LoginCloseIcon", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap Logout_32px_581264_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("Logout_32px_581264_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap Material {
+            get {
+                object obj = ResourceManager.GetObject("Material", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap minus {
+            get {
+                object obj = ResourceManager.GetObject("minus", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap normal {
+            get {
+                object obj = ResourceManager.GetObject("normal", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap notice_text_editor_16px_11373_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("notice_text_editor_16px_11373_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap OQC作业 {
+            get {
+                object obj = ResourceManager.GetObject("OQC作业", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap People_48px_500819_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("People_48px_500819_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap plus {
+            get {
+                object obj = ResourceManager.GetObject("plus", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap pluslogo {
+            get {
+                object obj = ResourceManager.GetObject("pluslogo", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap preview_16px_25980_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("preview_16px_25980_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap preview_16px_25980_easyicon_net1 {
+            get {
+                object obj = ResourceManager.GetObject("preview_16px_25980_easyicon_net1", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap pwd {
+            get {
+                object obj = ResourceManager.GetObject("pwd", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap refresh {
+            get {
+                object obj = ResourceManager.GetObject("refresh", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap search_16px_1202802_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("search_16px_1202802_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap SN {
+            get {
+                object obj = ResourceManager.GetObject("SN", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap timg {
+            get {
+                object obj = ResourceManager.GetObject("timg", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap two_arrow_left {
+            get {
+                object obj = ResourceManager.GetObject("two_arrow_left", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap two_arrow_right {
+            get {
+                object obj = ResourceManager.GetObject("two_arrow_right", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap uas_blue {
+            get {
+                object obj = ResourceManager.GetObject("uas_blue", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap updating {
+            get {
+                object obj = ResourceManager.GetObject("updating", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap upload_17_459649122807px_1200703_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("upload_17_459649122807px_1200703_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap upload_17_459649122807px_1200703_easyicon_net__1_ {
+            get {
+                object obj = ResourceManager.GetObject("upload_17_459649122807px_1200703_easyicon_net__1_", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap upload_icon1 {
+            get {
+                object obj = ResourceManager.GetObject("upload_icon1", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap White_side {
+            get {
+                object obj = ResourceManager.GetObject("White_side", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap WhiteImage {
+            get {
+                object obj = ResourceManager.GetObject("WhiteImage", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap write_15_893687707641px_1181413_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("write_15_893687707641px_1181413_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap zxing_android_code_48px_1107946_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("zxing_android_code_48px_1107946_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap 产线作业 {
+            get {
+                object obj = ResourceManager.GetObject("产线作业", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap 人员管理 {
+            get {
+                object obj = ResourceManager.GetObject("人员管理", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap 仓库作业 {
+            get {
+                object obj = ResourceManager.GetObject("仓库作业", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap 包装作业 {
+            get {
+                object obj = ResourceManager.GetObject("包装作业", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap 查询分析 {
+            get {
+                object obj = ResourceManager.GetObject("查询分析", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap 特殊作业 {
+            get {
+                object obj = ResourceManager.GetObject("特殊作业", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        public static System.Drawing.Bitmap 系统设置 {
+            get {
+                object obj = ResourceManager.GetObject("系统设置", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+    }
+}

+ 418 - 0
UAS_BARCODEIO/Properties/Resources.resx

@@ -0,0 +1,418 @@
+<?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="Barcode_48px_1072745_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Barcode_48px_1072745_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="bindingNavigatorAddNewItem_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\bindingNavigatorAddNewItem.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="bindingNavigatorDeleteItem_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\bindingNavigatorDeleteItem.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="bindingNavigatorMoveFirstItem_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\bindingNavigatorMoveFirstItem.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="bindingNavigatorMoveLastItem_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\bindingNavigatorMoveLastItem.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="bindingNavigatorMoveNextItem_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\bindingNavigatorMoveNextItem.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="bindingNavigatorMovePreviousItem_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\bindingNavigatorMovePreviousItem.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="box_17_453077699294px_1191579_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\box_17.453077699294px_1191579_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="box_26_17961654894px_1191579_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\box_26.17961654894px_1191579_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="btncheckoff1" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\btncheckoff1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="btncheckoff2" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\btncheckoff2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="btncheckoff3" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\btncheckoff3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="btncheckoff4" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\btncheckoff4.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="btncheckoff5" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\btncheckoff5.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="btncheckoff6" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\btncheckoff6.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="btncheckon1" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\btncheckon1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="btncheckon2" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\btncheckon2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="btncheckon3" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\btncheckon3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="btncheckon4" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\btncheckon4.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="btncheckon5" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\btncheckon5.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="btncheckon6" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\btncheckon6.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="change_password" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\change_password.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="close" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="close_16px_558195_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\close_16px_558195_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="CLOSE_24px_1115282_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\CLOSE_24px_1115282_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="close_24px_1139093_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\close_24px_1139093_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="close_32px_1181428_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\close_32px_1181428_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="Close_up_32px_1181430_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Close_up_32px_1181430_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="defaulticon" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\defaulticon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="dialog_close_24px_1173781_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\dialog_close_24px_1173781_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="dialog_error_5_48px_542794_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\dialog_error_5_48px_542794_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="down" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="download_14_926374650513px_1191613_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\download_14.926374650513px_1191613_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="download_17_519713261649px_1200629_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\download_17.519713261649px_1200629_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="down_load1" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\download_17.519713261649px_1200629_easyicon.net (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="excel" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\excel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="Excel_2010_16px_1180011_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Excel_2010_16px_1180011_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="Excel_2013_16px_1180012_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Excel_2013_16px_1180012_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="file" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\file.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="file_24px_1133611_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\file_24px_1133611_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="file_24px_1175380_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\file_24px_1175380_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="file_info_64px_1176626_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\file_info_64px_1176626_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="file_manager_24px_1145241_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\file_manager_24px_1145241_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="focus" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\focus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="gray" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\gray.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="highlight" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\highlight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="icon_title" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\icon_title.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="Image1" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Image1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="Light" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Light.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="LoadingError" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\LoadingError.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="LoadingFormat" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\LoadingFormat.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="Lock24px" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Lock24px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="lock_lock_24px" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\lock_lock_24px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="lock_open_24px" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\lock_open_24px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="LoginBG" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\LoginBG.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="LoginCloseIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\close_24px_1139293_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="Logout_32px_581264_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Logout_32px_581264_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="Material" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\15aedb5b-a345-48b6-8b81-784e410d7fd1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="minus" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\minus.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="normal" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\normal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="notice_text_editor_16px_11373_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\notice_text_editor_16px_11373_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="OQC作业" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\OQC作业.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="People_48px_500819_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\People_48px_500819_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="plus" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\plus.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="pluslogo" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\pluslogo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="preview_16px_25980_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\tool\preview_16px_25980_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="preview_16px_25980_easyicon_net1" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\preview_16px_25980_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="pwd" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\pwd.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="refresh" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="search_16px_1202802_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\search_16px_1202802_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="SN" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\b473847f-a85b-400e-807a-4875c4c07ff1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="timg" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\timg.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="two_arrow_left" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\two_arrow_left.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="two_arrow_right" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\two_arrow_right.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="uas_blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\uas_blue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="updating" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\updating.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="upload_17_459649122807px_1200703_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\upload_17.459649122807px_1200703_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="upload_17_459649122807px_1200703_easyicon_net__1_" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\upload_17.459649122807px_1200703_easyicon.net (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="upload_icon1" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\upload_icon1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="WhiteImage" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\WhiteImage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="White_side" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\White-side.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="write_15_893687707641px_1181413_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\write_15.893687707641px_1181413_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="zxing_android_code_48px_1107946_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\zxing_android_code_48px_1107946_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="_07" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\07.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="_0802192135" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\0802192135.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="_20130711113247276" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\20130711113247276.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="_2_0btn_04" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\2-0btn_04.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="_2_0btn_07" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\2-0btn_07.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="_2_0btn_36" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\2-0btn_36.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="_46" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\46.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="_5600c803afc2d" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\5600c803afc2d.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="_83" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\83.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="产线作业" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\产线作业.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="人员管理" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\人员管理.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="仓库作业" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\仓库作业.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="包装作业" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\包装作业.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="查询分析" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\查询分析.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="特殊作业" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\特殊作业.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="系统设置" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\系统设置.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+</root>

+ 86 - 0
UAS_BARCODEIO/Properties/Settings.Designer.cs

@@ -0,0 +1,86 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     此代码由工具生成。
+//     运行时版本:4.0.30319.42000
+//
+//     对此文件的更改可能会导致不正确的行为,并且如果
+//     重新生成代码,这些更改将会丢失。
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace UAS_BARCODEIO.Properties {
+    
+    
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.6.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+        
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+        
+        public static Settings Default {
+            get {
+                return defaultInstance;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("172.16.0.20")]
+        public string ftpaddress {
+            get {
+                return ((string)(this["ftpaddress"]));
+            }
+            set {
+                this["ftpaddress"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("vsftpd")]
+        public string ftpuser {
+            get {
+                return ((string)(this["ftpuser"]));
+            }
+            set {
+                this["ftpuser"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("shenaftp")]
+        public string ftppassword {
+            get {
+                return ((string)(this["ftppassword"]));
+            }
+            set {
+                this["ftppassword"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("False")]
+        public bool ifuseftp {
+            get {
+                return ((bool)(this["ifuseftp"]));
+            }
+            set {
+                this["ifuseftp"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("1")]
+        public int Printnum {
+            get {
+                return ((int)(this["Printnum"]));
+            }
+            set {
+                this["Printnum"] = value;
+            }
+        }
+    }
+}

+ 21 - 0
UAS_BARCODEIO/Properties/Settings.settings

@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="UAS_BARCODEIO.Properties" GeneratedClassName="Settings">
+  <Profiles />
+  <Settings>
+    <Setting Name="ftpaddress" Type="System.String" Scope="User">
+      <Value Profile="(Default)">172.16.0.20</Value>
+    </Setting>
+    <Setting Name="ftpuser" Type="System.String" Scope="User">
+      <Value Profile="(Default)">vsftpd</Value>
+    </Setting>
+    <Setting Name="ftppassword" Type="System.String" Scope="User">
+      <Value Profile="(Default)">shenaftp</Value>
+    </Setting>
+    <Setting Name="ifuseftp" Type="System.Boolean" Scope="User">
+      <Value Profile="(Default)">False</Value>
+    </Setting>
+    <Setting Name="Printnum" Type="System.Int32" Scope="User">
+      <Value Profile="(Default)">1</Value>
+    </Setting>
+  </Settings>
+</SettingsFile>

BIN
UAS_BARCODEIO/Resources/07.gif


BIN
UAS_BARCODEIO/Resources/0802192135.png


BIN
UAS_BARCODEIO/Resources/15aedb5b-a345-48b6-8b81-784e410d7fd1.png


BIN
UAS_BARCODEIO/Resources/2-0btn_04.png


BIN
UAS_BARCODEIO/Resources/2-0btn_07.png


BIN
UAS_BARCODEIO/Resources/2-0btn_36.png


BIN
UAS_BARCODEIO/Resources/20130711113247276.png


BIN
UAS_BARCODEIO/Resources/46.gif


BIN
UAS_BARCODEIO/Resources/5600c803afc2d.png


BIN
UAS_BARCODEIO/Resources/83.gif


BIN
UAS_BARCODEIO/Resources/Barcode_48px_1072745_easyicon.net.png


BIN
UAS_BARCODEIO/Resources/CLOSE_24px_1115282_easyicon.net.png


BIN
UAS_BARCODEIO/Resources/Close_up_32px_1181430_easyicon.net.png


BIN
UAS_BARCODEIO/Resources/Excel_2010_16px_1180011_easyicon.net.png


BIN
UAS_BARCODEIO/Resources/Excel_2013_16px_1180012_easyicon.net.png


BIN
UAS_BARCODEIO/Resources/Image1.bmp


BIN
UAS_BARCODEIO/Resources/Light.png


BIN
UAS_BARCODEIO/Resources/LoadingError.gif


BIN
UAS_BARCODEIO/Resources/LoadingFormat.gif


BIN
UAS_BARCODEIO/Resources/Lock24px.png


BIN
UAS_BARCODEIO/Resources/LoginBG.jpg


BIN
UAS_BARCODEIO/Resources/Logout_32px_581264_easyicon.net.png


BIN
UAS_BARCODEIO/Resources/OQC作业.png


BIN
UAS_BARCODEIO/Resources/People_48px_500819_easyicon.net.png


BIN
UAS_BARCODEIO/Resources/White-side.png


BIN
UAS_BARCODEIO/Resources/WhiteImage.png


BIN
UAS_BARCODEIO/Resources/b473847f-a85b-400e-807a-4875c4c07ff1.png


BIN
UAS_BARCODEIO/Resources/bindingNavigatorAddNewItem.Image.png


BIN
UAS_BARCODEIO/Resources/bindingNavigatorDeleteItem.Image.png


BIN
UAS_BARCODEIO/Resources/bindingNavigatorMoveFirstItem.Image.png


BIN
UAS_BARCODEIO/Resources/bindingNavigatorMoveLastItem.Image.png


BIN
UAS_BARCODEIO/Resources/bindingNavigatorMoveNextItem.Image.png


BIN
UAS_BARCODEIO/Resources/bindingNavigatorMovePreviousItem.Image.png


BIN
UAS_BARCODEIO/Resources/box_17.453077699294px_1191579_easyicon.net.png


BIN
UAS_BARCODEIO/Resources/box_26.17961654894px_1191579_easyicon.net.png


BIN
UAS_BARCODEIO/Resources/btncheckoff1.png


BIN
UAS_BARCODEIO/Resources/btncheckoff2.png


BIN
UAS_BARCODEIO/Resources/btncheckoff3.png


BIN
UAS_BARCODEIO/Resources/btncheckoff4.png


BIN
UAS_BARCODEIO/Resources/btncheckoff5.png


BIN
UAS_BARCODEIO/Resources/btncheckoff6.png


BIN
UAS_BARCODEIO/Resources/btncheckon1.png


BIN
UAS_BARCODEIO/Resources/btncheckon2.png


BIN
UAS_BARCODEIO/Resources/btncheckon3.png


BIN
UAS_BARCODEIO/Resources/btncheckon4.png


BIN
UAS_BARCODEIO/Resources/btncheckon5.png


BIN
UAS_BARCODEIO/Resources/btncheckon6.png


BIN
UAS_BARCODEIO/Resources/change_password.png


BIN
UAS_BARCODEIO/Resources/close.png


BIN
UAS_BARCODEIO/Resources/close_16px_558195_easyicon.net.png


BIN
UAS_BARCODEIO/Resources/close_24px_1139093_easyicon.net.png


BIN
UAS_BARCODEIO/Resources/close_24px_1139293_easyicon.net.png


BIN
UAS_BARCODEIO/Resources/close_32px_1181428_easyicon.net.png


BIN
UAS_BARCODEIO/Resources/defaulticon.png


BIN
UAS_BARCODEIO/Resources/dialog_close_24px_1173781_easyicon.net.png


BIN
UAS_BARCODEIO/Resources/dialog_error_5_48px_542794_easyicon.net.png


BIN
UAS_BARCODEIO/Resources/down.png


BIN
UAS_BARCODEIO/Resources/download_14.926374650513px_1191613_easyicon.net.png


BIN
UAS_BARCODEIO/Resources/download_17.519713261649px_1200629_easyicon.net (1).png


BIN
UAS_BARCODEIO/Resources/download_17.519713261649px_1200629_easyicon.net.png


BIN
UAS_BARCODEIO/Resources/excel.png


BIN
UAS_BARCODEIO/Resources/file.png


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