Browse Source

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

Hcsy 7 years ago
parent
commit
e983337ad4
26 changed files with 1744 additions and 87 deletions
  1. 31 7
      UAS_DeviceMonitor/CustomerControl/AutoDataGridControl/AutoDataGridControl.cs
  2. 2 2
      UAS_DeviceMonitor/CustomerControl/Button/ButtonAddRow.Designer.cs
  3. 6 1
      UAS_DeviceMonitor/CustomerControl/Button/ButtonAddRow.cs
  4. 42 0
      UAS_DeviceMonitor/CustomerControl/Button/ButtonDeleteRow.Designer.cs
  5. 63 0
      UAS_DeviceMonitor/CustomerControl/Button/ButtonDeleteRow.cs
  6. 123 0
      UAS_DeviceMonitor/CustomerControl/Button/ButtonDeleteRow.resx
  7. 40 4
      UAS_DeviceMonitor/CustomerControl/Button/ButtonSaveGrid.cs
  8. 42 0
      UAS_DeviceMonitor/CustomerControl/GridViewWithSerialNum/GridViewWithSerialNum.Designer.cs
  9. 21 0
      UAS_DeviceMonitor/CustomerControl/GridViewWithSerialNum/GridViewWithSerialNum.cs
  10. 123 0
      UAS_DeviceMonitor/CustomerControl/GridViewWithSerialNum/GridViewWithSerialNum.resx
  11. 26 0
      UAS_DeviceMonitor/DataOperate/ComboBoxData.cs
  12. 4 2
      UAS_DeviceMonitor/DataOperate/DataHelper.cs
  13. 257 0
      UAS_DeviceMonitor/Device/Command/FormNewCommand.Designer.cs
  14. 57 0
      UAS_DeviceMonitor/Device/Command/FormNewCommand.cs
  15. 120 0
      UAS_DeviceMonitor/Device/Command/FormNewCommand.resx
  16. 0 32
      UAS_DeviceMonitor/Entity/SystemInf.cs
  17. 245 24
      UAS_DeviceMonitor/Main.Designer.cs
  18. 114 11
      UAS_DeviceMonitor/Main.cs
  19. 287 0
      UAS_DeviceMonitor/Main.resx
  20. 2 3
      UAS_DeviceMonitor/Program.cs
  21. 10 0
      UAS_DeviceMonitor/Properties/Resources.Designer.cs
  22. 3 0
      UAS_DeviceMonitor/Properties/Resources.resx
  23. 84 0
      UAS_DeviceMonitor/PublicMethod/BaseUtil.cs
  24. 11 0
      UAS_DeviceMonitor/PublicMethod/PollingThread.cs
  25. BIN
      UAS_DeviceMonitor/Resources/U_Letter_64px_1121581_easyicon.net.ico
  26. 31 1
      UAS_DeviceMonitor/UAS_DeviceMonitor.csproj

+ 31 - 7
UAS_DeviceMonitor/CustomerControl/AutoDataGridControl/AutoDataGridControl.cs

@@ -1,14 +1,7 @@
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
 using System.Data;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
 using DevExpress.XtraGrid;
 using UAS_DeviceMonitor.DataOperate;
-using UAS_DeviceMonitor.Entity;
 
 namespace UAS_DeviceMonitor.CustomerControl.AutoDataGridControl
 {
@@ -16,6 +9,11 @@ namespace UAS_DeviceMonitor.CustomerControl.AutoDataGridControl
     {
         string getDataSQL;
 
+        string condition;
+
+        //记录初始化的SQL,防止条件重复拼接
+        string firstsql;
+
         DataHelper dh = new DataHelper();
         //获取数据的SQL
         public string GetDataSQL
@@ -28,8 +26,11 @@ namespace UAS_DeviceMonitor.CustomerControl.AutoDataGridControl
             set
             {
                 getDataSQL = value;
+                firstsql = value;
             }
         }
+
+
         //获取数据的总行数
         public int RowCount
         {
@@ -83,6 +84,19 @@ namespace UAS_DeviceMonitor.CustomerControl.AutoDataGridControl
             }
         }
 
+        public string Condition
+        {
+            get
+            {
+                return condition;
+            }
+
+            set
+            {
+                condition = value;
+            }
+        }
+
         private string insertSQL;
 
         //用于保存数据的主表的名称
@@ -98,12 +112,22 @@ namespace UAS_DeviceMonitor.CustomerControl.AutoDataGridControl
         }
 
         private void AutoDataGridControl_VisibleChanged(object sender, EventArgs e)
+        {
+            RefreshData();
+        }
+
+        public void RefreshData()
         {
             if (getDataSQL != null)
             {
+                if (condition != null)
+                {
+                    getDataSQL = getDataSQL + " " + condition;
+                }
                 DataTable dt = (DataTable)dh.ExecuteSql(getDataSQL, "select");
                 rowCount = dt.Rows.Count;
                 DataSource = dt;
+                getDataSQL = firstsql;
             }
         }
     }

+ 2 - 2
UAS_DeviceMonitor/CustomerControl/Button/ButtonAddRow.Designer.cs

@@ -30,9 +30,9 @@
         {
             this.SuspendLayout();
             // 
-            // ButtonSaveGrid
+            // ButtonAddRow
             // 
-            this.Click += new System.EventHandler(this.ButtonSaveGrid_Click);
+            this.Click += new System.EventHandler(this.ButtonAddRow_Click);
             this.ResumeLayout(false);
 
         }

+ 6 - 1
UAS_DeviceMonitor/CustomerControl/Button/ButtonAddRow.cs

@@ -29,10 +29,15 @@ namespace UAS_DeviceMonitor.CustomerControl.Button
         }
 
         private void ButtonSaveGrid_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void ButtonAddRow_Click(object sender, EventArgs e)
         {
             DataTable dt = (DataTable)grid.DataSource;
             if (dt != null)
-                SystemInf.dh.SaveDataTable(dt, grid.TableName, grid.ID, grid.InsertSQL);
+                dt.Rows.Add();
         }
     }
 }

+ 42 - 0
UAS_DeviceMonitor/CustomerControl/Button/ButtonDeleteRow.Designer.cs

@@ -0,0 +1,42 @@
+namespace UAS_DeviceMonitor.CustomerControl.Button
+{
+    partial class ButtonDeleteRow
+    {
+        /// <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();
+            // 
+            // ButtonDeleteRow
+            // 
+            this.Click += new System.EventHandler(this.ButtonDeleteRow_Click);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+    }
+}

+ 63 - 0
UAS_DeviceMonitor/CustomerControl/Button/ButtonDeleteRow.cs

@@ -0,0 +1,63 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using DevExpress.XtraEditors;
+using DevExpress.XtraGrid.Views.Grid;
+using UAS_DeviceMonitor.Entity;
+
+namespace UAS_DeviceMonitor.CustomerControl.Button
+{
+    public partial class ButtonDeleteRow : SimpleButton
+    {
+        private AutoDataGridControl.AutoDataGridControl grid;
+
+        public AutoDataGridControl.AutoDataGridControl Grid
+        {
+            get
+            {
+                return grid;
+            }
+
+            set
+            {
+                grid = value;
+            }
+        }
+
+
+        public ButtonDeleteRow()
+        {
+            InitializeComponent();
+        }
+
+        private void ButtonDeleteRow_Click(object sender, EventArgs e)
+        {
+            if (grid != null)
+            {
+                List<string> DeleteID = new List<string>();
+                GridView view = grid.MainView as GridView;
+                for (int i = 0; i < grid.RowCount; i++)
+                {
+                    string Checked = view.GetRowCellValue(i, "CHOOSE").ToString().ToUpper();
+                    if (Checked != "0")
+                        DeleteID.Add(view.GetRowCellValue(i, grid.ID.ToUpper()).ToString());
+                }
+                if (DeleteID.Count > 0)
+                {
+                    DialogResult result = XtraMessageBox.Show("确认删除", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
+                    if (result.ToString() == "Yes")
+                    {
+                        SystemInf.dh.DeleteDataByID(grid.TableName, grid.ID, DeleteID.ToArray());
+                        grid.RefreshData();
+                    }
+                }
+                else XtraMessageBox.Show("请选择要删除的数据", "提示");
+            }
+        }
+    }
+}

+ 123 - 0
UAS_DeviceMonitor/CustomerControl/Button/ButtonDeleteRow.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>

+ 40 - 4
UAS_DeviceMonitor/CustomerControl/Button/ButtonSaveGrid.cs

@@ -9,6 +9,10 @@ namespace UAS_DeviceMonitor.CustomerControl.Button
     {
 
         private AutoDataGridControl.AutoDataGridControl grid;
+        /// <summary>
+        /// 设置是否优先处理用户自定义的Click事件
+        /// </summary>
+        private bool handlerOtherFirst = false;
 
         public AutoDataGridControl.AutoDataGridControl Grid
         {
@@ -23,16 +27,48 @@ namespace UAS_DeviceMonitor.CustomerControl.Button
             }
         }
 
+        public bool HandlerOtherFirst
+        {
+            get
+            {
+                return handlerOtherFirst;
+            }
+
+            set
+            {
+                handlerOtherFirst = value;
+            }
+        }
+
         public ButtonSaveGrid()
         {
             InitializeComponent();
         }
 
-        private void ButtonSaveGrid_Click(object sender, EventArgs e)
+        /// <summary>
+        /// 处理完其他Click事件提供回调函数重新触发保存事件
+        /// </summary>
+        public void DoSave()
         {
-            DataTable dt = (DataTable)grid.DataSource;
-            if (dt != null)
+            DataTable dt = ((DataTable)grid.DataSource).GetChanges();
+            if (dt != null && dt.Rows.Count > 0)
+            {
                 SystemInf.dh.SaveDataTable(dt, grid.TableName, grid.ID, grid.InsertSQL);
+                grid.RefreshData();
+                XtraMessageBox.Show("保存成功", "提示");
+            }
+            else
+            {
+                XtraMessageBox.Show("没有修改过的数据", "提示");
+            }
+        }
+
+        private void ButtonSaveGrid_Click(object sender, EventArgs e)
+        {
+            if (!handlerOtherFirst)
+            {
+                DoSave();
+            }
         }
     }
-}
+}

+ 42 - 0
UAS_DeviceMonitor/CustomerControl/GridViewWithSerialNum/GridViewWithSerialNum.Designer.cs

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

+ 21 - 0
UAS_DeviceMonitor/CustomerControl/GridViewWithSerialNum/GridViewWithSerialNum.cs

@@ -0,0 +1,21 @@
+using DevExpress.XtraGrid.Views.Grid;
+
+namespace UAS_DeviceMonitor.CustomerControl.GridViewWithSerialNum
+{
+    public partial class GridViewWithSerialNum : GridView
+    {
+        public GridViewWithSerialNum()
+        {
+            InitializeComponent();
+            IndicatorWidth = 30;
+        }
+
+        private void GridViewWithSerialNum_CustomDrawRowIndicator(object sender, RowIndicatorCustomDrawEventArgs e)
+        {
+            if (e.Info.IsRowIndicator && e.RowHandle >= 0)
+            {
+                e.Info.DisplayText = (e.RowHandle + 1).ToString();
+            }
+        }
+    }
+}

+ 123 - 0
UAS_DeviceMonitor/CustomerControl/GridViewWithSerialNum/GridViewWithSerialNum.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>

+ 26 - 0
UAS_DeviceMonitor/DataOperate/ComboBoxData.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace UAS_DeviceMonitor.DataOperate
+{
+    class ComboBoxData
+    {
+        /// <summary>
+        /// 值
+        /// </summary>
+        public string Text { set; get; }
+
+        /// <summary>
+        /// 键
+        /// </summary>
+        public string Value { set; get; }
+
+        /// <returns>返回ComboBox的值</returns>
+        public override string ToString()
+        {
+            return Text;
+        }
+    }
+}

