Browse Source

添加设备编号

章政 7 years ago
parent
commit
ab325b6da1
2 changed files with 84 additions and 73 deletions
  1. 83 72
      PLCDataReader/Main.Designer.cs
  2. 1 1
      PLCDataReader/Main.cs

+ 83 - 72
PLCDataReader/Main.Designer.cs

@@ -88,9 +88,16 @@ namespace UAS_PLCDataReader
             this.de_linecode = new DevExpress.XtraGrid.Columns.GridColumn();
             this.de_wccode = new DevExpress.XtraGrid.Columns.GridColumn();
             this.de_item1 = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.DataItemRepositoryItemComboBox1 = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox();
             this.de_item2 = new DevExpress.XtraGrid.Columns.GridColumn();
             this.de_item3 = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.de_item4 = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.de_item5 = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.de_item6 = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.de_item7 = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.de_item8 = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.de_item9 = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.de_item10 = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.DataItemRepositoryItemComboBox1 = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox();
             this.PageCommandSet = new DevExpress.XtraTab.XtraTabPage();
             this.ButtonDeleteCommand = new UAS_PLCDataReader.CustomerControl.Button.ButtonDeleteRow();
             this.Brand_label = new DevExpress.XtraEditors.LabelControl();
@@ -216,13 +223,7 @@ namespace UAS_PLCDataReader
             this.CommonTipController = new DevExpress.Utils.ToolTipController(this.components);
             this.TimerUpdateDevice = new System.Windows.Forms.Timer(this.components);
             this.TimerUpdateSQL = new System.Windows.Forms.Timer(this.components);
-            this.de_item4 = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.de_item5 = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.de_item6 = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.de_item7 = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.de_item8 = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.de_item9 = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.de_item10 = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.de_name1 = new DevExpress.XtraGrid.Columns.GridColumn();
             ((System.ComponentModel.ISupportInitialize)(this.RibbonNav)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.MainTabControl)).BeginInit();
             this.MainTabControl.SuspendLayout();
@@ -841,13 +842,6 @@ namespace UAS_PLCDataReader
             this.de_item1.Visible = true;
             this.de_item1.VisibleIndex = 13;
             // 
-            // DataItemRepositoryItemComboBox1
-            // 
-            this.DataItemRepositoryItemComboBox1.AutoHeight = false;
-            this.DataItemRepositoryItemComboBox1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
-            this.DataItemRepositoryItemComboBox1.Name = "DataItemRepositoryItemComboBox1";
-            // 
             // de_item2
             // 
             this.de_item2.Caption = "参数2";
@@ -864,6 +858,69 @@ namespace UAS_PLCDataReader
             this.de_item3.Visible = true;
             this.de_item3.VisibleIndex = 15;
             // 
+            // de_item4
+            // 
+            this.de_item4.Caption = "参数4";
+            this.de_item4.FieldName = "DE_ITEM4";
+            this.de_item4.Name = "de_item4";
+            this.de_item4.Visible = true;
+            this.de_item4.VisibleIndex = 16;
+            // 
+            // de_item5
+            // 
+            this.de_item5.Caption = "参数5";
+            this.de_item5.FieldName = "DE_ITEM5";
+            this.de_item5.Name = "de_item5";
+            this.de_item5.Visible = true;
+            this.de_item5.VisibleIndex = 17;
+            // 
+            // de_item6
+            // 
+            this.de_item6.Caption = "参数6";
+            this.de_item6.FieldName = "DE_ITEM6";
+            this.de_item6.Name = "de_item6";
+            this.de_item6.Visible = true;
+            this.de_item6.VisibleIndex = 18;
+            // 
+            // de_item7
+            // 
+            this.de_item7.Caption = "参数7";
+            this.de_item7.FieldName = "DE_ITEM7";
+            this.de_item7.Name = "de_item7";
+            this.de_item7.Visible = true;
+            this.de_item7.VisibleIndex = 19;
+            // 
+            // de_item8
+            // 
+            this.de_item8.Caption = "参数8";
+            this.de_item8.FieldName = "DE_ITEM8";
+            this.de_item8.Name = "de_item8";
+            this.de_item8.Visible = true;
+            this.de_item8.VisibleIndex = 20;
+            // 
+            // de_item9
+            // 
+            this.de_item9.Caption = "参数9";
+            this.de_item9.FieldName = "DE_ITEM9";
+            this.de_item9.Name = "de_item9";
+            this.de_item9.Visible = true;
+            this.de_item9.VisibleIndex = 21;
+            // 
+            // de_item10
+            // 
+            this.de_item10.Caption = "参数10";
+            this.de_item10.FieldName = "DE_ITEM10";
+            this.de_item10.Name = "de_item10";
+            this.de_item10.Visible = true;
+            this.de_item10.VisibleIndex = 22;
+            // 
+            // DataItemRepositoryItemComboBox1
+            // 
+            this.DataItemRepositoryItemComboBox1.AutoHeight = false;
+            this.DataItemRepositoryItemComboBox1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.DataItemRepositoryItemComboBox1.Name = "DataItemRepositoryItemComboBox1";
+            // 
             // PageCommandSet
             // 
             this.PageCommandSet.Controls.Add(this.ButtonDeleteCommand);
@@ -1186,6 +1243,7 @@ namespace UAS_PLCDataReader
             this.NetSettingCheckedColumn,
             this.dnc_id,
             this.dnc_decode,
+            this.de_name1,
             this.dnc_getway,
             this.dnc_upperip,
             this.dnc_port,
@@ -1241,7 +1299,7 @@ namespace UAS_PLCDataReader
             this.dnc_port.FieldName = "DNC_PORT";
             this.dnc_port.Name = "dnc_port";
             this.dnc_port.Visible = true;
