Browse Source

移动按钮位置

章政 7 years ago
parent
commit
7d45e22bb9
2 changed files with 89 additions and 37 deletions
  1. 78 37
      UAS_DeviceMonitor/Main.Designer.cs
  2. 11 0
      UAS_DeviceMonitor/Main.cs

+ 78 - 37
UAS_DeviceMonitor/Main.Designer.cs

@@ -49,6 +49,9 @@ namespace UAS_DeviceMonitor
             this.RibDeviceCommand = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
             this.MainTabControl = new DevExpress.XtraTab.XtraTabControl();
             this.PageDeviceList = new DevExpress.XtraTab.XtraTabPage();
+            this.ButtonAddDevice = new UAS_DeviceMonitor.CustomerControl.Button.ButtonAddRow();
+            this.ButtonDeleteDevice = new UAS_DeviceMonitor.CustomerControl.Button.ButtonDeleteRow();
+            this.ButtonSaveDevice = new UAS_DeviceMonitor.CustomerControl.Button.ButtonSaveGrid();
             this.ComBoxDeviceListMan = new DevExpress.XtraEditors.SearchLookUpEdit();
             this.searchLookUpEdit1View = new DevExpress.XtraGrid.Views.Grid.GridView();
             this.em_code = new DevExpress.XtraGrid.Columns.GridColumn();
@@ -64,6 +67,8 @@ namespace UAS_DeviceMonitor
             this.de_code = new DevExpress.XtraGrid.Columns.GridColumn();
             this.de_name = new DevExpress.XtraGrid.Columns.GridColumn();
             this.de_runstatus = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.de_stepcode = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.de_stepname = new DevExpress.XtraGrid.Columns.GridColumn();
             this.de_indate = new DevExpress.XtraGrid.Columns.GridColumn();
             this.de_spec = new DevExpress.XtraGrid.Columns.GridColumn();
             this.de_inman = new DevExpress.XtraGrid.Columns.GridColumn();
@@ -160,8 +165,6 @@ namespace UAS_DeviceMonitor
             this.GridViewWorkCenterStatus = new UAS_DeviceMonitor.CustomerControl.GridViewWithSerialNum.GridViewWithSerialNum();
             this.TimerDeviceStatus = new System.Windows.Forms.Timer(this.components);
             this.CommonTipController = new DevExpress.Utils.ToolTipController(this.components);
-            this.de_stepname = new DevExpress.XtraGrid.Columns.GridColumn();
-            this.de_stepcode = new DevExpress.XtraGrid.Columns.GridColumn();
             ((System.ComponentModel.ISupportInitialize)(this.RibbonNav)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.MainTabControl)).BeginInit();
             this.MainTabControl.SuspendLayout();
@@ -221,6 +224,7 @@ namespace UAS_DeviceMonitor
             this.DeviceInf,
             this.DeviceCommandSetting});
             this.RibbonNav.Size = new System.Drawing.Size(1033, 128);
+            this.RibbonNav.Click += new System.EventHandler(this.RibbonNav_Click);
             // 
             // ButtonDeviceList
             // 
@@ -341,6 +345,9 @@ namespace UAS_DeviceMonitor
             // 
             // PageDeviceList
             // 
+            this.PageDeviceList.Controls.Add(this.ButtonAddDevice);
+            this.PageDeviceList.Controls.Add(this.ButtonDeleteDevice);
+            this.PageDeviceList.Controls.Add(this.ButtonSaveDevice);
             this.PageDeviceList.Controls.Add(this.ComBoxDeviceListMan);
             this.PageDeviceList.Controls.Add(this.ComBoxDeviceListMan_label);
             this.PageDeviceList.Controls.Add(this.ComboxDeviceListWC);
@@ -354,6 +361,37 @@ namespace UAS_DeviceMonitor
             this.PageDeviceList.Text = "xtraTabPage1";
             this.PageDeviceList.VisibleChanged += new System.EventHandler(this.PageDeviceList_VisibleChanged);
             // 