+ 4 - 2
UAS_DeviceMonitor/DataOperate/DataHelper.cs

@@ -14,7 +14,6 @@ namespace UAS_DeviceMonitor.DataOperate
         public static string DBConnectionString;
         public static OracleConnection connection = null;
         OracleCommand command = null;
-        int ReconnectTime = 0;
         /// <summary>
         /// 执行构造函数的时候打开数据库的链接
         /// </summary>
@@ -809,7 +808,10 @@ namespace UAS_DeviceMonitor.DataOperate
             command = new OracleCommand(sql, connection);
             Reconnect(command);
             command.ArrayBindCount = names[1].Length;
-
+            if (names[1].Length == 0)
+            {
+                return;
+            }
             //因为第一个数组保存的是参数的名称,所以循环从1而不是0开始
             //将第一个数组的下标固定为0作为循环添加的参数的名称
             for (int i = 1; i <= names[0].Length; i++)

+ 257 - 0
UAS_DeviceMonitor/Device/Command/FormNewCommand.Designer.cs

@@ -0,0 +1,257 @@
+namespace UAS_DeviceMonitor.Device.Command
+{
+    partial class FormNewCommand
+    {
+        /// <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.AddCommand = new DevExpress.XtraEditors.SimpleButton();
+            this.CodeClientAddress = new DevExpress.XtraEditors.ComboBoxEdit();
+            this.CodeFunction = new DevExpress.XtraEditors.ComboBoxEdit();
+            this.CodeAddress = new DevExpress.XtraEditors.TextEdit();
+            this.CodeLength = new DevExpress.XtraEditors.TextEdit();
+            this.CodeClientAddress_label = new DevExpress.XtraEditors.LabelControl();
+            this.CodeFunction_label = new DevExpress.XtraEditors.LabelControl();
+            this.CodeAddress_label = new DevExpress.XtraEditors.LabelControl();
+            this.CodeLength_label = new DevExpress.XtraEditors.LabelControl();
+            this.dc_name_label = new DevExpress.XtraEditors.LabelControl();
+            this.dc_code_label = new DevExpress.XtraEditors.LabelControl();
+            this.dc_name = new DevExpress.XtraEditors.TextEdit();
+            this.dc_code = new DevExpress.XtraEditors.TextEdit();
+            this.CodeComplement_label = new DevExpress.XtraEditors.LabelControl();
+            this.CodeEnd_label = new DevExpress.XtraEditors.LabelControl();
+            this.CodeEnd = new DevExpress.XtraEditors.ComboBoxEdit();
+            this.CodeComplement = new DevExpress.XtraEditors.ComboBoxEdit();
+            ((System.ComponentModel.ISupportInitialize)(this.CodeClientAddress.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.CodeFunction.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.CodeAddress.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.CodeLength.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dc_name.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dc_code.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.CodeEnd.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.CodeComplement.Properties)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // AddCommand
+            // 
+            this.AddCommand.Location = new System.Drawing.Point(347, 133);
+            this.AddCommand.Name = "AddCommand";
+            this.AddCommand.Size = new System.Drawing.Size(75, 23);
+            this.AddCommand.TabIndex = 0;
+            this.AddCommand.Text = "确认添加";
+            this.AddCommand.Click += new System.EventHandler(this.AddCommand_Click);
+            // 
+            // CodeClientAddress
+            // 
+            this.CodeClientAddress.Location = new System.Drawing.Point(75, 80);
+            this.CodeClientAddress.Name = "CodeClientAddress";
+            this.CodeClientAddress.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.CodeClientAddress.Size = new System.Drawing.Size(63, 20);
+            this.CodeClientAddress.TabIndex = 1;
+            // 
+            // CodeFunction
+            // 
+            this.CodeFunction.Location = new System.Drawing.Point(198, 80);
+            this.CodeFunction.Name = "CodeFunction";
+            this.CodeFunction.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.CodeFunction.Size = new System.Drawing.Size(63, 20);
+            this.CodeFunction.TabIndex = 2;
+            // 
+            // CodeAddress
+            // 
+            this.CodeAddress.Location = new System.Drawing.Point(318, 80);
+            this.CodeAddress.Name = "CodeAddress";
+            this.CodeAddress.Size = new System.Drawing.Size(60, 20);
+            this.CodeAddress.TabIndex = 3;
+            // 
+            // CodeLength
+            // 
+            this.CodeLength.Location = new System.Drawing.Point(447, 80);
+            this.CodeLength.Name = "CodeLength";
+            this.CodeLength.Size = new System.Drawing.Size(60, 20);
+            this.CodeLength.TabIndex = 4;
+            // 
+            // CodeClientAddress_label
+            // 
+            this.CodeClientAddress_label.Location = new System.Drawing.Point(18, 83);
+            this.CodeClientAddress_label.Name = "CodeClientAddress_label";
+            this.CodeClientAddress_label.Size = new System.Drawing.Size(48, 14);
+            this.CodeClientAddress_label.TabIndex = 5;
+            this.CodeClientAddress_label.Text = "从站地址";
+            // 
+            // CodeFunction_label
+            // 
+            this.CodeFunction_label.Location = new System.Drawing.Point(144, 83);
+            this.CodeFunction_label.Name = "CodeFunction_label";
+            this.CodeFunction_label.Size = new System.Drawing.Size(36, 14);
+            this.CodeFunction_label.TabIndex = 6;
+            this.CodeFunction_label.Text = "命令码";
+            // 
+            // CodeAddress_label
+            // 
+            this.CodeAddress_label.AccessibleDescription = "";
+            this.CodeAddress_label.Location = new System.Drawing.Point(276, 83);
+            this.CodeAddress_label.Name = "CodeAddress_label";
+            this.CodeAddress_label.Size = new System.Drawing.Size(36, 14);
+            this.CodeAddress_label.TabIndex = 7;
+            this.CodeAddress_label.Text = "地址位";
+            // 
+            // CodeLength_label
+            // 
+            this.CodeLength_label.Location = new System.Drawing.Point(393, 83);
+            this.CodeLength_label.Name = "CodeLength_label";
+            this.CodeLength_label.Size = new System.Drawing.Size(48, 14);
+            this.CodeLength_label.TabIndex = 8;
+            this.CodeLength_label.Text = "操作位数";
+            // 
+            // dc_name_label
+            // 
+            this.dc_name_label.Location = new System.Drawing.Point(144, 30);
+            this.dc_name_label.Name = "dc_name_label";
+            this.dc_name_label.Size = new System.Drawing.Size(48, 14);
+            this.dc_name_label.TabIndex = 12;
+            this.dc_name_label.Text = "指令名称";
+            // 
+            // dc_code_label
+            // 
+            this.dc_code_label.AccessibleDescription = "";
+            this.dc_code_label.Location = new System.Drawing.Point(18, 30);
+            this.dc_code_label.Name = "dc_code_label";
+            this.dc_code_label.Size = new System.Drawing.Size(48, 14);
+            this.dc_code_label.TabIndex = 11;
+            this.dc_code_label.Text = "指令编号";
+            // 
+            // dc_name
+            // 
+            this.dc_name.Location = new System.Drawing.Point(198, 27);
+            this.dc_name.Name = "dc_name";
+            this.dc_name.Size = new System.Drawing.Size(60, 20);
+            this.dc_name.TabIndex = 10;
+            // 
+            // dc_code
+            // 
+            this.dc_code.Location = new System.Drawing.Point(73, 27);
+            this.dc_code.Name = "dc_code";
+            this.dc_code.Size = new System.Drawing.Size(65, 20);
+            this.dc_code.TabIndex = 9;
+            // 
+            // CodeComplement_label
+            // 
+            this.CodeComplement_label.Location = new System.Drawing.Point(528, 83);
+            this.CodeComplement_label.Name = "CodeComplement_label";
+            this.CodeComplement_label.Size = new System.Drawing.Size(24, 14);
+            this.CodeComplement_label.TabIndex = 14;
+            this.CodeComplement_label.Text = "补码";
+            // 
+            // CodeEnd_label
+            // 
+            this.CodeEnd_label.Location = new System.Drawing.Point(646, 83);
+            this.CodeEnd_label.Name = "CodeEnd_label";
+            this.CodeEnd_label.Size = new System.Drawing.Size(36, 14);
+            this.CodeEnd_label.TabIndex = 16;
+            this.CodeEnd_label.Text = "结束位";
+            // 
+            // CodeEnd
+            // 
+            this.CodeEnd.Location = new System.Drawing.Point(700, 80);
+            this.CodeEnd.Name = "CodeEnd";
+            this.CodeEnd.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.CodeEnd.Size = new System.Drawing.Size(63, 20);
+            this.CodeEnd.TabIndex = 18;
+            // 
+            // CodeComplement
+            // 
+            this.CodeComplement.Location = new System.Drawing.Point(567, 80);
+            this.CodeComplement.Name = "CodeComplement";
+            this.CodeComplement.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.CodeComplement.Size = new System.Drawing.Size(63, 20);
+            this.CodeComplement.TabIndex = 17;
+            // 
+            // FormNewCommand
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(766, 190);
+            this.Controls.Add(this.CodeEnd);
+            this.Controls.Add(this.CodeComplement);
+            this.Controls.Add(this.CodeEnd_label);
+            this.Controls.Add(this.CodeComplement_label);
+            this.Controls.Add(this.dc_name_label);
+            this.Controls.Add(this.dc_code_label);
+            this.Controls.Add(this.dc_name);
+            this.Controls.Add(this.dc_code);
+            this.Controls.Add(this.CodeLength_label);
+            this.Controls.Add(this.CodeAddress_label);
+            this.Controls.Add(this.CodeFunction_label);
+            this.Controls.Add(this.CodeClientAddress_label);
+            this.Controls.Add(this.CodeLength);
+            this.Controls.Add(this.CodeAddress);
+            this.Controls.Add(this.CodeFunction);
+            this.Controls.Add(this.CodeClientAddress);
+            this.Controls.Add(this.AddCommand);
+            this.FormBorderEffect = DevExpress.XtraEditors.FormBorderEffect.None;
+            this.Name = "FormNewCommand";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+            this.Text = " ";
+            this.Load += new System.EventHandler(this.FormNewCommand_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.CodeClientAddress.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.CodeFunction.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.CodeAddress.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.CodeLength.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dc_name.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dc_code.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.CodeEnd.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.CodeComplement.Properties)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private DevExpress.XtraEditors.SimpleButton AddCommand;
+        private DevExpress.XtraEditors.ComboBoxEdit CodeClientAddress;
+        private DevExpress.XtraEditors.ComboBoxEdit CodeFunction;
+        private DevExpress.XtraEditors.TextEdit CodeAddress;
+        private DevExpress.XtraEditors.TextEdit CodeLength;
+        private DevExpress.XtraEditors.LabelControl CodeClientAddress_label;
+        private DevExpress.XtraEditors.LabelControl CodeFunction_label;
+        private DevExpress.XtraEditors.LabelControl CodeAddress_label;
+        private DevExpress.XtraEditors.LabelControl CodeLength_label;
+        private DevExpress.XtraEditors.LabelControl dc_name_label;
+        private DevExpress.XtraEditors.LabelControl dc_code_label;
+        private DevExpress.XtraEditors.TextEdit dc_name;
+        private DevExpress.XtraEditors.TextEdit dc_code;
+        private DevExpress.XtraEditors.LabelControl CodeComplement_label;
+        private DevExpress.XtraEditors.LabelControl CodeEnd_label;
+        private DevExpress.XtraEditors.ComboBoxEdit CodeEnd;
+        private DevExpress.XtraEditors.ComboBoxEdit CodeComplement;
+    }
+}

+ 57 - 0
UAS_DeviceMonitor/Device/Command/FormNewCommand.cs

@@ -0,0 +1,57 @@
+using System;
+using DevExpress.XtraEditors;
+using UAS_DeviceMonitor.Entity;
+using System.Data;
+using UAS_DeviceMonitor.DataOperate;
+using UAS_DeviceMonitor.PublicMethod;
+
+namespace UAS_DeviceMonitor.Device.Command
+{
+    public partial class FormNewCommand : XtraForm
+    {
+
+        string brand = "";
+
+        public FormNewCommand()
+        {
+            InitializeComponent();
+        }
+
+        public FormNewCommand(string BrandCode, string BrandName)
+        {
+            InitializeComponent();
+            brand = BrandCode;
+            Text = "新增指令(" + BrandName + ")";
+        }
+
+        /// <summary>
+        /// 设置下拉框的值
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void FormNewCommand_Load(object sender, EventArgs e)
+        {
+            DataTable dt = (DataTable)SystemInf.dh.ExecuteSql("select * from CommandFunctionSetting where cfs_debrand='" + brand + "' order by cfs_id ", "select");
+            BaseUtil.FillComBoxEditWidthDataTable(CodeClientAddress, "cfs_name", "cfs_value", BaseUtil.ToDataTable(dt.Select("cfs_type='CA'")));
+            BaseUtil.FillComBoxEditWidthDataTable(CodeFunction, "cfs_name", "cfs_value", BaseUtil.ToDataTable(dt.Select("cfs_type='CF'")));
+            BaseUtil.FillComBoxEditWidthDataTable(CodeComplement, "cfs_name", "cfs_value", BaseUtil.ToDataTable(dt.Select("cfs_type='CC'")));
+            BaseUtil.FillComBoxEditWidthDataTable(CodeEnd, "cfs_name", "cfs_value", BaseUtil.ToDataTable(dt.Select("cfs_type='CE'")));
+        }
+
+        /// <summary>
+        /// 插入生成的指令,根据选择的功能码+地址位+长度+补码+结束码
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void AddCommand_Click(object sender, EventArgs e)
+        {
+            string code = BaseUtil.GetComboxEditValue(CodeClientAddress) + BaseUtil.GetComboxEditValue(CodeFunction) + CodeAddress.Text + CodeLength.Text;
+            //添加指令的补码
+            code = code + BaseUtil.getLRC(code);
+            code = code + BaseUtil.GetComboxEditValue(CodeEnd);
+            SystemInf.dh.ExecuteSql("insert into devicecommand(dc_id,dc_name,dc_code,dc_command,dc_brand) values (devicecommand_seq.nextval,'" + dc_name.Text + "','" + dc_code.Text + "','" + code + "','" + brand + "')", "insert");
+            XtraMessageBox.Show("指令保存成功");
+            Close();
+        }
+    }
+}

+ 120 - 0
UAS_DeviceMonitor/Device/Command/FormNewCommand.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>

+ 0 - 32
UAS_DeviceMonitor/Entity/SystemInf.cs

@@ -5,30 +5,6 @@ namespace UAS_DeviceMonitor.Entity
 {
     class SystemInf
     {
-        /// <summary>
-        /// 连接字符串,用户登录的时候选择了数据库之后会使用该字符串作为连接字符串
-        /// </summary>
-        public static string ConnectionString;
-        /// <summary>
-        /// 用户登录的时间
-        /// </summary>
-        public static string LoginTime;
-        /// <summary>
-        /// 当前的连接数据库
-        /// </summary>
-        public static string CurrentDB;
-        /// <summary>
-        ///  配置文件默认的数据库
-        /// </summary>
-        public static string DefaultDB;
-        /// <summary>
-        /// 屏幕的宽度
-        /// </summary>
-        public static int ScreenWidth;
-        /// <summary>
-        /// 屏幕的高度
-        /// </summary>
-        public static int ScreenHeight;
         /// <summary>
         /// 当前岗位资源对应的Caller
         /// </summary>
@@ -50,14 +26,6 @@ namespace UAS_DeviceMonitor.Entity
         /// </summary>
         public static int HeadBarHeight = 0;
         /// <summary>
-        /// 当前程序进程ID
-        /// </summary>
-        public static int ProcessesID;
-        /// <summary>
-        /// 是否允许打印程序
-        /// </summary>
-        public static bool EnablePrint;
-        /// <summary>
         /// 缓存数据的文件夹
         /// </summary>
         public static string CacheFolder= Environment.GetEnvironmentVariable("windir").Substring(0, 1)+@":\UAS_MES\CacheFile\";

+ 245 - 24
UAS_DeviceMonitor/Main.Designer.cs

@@ -1,4 +1,7 @@
-using UAS_DeviceMonitor.CustomerControl.AutoDataGridControl;
+using DevExpress.XtraEditors;
+using UAS_DeviceMonitor.CustomerControl.AutoDataGridControl;
+using UAS_DeviceMonitor.CustomerControl;
+using UAS_DeviceMonitor.CustomerControl.GridViewWithSerialNum;
 
 namespace UAS_DeviceMonitor
 {
@@ -46,7 +49,7 @@ namespace UAS_DeviceMonitor
             this.PageDeviceList = new DevExpress.XtraTab.XtraTabPage();
             this.PageControlDeviceList = new UAS_DeviceMonitor.CustomerControl.PagingControl.PageControl();
             this.GridDeviceList = new UAS_DeviceMonitor.CustomerControl.AutoDataGridControl.AutoDataGridControl();
-            this.GridViewDeviceList = new DevExpress.XtraGrid.Views.Grid.GridView();
+            this.GridViewDeviceList = new UAS_DeviceMonitor.CustomerControl.GridViewWithSerialNum.GridViewWithSerialNum();
             this.de_id = new DevExpress.XtraGrid.Columns.GridColumn();
             this.de_code = new DevExpress.XtraGrid.Columns.GridColumn();
             this.de_name = new DevExpress.XtraGrid.Columns.GridColumn();
@@ -58,9 +61,15 @@ namespace UAS_DeviceMonitor
             this.de_address = new DevExpress.XtraGrid.Columns.GridColumn();
             this.de_wccode = new DevExpress.XtraGrid.Columns.GridColumn();
             this.PageCommandSet = new DevExpress.XtraTab.XtraTabPage();
-            this.ButtonSaveCommand = new UAS_DeviceMonitor.CustomerControl.Button.ButtonAddRow();
+            this.ButtonDeleteCommand = new UAS_DeviceMonitor.CustomerControl.Button.ButtonDeleteRow();
+            this.Brand_label = new DevExpress.XtraEditors.LabelControl();
+            this.Brand = new DevExpress.XtraEditors.ComboBoxEdit();
+            this.ButtonNewCommand = new DevExpress.XtraEditors.SimpleButton();
+            this.ButtonSaveCommand = new UAS_DeviceMonitor.CustomerControl.Button.ButtonSaveGrid();
             this.GridCommandSetting = new UAS_DeviceMonitor.CustomerControl.AutoDataGridControl.AutoDataGridControl();
-            this.GridViewCommandSet = new DevExpress.XtraGrid.Views.Grid.GridView();
+            this.GridViewCommandSet = new UAS_DeviceMonitor.CustomerControl.GridViewWithSerialNum.GridViewWithSerialNum();
+            this.Choose = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.CheckEditCommandSet = new DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit();
             this.dc_id = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dc_code = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dc_name = new DevExpress.XtraGrid.Columns.GridColumn();
@@ -68,22 +77,31 @@ namespace UAS_DeviceMonitor
             this.PageDeviceKind = new DevExpress.XtraTab.XtraTabPage();
             this.PageDeviceStatus = new DevExpress.XtraTab.XtraTabPage();
             this.PagePollingSetting = new DevExpress.XtraTab.XtraTabPage();
+            this.ButtonDeleteCommandSet = new UAS_DeviceMonitor.CustomerControl.Button.ButtonDeleteRow();
+            this.ButtonNewCommandSet = new UAS_DeviceMonitor.CustomerControl.Button.ButtonAddRow();
+            this.ButtonSaveCommandSet = new UAS_DeviceMonitor.CustomerControl.Button.ButtonSaveGrid();
+            this.ButtonPausePolling = new DevExpress.XtraEditors.SimpleButton();
+            this.ButtonStartPolling = new DevExpress.XtraEditors.SimpleButton();
             this.GridPollingSetting = new UAS_DeviceMonitor.CustomerControl.AutoDataGridControl.AutoDataGridControl();
-            this.GridViewPollSetting = new DevExpress.XtraGrid.Views.Grid.GridView();
+            this.GridViewPollSetting = new UAS_DeviceMonitor.CustomerControl.GridViewWithSerialNum.GridViewWithSerialNum();
             this.dpc_id = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dpc_decode = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dpc_plcode = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dpc_plname = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dpc_interval = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dpc_dccode = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.PollingSetItemLookUpEdit = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit();
             this.dpc_function = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dpc_enable = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dpc_enableCheckEdit = new DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit();
             this.dpc_status = new DevExpress.XtraGrid.Columns.GridColumn();
             this.dpc_remark = new DevExpress.XtraGrid.Columns.GridColumn();
             this.PagePolling = new DevExpress.XtraTab.XtraTabPage();
+            this.ButtonAddPolling = new UAS_DeviceMonitor.CustomerControl.Button.ButtonAddRow();
+            this.ButtonDeletePolling = new UAS_DeviceMonitor.CustomerControl.Button.ButtonDeleteRow();
+            this.ButtonSavePolling = new UAS_DeviceMonitor.CustomerControl.Button.ButtonSaveGrid();
             this.GridPolling = new UAS_DeviceMonitor.CustomerControl.AutoDataGridControl.AutoDataGridControl();
-            this.GridViewPolling = new DevExpress.XtraGrid.Views.Grid.GridView();
+            this.GridViewPolling = new UAS_DeviceMonitor.CustomerControl.GridViewWithSerialNum.GridViewWithSerialNum();
             this.pl_id = new DevExpress.XtraGrid.Columns.GridColumn();
             this.pl_code = new DevExpress.XtraGrid.Columns.GridColumn();
             this.pl_name = new DevExpress.XtraGrid.Columns.GridColumn();
@@ -97,11 +115,14 @@ namespace UAS_DeviceMonitor
             ((System.ComponentModel.ISupportInitialize)(this.GridDeviceList)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridViewDeviceList)).BeginInit();
             this.PageCommandSet.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.Brand.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridCommandSetting)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridViewCommandSet)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.CheckEditCommandSet)).BeginInit();
             this.PagePollingSetting.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.GridPollingSetting)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridViewPollSetting)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.PollingSetItemLookUpEdit)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.dpc_enableCheckEdit)).BeginInit();
             this.PagePolling.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.GridPolling)).BeginInit();