-            this.dnc_port.VisibleIndex = 2;
+            this.dnc_port.VisibleIndex = 3;
             // 
             // dnc_mac
             // 
@@ -1249,7 +1307,7 @@ namespace UAS_PLCDataReader
             this.dnc_mac.FieldName = "DNC_MAC";
             this.dnc_mac.Name = "dnc_mac";
             this.dnc_mac.Visible = true;
-            this.dnc_mac.VisibleIndex = 3;
+            this.dnc_mac.VisibleIndex = 4;
             // 
             // dnc_ip
             // 
@@ -1257,7 +1315,7 @@ namespace UAS_PLCDataReader
             this.dnc_ip.FieldName = "DNC_IP";
             this.dnc_ip.Name = "dnc_ip";
             this.dnc_ip.Visible = true;
-            this.dnc_ip.VisibleIndex = 4;
+            this.dnc_ip.VisibleIndex = 5;
             // 
             // dnc_type
             // 
@@ -2158,61 +2216,13 @@ namespace UAS_PLCDataReader
             this.TimerUpdateSQL.Interval = 5000;
             this.TimerUpdateSQL.Tick += new System.EventHandler(this.TimerUpdateSQL_Tick);
             // 
-            // de_item4
-            // 
-            this.de_item4.Caption = "参数4";
-            this.de_item4.FieldName = "DE_ITEM4";
-            this.de_item4.Name = "de_item4";
-            this.de_item4.Visible = true;
-            this.de_item4.VisibleIndex = 16;
-            // 
-            // de_item5
-            // 
-            this.de_item5.Caption = "参数5";
-            this.de_item5.FieldName = "DE_ITEM5";
-            this.de_item5.Name = "de_item5";
-            this.de_item5.Visible = true;
-            this.de_item5.VisibleIndex = 17;
-            // 
-            // de_item6
-            // 
-            this.de_item6.Caption = "参数6";
-            this.de_item6.FieldName = "DE_ITEM6";
-            this.de_item6.Name = "de_item6";
-            this.de_item6.Visible = true;
-            this.de_item6.VisibleIndex = 18;
-            // 
-            // de_item7
-            // 
-            this.de_item7.Caption = "参数7";
-            this.de_item7.FieldName = "DE_ITEM7";
-            this.de_item7.Name = "de_item7";
-            this.de_item7.Visible = true;
-            this.de_item7.VisibleIndex = 19;
-            // 
-            // de_item8
+            // de_name1
             // 
-            this.de_item8.Caption = "参数8";
-            this.de_item8.FieldName = "DE_ITEM8";
-            this.de_item8.Name = "de_item8";
-            this.de_item8.Visible = true;
-            this.de_item8.VisibleIndex = 20;
-            // 
-            // de_item9
-            // 
-            this.de_item9.Caption = "参数9";
-            this.de_item9.FieldName = "DE_ITEM9";
-            this.de_item9.Name = "de_item9";
-            this.de_item9.Visible = true;
-            this.de_item9.VisibleIndex = 21;
-            // 
-            // de_item10
-            // 
-            this.de_item10.Caption = "参数10";
-            this.de_item10.FieldName = "DE_ITEM10";
-            this.de_item10.Name = "de_item10";
-            this.de_item10.Visible = true;
-            this.de_item10.VisibleIndex = 22;
+            this.de_name1.Caption = "设备名称";
+            this.de_name1.FieldName = "DE_NAME";
+            this.de_name1.Name = "de_name1";
+            this.de_name1.Visible = true;
+            this.de_name1.VisibleIndex = 2;
             // 
             // Main
             // 
@@ -2485,5 +2495,6 @@ namespace UAS_PLCDataReader
         private DevExpress.XtraGrid.Columns.GridColumn de_item8;
         private DevExpress.XtraGrid.Columns.GridColumn de_item9;
         private DevExpress.XtraGrid.Columns.GridColumn de_item10;
+        private DevExpress.XtraGrid.Columns.GridColumn de_name1;
     }
 }

+ 1 - 1
PLCDataReader/Main.cs

@@ -190,7 +190,7 @@ namespace UAS_PLCDataReader
             ButtonNewCommand.Grid = GridCommandSetting;
 
             //设备联网配置界面
-            GridDeviceNetSetting.GetDataSQL = "SELECT 0 CHECKEDCOLUMN,DNC_ID,DNC_DECODE,DNC_GATEWAY,DNC_UPPERIP,DNC_PORT,DNC_MAC,DNC_IP,DNC_TYPE FROM DEVICENETCONFIG order by dnc_decode";
+            GridDeviceNetSetting.GetDataSQL = "SELECT 0 CHECKEDCOLUMN,DNC_ID,DNC_DECODE,DNC_GATEWAY,DNC_UPPERIP,DNC_PORT,DNC_MAC,DNC_IP,DNC_TYPE,DE_NAME FROM DEVICENETCONFIG left join device on dnc_decode=de_code order by dnc_decode";
             GridDeviceNetSetting.ID = "dnc_id";
             GridDeviceNetSetting.TableName = "DEVICENETCONFIG";
             GridDeviceNetSetting.InsertSQL = "insert into DEVICENETCONFIG(DNC_ID,DNC_DECODE,DNC_GATEWAY,DNC_UPPERIP,DNC_PORT,DNC_MAC,DNC_IP,DNC_TYPE) values(DEVICENETCONFIG_SEQ.NEXTVAL,:DNC_DECODE,:DNC_GATEWAY,:DNC_UPPERIP,:DNC_PORT,:DNC_MAC,:DNC_IP,:DNC_TYPE)";