فهرست منبع

添加对应界面的Grid

章政 7 سال پیش
والد
کامیت
167c32b35a

+ 3 - 1
UAS_DeviceMonitor/CustomerControl/PagingControl/PageControl.Designer.cs

@@ -117,6 +117,7 @@
             this.ExportAllPage.Size = new System.Drawing.Size(75, 29);
             this.ExportAllPage.TabIndex = 7;
             this.ExportAllPage.Text = "导出全部页";
+            this.ExportAllPage.Visible = false;
             // 
             // ExportCurrentPage
             // 
@@ -126,6 +127,7 @@
             this.ExportCurrentPage.Size = new System.Drawing.Size(75, 29);
             this.ExportCurrentPage.TabIndex = 8;
             this.ExportCurrentPage.Text = "导出当前页";
+            this.ExportCurrentPage.Visible = false;
             // 
             // PageSize
             // 
@@ -162,7 +164,7 @@
             this.PageCount.Name = "PageCount";
             this.PageCount.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 12F);
             this.PageCount.Properties.Appearance.Options.UseFont = true;
-            this.PageCount.Size = new System.Drawing.Size(58, 26);
+            this.PageCount.Size = new System.Drawing.Size(42, 26);
             this.PageCount.TabIndex = 12;
             // 
             // PageControl

+ 2 - 1
UAS_DeviceMonitor/CustomerControl/PagingControl/PageControl.cs

@@ -33,7 +33,8 @@ namespace UAS_DeviceMonitor.CustomerControl.PagingControl
 
         private void PageControl_Load(object sender, EventArgs e)
         {
-            gridcontrol.VisibleChanged += Gridcontrol_VisibleChanged;
+            if (gridcontrol != null)
+                gridcontrol.VisibleChanged += Gridcontrol_VisibleChanged;
         }
 
         private void Gridcontrol_VisibleChanged(object sender, EventArgs e)

+ 1 - 1
UAS_DeviceMonitor/DataOperate/DataHelper.cs

@@ -534,7 +534,7 @@ namespace UAS_DeviceMonitor.DataOperate
                 for (int i = 0; i < addpar.Length; i++)
                     command.Parameters.Add(new OracleParameter(addpar[i].ToString(), OracleDbType.Varchar2, names[i], ParameterDirection.Input));
             }
-
+            Console.WriteLine(SQL);
             switch (Type.ToUpper())
             {
                 case "SELECT":

+ 166 - 33
UAS_DeviceMonitor/Main.Designer.cs

@@ -31,7 +31,7 @@ namespace UAS_DeviceMonitor
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));
-            this.ribbon = new DevExpress.XtraBars.Ribbon.RibbonControl();
+            this.RibbonNav = new DevExpress.XtraBars.Ribbon.RibbonControl();
             this.barButtonItem1 = new DevExpress.XtraBars.BarButtonItem();
             this.ButtonDeviceList = new DevExpress.XtraBars.BarButtonItem();
             this.ButtonDeviceKind = new DevExpress.XtraBars.BarButtonItem();
@@ -52,7 +52,8 @@ namespace UAS_DeviceMonitor
             this.ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage();
             this.MainTabControl = new DevExpress.XtraTab.XtraTabControl();
             this.PageDeviceList = new DevExpress.XtraTab.XtraTabPage();
-            this.GridDeviceList = new AutoDataGridControl();
+            this.pageControl1 = new UAS_DeviceMonitor.CustomerControl.PagingControl.PageControl();
+            this.GridDeviceList = new UAS_DeviceMonitor.CustomerControl.AutoDataGridControl.AutoDataGridControl();
             this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
             this.de_id = new DevExpress.XtraGrid.Columns.GridColumn();
             this.de_code = new DevExpress.XtraGrid.Columns.GridColumn();
@@ -65,26 +66,44 @@ 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.GridCommandSetting = new DevExpress.XtraGrid.GridControl();
+            this.gridView2 = new DevExpress.XtraGrid.Views.Grid.GridView();
             this.PageDeviceKind = new DevExpress.XtraTab.XtraTabPage();
             this.PageDeviceStatus = new DevExpress.XtraTab.XtraTabPage();
             this.PagePollingSetting = new DevExpress.XtraTab.XtraTabPage();
             this.PagePolling = new DevExpress.XtraTab.XtraTabPage();