@@ -257,6 +278,7 @@ namespace UAS_DeviceMonitor
             // 
             // GridDeviceList
             // 
+            this.GridDeviceList.Condition = null;
             this.GridDeviceList.Dock = System.Windows.Forms.DockStyle.Fill;
             this.GridDeviceList.GetDataSQL = null;
             this.GridDeviceList.ID = null;
@@ -286,6 +308,7 @@ namespace UAS_DeviceMonitor
             this.de_address,
             this.de_wccode});
             this.GridViewDeviceList.GridControl = this.GridDeviceList;
+            this.GridViewDeviceList.IndicatorWidth = 30;
             this.GridViewDeviceList.Name = "GridViewDeviceList";
             // 
             // de_id
@@ -371,36 +394,90 @@ namespace UAS_DeviceMonitor
             // 
             // PageCommandSet
             // 
+            this.PageCommandSet.Controls.Add(this.ButtonDeleteCommand);
+            this.PageCommandSet.Controls.Add(this.Brand_label);
+            this.PageCommandSet.Controls.Add(this.Brand);
+            this.PageCommandSet.Controls.Add(this.ButtonNewCommand);
             this.PageCommandSet.Controls.Add(this.ButtonSaveCommand);
             this.PageCommandSet.Controls.Add(this.GridCommandSetting);
             this.PageCommandSet.Name = "PageCommandSet";
             this.PageCommandSet.PageVisible = false;
             this.PageCommandSet.Size = new System.Drawing.Size(1027, 577);
             this.PageCommandSet.Text = "xtraTabPage1";