+            // ButtonAddDevice
+            // 
+            this.ButtonAddDevice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.ButtonAddDevice.Grid = null;
+            this.ButtonAddDevice.Location = new System.Drawing.Point(795, 5);
+            this.ButtonAddDevice.Name = "ButtonAddDevice";
+            this.ButtonAddDevice.Size = new System.Drawing.Size(64, 23);
+            this.ButtonAddDevice.TabIndex = 16;
+            this.ButtonAddDevice.Text = "新增";
+            // 
+            // ButtonDeleteDevice
+            // 
+            this.ButtonDeleteDevice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.ButtonDeleteDevice.Grid = null;
+            this.ButtonDeleteDevice.Location = new System.Drawing.Point(935, 5);
+            this.ButtonDeleteDevice.Name = "ButtonDeleteDevice";
+            this.ButtonDeleteDevice.Size = new System.Drawing.Size(64, 23);
+            this.ButtonDeleteDevice.TabIndex = 15;
+            this.ButtonDeleteDevice.Text = "删除";
+            // 
+            // ButtonSaveDevice
+            // 
+            this.ButtonSaveDevice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.ButtonSaveDevice.Grid = null;
+            this.ButtonSaveDevice.HandlerOtherFirst = false;
+            this.ButtonSaveDevice.Location = new System.Drawing.Point(865, 5);
+            this.ButtonSaveDevice.Name = "ButtonSaveDevice";
+            this.ButtonSaveDevice.Size = new System.Drawing.Size(64, 23);
+            this.ButtonSaveDevice.TabIndex = 14;
+            this.ButtonSaveDevice.Text = "保存";
+            // 
             // ComBoxDeviceListMan
             // 
             this.ComBoxDeviceListMan.EditValue = "";
@@ -528,6 +566,22 @@ namespace UAS_DeviceMonitor
             this.de_runstatus.Visible = true;
             this.de_runstatus.VisibleIndex = 2;
             // 
+            // de_stepcode
+            // 
+            this.de_stepcode.Caption = "工序编号";
+            this.de_stepcode.FieldName = "DE_STEPCODE";
+            this.de_stepcode.Name = "de_stepcode";
+            this.de_stepcode.Visible = true;
+            this.de_stepcode.VisibleIndex = 4;
+            // 
+            // de_stepname
+            // 
+            this.de_stepname.Caption = "工序名称";
+            this.de_stepname.FieldName = "DE_STEPNAME";
+            this.de_stepname.Name = "de_stepname";
+            this.de_stepname.Visible = true;
+            this.de_stepname.VisibleIndex = 5;
+            // 
             // de_indate
             // 
             this.de_indate.Caption = "录入日期";
@@ -609,9 +663,9 @@ namespace UAS_DeviceMonitor
             // 
             // ButtonDeleteCommand
             // 
-            this.ButtonDeleteCommand.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.ButtonDeleteCommand.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.ButtonDeleteCommand.Grid = null;
-            this.ButtonDeleteCommand.Location = new System.Drawing.Point(816, 551);
+            this.ButtonDeleteCommand.Location = new System.Drawing.Point(945, 5);
             this.ButtonDeleteCommand.Name = "ButtonDeleteCommand";
             this.ButtonDeleteCommand.Size = new System.Drawing.Size(64, 23);
             this.ButtonDeleteCommand.TabIndex = 6;
@@ -642,9 +696,9 @@ namespace UAS_DeviceMonitor
             // 
             // ButtonNewCommand
             // 
-            this.ButtonNewCommand.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.ButtonNewCommand.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.ButtonNewCommand.Grid = null;
-            this.ButtonNewCommand.Location = new System.Drawing.Point(886, 551);
+            this.ButtonNewCommand.Location = new System.Drawing.Point(805, 5);
             this.ButtonNewCommand.Name = "ButtonNewCommand";
             this.ButtonNewCommand.Size = new System.Drawing.Size(64, 23);
             this.ButtonNewCommand.TabIndex = 3;