-            this.pageControl1 = new CustomerControl.PagingControl.PageControl();
-            ((System.ComponentModel.ISupportInitialize)(this.ribbon)).BeginInit();
+            this.dc_id = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.dc_code = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.dc_name = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.dc_command = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.GridPolling = new DevExpress.XtraGrid.GridControl();
+            this.gridView3 = new DevExpress.XtraGrid.Views.Grid.GridView();
+            this.GridPollingSetting = new DevExpress.XtraGrid.GridControl();
+            this.gridView4 = new DevExpress.XtraGrid.Views.Grid.GridView();
+            ((System.ComponentModel.ISupportInitialize)(this.RibbonNav)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.MainTabControl)).BeginInit();
             this.MainTabControl.SuspendLayout();
             this.PageDeviceList.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.GridDeviceList)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit();
+            this.PageCommandSet.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.GridCommandSetting)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gridView2)).BeginInit();
+            this.PagePollingSetting.SuspendLayout();
+            this.PagePolling.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.GridPolling)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gridView3)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.GridPollingSetting)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gridView4)).BeginInit();
             this.SuspendLayout();
             // 
-            // ribbon
+            // RibbonNav
             // 
-            this.ribbon.ApplicationIcon = global::UAS_DeviceMonitor.Properties.Resources.U_Letter_72px_1121581_easyicon_net;
-            this.ribbon.DrawGroupCaptions = DevExpress.Utils.DefaultBoolean.False;
-            this.ribbon.ExpandCollapseItem.Id = 0;
-            this.ribbon.Items.AddRange(new DevExpress.XtraBars.BarItem[] {
-            this.ribbon.ExpandCollapseItem,
+            this.RibbonNav.ApplicationIcon = global::UAS_DeviceMonitor.Properties.Resources.U_Letter_72px_1121581_easyicon_net;
+            this.RibbonNav.DrawGroupCaptions = DevExpress.Utils.DefaultBoolean.False;
+            this.RibbonNav.ExpandCollapseItem.Id = 0;
+            this.RibbonNav.Items.AddRange(new DevExpress.XtraBars.BarItem[] {
+            this.RibbonNav.ExpandCollapseItem,
             this.barButtonItem1,
             this.ButtonDeviceList,
             this.ButtonDeviceKind,
@@ -94,15 +113,15 @@ namespace UAS_DeviceMonitor
             this.barButtonItem5,
             this.ButtonPollingSetting,
             this.ButtionPolling});
-            this.ribbon.Location = new System.Drawing.Point(0, 0);
-            this.ribbon.MaxItemId = 13;
-            this.ribbon.Name = "ribbon";
-            this.ribbon.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] {
+            this.RibbonNav.Location = new System.Drawing.Point(0, 0);
+            this.RibbonNav.MaxItemId = 13;
+            this.RibbonNav.Name = "RibbonNav";
+            this.RibbonNav.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] {
             this.DeviceInf,
             this.DeviceCommandSetting,
             this.ribbonPage2});
-            this.ribbon.Size = new System.Drawing.Size(1033, 128);
-            this.ribbon.StatusBar = this.ribbonStatusBar;
+            this.RibbonNav.Size = new System.Drawing.Size(1033, 128);
+            this.RibbonNav.StatusBar = this.ribbonStatusBar;
             // 
             // barButtonItem1
             // 
@@ -215,8 +234,8 @@ namespace UAS_DeviceMonitor
             // RibDeviceCommand
             // 
             this.RibDeviceCommand.ItemLinks.Add(this.ButtonCommandSet);
-            this.RibDeviceCommand.ItemLinks.Add(this.ButtonPollingSetting);
             this.RibDeviceCommand.ItemLinks.Add(this.ButtionPolling);
+            this.RibDeviceCommand.ItemLinks.Add(this.ButtonPollingSetting);
             this.RibDeviceCommand.Name = "RibDeviceCommand";
             this.RibDeviceCommand.Text = "ribbonPageGroup3";
             // 
@@ -237,7 +256,7 @@ namespace UAS_DeviceMonitor
             // 
             this.ribbonStatusBar.Location = new System.Drawing.Point(0, 680);
             this.ribbonStatusBar.Name = "ribbonStatusBar";