+            this.PageCommandSet.VisibleChanged += new System.EventHandler(this.PageCommandSet_VisibleChanged);
+            // 
+            // ButtonDeleteCommand
+            // 
+            this.ButtonDeleteCommand.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.ButtonDeleteCommand.Grid = null;
+            this.ButtonDeleteCommand.Location = new System.Drawing.Point(816, 551);
+            this.ButtonDeleteCommand.Name = "ButtonDeleteCommand";
+            this.ButtonDeleteCommand.Size = new System.Drawing.Size(64, 23);
+            this.ButtonDeleteCommand.TabIndex = 6;
+            this.ButtonDeleteCommand.Text = "删除";
+            // 
+            // Brand_label
+            // 
+            this.Brand_label.Appearance.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.Brand_label.Location = new System.Drawing.Point(8, 5);
+            this.Brand_label.Name = "Brand_label";
+            this.Brand_label.Size = new System.Drawing.Size(32, 21);
+            this.Brand_label.TabIndex = 5;
+            this.Brand_label.Text = "品牌";
+            // 
+            // Brand
+            // 
+            this.Brand.Location = new System.Drawing.Point(47, 4);
+            this.Brand.MenuManager = this.RibbonNav;
+            this.Brand.Name = "Brand";
+            this.Brand.Properties.Appearance.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.Brand.Properties.Appearance.Options.UseFont = true;
+            this.Brand.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.Brand.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
+            this.Brand.Size = new System.Drawing.Size(100, 24);
+            this.Brand.TabIndex = 4;
+            this.Brand.SelectedIndexChanged += new System.EventHandler(this.Brand_SelectedIndexChanged);
+            // 
+            // ButtonNewCommand
+            // 
+            this.ButtonNewCommand.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.ButtonNewCommand.Location = new System.Drawing.Point(886, 551);
+            this.ButtonNewCommand.Name = "ButtonNewCommand";
+            this.ButtonNewCommand.Size = new System.Drawing.Size(64, 23);
+            this.ButtonNewCommand.TabIndex = 3;
+            this.ButtonNewCommand.Text = "新增";
+            this.ButtonNewCommand.Click += new System.EventHandler(this.ButtonNewCommand_Click);
             // 
             // ButtonSaveCommand
             // 
+            this.ButtonSaveCommand.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
             this.ButtonSaveCommand.Grid = null;
+            this.ButtonSaveCommand.HandlerOtherFirst = true;
             this.ButtonSaveCommand.Location = new System.Drawing.Point(956, 551);
             this.ButtonSaveCommand.Name = "ButtonSaveCommand";
             this.ButtonSaveCommand.Size = new System.Drawing.Size(64, 23);
             this.ButtonSaveCommand.TabIndex = 2;
             this.ButtonSaveCommand.Text = "保存";
+            this.ButtonSaveCommand.Click += new System.EventHandler(this.ButtonSaveCommand_Click);
             // 
             // GridCommandSetting
             // 
             this.GridCommandSetting.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
+            this.GridCommandSetting.Condition = null;
             this.GridCommandSetting.GetDataSQL = null;
             this.GridCommandSetting.ID = null;
             this.GridCommandSetting.InsertSQL = null;
-            this.GridCommandSetting.Location = new System.Drawing.Point(0, -1);
+            this.GridCommandSetting.Location = new System.Drawing.Point(0, 31);
             this.GridCommandSetting.MainView = this.GridViewCommandSet;
             this.GridCommandSetting.MenuManager = this.RibbonNav;
             this.GridCommandSetting.Name = "GridCommandSetting";
+            this.GridCommandSetting.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
+            this.CheckEditCommandSet});
             this.GridCommandSetting.RowCount = 0;
-            this.GridCommandSetting.Size = new System.Drawing.Size(1027, 549);
+            this.GridCommandSetting.Size = new System.Drawing.Size(1027, 517);
             this.GridCommandSetting.TabIndex = 1;
             this.GridCommandSetting.TableName = null;
             this.GridCommandSetting.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -409,12 +486,30 @@ namespace UAS_DeviceMonitor
             // GridViewCommandSet
             // 
             this.GridViewCommandSet.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
+            this.Choose,
             this.dc_id,
             this.dc_code,
             this.dc_name,
             this.dc_command});
             this.GridViewCommandSet.GridControl = this.GridCommandSetting;
+            this.GridViewCommandSet.IndicatorWidth = 30;
             this.GridViewCommandSet.Name = "GridViewCommandSet";
+            this.GridViewCommandSet.OptionsSelection.MultiSelect = true;
+            // 
+            // Choose
+            // 
+            this.Choose.Caption = "勾选";
+            this.Choose.ColumnEdit = this.CheckEditCommandSet;
+            this.Choose.FieldName = "CHOOSE";
+            this.Choose.Name = "Choose";
+            this.Choose.Visible = true;
+            this.Choose.VisibleIndex = 0;
+            // 
+            // CheckEditCommandSet
+            // 
+            this.CheckEditCommandSet.AutoHeight = false;
+            this.CheckEditCommandSet.Name = "CheckEditCommandSet";
+            this.CheckEditCommandSet.NullStyle = DevExpress.XtraEditors.Controls.StyleIndeterminate.Unchecked;
             // 
             // dc_id
             // 
@@ -427,7 +522,7 @@ namespace UAS_DeviceMonitor
             this.dc_code.FieldName = "DC_CODE";
             this.dc_code.Name = "dc_code";
             this.dc_code.Visible = true;
-            this.dc_code.VisibleIndex = 0;
+            this.dc_code.VisibleIndex = 1;
             this.dc_code.Width = 118;
             // 
             // dc_name
@@ -436,7 +531,7 @@ namespace UAS_DeviceMonitor
             this.dc_name.FieldName = "DC_NAME";
             this.dc_name.Name = "dc_name";
             this.dc_name.Visible = true;
-            this.dc_name.VisibleIndex = 1;
+            this.dc_name.VisibleIndex = 2;
             this.dc_name.Width = 123;
             // 
             // dc_command
@@ -445,7 +540,7 @@ namespace UAS_DeviceMonitor
             this.dc_command.FieldName = "DC_COMMAND";
             this.dc_command.Name = "dc_command";
             this.dc_command.Visible = true;
-            this.dc_command.VisibleIndex = 2;
+            this.dc_command.VisibleIndex = 3;
             this.dc_command.Width = 768;
             // 
             // PageDeviceKind
@@ -464,17 +559,73 @@ namespace UAS_DeviceMonitor
             // 
             // PagePollingSetting
             // 
+            this.PagePollingSetting.Controls.Add(this.ButtonDeleteCommandSet);
+            this.PagePollingSetting.Controls.Add(this.ButtonNewCommandSet);
+            this.PagePollingSetting.Controls.Add(this.ButtonSaveCommandSet);
+            this.PagePollingSetting.Controls.Add(this.ButtonPausePolling);
+            this.PagePollingSetting.Controls.Add(this.ButtonStartPolling);
             this.PagePollingSetting.Controls.Add(this.GridPollingSetting);
             this.PagePollingSetting.Name = "PagePollingSetting";
             this.PagePollingSetting.PageVisible = false;
             this.PagePollingSetting.Size = new System.Drawing.Size(1027, 577);
             this.PagePollingSetting.Text = "xtraTabPage1";
+            this.PagePollingSetting.VisibleChanged += new System.EventHandler(this.PagePollingSetting_VisibleChanged);
+            // 
+            // ButtonDeleteCommandSet
+            // 
+            this.ButtonDeleteCommandSet.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.ButtonDeleteCommandSet.Grid = null;
+            this.ButtonDeleteCommandSet.Location = new System.Drawing.Point(816, 549);
+            this.ButtonDeleteCommandSet.Name = "ButtonDeleteCommandSet";
+            this.ButtonDeleteCommandSet.Size = new System.Drawing.Size(64, 23);
+            this.ButtonDeleteCommandSet.TabIndex = 9;
+            this.ButtonDeleteCommandSet.Text = "删除";
+            // 
+            // ButtonNewCommandSet
+            // 
+            this.ButtonNewCommandSet.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.ButtonNewCommandSet.Grid = null;
+            this.ButtonNewCommandSet.Location = new System.Drawing.Point(886, 549);
+            this.ButtonNewCommandSet.Name = "ButtonNewCommandSet";
+            this.ButtonNewCommandSet.Size = new System.Drawing.Size(64, 23);
+            this.ButtonNewCommandSet.TabIndex = 8;
+            this.ButtonNewCommandSet.Text = "新增";
+            // 
+            // ButtonSaveCommandSet
+            // 
+            this.ButtonSaveCommandSet.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.ButtonSaveCommandSet.Grid = null;
+            this.ButtonSaveCommandSet.HandlerOtherFirst = false;
+            this.ButtonSaveCommandSet.Location = new System.Drawing.Point(956, 549);
+            this.ButtonSaveCommandSet.Name = "ButtonSaveCommandSet";
+            this.ButtonSaveCommandSet.Size = new System.Drawing.Size(64, 23);
+            this.ButtonSaveCommandSet.TabIndex = 7;
+            this.ButtonSaveCommandSet.Text = "保存";
+            // 
+            // ButtonPausePolling
+            // 
+            this.ButtonPausePolling.Location = new System.Drawing.Point(734, 549);
+            this.ButtonPausePolling.Name = "ButtonPausePolling";
+            this.ButtonPausePolling.Size = new System.Drawing.Size(75, 23);
+            this.ButtonPausePolling.TabIndex = 2;
+            this.ButtonPausePolling.Text = "暂停轮询";
+            this.ButtonPausePolling.Click += new System.EventHandler(this.ButtonPausePolling_Click);
+            // 
+            // ButtonStartPolling
+            // 
+            this.ButtonStartPolling.Location = new System.Drawing.Point(653, 549);
+            this.ButtonStartPolling.Name = "ButtonStartPolling";
+            this.ButtonStartPolling.Size = new System.Drawing.Size(75, 23);
+            this.ButtonStartPolling.TabIndex = 1;
+            this.ButtonStartPolling.Text = "开启轮询";
+            this.ButtonStartPolling.Click += new System.EventHandler(this.ButtonStartPolling_Click);
             // 
             // GridPollingSetting
             // 
             this.GridPollingSetting.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
+            this.GridPollingSetting.Condition = null;
             this.GridPollingSetting.GetDataSQL = null;
             this.GridPollingSetting.ID = null;
             this.GridPollingSetting.InsertSQL = null;
@@ -483,9 +634,10 @@ namespace UAS_DeviceMonitor
             this.GridPollingSetting.MenuManager = this.RibbonNav;
             this.GridPollingSetting.Name = "GridPollingSetting";
             this.GridPollingSetting.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
-            this.dpc_enableCheckEdit});
+            this.dpc_enableCheckEdit,
+            this.PollingSetItemLookUpEdit});
             this.GridPollingSetting.RowCount = 0;