@@ -652,10 +706,10 @@ namespace UAS_DeviceMonitor
             // 
             // ButtonSaveCommand
             // 
-            this.ButtonSaveCommand.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.ButtonSaveCommand.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.ButtonSaveCommand.Grid = null;
             this.ButtonSaveCommand.HandlerOtherFirst = true;
-            this.ButtonSaveCommand.Location = new System.Drawing.Point(956, 551);
+            this.ButtonSaveCommand.Location = new System.Drawing.Point(875, 5);
             this.ButtonSaveCommand.Name = "ButtonSaveCommand";
             this.ButtonSaveCommand.Size = new System.Drawing.Size(64, 23);
             this.ButtonSaveCommand.TabIndex = 2;
@@ -679,7 +733,7 @@ namespace UAS_DeviceMonitor
             this.CheckEditCommandSet,
             this.CommandSetRepositoryItemComboBox1});
             this.GridCommandSetting.RowCount = 0;
-            this.GridCommandSetting.Size = new System.Drawing.Size(1027, 517);
+            this.GridCommandSetting.Size = new System.Drawing.Size(1027, 546);
             this.GridCommandSetting.TabIndex = 1;
             this.GridCommandSetting.TableName = null;
             this.GridCommandSetting.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -833,7 +887,7 @@ namespace UAS_DeviceMonitor
             // 
             this.ButtonDeleteNetConfig.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
             this.ButtonDeleteNetConfig.Grid = null;
-            this.ButtonDeleteNetConfig.Location = new System.Drawing.Point(813, 548);
+            this.ButtonDeleteNetConfig.Location = new System.Drawing.Point(942, 7);
             this.ButtonDeleteNetConfig.Name = "ButtonDeleteNetConfig";
             this.ButtonDeleteNetConfig.Size = new System.Drawing.Size(64, 23);
             this.ButtonDeleteNetConfig.TabIndex = 12;
@@ -843,7 +897,7 @@ namespace UAS_DeviceMonitor
             // 
             this.ButtonAddNetConfig.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
             this.ButtonAddNetConfig.Grid = null;
-            this.ButtonAddNetConfig.Location = new System.Drawing.Point(883, 548);
+            this.ButtonAddNetConfig.Location = new System.Drawing.Point(802, 7);
             this.ButtonAddNetConfig.Name = "ButtonAddNetConfig";
             this.ButtonAddNetConfig.Size = new System.Drawing.Size(64, 23);
             this.ButtonAddNetConfig.TabIndex = 11;
@@ -854,7 +908,7 @@ namespace UAS_DeviceMonitor
             this.ButtonSaveNetConfig.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
             this.ButtonSaveNetConfig.Grid = null;
             this.ButtonSaveNetConfig.HandlerOtherFirst = false;
-            this.ButtonSaveNetConfig.Location = new System.Drawing.Point(953, 548);
+            this.ButtonSaveNetConfig.Location = new System.Drawing.Point(872, 7);
             this.ButtonSaveNetConfig.Name = "ButtonSaveNetConfig";
             this.ButtonSaveNetConfig.Size = new System.Drawing.Size(64, 23);
             this.ButtonSaveNetConfig.TabIndex = 10;
@@ -869,14 +923,14 @@ namespace UAS_DeviceMonitor
             this.GridDeviceNetSetting.GetDataSQL = null;
             this.GridDeviceNetSetting.ID = null;
             this.GridDeviceNetSetting.InsertSQL = null;
-            this.GridDeviceNetSetting.Location = new System.Drawing.Point(0, 2);
+            this.GridDeviceNetSetting.Location = new System.Drawing.Point(0, 34);
             this.GridDeviceNetSetting.MainView = this.GridViewDeviceNetSetting;
             this.GridDeviceNetSetting.MenuManager = this.RibbonNav;
             this.GridDeviceNetSetting.Name = "GridDeviceNetSetting";
             this.GridDeviceNetSetting.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
             this.dpc_enableCheckEdit});
             this.GridDeviceNetSetting.RowCount = 0;