-            this.ribbonStatusBar.Ribbon = this.ribbon;
+            this.ribbonStatusBar.Ribbon = this.RibbonNav;
             this.ribbonStatusBar.Size = new System.Drawing.Size(1033, 31);
             // 
             // ribbonPageGroup1
@@ -278,16 +297,25 @@ namespace UAS_DeviceMonitor
             this.PageDeviceList.Size = new System.Drawing.Size(1027, 546);
             this.PageDeviceList.Text = "xtraTabPage1";
             // 
+            // pageControl1
+            // 
+            this.pageControl1.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.pageControl1.Gridcontrol = null;
+            this.pageControl1.Location = new System.Drawing.Point(0, 517);
+            this.pageControl1.Name = "pageControl1";
+            this.pageControl1.Size = new System.Drawing.Size(1027, 29);
+            this.pageControl1.TabIndex = 1;
+            // 
             // GridDeviceList
             // 
-            this.GridDeviceList.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.GridDeviceList.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.GridDeviceList.GetDataSQL = null;
             this.GridDeviceList.Location = new System.Drawing.Point(0, 0);
             this.GridDeviceList.MainView = this.gridView1;
-            this.GridDeviceList.MenuManager = this.ribbon;
+            this.GridDeviceList.MenuManager = this.RibbonNav;
             this.GridDeviceList.Name = "GridDeviceList";
-            this.GridDeviceList.Size = new System.Drawing.Size(1027, 516);
+            this.GridDeviceList.RowCount = 0;
+            this.GridDeviceList.Size = new System.Drawing.Size(1027, 546);
             this.GridDeviceList.TabIndex = 0;
             this.GridDeviceList.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
             this.gridView1});
@@ -391,11 +419,36 @@ namespace UAS_DeviceMonitor
             // 
             // PageCommandSet
             // 
+            this.PageCommandSet.Controls.Add(this.GridCommandSetting);
             this.PageCommandSet.Name = "PageCommandSet";
             this.PageCommandSet.PageVisible = false;
             this.PageCommandSet.Size = new System.Drawing.Size(1027, 546);
             this.PageCommandSet.Text = "xtraTabPage1";
             // 
+            // 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.Location = new System.Drawing.Point(0, -1);
+            this.GridCommandSetting.MainView = this.gridView2;
+            this.GridCommandSetting.MenuManager = this.RibbonNav;
+            this.GridCommandSetting.Name = "GridCommandSetting";
+            this.GridCommandSetting.Size = new System.Drawing.Size(1027, 511);
+            this.GridCommandSetting.TabIndex = 1;
+            this.GridCommandSetting.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
+            this.gridView2});
+            // 
+            // gridView2
+            // 
+            this.gridView2.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
+            this.dc_id,
+            this.dc_code,
+            this.dc_name,
+            this.dc_command});
+            this.gridView2.GridControl = this.GridCommandSetting;
+            this.gridView2.Name = "gridView2";
+            // 
             // PageDeviceKind
             // 
             this.PageDeviceKind.Name = "PageDeviceKind";
@@ -412,6 +465,7 @@ namespace UAS_DeviceMonitor
             // 
             // PagePollingSetting
             // 
+            this.PagePollingSetting.Controls.Add(this.GridPollingSetting);
             this.PagePollingSetting.Name = "PagePollingSetting";
             this.PagePollingSetting.PageVisible = false;
             this.PagePollingSetting.Size = new System.Drawing.Size(1027, 546);
@@ -419,18 +473,77 @@ namespace UAS_DeviceMonitor
             // 
             // PagePolling
             // 
+            this.PagePolling.Controls.Add(this.GridPolling);
             this.PagePolling.Name = "PagePolling";
             this.PagePolling.PageVisible = false;
             this.PagePolling.Size = new System.Drawing.Size(1027, 546);
             this.PagePolling.Text = "xtraTabPage1";
             // 
-            // pageControl1
+            // dc_id
             // 