-            this.GridPollingSetting.Size = new System.Drawing.Size(1027, 582);
+            this.GridPollingSetting.Size = new System.Drawing.Size(1027, 544);
             this.GridPollingSetting.TabIndex = 0;
             this.GridPollingSetting.TableName = null;
             this.GridPollingSetting.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -505,6 +657,7 @@ namespace UAS_DeviceMonitor
             this.dpc_status,
             this.dpc_remark});
             this.GridViewPollSetting.GridControl = this.GridPollingSetting;
+            this.GridViewPollSetting.IndicatorWidth = 30;
             this.GridViewPollSetting.Name = "GridViewPollSetting";
             this.GridViewPollSetting.OptionsSelection.MultiSelect = true;
             // 
@@ -549,11 +702,22 @@ namespace UAS_DeviceMonitor
             // dpc_dccode
             // 
             this.dpc_dccode.Caption = "指令编号";
+            this.dpc_dccode.ColumnEdit = this.PollingSetItemLookUpEdit;
             this.dpc_dccode.FieldName = "DPC_DCCODE";
             this.dpc_dccode.Name = "dpc_dccode";
             this.dpc_dccode.Visible = true;
             this.dpc_dccode.VisibleIndex = 4;
             // 
+            // PollingSetItemLookUpEdit
+            // 
+            this.PollingSetItemLookUpEdit.AutoHeight = false;
+            this.PollingSetItemLookUpEdit.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.PollingSetItemLookUpEdit.Name = "PollingSetItemLookUpEdit";
+            this.PollingSetItemLookUpEdit.NullText = "";
+            this.PollingSetItemLookUpEdit.ShowFooter = false;
+            this.PollingSetItemLookUpEdit.ShowHeader = false;
+            // 
             // dpc_function
             // 
             this.dpc_function.Caption = "解析函数";
@@ -599,24 +763,61 @@ namespace UAS_DeviceMonitor
             // 
             // PagePolling
             // 
+            this.PagePolling.Controls.Add(this.ButtonAddPolling);
+            this.PagePolling.Controls.Add(this.ButtonDeletePolling);
+            this.PagePolling.Controls.Add(this.ButtonSavePolling);
             this.PagePolling.Controls.Add(this.GridPolling);
             this.PagePolling.Name = "PagePolling";
             this.PagePolling.PageVisible = false;
             this.PagePolling.Size = new System.Drawing.Size(1027, 577);
             this.PagePolling.Text = "xtraTabPage1";
             // 
+            // ButtonAddPolling
+            // 
+            this.ButtonAddPolling.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.ButtonAddPolling.Grid = null;
+            this.ButtonAddPolling.Location = new System.Drawing.Point(878, 551);
+            this.ButtonAddPolling.Name = "ButtonAddPolling";
+            this.ButtonAddPolling.Size = new System.Drawing.Size(64, 23);
+            this.ButtonAddPolling.TabIndex = 9;
+            this.ButtonAddPolling.Text = "新增";
+            // 
+            // ButtonDeletePolling
+            // 
+            this.ButtonDeletePolling.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.ButtonDeletePolling.Grid = null;
+            this.ButtonDeletePolling.Location = new System.Drawing.Point(807, 551);
+            this.ButtonDeletePolling.Name = "ButtonDeletePolling";
+            this.ButtonDeletePolling.Size = new System.Drawing.Size(64, 23);
+            this.ButtonDeletePolling.TabIndex = 8;
+            this.ButtonDeletePolling.Text = "删除";
+            // 
+            // ButtonSavePolling
+            // 
+            this.ButtonSavePolling.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.ButtonSavePolling.Grid = null;
+            this.ButtonSavePolling.HandlerOtherFirst = false;
+            this.ButtonSavePolling.Location = new System.Drawing.Point(949, 551);
+            this.ButtonSavePolling.Name = "ButtonSavePolling";
+            this.ButtonSavePolling.Size = new System.Drawing.Size(64, 23);
+            this.ButtonSavePolling.TabIndex = 7;
+            this.ButtonSavePolling.Text = "保存";
+            // 
             // GridPolling
             // 
-            this.GridPolling.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.GridPolling.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.GridPolling.Condition = null;
             this.GridPolling.GetDataSQL = null;
             this.GridPolling.ID = null;
             this.GridPolling.InsertSQL = null;
-            this.GridPolling.Location = new System.Drawing.Point(0, 0);
+            this.GridPolling.Location = new System.Drawing.Point(3, -3);
             this.GridPolling.MainView = this.GridViewPolling;
             this.GridPolling.MenuManager = this.RibbonNav;
             this.GridPolling.Name = "GridPolling";
             this.GridPolling.RowCount = 0;
-            this.GridPolling.Size = new System.Drawing.Size(1027, 577);
+            this.GridPolling.Size = new System.Drawing.Size(1027, 549);
             this.GridPolling.TabIndex = 0;
             this.GridPolling.TableName = null;
             this.GridPolling.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -632,12 +833,13 @@ namespace UAS_DeviceMonitor
             this.pl_dccode,
             this.pl_remark});
             this.GridViewPolling.GridControl = this.GridPolling;
+            this.GridViewPolling.IndicatorWidth = 30;
             this.GridViewPolling.Name = "GridViewPolling";
             // 
             // pl_id
             // 
             this.pl_id.Caption = "ID";
-            this.pl_id.FieldName = "pl_id";
+            this.pl_id.FieldName = "PL_ID";
             this.pl_id.Name = "pl_id";
             // 
             // pl_code
@@ -685,11 +887,11 @@ namespace UAS_DeviceMonitor
             this.AllowFormGlass = DevExpress.Utils.DefaultBoolean.False;
             this.Appearance.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(128)))));
             this.Appearance.Options.UseForeColor = true;
-            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
             this.ClientSize = new System.Drawing.Size(1033, 711);
             this.Controls.Add(this.MainTabControl);
             this.Controls.Add(this.RibbonNav);
+            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
             this.Name = "Main";
             this.Ribbon = this.RibbonNav;
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
@@ -702,11 +904,15 @@ namespace UAS_DeviceMonitor
             ((System.ComponentModel.ISupportInitialize)(this.GridDeviceList)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridViewDeviceList)).EndInit();
             this.PageCommandSet.ResumeLayout(false);
+            this.PageCommandSet.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.Brand.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridCommandSetting)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridViewCommandSet)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.CheckEditCommandSet)).EndInit();
             this.PagePollingSetting.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.GridPollingSetting)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridViewPollSetting)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.PollingSetItemLookUpEdit)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.dpc_enableCheckEdit)).EndInit();
             this.PagePolling.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.GridPolling)).EndInit();
@@ -737,7 +943,6 @@ namespace UAS_DeviceMonitor
         private DevExpress.XtraBars.BarButtonItem ButtionPolling;
         private DevExpress.XtraTab.XtraTabPage PagePollingSetting;
         private DevExpress.XtraTab.XtraTabPage PagePolling;
-        private DevExpress.XtraGrid.Views.Grid.GridView GridViewDeviceList;
         private DevExpress.XtraGrid.Columns.GridColumn de_id;
         private DevExpress.XtraGrid.Columns.GridColumn de_code;
         private DevExpress.XtraGrid.Columns.GridColumn de_name;
@@ -750,15 +955,12 @@ namespace UAS_DeviceMonitor
         private DevExpress.XtraGrid.Columns.GridColumn de_wccode;
         private CustomerControl.PagingControl.PageControl PageControlDeviceList;
         private AutoDataGridControl GridCommandSetting;
-        private DevExpress.XtraGrid.Views.Grid.GridView GridViewCommandSet;
         private DevExpress.XtraGrid.Columns.GridColumn dc_id;
         private DevExpress.XtraGrid.Columns.GridColumn dc_code;
         private DevExpress.XtraGrid.Columns.GridColumn dc_name;
         private DevExpress.XtraGrid.Columns.GridColumn dc_command;
         private AutoDataGridControl GridPolling;
-        private DevExpress.XtraGrid.Views.Grid.GridView GridViewPolling;
         private AutoDataGridControl GridPollingSetting;
-        private DevExpress.XtraGrid.Views.Grid.GridView GridViewPollSetting;
         private DevExpress.XtraGrid.Columns.GridColumn pl_id;
         private DevExpress.XtraGrid.Columns.GridColumn pl_code;
         private DevExpress.XtraGrid.Columns.GridColumn pl_name;
@@ -776,6 +978,25 @@ namespace UAS_DeviceMonitor
         private DevExpress.XtraGrid.Columns.GridColumn dpc_status;
         private DevExpress.XtraGrid.Columns.GridColumn dpc_remark;
         private DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit dpc_enableCheckEdit;
-        private CustomerControl.Button.ButtonAddRow ButtonSaveCommand;
+        private CustomerControl.Button.ButtonSaveGrid ButtonSaveCommand;
+        private SimpleButton ButtonNewCommand;
+        private GridViewWithSerialNum GridViewDeviceList;
+        private GridViewWithSerialNum GridViewCommandSet;
+        private GridViewWithSerialNum GridViewPolling;
+        private GridViewWithSerialNum GridViewPollSetting;
+        private LabelControl Brand_label;
+        private ComboBoxEdit Brand;
+        private DevExpress.XtraGrid.Columns.GridColumn Choose;
+        private DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit CheckEditCommandSet;
+        private CustomerControl.Button.ButtonDeleteRow ButtonDeleteCommand;
+        private CustomerControl.Button.ButtonDeleteRow ButtonDeletePolling;
+        private CustomerControl.Button.ButtonSaveGrid ButtonSavePolling;
+        private CustomerControl.Button.ButtonAddRow ButtonAddPolling;
+        private SimpleButton ButtonPausePolling;
+        private SimpleButton ButtonStartPolling;
+        private CustomerControl.Button.ButtonDeleteRow ButtonDeleteCommandSet;
+        private CustomerControl.Button.ButtonAddRow ButtonNewCommandSet;
+        private CustomerControl.Button.ButtonSaveGrid ButtonSaveCommandSet;
+        private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit PollingSetItemLookUpEdit;
     }
 }

+ 114 - 11
UAS_DeviceMonitor/Main.cs

@@ -3,8 +3,12 @@ using DevExpress.XtraBars;
 using UAS_DeviceMonitor.DataOperate;
 using System.Data;
 using System.Text;
-using DevExpress.XtraTab;
 using UAS_DeviceMonitor.Entity;