-            this.GridDeviceNetSetting.Size = new System.Drawing.Size(1024, 540);
+            this.GridDeviceNetSetting.Size = new System.Drawing.Size(1024, 543);
             this.GridDeviceNetSetting.TabIndex = 0;
             this.GridDeviceNetSetting.TableName = null;
             this.GridDeviceNetSetting.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -1000,7 +1054,7 @@ namespace UAS_DeviceMonitor
             // 
             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.Location = new System.Drawing.Point(950, 6);
             this.ButtonDeleteCommandSet.Name = "ButtonDeleteCommandSet";
             this.ButtonDeleteCommandSet.Size = new System.Drawing.Size(64, 23);
             this.ButtonDeleteCommandSet.TabIndex = 9;
@@ -1010,7 +1064,7 @@ namespace UAS_DeviceMonitor
             // 
             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.Location = new System.Drawing.Point(810, 6);
             this.ButtonNewCommandSet.Name = "ButtonNewCommandSet";
             this.ButtonNewCommandSet.Size = new System.Drawing.Size(64, 23);
             this.ButtonNewCommandSet.TabIndex = 8;
@@ -1021,7 +1075,7 @@ namespace UAS_DeviceMonitor
             this.ButtonSaveCommandSet.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
             this.ButtonSaveCommandSet.Grid = null;
             this.ButtonSaveCommandSet.HandlerOtherFirst = true;
-            this.ButtonSaveCommandSet.Location = new System.Drawing.Point(956, 549);
+            this.ButtonSaveCommandSet.Location = new System.Drawing.Point(880, 6);
             this.ButtonSaveCommandSet.Name = "ButtonSaveCommandSet";
             this.ButtonSaveCommandSet.Size = new System.Drawing.Size(64, 23);
             this.ButtonSaveCommandSet.TabIndex = 7;
@@ -1031,7 +1085,7 @@ namespace UAS_DeviceMonitor
             // ButtonPausePolling
             // 
             this.ButtonPausePolling.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.ButtonPausePolling.Location = new System.Drawing.Point(734, 549);
+            this.ButtonPausePolling.Location = new System.Drawing.Point(729, 6);
             this.ButtonPausePolling.Name = "ButtonPausePolling";
             this.ButtonPausePolling.Size = new System.Drawing.Size(75, 23);
             this.ButtonPausePolling.TabIndex = 2;
@@ -1041,7 +1095,7 @@ namespace UAS_DeviceMonitor
             // ButtonStartPolling
             // 
             this.ButtonStartPolling.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.ButtonStartPolling.Location = new System.Drawing.Point(653, 549);
+            this.ButtonStartPolling.Location = new System.Drawing.Point(648, 6);
             this.ButtonStartPolling.Name = "ButtonStartPolling";
             this.ButtonStartPolling.Size = new System.Drawing.Size(75, 23);
             this.ButtonStartPolling.TabIndex = 1;
@@ -1057,7 +1111,7 @@ namespace UAS_DeviceMonitor
             this.GridPollingSetting.GetDataSQL = null;
             this.GridPollingSetting.ID = null;
             this.GridPollingSetting.InsertSQL = null;
-            this.GridPollingSetting.Location = new System.Drawing.Point(0, 0);
+            this.GridPollingSetting.Location = new System.Drawing.Point(0, 34);
             this.GridPollingSetting.MainView = this.GridViewPollSetting;
             this.GridPollingSetting.MenuManager = this.RibbonNav;
             this.GridPollingSetting.Name = "GridPollingSetting";
@@ -1066,7 +1120,7 @@ namespace UAS_DeviceMonitor
             this.PollingSetItemLookUpEdit,
             this.PollSettingItemSearchLookUpEdit});
             this.GridPollingSetting.RowCount = 0;