-            this.pageControl1.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.pageControl1.Location = new System.Drawing.Point(0, 517);
-            this.pageControl1.Name = "pageControl1";
-            this.pageControl1.Size = new System.Drawing.Size(1027, 29);
-            this.pageControl1.TabIndex = 1;
+            this.dc_id.FieldName = "DC_ID";
+            this.dc_id.Name = "dc_id";
+            // 
+            // dc_code
+            // 
+            this.dc_code.Caption = "指令编号";
+            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.Width = 118;
+            // 
+            // dc_name
+            // 
+            this.dc_name.Caption = "指令名称";
+            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.Width = 123;
+            // 
+            // dc_command
+            // 
+            this.dc_command.Caption = "发送指令";
+            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.Width = 768;
+            // 
+            // GridPolling
+            // 
+            this.GridPolling.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.GridPolling.Location = new System.Drawing.Point(0, 0);
+            this.GridPolling.MainView = this.gridView3;
+            this.GridPolling.MenuManager = this.RibbonNav;
+            this.GridPolling.Name = "GridPolling";
+            this.GridPolling.Size = new System.Drawing.Size(1027, 546);
+            this.GridPolling.TabIndex = 0;
+            this.GridPolling.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
+            this.gridView3});
+            // 
+            // gridView3
+            // 
+            this.gridView3.GridControl = this.GridPolling;
+            this.gridView3.Name = "gridView3";
+            // 
+            // GridPollingSetting
+            // 
+            this.GridPollingSetting.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.GridPollingSetting.Location = new System.Drawing.Point(0, 0);
+            this.GridPollingSetting.MainView = this.gridView4;
+            this.GridPollingSetting.MenuManager = this.RibbonNav;
+            this.GridPollingSetting.Name = "GridPollingSetting";
+            this.GridPollingSetting.Size = new System.Drawing.Size(1027, 546);
+            this.GridPollingSetting.TabIndex = 0;
+            this.GridPollingSetting.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
+            this.gridView4});
+            // 
+            // gridView4
+            // 
+            this.gridView4.GridControl = this.GridPollingSetting;
+            this.gridView4.Name = "gridView4";
             // 
             // Main
             // 
@@ -442,18 +555,28 @@ namespace UAS_DeviceMonitor
             this.ClientSize = new System.Drawing.Size(1033, 711);
             this.Controls.Add(this.MainTabControl);
             this.Controls.Add(this.ribbonStatusBar);
-            this.Controls.Add(this.ribbon);
+            this.Controls.Add(this.RibbonNav);
             this.Name = "Main";
-            this.Ribbon = this.ribbon;
+            this.Ribbon = this.RibbonNav;
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.StatusBar = this.ribbonStatusBar;
             this.Text = "设备监控管理平台";
             this.Load += new System.EventHandler(this.Main_Load);
-            ((System.ComponentModel.ISupportInitialize)(this.ribbon)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.RibbonNav)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.MainTabControl)).EndInit();
             this.MainTabControl.ResumeLayout(false);
             this.PageDeviceList.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.GridDeviceList)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit();
+            this.PageCommandSet.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.GridCommandSetting)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gridView2)).EndInit();
+            this.PagePollingSetting.ResumeLayout(false);
+            this.PagePolling.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.GridPolling)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gridView3)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.GridPollingSetting)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gridView4)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -461,7 +584,7 @@ namespace UAS_DeviceMonitor
 
         #endregion
 
-        private DevExpress.XtraBars.Ribbon.RibbonControl ribbon;
+        private DevExpress.XtraBars.Ribbon.RibbonControl RibbonNav;
         private DevExpress.XtraBars.Ribbon.RibbonStatusBar ribbonStatusBar;
         private DevExpress.XtraBars.BarButtonItem barButtonItem1;
         private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup1;
@@ -500,5 +623,15 @@ namespace UAS_DeviceMonitor
         private DevExpress.XtraGrid.Columns.GridColumn de_address;
         private DevExpress.XtraGrid.Columns.GridColumn de_wccode;
         private CustomerControl.PagingControl.PageControl pageControl1;
+        private DevExpress.XtraGrid.GridControl GridCommandSetting;
+        private DevExpress.XtraGrid.Views.Grid.GridView gridView2;
+        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 DevExpress.XtraGrid.GridControl GridPolling;
+        private DevExpress.XtraGrid.Views.Grid.GridView gridView3;
+        private DevExpress.XtraGrid.GridControl GridPollingSetting;
+        private DevExpress.XtraGrid.Views.Grid.GridView gridView4;
     }
 }