+using UAS_DeviceMonitor.Device.Command;
+using UAS_DeviceMonitor.PublicMethod;
+using DevExpress.XtraEditors;
+using DevExpress.XtraGrid;
+using DevExpress.XtraGrid.Views.Grid;
 
 namespace UAS_DeviceMonitor
 {
@@ -17,23 +21,42 @@ namespace UAS_DeviceMonitor
         {
             SystemInf.dh = new DataHelper();
             InitializeComponent();
-            dpc_enableCheckEdit.QueryCheckStateByValue += CheckedEdit_QueryCheckStateByValue; ;
+            dpc_enableCheckEdit.QueryCheckStateByValue += CheckedEdit_QueryCheckStateByValue;
+            CheckEditCommandSet.QueryCheckStateByValue += CheckedEdit_QueryCheckStateByValue;
         }
 
         private void Main_Load(object sender, EventArgs e)
         {
+            //设备列表
             GridDeviceList.GetDataSQL = "select de_id,de_code,de_name,de_spec,de_indate,de_runstatus,de_address,de_wccode,de_vendcode,de_vendname from device".ToUpper();
-
-            GridPollingSetting.GetDataSQL = "SELECT DPC_ID,DPC_DECODE ,DPC_PLCODE ,DPC_PLNAME ,DPC_INTERVAL ,DPC_DCCODE ,DPC_FUNCTION , DPC_ENABLE,DPC_STATUS ,DPC_REMARK FROM DEVICEPOLLINGCONFIG";
             PageControlDeviceList.Gridcontrol = GridDeviceList;
+            //轮询业务
+            GridPolling.GetDataSQL = "select pl_id,pl_code,pl_name,pl_type,pl_dccode,pl_remark from polling".ToUpper();
+            GridPolling.ID = "pl_id";
+            GridPolling.TableName = "polling";
+            GridPolling.InsertSQL = "insert into polling(pl_id,pl_code,pl_name,pl_type,pl_dccode,pl_remark) values(polling_seq.nextval,:pl_code,:pl_name,:pl_type,:pl_dccode,:pl_remark)";
+            ButtonDeletePolling.Grid = GridPolling;
+            ButtonSavePolling.Grid = GridPolling;
+            ButtonAddPolling.Grid = GridPolling;
+            //轮询配置界面
+            GridPollingSetting.GetDataSQL = "SELECT DPC_ID,DPC_DECODE ,DPC_PLCODE ,DPC_PLNAME ,DPC_INTERVAL ,DPC_DCCODE ,DPC_FUNCTION , DPC_ENABLE,DPC_STATUS ,DPC_REMARK FROM DEVICEPOLLINGCONFIG";
+            GridPollingSetting.ID = "DPC_ID";
+            GridPollingSetting.TableName = "DEVICEPOLLINGCONFIG";
+            GridPollingSetting.InsertSQL = "insert into DEVICEPOLLINGCONFIG(DPC_ID,DPC_DECODE ,DPC_PLCODE ,DPC_PLNAME ,DPC_INTERVAL ,DPC_DCCODE ,DPC_FUNCTION , DPC_ENABLE,DPC_STATUS ,DPC_REMARK) values(DEVICEPOLLINGCONFIG_seq.nextval,:DPC_DECODE ,:DPC_PLCODE ,:DPC_PLNAME ,:DPC_INTERVAL ,:DPC_DCCODE ,:DPC_FUNCTION , :DPC_ENABLE,:DPC_STATUS ,:DPC_REMARK)";
+            ButtonSaveCommandSet.Grid = GridPollingSetting;
+            ButtonNewCommandSet.Grid = GridPollingSetting;
+            ButtonDeleteCommandSet.Grid = GridPollingSetting;
 
-            GridCommandSetting.GetDataSQL = "select dc_id,dc_code,dc_name,dc_command from devicecommand".ToUpper();
+            //指令设置界面
+            GridCommandSetting.GetDataSQL = "select 0 CHOOSE,dc_id,dc_code,dc_name,dc_command from devicecommand".ToUpper();
             GridCommandSetting.TableName = "devicecommand";
             GridCommandSetting.ID = "dc_id";
             GridCommandSetting.InsertSQL = "insert into devicecommand(dc_id,dc_code,dc_name,dc_command) values(devicecommand_seq.nextval,:dc_code,:dc_name,:dc_command)";
             ButtonSaveCommand.Grid = GridCommandSetting;
+            ButtonDeleteCommand.Grid = GridCommandSetting;
         }
 
+        #region 界面通用事件
         /// <summary>
         /// 选项卡切换不同XPage
         /// </summary>
@@ -59,6 +82,11 @@ namespace UAS_DeviceMonitor
             }
         }
 
+        /// <summary>
+        /// 勾选Grid的CheckBox
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void CheckedEdit_QueryCheckStateByValue(object sender, DevExpress.XtraEditors.Controls.QueryCheckStateByValueEventArgs e)
         {
             string val = "";
@@ -68,17 +96,17 @@ namespace UAS_DeviceMonitor
             }
             else
             {
-                val = "False";//默认为不选   
+                val = "FALSE";//默认为不选   
             }
-            switch (val)
+            switch (val.ToUpper())
             {
-                case "True":
-                case "Yes":
+                case "TRUE":
+                case "YES":
                 case "1":
                     e.CheckState = System.Windows.Forms.CheckState.Checked;
                     break;
-                case "False":
-                case "No":
+                case "FALSE":
+                case "NO":
                 case "0":
                     e.CheckState = System.Windows.Forms.CheckState.Unchecked;
                     break;
@@ -88,5 +116,80 @@ namespace UAS_DeviceMonitor
             }
             e.Handled = true;
         }
+        #endregion
+
+        #region PageCommandSet业务代码
+        /// <summary>
+        /// 新增指令弹窗
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void ButtonNewCommand_Click(object sender, EventArgs e)
+        {
+            FormNewCommand fncmd = new FormNewCommand(BaseUtil.GetComboxEditValue(Brand), Brand.Text);
+            fncmd.ShowDialog();
+            GridCommandSetting.RefreshData();
+        }
+
+        /// <summary>
+        /// 判断指令编号不能重复
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void ButtonSaveCommand_Click(object sender, EventArgs e)
+        {
+            ButtonSaveCommand.DoSave();
+        }
+
+        /// <summary>
+        /// 加载ComBox品牌数据
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void PageCommandSet_VisibleChanged(object sender, EventArgs e)
+        {
+            if (PageCommandSet.PageVisible)
+            {
+                DataTable dt = (DataTable)SystemInf.dh.ExecuteSql("select * from devicebrand", "select");
+                BaseUtil.FillComBoxEditWidthDataTable(Brand, "db_name", "db_code", dt);
+                GridCommandSetting.Condition = " where dc_brand='" + BaseUtil.GetComboxEditValue(Brand) + "'";
+            }
+        }
+
+        private void Brand_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            GridCommandSetting.Condition = " where dc_brand='" + BaseUtil.GetComboxEditValue(Brand) + "'";
+            GridCommandSetting.RefreshData();
+        }
+
+        #endregion
+
+        #region PagePollingSetting业务代码
+        private void ButtonStartPolling_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void ButtonPausePolling_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        /// <summary>
+        /// 设置GridView下拉框的值
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void PagePollingSetting_VisibleChanged(object sender, EventArgs e)
+        {
+            if (PagePollingSetting.PageVisible)
+            {
+                DataTable dt = (DataTable)SystemInf.dh.ExecuteSql("select dc_name,dc_code from devicecommand ", "select");
+                PollingSetItemLookUpEdit.DataSource = dt;
+                PollingSetItemLookUpEdit.DisplayMember = "DC_NAME";
+                PollingSetItemLookUpEdit.ValueMember = "DC_CODE";
+            }
+        }
+        #endregion
     }
 }

+ 287 - 0
UAS_DeviceMonitor/Main.resx

@@ -451,6 +451,293 @@
         wZ5X4MFvIhEggRTHZb2VCYqYoOgK7R0ia7qDAoFqIBzjQa8vSOJ00BOIwSPE6J2CqutccIQLqvSzECMq
         BNrPTwK2J4PJ0sjwigq8vMr8XmXbzMEEuaW147YLzZOoaHqGikYLzjf8wozyejPKiNK6pyghSusmUFI7
         geLKUTtl+f8gY//Axjn6F8f+AXtHGV3GT+qTmOL/wFqMAAAAAElFTkSuQmCC