-            this.GridPollingSetting.Size = new System.Drawing.Size(1027, 544);
+            this.GridPollingSetting.Size = new System.Drawing.Size(1027, 543);
             this.GridPollingSetting.TabIndex = 0;
             this.GridPollingSetting.TableName = null;
             this.GridPollingSetting.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -1522,22 +1576,6 @@ namespace UAS_DeviceMonitor
             // 
             this.CommonTipController.AutoPopDelay = 10000;
             // 
-            // de_stepname
-            // 
-            this.de_stepname.Caption = "工序名称";
-            this.de_stepname.FieldName = "DE_STEPNAME";
-            this.de_stepname.Name = "de_stepname";
-            this.de_stepname.Visible = true;
-            this.de_stepname.VisibleIndex = 5;
-            // 
-            // de_stepcode
-            // 
-            this.de_stepcode.Caption = "工序编号";
-            this.de_stepcode.FieldName = "DE_STEPCODE";
-            this.de_stepcode.Name = "de_stepcode";
-            this.de_stepcode.Visible = true;
-            this.de_stepcode.VisibleIndex = 4;
-            // 
             // Main
             // 
             this.AllowFormGlass = DevExpress.Utils.DefaultBoolean.False;
@@ -1728,5 +1766,8 @@ namespace UAS_DeviceMonitor
         private DevExpress.XtraGrid.Columns.GridColumn dc_date;
         private DevExpress.XtraGrid.Columns.GridColumn de_stepcode;
         private DevExpress.XtraGrid.Columns.GridColumn de_stepname;
+        private CustomerControl.Button.ButtonAddRow ButtonAddDevice;
+        private CustomerControl.Button.ButtonDeleteRow ButtonDeleteDevice;
+        private CustomerControl.Button.ButtonSaveGrid ButtonSaveDevice;
     }
 }

+ 11 - 0
UAS_DeviceMonitor/Main.cs

@@ -79,6 +79,12 @@ namespace UAS_DeviceMonitor
         {
             //设备列表
             GridDeviceList.GetDataSQL = "select de_id,de_code,de_name,de_spec,de_indate,de_runstatus,de_address,de_inman,de_linecode,de_wccode,de_vendcode,de_vendname,de_stepcode,de_stepname from device order by de_code".ToUpper();
+            GridDeviceList.TableName = "device";
+            GridDeviceList.ID = "de_id";
+            GridDeviceList.InsertSQL = "INSERT INTO DEVICE(DE_ID,DE_CODE,DE_NAME,DE_SPEC,DE_INDATE,DE_RUNSTATUS,DE_ADDRESS,DE_INMAN,DE_LINECODE,DE_WCCODE,DE_VENDCODE,DE_VENDNAME,DE_STEPCODE,DE_STEPNAME) VALUES(DEVICE_SEQ.NEXTVAL,:DE_CODE,:DE_NAME,:DE_SPEC,:DE_INDATE,:DE_RUNSTATUS,:DE_ADDRESS,:DE_INMAN,:DE_LINECODE,:DE_WCCODE,:DE_VENDCODE,:DE_VENDNAME,:DE_STEPCODE,:DE_STEPNAME)";
+            ButtonAddDevice.Grid = GridDeviceList;
+            ButtonSaveDevice.Grid = GridDeviceList;
+            ButtonDeleteDevice.Grid = GridDeviceList;
             //ToolPageControlDeviceList.Gridcontrol = GridDeviceList;
             //轮询业务
             //GridPolling.GetDataSQL = "select 0 CHECKEDCOLUMN,pl_id,pl_code,pl_name,pl_type,pl_dccode,pl_remark from polling".ToUpper();
@@ -744,5 +750,10 @@ namespace UAS_DeviceMonitor
             }
         }
         #endregion
+
+        private void RibbonNav_Click(object sender, EventArgs e)
+        {
+
+        }
     }
 }