+</value>
+  </data>
+  <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        AAABAAEAQEAAAAEAIAAoQgAAFgAAACgAAABAAAAAgAAAAAEAIAAAAAAAAEAAABMLAAATCwAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8S////Mv///1n///9+////n///
+        /7X////F////zf///83////F////tf///5////9+////Wf///zL///8S////AP///wD///8A////AP//
+        /wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wD///8A////AP///wD///8B////Hf///1P///+S////xf//
+        /+b////3/////v///////////////////////////////////////////////v////f////m////xf//
+        /5L///9T////Hf///wH///8A////AP///wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////AP///wn///9A////k///
+        /9j////5////////////////////////////////////////////////////////////////////////
+        ////////////////////////////+f///9j///+T////QP///wn///8A////AP///wD///8AAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////Cf//
+        /0z///+w////8P////////////////////////////////////////////////7+/v7+/v79/f39/P39
+        /fz+/v79//////////////////////////////////////////////////////////D///+w////TP//
+        /wn///8A////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP//
+        /wD///8B////Of///6n////0/////////////////////////////////Pz8+vDw8Ove3t7Vx8fHv66u
+        rqyZmZmfioqKl4GBgZKCgoKTjY2NmZ2dnaK0tLSxzMzMxOPj49v09PTv/f39/f//////////////////
+        //////////////////T///+p////Of///wH///8A////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAD///8A////AP///wD///8U////ff///+f///////////////////////////v7+/rn5+ffvb29uIGB
+        gZJCQkJ5FRUVawAAAGYAAABkAAAAZAAAAGQAAABjAAAAYwAAAGQAAABkAAAAZAMDA2ceHh5uUVFRfpGR
+        kZvJycnC7u7u6P7+/v3//////////////////////////////+f///99////FP///wD///8A////AAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAD///8A////AP///wD///8z////t/////7/////////////////////9/f389HR
+        0cmEhISULCwscgAAAGUAAABkAAAAZQAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZQAAAGUAAABkBAQEZ0BAQHibm5ug3t7e1vv7+/n//////////////////////////v//
+        /7f///8z////AP///wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wH///9S////2v//////////////////
+        ///5+fn3z8/Px25ubooODg5pAAAAZAAAAGUAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABlAAAAZB8fH26KioqX39/f1/39
+        /fz/////////////////////////2v///1L///8B////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wP///9n////6///
+        ///////////////////k5OTchoaGlRAQEGoAAABkAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABlAAAAZCYmJnCkpKSm8PDw6v/////////////////////////r////Z////wP///8A////AAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP//
+        /wP///9u////8f////////////////r6+vjBwcG7ODg4dgAAAGQAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABlAAAAZVxcXILX19fP/v7+/f//////////////////
+        //H///9u////A////wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAD///8A////AP///wH///9n////8f////////////////Pz8++ampqgDAwMaQAAAGUAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABkJiYmcLq6
+        urb5+fn3////////////////////8f///2f///8B////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAD///8A////AP///wD///9S////6////////////////+7u7uh9fX2RAAAAZQAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGUMDAxppKSkpvj4+PT////////////////////r////Uv///wD///8A////AAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8z////2v///////////////+3t
+        7edxcXGLAAAAZQAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZQQEBGednZ2i+Pj49f//////////////////
+        /9r///8z////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8U////t///
+        //////////////Ly8u14eHiOAAAAZAAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmBAQEZ6Wl
+        paf7+/v5////////////////////t////xT///8A////AAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP//
+        /wD///8B////ff////7///////////n5+faRkZGbAAAAZQAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZQAAAGQAAABkAAAAZAAAAGUAAABlAAAAZQAA
+        AGQAAABkAAAAZAAAAGUAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGUMDAxpu7u7tv7+/v7///////////////7///99////Af///wD///8AAAAAAAAA
+        AAAAAAAAAAAAAP///wD///8A////Of///+f///////////7+/v63t7ezBgYGZwAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABlAAAAZSUlJXBmZmaGl5eXnrKy
+        srDAwMC6wcHBu8HBwbu6urq1oaGhpHV1dY00NDR0AAAAZgAAAGQAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZSYmJnDX19fP////////////////////5///
+        /zn///8A////AAAAAAAAAAAAAAAAAP///wD///8A////Cf///6n////////////////c3NzUKSkpcQAA
+        AGUAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABlQ0NDea+v
+        r67l5eXd+Pj49f7+/v7////////////////////////////////7+/v56+vr5cHBwbtfX1+EAQEBZgAA
+        AGUAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABkXFxcgvDw
+        8Or///////////////////+p////Cf///wD///8AAAAAAAAAAAD///8A////AP///0z////0////////
+        ///29vbycXFxiwAAAGQAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYEBARnjo6Omevr6+T/////////////////////////////////////////////////////////////
+        ////////9PT077Kysq8gICBuAAAAZQAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGWkpKSm/f39/P//////////////9P///0z///8A////AAAAAAD///8A////AP//
+        /wn///+w////////////////wMDAugQEBGcAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYBAQFmnZ2dovj4+PX/////////////////////////////////////////////
+        ///////////////////////////////////+/v7+zMzMxScnJ3AAAABlAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABlJiYmcN/f39f///////////////////+w////Cf//
+        /wD///8A////AP///wD///9A////8P//////////8PDw61FRUX4AAABkAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABkd3d3jvb29vL/////////////////////////////
+        ///////////////////////////////////////////////////////////////////BwcG7DAwMaQAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGSKioqX+/v7+f//
+        ////////////8P///0D///8A////AP///wD///8B////k////////////////729vbgAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABlHR0dbdzc3NP/////////////
+        ////////////////////////8PDw6tnZ2dDLy8vEy8vLw9fX18/u7u7o/v7+/v//////////////////
+        ////////+vr6+IeHh5YAAABkAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABlHx8fbt7e3tb///////////////////+T////Af///wD///8A////Hf///9j///////////b2
+        9vJiYmKFAAAAZAAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZHl5
+        eY/6+vr4///////////////////////////6+vr4urq6tkZGRnoMDAxpAgICZgEBAWYLCwtpPj4+eLOz
+        s7D5+fn2///////////////////////////e3t7VHR0dbgAAAGUAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGSbm5ug/v7+/f//////////////2P///x3///8A////AP//
+        /1P////5///////////W1tbOEBAQagAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGW7u7u2///////////////////////////+/v79srKysAUFBWcAAABkAAAAZgAA
+        AGYAAABmAAAAZgAAAGUBAQFmsrKysP7+/v7/////////////////////+vr6+Hh4eI4AAABkAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABlQEBAeO7u7uj/////////////
+        //n///9T////AP///wD///+S///////////+/v7+nZ2dogAAAGQAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYTExNr3d3d1P//////////////////////////5+fn3y0t
+        LXIAAABlAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZTU1NXTq6urj////////////////////////
+        //+6urq2AAAAZQAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgQE
+        BGfJycnC////////////////////kv///wD///8S////xf//////////9PT08FVVVYAAAABkAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABlMjIydOzs7Ob/////////////
+        /////////////729vbgAAABlAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABlxMTEvf//
+        ////////////////////////3Nzc0xISEmoAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABkkZGRm/39/f3//////////////8X///8S////Mv///+b//////////+Dg
+        4NgbGxttAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZUpK
+        Snv09PTv//////////////////////7+/v6YmJifAAAAYwAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZJ6enqL//////////////////////////+zs7OUxMTFzAAAAZQAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZVFRUX709PTv///////////////m////Mv//
+        /1n////3///////////Dw8O8AAAAZQAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGRTU1N+9fX18f/////////////////////9/f38goKCkwAAAGMAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGOEhISU/f39/P/////////////////////z8/PvSUlJewAA
+        AGUAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGUeHh5u4+Pj2///
+        ////////////9////1n///9+/////v//////////oKCgpAAAAGQAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABkUlJSfvX19fH//////////////////////Pz8+nl5
+        eY4AAABkAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABkfHx8kPz8/Pv/////////////
+        ////////9fX18VNTU34AAABkAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAwMDZ83NzcX///////////////7///9+////n////////////Pz8+n5+fpEAAABkAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZFJSUn719fXx////////
+        //////////////r6+vhycnKLAAAAZAAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZHNz
+        c4z7+/v4//////////////////////X19fFSUlJ+AAAAZAAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGS0tLSx////////////////////n////7X///////////j4
+        +PViYmKFAAAAZAAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGRSUlJ+9fX18f/////////////////////6+vr4cnJyiwAAAGQAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGRycnKL+vr6+P/////////////////////19fXxUlJSfgAAAGQAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABknZ2dov//////////////////
+        /7X////F///////////19fXwUFBQfQAAAGUAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABkUlJSfvX19fH/////////////////////+vr6+HJycosAAABkAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABkcnJyi/r6+vj/////////////////////9fX18VJS
+        Un4AAABkAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZI2N
+        jZn+/v79///////////////F////zf//////////8/Pz7kNDQ3kAAABlAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZFJSUn719fXx//////////////////////r6
+        +vhycnKLAAAAZAAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZHJycov6+vr4////////
+        //////////////X19fFSUlJ+AAAAZAAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGOCgoKT/f39/P//////////////zf///83///////////Ly8u1CQkJ5AAAAZQAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGRSUlJ+9fX18f//
+        ///////////////////6+vr4cnJyiwAAAGQAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGRycnKL+vr6+P/////////////////////19fXxUlJSfgAAAGQAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABjgYGBkv39/fz//////////////83////F////////
+        ///09PTvTExMfAAAAGUAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABkUlJSfvX19fH/////////////////////+vr6+HJycosAAABkAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABkcnJyi/r6+vj/////////////////////9fX18VJSUn4AAABkAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZIqKipf+/v79////////
+        ///////F////tf//////////9/f3811dXYMAAABkAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZFJSUn719fXx//////////////////////r6+vhycnKLAAAAZAAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZHJycov6+vr4//////////////////////X1
+        9fFSUlJ+AAAAZAAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGSZmZmf/v7+/v//////////////tf///5////////////v7+/l2dnaNAAAAZAAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGRSUlJ+9fX18f//////////////////
+        ///6+vr4cnJyiwAAAGQAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGRycnKL+vr6+P//
+        ///////////////////19fXxUlJSfgAAAGQAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABkrq6urP///////////////////5////9+/////v/////+/v7+mJiYnwAA
+        AGQAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABkUlJSfvX1
+        9fH/////////////////////+vr6+HJycosAAABkAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABkcnJyi/r6+vj/////////////////////9fX18VJSUn4AAABkAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZsfHx7////////////////7///9+////Wf//
+        //f//////////7u7u7YAAABlAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZFJSUn719fXx//////////////////////r6+vhycnKLAAAAZAAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZHJycov6+vr4//////////////////////X19fFSUlJ+AAAAZAAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZhUVFWve3t7V////////
+        ///////3////Wf///zL////m///////////a2trRERERagAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGRSUlJ+9fX18f/////////////////////6+vr4cnJyiwAA
+        AGQAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGRycnKL+vr6+P//////////////////
+        ///19fXxUlJSfgAAAGQAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGVCQkJ58PDw6///////////////5v///zL///8S////xf//////////8PDw60RERHoAAABlAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABkUlJSfvX19fH/////////////
+        ////////+vr6+HJycosAAABkAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABkcnJyi/r6
+        +vj/////////////////////9fX18VJSUn4AAABkAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABkgYGBkvz8/Pr//////////////8X///8S////AP///5L///////////39
+        /fuLi4uYAAAAZAAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZFJS
+        Un719fXx//////////////////////r6+vhycnKLAAAAZAAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZHJycov6+vr4//////////////////////X19fFSUlJ+AAAAZAAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZb29vbj///////////////////+S////AP//
+        /wD///9T////+f//////////ysrKwwUFBWcAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGRSUlJ+9fX18f/////////////////////6+vr4cnJyiwAAAGQAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGRycnKL+vr6+P/////////////////////19fXxUlJSfgAA
+        AGQAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZSwsLHLn5+ff////////
+        ///////5////U////wD///8A////Hf///9j///////////Dw8OpJSUl7AAAAZQAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABkUlJSfvX19fH/////////////////////+vr6+HJy
+        cosAAABkAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABkcnJyi/r6+vj/////////////
+        ////////9fX18VJSUn4AAABkAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGSEhISU+/v7+v//////////////2P///x3///8A////AP///wH///+T///////////////+qampqgAA
+        AGQAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZFJSUn719fXx////////
+        //////////////r6+vhycnKLAAAAZAAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZHJy
+        cov6+vr4//////////////////////X19fFSUlJ+AAAAZAAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYODg5p0dHRyf///////////////////5P///8B////AP///wD///8A////QP//
+        //D//////////+jo6OA1NTV1AAAAZQAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGRSUlJ+9fX18f/////////////////////6+vr4cnJyiwAAAGQAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGRycnKL+vr6+P/////////////////////19fXxUlJSfgAAAGQAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABkbm5uivf39/P///////////////D///9A////AP//
+        /wD///8A////AP///wn///+w///////////+/v7+qKioqQAAAGUAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABkUlJSfvX19fH/////////////////////+vr6+HJycosAAABkAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABkcnJyi/r6+vj/////////////////////9fX18VJS
+        Un4AAABkAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmEBAQas/Pz8f/////////////
+        //////+w////Cf///wD///8AAAAAAP///wD///8A////TP////T//////////+7u7udOTk59AAAAZAAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZFJSUn719fXx//////////////////////r6
+        +vhycnKLAAAAZAAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZHJycov6+vr4////////
+        //////////////X19fFSUlJ+AAAAZAAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZIWF
+        hZX5+fn3///////////////0////TP///wD///8AAAAAAAAAAAD///8A////AP///wn///+p////////
+        ////////ycnJwQ8PD2oAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGRTU1N+9fX18f//
+        ///////////////////7+/v5cnJyiwAAAGQAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGRycnKL+/v7+f/////////////////////19fXxU1NTfgAAAGQAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZTg4OHbk5OTc////////////////////qf///wn///8A////AAAAAAAAAAAAAAAAAP//
+        /wD///8A////Of///+f///////////v7+/mXl5eeAAAAZQAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABlTk5Ofe7u7uf4+Pj1+Pj49fj4+PX4+Pj18/Pz7mxsbIkAAABkAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABkbGxsifPz8+74+Pj1+Pj49fj4+PX4+Pj17u7u505OTn0AAABlAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgwMDGnBwcG7////////////////////5////zn///8A////AAAA
+        AAAAAAAAAAAAAAAAAAD///8A////AP///wH///99/////v//////////8PDw62hoaIcAAABkAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZhQUFGtbW1uCY2NjhWNjY4VjY2OFY2NjhV9fX4QdHR1uAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZh0dHW5fX1+EY2NjhWNjY4VjY2OFY2NjhVtb
+        W4IUFBRrAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGWampqg+vr6+P///////////////v//
+        /33///8B////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wD///8A////FP///7f/////////////
+        ///k5OTdTExMfAAAAGQAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZAAAAGQAAABkAAAAZAAA
+        AGQAAABkAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZAAA
+        AGQAAABkAAAAZAAAAGQAAABkAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGV9fX2R8/Pz7///
+        /////////////////7f///8U////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP//
+        /wD///8z////2v///////////////9zc3NRCQkJ5AAAAZAAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGRxcXGL7u7u6P///////////////////9r///8z////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAP///wD///8A////AP///1L////r////////////////3Nzc1ExMTHwAAABkAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGV4eHiO7e3t5////////////////////+v///9S////AP///wD///8AAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8B////Z/////H/////////////
+        ///k5OTdaGhohwAAAGUAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZQYGBmeRkZGb8vLy7f////////////////////H///9n////Af//
+        /wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP//
+        /wP///9u////8f////////////////Dw8OuXl5eeDw8PagAAAGQAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZCkpKXG3t7ez+fn59v//////////////////
+        //H///9u////A////wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAP///wD///8A////A////2f////r////////////////+/v7+cnJycFOTk59AAAAZQAA
+        AGUAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABkBAQEZ3FxcYvc3NzU/v7+/v//
+        /////////////////+v///9n////A////wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8B////Uv///9r/////////////
+        ////////7u7u56ioqKk1NTV1AAAAZAAAAGUAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGQAAABmUVFRfsDA
+        wLr29vby/////////////////////////9r///9S////Af///wD///8AAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP//
+        /wD///8z////t/////7////////////////+/v7+6Ojo4KmpqapJSUl7BQUFZwAAAGQAAABlAAAAZgAA
+        AGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABmAAAAZgAAAGYAAABkAAAAZBAQ
+        EGpiYmKEvb29uPDw8Ov//////////////////////////v///7f///8z////AP///wD///8AAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAP///wD///8A////AP///xT///99////5//////////////////////////+8PDw6srK
+        ysOLi4uYREREehEREWoAAABlAAAAZAAAAGQAAABkAAAAZQAAAGUAAABlAAAAZQAAAGQAAABkAAAAZAAA
+        AGUbGxttVVVVgJ2dnaLW1tbO9vb28f//////////////////////////////5////33///8U////AP//
+        /wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wD///8A////Af///zn///+p////9P//
+        /////////////////////////f39+/Dw8Ova2trRu7u7tpiYmJ92dnaNXV1dg0xMTHxCQkJ5Q0NDeVBQ
+        UH1iYmKFfn5+kaCgoKTDw8O84ODg2PT09PD+/v7+///////////////////////////////0////qf//
+        /zn///8B////AP///wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP//
+        /wD///8A////Cf///0z///+w////8P/////////////////////////////////////+/v7++/v7+ff3
+        9/P09PTv8vLy7fPz8+719fXw+Pj49fz8/Pr/////////////////////////////////////////////
+        //D///+w////TP///wn///8A////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////Cf///0D///+T////2P////n/////////////
+        ////////////////////////////////////////////////////////////////////////////////
+        ///////5////2P///5P///9A////Cf///wD///8A////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////Af//
+        /x3///9T////kv///8X////m////9/////7/////////////////////////////////////////////
+        //7////3////5v///8X///+S////U////x3///8B////AP///wD///8A////AAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAD///8A////AP///wD///8A////AP///wD///8S////Mv///1n///9+////n////7X////F////zf//
+        /83////F////tf///5////9+////Wf///zL///8S////AP///wD///8A////AP///wD///8AAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAA///AAAAD/////wAAAAD////8AAAAAD////gAAAAAH///4AAAAAAH///AAAAAAAP//4AAAAAA
+        Af//AAAAAAAA//4AAAAAAAB//AAAAAAAAD/4AAAAAAAAH/AAAAAAAAAP8AAAAAAAAA/gAAAAAAAAB8AA
+        AAAAAAADwAAAAAAAAAOAAAAAAAAAAYAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+        AAAAAAAAAAAAAAAAAACAAAAAAAAAAYAAAAAAAAABwAAAAAAAAAPAAAAAAAAAA+AAAAAAAAAH8AAAAAAA
+        AA/wAAAAAAAAD/gAAAAAAAAf/AAAAAAAAD/+AAAAAAAAf/8AAAAAAAD//4AAAAAAAf//wAAAAAAD///g
+        AAAAAAf///gAAAAAH////AAAAAA/////AAAAAP/////AAAAD//8=
 </value>
   </data>
 </root>

+ 2 - 3
UAS_DeviceMonitor/Program.cs

@@ -1,7 +1,5 @@
 using System;
-using System.Collections.Generic;
 using System.IO;
-using System.Linq;
 using System.Security.Principal;
 using System.Text;
 using System.Windows.Forms;
@@ -59,6 +57,7 @@ namespace UAS_DeviceMonitor
                 //创建记录打印进程的文件
                 FileStream fas = new FileStream(SystemInf.CacheFolder + "lblprocess.txt", FileMode.OpenOrCreate, FileAccess.ReadWrite);
                 fas.Close();
+                DevExpress.Skins.SkinManager.EnableFormSkins();
                 if (principal.IsInRole(WindowsBuiltInRole.Administrator))
                     Application.Run(new Main());
                 else
@@ -115,4 +114,4 @@ namespace UAS_DeviceMonitor
             return sb.ToString();
         }
     }
-}
+}

+ 10 - 0
UAS_DeviceMonitor/Properties/Resources.Designer.cs

@@ -90,6 +90,16 @@ namespace UAS_DeviceMonitor.Properties {
             }
         }
         
+        /// <summary>
+        ///   查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Icon U_Letter_64px_1121581_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("U_Letter_64px_1121581_easyicon_net", resourceCulture);
+                return ((System.Drawing.Icon)(obj));
+            }
+        }
+        
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>

+ 3 - 0
UAS_DeviceMonitor/Properties/Resources.resx

@@ -133,4 +133,7 @@
   <data name="U_Letter_72px_1121581_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\U_Letter_72px_1121581_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="U_Letter_64px_1121581_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\U_Letter_64px_1121581_easyicon.net.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
 </root>

+ 84 - 0
UAS_DeviceMonitor/PublicMethod/BaseUtil.cs

@@ -0,0 +1,84 @@
+using DevExpress.XtraEditors;
+using DevExpress.XtraEditors.Repository;
+using System.Data;
+using UAS_DeviceMonitor.DataOperate;
+
+namespace UAS_DeviceMonitor.PublicMethod
+{
+    class BaseUtil
+    {
+        public static void FillComBoxEditWidthDataTable(RepositoryItemComboBox combo, string TextField, string ValueField, DataTable dt)
+        {
+            combo.Items.Clear();
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                ComboBoxData item = new ComboBoxData();
+                item.Value = dt.Rows[i][ValueField].ToString();
+                item.Text = dt.Rows[i][TextField].ToString();
+                combo.Items.Add(item);
+            }
+        }
+
+        public static void FillComBoxEditWidthDataTable(ComboBoxEdit combo, string TextField, string ValueField, DataTable dt)
+        {
+            combo.Properties.Items.Clear();
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                ComboBoxData item = new ComboBoxData();
+                item.Value = dt.Rows[i][ValueField].ToString();
+                item.Text = dt.Rows[i][TextField].ToString();
+                combo.Properties.Items.Add(item);
+            }
+            combo.SelectedIndex = 0;
+        }
+
+        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;
+        }
+
+        public static string GetComboxEditValue(ComboBoxEdit ComBox)
+        {
+            if (ComBox.SelectedItem == null)
+                return ComBox.Text;
+            else
+                return (ComBox.SelectedItem as ComboBoxData).Value;
+        }
+
+        /// <summary>
+        /// 获取LRC
+        /// </summary>
+        /// <param name="SQL"></param>
+        public static string getLRC(string SENDMESSAGE)
+        {
+            string message = SENDMESSAGE.Trim();
+            if (message.Length % 2 != 0)
+            {
+                message = message + "0";
+            }
+
+            int LRC = 0x0;
+            for (int i = 0; i < message.Length; i = i + 2)
+            {
+                int inside = int.Parse(message.Substring(i, 1).ToString() + message.Substring(i + 1, 1).ToString(), System.Globalization.NumberStyles.HexNumber);
+                LRC += inside;
+            }
+            string _LRC = string.Format("{0:X2}", LRC);
+            string LRCre = "";
+            for (int i = 0; i < _LRC.Length; i++)
+            {
+                int index;
+                index = 0xF - int.Parse(_LRC.Substring(i, 1).ToString(), System.Globalization.NumberStyles.HexNumber);
+                LRCre += string.Format("{0:X}", index);
+            }
+
+            LRCre = string.Format("{0:X}", int.Parse(LRCre, System.Globalization.NumberStyles.HexNumber) + 1);
+
+            return LRCre;
+        }
+    }
+}

+ 11 - 0
UAS_DeviceMonitor/PublicMethod/PollingThread.cs

@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace UAS_DeviceMonitor.PublicMethod
+{
+    class PollingThread
+    {
+    }
+}

BIN
UAS_DeviceMonitor/Resources/U_Letter_64px_1121581_easyicon.net.ico


+ 31 - 1
UAS_DeviceMonitor/UAS_DeviceMonitor.csproj

@@ -72,19 +72,38 @@
     <Compile Include="CustomerControl\Button\ButtonAddRow.Designer.cs">
       <DependentUpon>ButtonAddRow.cs</DependentUpon>
     </Compile>
+    <Compile Include="CustomerControl\Button\ButtonDeleteRow.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="CustomerControl\Button\ButtonDeleteRow.Designer.cs">
+      <DependentUpon>ButtonDeleteRow.cs</DependentUpon>
+    </Compile>
     <Compile Include="CustomerControl\Button\ButtonSaveGrid.cs">
       <SubType>Component</SubType>
     </Compile>
     <Compile Include="CustomerControl\Button\ButtonSaveGrid.Designer.cs">
       <DependentUpon>ButtonSaveGrid.cs</DependentUpon>
     </Compile>
+    <Compile Include="CustomerControl\GridViewWithSerialNum\GridViewWithSerialNum.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="CustomerControl\GridViewWithSerialNum\GridViewWithSerialNum.Designer.cs">
+      <DependentUpon>GridViewWithSerialNum.cs</DependentUpon>
+    </Compile>
     <Compile Include="CustomerControl\PagingControl\PageControl.cs">
       <SubType>UserControl</SubType>
     </Compile>
     <Compile Include="CustomerControl\PagingControl\PageControl.Designer.cs">
       <DependentUpon>PageControl.cs</DependentUpon>
     </Compile>
+    <Compile Include="DataOperate\ComboBoxData.cs" />
     <Compile Include="DataOperate\DataHelper.cs" />
+    <Compile Include="Device\Command\FormNewCommand.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Device\Command\FormNewCommand.Designer.cs">
+      <DependentUpon>FormNewCommand.cs</DependentUpon>
+    </Compile>
     <Compile Include="Entity\SystemInf.cs" />
     <Compile Include="Main.cs">
       <SubType>Form</SubType>
@@ -94,20 +113,31 @@
     </Compile>
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="PublicMethod\BaseUtil.cs" />
     <Compile Include="PublicMethod\LogManager.cs" />
     <Compile Include="PublicMethod\ModeBusTCPServer.cs" />
+    <Compile Include="PublicMethod\PollingThread.cs" />
     <EmbeddedResource Include="CustomerControl\AutoDataGridControl\AutoDataGridControl.resx">
       <DependentUpon>AutoDataGridControl.cs</DependentUpon>
     </EmbeddedResource>
     <EmbeddedResource Include="CustomerControl\Button\ButtonAddRow.resx">
       <DependentUpon>ButtonAddRow.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="CustomerControl\Button\ButtonDeleteRow.resx">
+      <DependentUpon>ButtonDeleteRow.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="CustomerControl\Button\ButtonSaveGrid.resx">
       <DependentUpon>ButtonSaveGrid.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="CustomerControl\GridViewWithSerialNum\GridViewWithSerialNum.resx">
+      <DependentUpon>GridViewWithSerialNum.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="CustomerControl\PagingControl\PageControl.resx">
       <DependentUpon>PageControl.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Device\Command\FormNewCommand.resx">
+      <DependentUpon>FormNewCommand.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Main.resx">
       <DependentUpon>Main.cs</DependentUpon>
     </EmbeddedResource>
@@ -140,10 +170,10 @@
     <None Include="Resources\UIcon.png" />
     <None Include="Resources\U_Letter_72px_1121581_easyicon.net.png" />
     <None Include="Resources\netstatus_tx_64px_18991_easyicon.net.png" />
+    <None Include="Resources\U_Letter_64px_1121581_easyicon.net.ico" />
     <Content Include="Tool\Oracle.ManagedDataAccess.dll" />
   </ItemGroup>
   <ItemGroup>
-    <Folder Include="Device\Command\" />
     <Folder Include="Device\Information\" />
     <Folder Include="Device\Transfer\" />
   </ItemGroup>