ソースを参照

添加全局按钮日志记录

章政 7 年 前
コミット
b5d32e78f1

+ 80 - 77
PLCDataReader/Main.Designer.cs

@@ -213,6 +213,7 @@ namespace UAS_PLCDataReader
             this.UpdateTimeSpan = new System.Windows.Forms.NumericUpDown();
             this.label1 = new System.Windows.Forms.Label();
             this.PageDeviceData = new DevExpress.XtraTab.XtraTabPage();
+            this.ButtonRefreshDeviceData = new UAS_PLCDataReader.CustomerControl.Button.ButtonDeleteRow();
             this.GridDeviceData = new UAS_PLCDataReader.CustomerControl.AutoDataGridControl.AutoDataGridControl();
             this.GridViewDeviceData = new UAS_PLCDataReader.CustomerControl.GridViewWithSerialNum.GridViewWithSerialNum();
             this.dr_decode = new DevExpress.XtraGrid.Columns.GridColumn();
@@ -234,7 +235,6 @@ 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.ButtonRefreshDeviceData = new UAS_PLCDataReader.CustomerControl.Button.ButtonDeleteRow();
             ((System.ComponentModel.ISupportInitialize)(this.RibbonNav)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.MainTabControl)).BeginInit();
             this.MainTabControl.SuspendLayout();
@@ -314,7 +314,7 @@ namespace UAS_PLCDataReader
             this.RibbonNav.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] {
             this.DeviceInf,
             this.DeviceCommandSetting});
-            this.RibbonNav.Size = new System.Drawing.Size(1040, 252);
+            this.RibbonNav.Size = new System.Drawing.Size(1040, 128);
             // 
             // ButtonDeviceList
             // 
@@ -451,11 +451,11 @@ namespace UAS_PLCDataReader
             // MainTabControl
             // 
             this.MainTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.MainTabControl.Location = new System.Drawing.Point(0, 252);
+            this.MainTabControl.Location = new System.Drawing.Point(0, 128);
             this.MainTabControl.Name = "MainTabControl";
             this.MainTabControl.SelectedTabPage = this.PageDeviceList;
             this.MainTabControl.ShowTabHeader = DevExpress.Utils.DefaultBoolean.False;
-            this.MainTabControl.Size = new System.Drawing.Size(1040, 460);
+            this.MainTabControl.Size = new System.Drawing.Size(1040, 584);
             this.MainTabControl.TabIndex = 3;
             this.MainTabControl.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
             this.PageDeviceList,
@@ -483,15 +483,15 @@ namespace UAS_PLCDataReader
             this.PageDeviceList.Controls.Add(this.GridDeviceList);
             this.PageDeviceList.Name = "PageDeviceList";
             this.PageDeviceList.PageVisible = false;
-            this.PageDeviceList.Size = new System.Drawing.Size(1028, 448);
-            this.PageDeviceList.Text = "xtraTabPage1";
+            this.PageDeviceList.Size = new System.Drawing.Size(1034, 578);
+            this.PageDeviceList.Text = "设备主档资料";
             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(812, 4);
+            this.ButtonAddDevice.Location = new System.Drawing.Point(818, 4);
             this.ButtonAddDevice.Name = "ButtonAddDevice";
             this.ButtonAddDevice.Size = new System.Drawing.Size(64, 23);
             this.ButtonAddDevice.TabIndex = 16;
@@ -501,7 +501,7 @@ namespace UAS_PLCDataReader
             // 
             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(952, 4);
+            this.ButtonDeleteDevice.Location = new System.Drawing.Point(958, 4);
             this.ButtonDeleteDevice.Name = "ButtonDeleteDevice";
             this.ButtonDeleteDevice.Size = new System.Drawing.Size(64, 23);
             this.ButtonDeleteDevice.TabIndex = 15;
@@ -512,7 +512,7 @@ namespace UAS_PLCDataReader
             this.ButtonSaveDevice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.ButtonSaveDevice.Grid = null;
             this.ButtonSaveDevice.HandlerOtherFirst = true;
-            this.ButtonSaveDevice.Location = new System.Drawing.Point(882, 4);
+            this.ButtonSaveDevice.Location = new System.Drawing.Point(888, 4);
             this.ButtonSaveDevice.Name = "ButtonSaveDevice";
             this.ButtonSaveDevice.Size = new System.Drawing.Size(64, 23);
             this.ButtonSaveDevice.TabIndex = 14;
@@ -533,7 +533,7 @@ namespace UAS_PLCDataReader
             this.ComBoxDeviceListMan.Properties.NullText = "";
             this.ComBoxDeviceListMan.Properties.ValueMember = "EM_CODE";
             this.ComBoxDeviceListMan.Properties.View = this.searchLookUpEdit1View;
-            this.ComBoxDeviceListMan.Size = new System.Drawing.Size(100, 34);
+            this.ComBoxDeviceListMan.Size = new System.Drawing.Size(100, 22);
             this.ComBoxDeviceListMan.TabIndex = 12;
             this.ComBoxDeviceListMan.Visible = false;
             // 
@@ -568,7 +568,7 @@ namespace UAS_PLCDataReader
             this.ComBoxDeviceListMan_label.Appearance.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.ComBoxDeviceListMan_label.Location = new System.Drawing.Point(318, 8);
             this.ComBoxDeviceListMan_label.Name = "ComBoxDeviceListMan_label";
-            this.ComBoxDeviceListMan_label.Size = new System.Drawing.Size(64, 33);
+            this.ComBoxDeviceListMan_label.Size = new System.Drawing.Size(32, 16);
             this.ComBoxDeviceListMan_label.TabIndex = 11;
             this.ComBoxDeviceListMan_label.Text = "人员";
             this.ComBoxDeviceListMan_label.Visible = false;
@@ -583,7 +583,7 @@ namespace UAS_PLCDataReader
             this.ComboxDeviceListWC.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
             this.ComboxDeviceListWC.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
-            this.ComboxDeviceListWC.Size = new System.Drawing.Size(100, 36);
+            this.ComboxDeviceListWC.Size = new System.Drawing.Size(100, 22);
             this.ComboxDeviceListWC.TabIndex = 6;
             this.ComboxDeviceListWC.SelectedIndexChanged += new System.EventHandler(this.ComboxDeviceListWC_SelectedIndexChanged);
             // 
@@ -597,7 +597,7 @@ namespace UAS_PLCDataReader
             this.ComboxDeviceListLC.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
             this.ComboxDeviceListLC.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
-            this.ComboxDeviceListLC.Size = new System.Drawing.Size(100, 36);
+            this.ComboxDeviceListLC.Size = new System.Drawing.Size(100, 22);
             this.ComboxDeviceListLC.TabIndex = 7;
             this.ComboxDeviceListLC.SelectedIndexChanged += new System.EventHandler(this.ComboxDeviceListLC_SelectedIndexChanged);
             // 
@@ -606,7 +606,7 @@ namespace UAS_PLCDataReader
             this.ComboxDeviceListLC_label.Appearance.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.ComboxDeviceListLC_label.Location = new System.Drawing.Point(161, 8);
             this.ComboxDeviceListLC_label.Name = "ComboxDeviceListLC_label";
-            this.ComboxDeviceListLC_label.Size = new System.Drawing.Size(64, 33);
+            this.ComboxDeviceListLC_label.Size = new System.Drawing.Size(32, 16);
             this.ComboxDeviceListLC_label.TabIndex = 9;
             this.ComboxDeviceListLC_label.Text = "线别";
             // 
@@ -615,7 +615,7 @@ namespace UAS_PLCDataReader
             this.ComboxDeviceListWC_label.Appearance.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.ComboxDeviceListWC_label.Location = new System.Drawing.Point(10, 8);
             this.ComboxDeviceListWC_label.Name = "ComboxDeviceListWC_label";
-            this.ComboxDeviceListWC_label.Size = new System.Drawing.Size(64, 33);
+            this.ComboxDeviceListWC_label.Size = new System.Drawing.Size(32, 16);
             this.ComboxDeviceListWC_label.TabIndex = 8;
             this.ComboxDeviceListWC_label.Text = "车间";
             // 
@@ -636,7 +636,7 @@ namespace UAS_PLCDataReader
             this.DataItemRepositoryItemComboBox1,
             this.DeviceItemSearchLookUpEdit});
             this.GridDeviceList.RowCount = 0;
-            this.GridDeviceList.Size = new System.Drawing.Size(1028, 417);
+            this.GridDeviceList.Size = new System.Drawing.Size(1034, 547);
             this.GridDeviceList.TabIndex = 0;
             this.GridDeviceList.TableName = null;
             this.GridDeviceList.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -942,15 +942,15 @@ namespace UAS_PLCDataReader
             this.PageCommandSet.Controls.Add(this.GridCommandSetting);
             this.PageCommandSet.Name = "PageCommandSet";
             this.PageCommandSet.PageVisible = false;
-            this.PageCommandSet.Size = new System.Drawing.Size(1028, 448);
-            this.PageCommandSet.Text = "xtraTabPage1";
+            this.PageCommandSet.Size = new System.Drawing.Size(1034, 454);
+            this.PageCommandSet.Text = "设备指令设置";
             this.PageCommandSet.VisibleChanged += new System.EventHandler(this.PageCommandSet_VisibleChanged);
             // 
             // ButtonDeleteCommand
             // 
             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(946, 5);
+            this.ButtonDeleteCommand.Location = new System.Drawing.Point(952, 5);
             this.ButtonDeleteCommand.Name = "ButtonDeleteCommand";
             this.ButtonDeleteCommand.Size = new System.Drawing.Size(64, 23);
             this.ButtonDeleteCommand.TabIndex = 6;
@@ -961,7 +961,7 @@ namespace UAS_PLCDataReader
             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(64, 41);
+            this.Brand_label.Size = new System.Drawing.Size(32, 21);
             this.Brand_label.TabIndex = 5;
             this.Brand_label.Text = "品牌";
             // 
@@ -975,7 +975,7 @@ namespace UAS_PLCDataReader
             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, 38);
+            this.Brand.Size = new System.Drawing.Size(100, 24);
             this.Brand.TabIndex = 4;
             this.Brand.SelectedIndexChanged += new System.EventHandler(this.Brand_SelectedIndexChanged);
             // 
@@ -983,7 +983,7 @@ namespace UAS_PLCDataReader
             // 
             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(806, 5);
+            this.ButtonNewCommand.Location = new System.Drawing.Point(812, 5);
             this.ButtonNewCommand.Name = "ButtonNewCommand";
             this.ButtonNewCommand.Size = new System.Drawing.Size(64, 23);
             this.ButtonNewCommand.TabIndex = 3;
@@ -994,7 +994,7 @@ namespace UAS_PLCDataReader
             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(876, 5);
+            this.ButtonSaveCommand.Location = new System.Drawing.Point(882, 5);
             this.ButtonSaveCommand.Name = "ButtonSaveCommand";
             this.ButtonSaveCommand.Size = new System.Drawing.Size(64, 23);
             this.ButtonSaveCommand.TabIndex = 2;
@@ -1019,7 +1019,7 @@ namespace UAS_PLCDataReader
             this.CommandSetRepositoryItemComboBox1,
             this.repositoryItemDateEdit1});
             this.GridCommandSetting.RowCount = 0;
-            this.GridCommandSetting.Size = new System.Drawing.Size(1028, 417);
+            this.GridCommandSetting.Size = new System.Drawing.Size(1034, 423);
             this.GridCommandSetting.TabIndex = 1;
             this.GridCommandSetting.TableName = null;
             this.GridCommandSetting.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -1193,13 +1193,14 @@ namespace UAS_PLCDataReader
             this.PageDeviceNetSetting.Controls.Add(this.GridDeviceNetSetting);
             this.PageDeviceNetSetting.Name = "PageDeviceNetSetting";
             this.PageDeviceNetSetting.PageVisible = false;
-            this.PageDeviceNetSetting.Size = new System.Drawing.Size(1028, 448);
+            this.PageDeviceNetSetting.Size = new System.Drawing.Size(1034, 454);
+            this.PageDeviceNetSetting.Text = "设备网络配置";
             // 
             // ButtonDeleteNetConfig
             // 
             this.ButtonDeleteNetConfig.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.ButtonDeleteNetConfig.Grid = null;
-            this.ButtonDeleteNetConfig.Location = new System.Drawing.Point(943, 7);
+            this.ButtonDeleteNetConfig.Location = new System.Drawing.Point(949, 7);
             this.ButtonDeleteNetConfig.Name = "ButtonDeleteNetConfig";
             this.ButtonDeleteNetConfig.Size = new System.Drawing.Size(64, 23);
             this.ButtonDeleteNetConfig.TabIndex = 12;
@@ -1209,7 +1210,7 @@ namespace UAS_PLCDataReader
             // 
             this.ButtonAddNetConfig.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.ButtonAddNetConfig.Grid = null;
-            this.ButtonAddNetConfig.Location = new System.Drawing.Point(803, 7);
+            this.ButtonAddNetConfig.Location = new System.Drawing.Point(809, 7);
             this.ButtonAddNetConfig.Name = "ButtonAddNetConfig";
             this.ButtonAddNetConfig.Size = new System.Drawing.Size(64, 23);
             this.ButtonAddNetConfig.TabIndex = 11;
@@ -1220,7 +1221,7 @@ namespace UAS_PLCDataReader
             this.ButtonSaveNetConfig.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.ButtonSaveNetConfig.Grid = null;
             this.ButtonSaveNetConfig.HandlerOtherFirst = false;
-            this.ButtonSaveNetConfig.Location = new System.Drawing.Point(873, 7);
+            this.ButtonSaveNetConfig.Location = new System.Drawing.Point(879, 7);
             this.ButtonSaveNetConfig.Name = "ButtonSaveNetConfig";
             this.ButtonSaveNetConfig.Size = new System.Drawing.Size(64, 23);
             this.ButtonSaveNetConfig.TabIndex = 10;
@@ -1242,7 +1243,7 @@ namespace UAS_PLCDataReader
             this.GridDeviceNetSetting.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
             this.dpc_enableCheckEdit});
             this.GridDeviceNetSetting.RowCount = 0;
-            this.GridDeviceNetSetting.Size = new System.Drawing.Size(1025, 414);
+            this.GridDeviceNetSetting.Size = new System.Drawing.Size(1031, 420);
             this.GridDeviceNetSetting.TabIndex = 0;
             this.GridDeviceNetSetting.TableName = null;
             this.GridDeviceNetSetting.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -1352,15 +1353,15 @@ namespace UAS_PLCDataReader
             this.PagePollingSetting.Controls.Add(this.GridPollingSetting);
             this.PagePollingSetting.Name = "PagePollingSetting";
             this.PagePollingSetting.PageVisible = false;
-            this.PagePollingSetting.Size = new System.Drawing.Size(1028, 448);
-            this.PagePollingSetting.Text = "xtraTabPage1";
+            this.PagePollingSetting.Size = new System.Drawing.Size(1034, 454);
+            this.PagePollingSetting.Text = "设备轮询配置";
             this.PagePollingSetting.VisibleChanged += new System.EventHandler(this.PagePollingSetting_VisibleChanged);
             // 
             // ButtonDeleteCommandSet
             // 
             this.ButtonDeleteCommandSet.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.ButtonDeleteCommandSet.Grid = null;
-            this.ButtonDeleteCommandSet.Location = new System.Drawing.Point(951, 6);
+            this.ButtonDeleteCommandSet.Location = new System.Drawing.Point(957, 6);
             this.ButtonDeleteCommandSet.Name = "ButtonDeleteCommandSet";
             this.ButtonDeleteCommandSet.Size = new System.Drawing.Size(64, 23);
             this.ButtonDeleteCommandSet.TabIndex = 9;
@@ -1370,7 +1371,7 @@ namespace UAS_PLCDataReader
             // 
             this.ButtonNewCommandSet.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.ButtonNewCommandSet.Grid = null;
-            this.ButtonNewCommandSet.Location = new System.Drawing.Point(811, 6);
+            this.ButtonNewCommandSet.Location = new System.Drawing.Point(817, 6);
             this.ButtonNewCommandSet.Name = "ButtonNewCommandSet";
             this.ButtonNewCommandSet.Size = new System.Drawing.Size(64, 23);
             this.ButtonNewCommandSet.TabIndex = 8;
@@ -1381,7 +1382,7 @@ namespace UAS_PLCDataReader
             this.ButtonSaveCommandSet.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.ButtonSaveCommandSet.Grid = null;
             this.ButtonSaveCommandSet.HandlerOtherFirst = true;
-            this.ButtonSaveCommandSet.Location = new System.Drawing.Point(881, 6);
+            this.ButtonSaveCommandSet.Location = new System.Drawing.Point(887, 6);
             this.ButtonSaveCommandSet.Name = "ButtonSaveCommandSet";
             this.ButtonSaveCommandSet.Size = new System.Drawing.Size(64, 23);
             this.ButtonSaveCommandSet.TabIndex = 7;
@@ -1391,7 +1392,7 @@ namespace UAS_PLCDataReader
             // ButtonPausePolling
             // 
             this.ButtonPausePolling.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.ButtonPausePolling.Location = new System.Drawing.Point(730, 6);
+            this.ButtonPausePolling.Location = new System.Drawing.Point(736, 6);
             this.ButtonPausePolling.Name = "ButtonPausePolling";
             this.ButtonPausePolling.Size = new System.Drawing.Size(75, 23);
             this.ButtonPausePolling.TabIndex = 2;
@@ -1401,7 +1402,7 @@ namespace UAS_PLCDataReader
             // ButtonStartPolling
             // 
             this.ButtonStartPolling.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.ButtonStartPolling.Location = new System.Drawing.Point(649, 6);
+            this.ButtonStartPolling.Location = new System.Drawing.Point(655, 6);
             this.ButtonStartPolling.Name = "ButtonStartPolling";
             this.ButtonStartPolling.Size = new System.Drawing.Size(75, 23);
             this.ButtonStartPolling.TabIndex = 1;
@@ -1427,7 +1428,7 @@ namespace UAS_PLCDataReader
             this.PollSettingItemSearchLookUpEdit,
             this.PollSettingDeviceSearchLookUpEdit});
             this.GridPollingSetting.RowCount = 0;
-            this.GridPollingSetting.Size = new System.Drawing.Size(1028, 414);
+            this.GridPollingSetting.Size = new System.Drawing.Size(1034, 420);
             this.GridPollingSetting.TabIndex = 0;
             this.GridPollingSetting.TableName = null;
             this.GridPollingSetting.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -1649,14 +1650,14 @@ namespace UAS_PLCDataReader
             this.PagePolling.Controls.Add(this.GridPolling);
             this.PagePolling.Name = "PagePolling";
             this.PagePolling.PageVisible = false;
-            this.PagePolling.Size = new System.Drawing.Size(1028, 448);
+            this.PagePolling.Size = new System.Drawing.Size(1034, 454);
             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(879, 422);
+            this.ButtonAddPolling.Location = new System.Drawing.Point(885, 428);
             this.ButtonAddPolling.Name = "ButtonAddPolling";
             this.ButtonAddPolling.Size = new System.Drawing.Size(64, 23);
             this.ButtonAddPolling.TabIndex = 9;
@@ -1666,7 +1667,7 @@ namespace UAS_PLCDataReader
             // 
             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(808, 422);
+            this.ButtonDeletePolling.Location = new System.Drawing.Point(814, 428);
             this.ButtonDeletePolling.Name = "ButtonDeletePolling";
             this.ButtonDeletePolling.Size = new System.Drawing.Size(64, 23);
             this.ButtonDeletePolling.TabIndex = 8;
@@ -1677,7 +1678,7 @@ namespace UAS_PLCDataReader
             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(950, 422);
+            this.ButtonSavePolling.Location = new System.Drawing.Point(956, 428);
             this.ButtonSavePolling.Name = "ButtonSavePolling";
             this.ButtonSavePolling.Size = new System.Drawing.Size(64, 23);
             this.ButtonSavePolling.TabIndex = 7;
@@ -1699,7 +1700,7 @@ namespace UAS_PLCDataReader
             this.GridPolling.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
             this.dpc_enableCheckEdit});
             this.GridPolling.RowCount = 0;
-            this.GridPolling.Size = new System.Drawing.Size(1028, 420);
+            this.GridPolling.Size = new System.Drawing.Size(1034, 426);
             this.GridPolling.TabIndex = 0;
             this.GridPolling.TableName = null;
             this.GridPolling.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -1792,8 +1793,8 @@ namespace UAS_PLCDataReader
             this.PageDeviceStatus.Controls.Add(this.PanelDeviceStatus);
             this.PageDeviceStatus.Name = "PageDeviceStatus";
             this.PageDeviceStatus.PageVisible = false;
-            this.PageDeviceStatus.Size = new System.Drawing.Size(1028, 448);
-            this.PageDeviceStatus.Text = "xtraTabPage1";
+            this.PageDeviceStatus.Size = new System.Drawing.Size(1034, 454);
+            this.PageDeviceStatus.Text = "设备状态查看";
             this.PageDeviceStatus.VisibleChanged += new System.EventHandler(this.PageDeviceStatus_VisibleChanged);
             // 
             // ComboxDeviceDepartment
@@ -1806,7 +1807,7 @@ namespace UAS_PLCDataReader
             this.ComboxDeviceDepartment.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
             this.ComboxDeviceDepartment.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
-            this.ComboxDeviceDepartment.Size = new System.Drawing.Size(100, 36);
+            this.ComboxDeviceDepartment.Size = new System.Drawing.Size(100, 22);
             this.ComboxDeviceDepartment.TabIndex = 6;
             this.ComboxDeviceDepartment.SelectedIndexChanged += new System.EventHandler(this.ComboxDeviceStatusLC_SelectedIndexChanged);
             // 
@@ -1820,7 +1821,7 @@ namespace UAS_PLCDataReader
             this.ComboxDeviceFloor.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
             this.ComboxDeviceFloor.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
-            this.ComboxDeviceFloor.Size = new System.Drawing.Size(100, 36);
+            this.ComboxDeviceFloor.Size = new System.Drawing.Size(100, 22);
             this.ComboxDeviceFloor.TabIndex = 7;
             this.ComboxDeviceFloor.SelectedIndexChanged += new System.EventHandler(this.ComboxDeviceStatusLC_SelectedIndexChanged);
             // 
@@ -1829,7 +1830,7 @@ namespace UAS_PLCDataReader
             this.label_ComboxDeviceFloor.Appearance.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.label_ComboxDeviceFloor.Location = new System.Drawing.Point(477, 13);
             this.label_ComboxDeviceFloor.Name = "label_ComboxDeviceFloor";
-            this.label_ComboxDeviceFloor.Size = new System.Drawing.Size(64, 33);
+            this.label_ComboxDeviceFloor.Size = new System.Drawing.Size(32, 16);
             this.label_ComboxDeviceFloor.TabIndex = 9;
             this.label_ComboxDeviceFloor.Text = "楼层";
             // 
@@ -1838,7 +1839,7 @@ namespace UAS_PLCDataReader
             this.label_ComboxDeviceDepartment.Appearance.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.label_ComboxDeviceDepartment.Location = new System.Drawing.Point(326, 13);
             this.label_ComboxDeviceDepartment.Name = "label_ComboxDeviceDepartment";
-            this.label_ComboxDeviceDepartment.Size = new System.Drawing.Size(64, 33);
+            this.label_ComboxDeviceDepartment.Size = new System.Drawing.Size(32, 16);
             this.label_ComboxDeviceDepartment.TabIndex = 8;
             this.label_ComboxDeviceDepartment.Text = "部门";
             // 
@@ -1852,7 +1853,7 @@ namespace UAS_PLCDataReader
             this.ComboxDeviceStatusWC.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
             this.ComboxDeviceStatusWC.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
-            this.ComboxDeviceStatusWC.Size = new System.Drawing.Size(100, 36);
+            this.ComboxDeviceStatusWC.Size = new System.Drawing.Size(100, 22);
             this.ComboxDeviceStatusWC.TabIndex = 0;
             this.ComboxDeviceStatusWC.SelectedIndexChanged += new System.EventHandler(this.ComboxDeviceStatusWC_SelectedIndexChanged);
             // 
@@ -1866,7 +1867,7 @@ namespace UAS_PLCDataReader
             this.ComboxDeviceStatusLC.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
             this.ComboxDeviceStatusLC.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
-            this.ComboxDeviceStatusLC.Size = new System.Drawing.Size(100, 36);
+            this.ComboxDeviceStatusLC.Size = new System.Drawing.Size(100, 22);
             this.ComboxDeviceStatusLC.TabIndex = 0;
             this.ComboxDeviceStatusLC.SelectedIndexChanged += new System.EventHandler(this.ComboxDeviceStatusLC_SelectedIndexChanged);
             // 
@@ -1878,7 +1879,7 @@ namespace UAS_PLCDataReader
             this.CheckEditDeviceStatusEnable.Properties.Appearance.Font = new System.Drawing.Font("黑体", 10F);
             this.CheckEditDeviceStatusEnable.Properties.Appearance.Options.UseFont = true;
             this.CheckEditDeviceStatusEnable.Properties.Caption = "只显示已启用设备";
-            this.CheckEditDeviceStatusEnable.Size = new System.Drawing.Size(142, 34);
+            this.CheckEditDeviceStatusEnable.Size = new System.Drawing.Size(142, 19);
             this.CheckEditDeviceStatusEnable.TabIndex = 5;
             this.CheckEditDeviceStatusEnable.CheckedChanged += new System.EventHandler(this.CheckEditDeviceStatusEnable_CheckedChanged);
             // 
@@ -1887,7 +1888,7 @@ namespace UAS_PLCDataReader
             this.ComboxDeviceStatusLC_label.Appearance.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.ComboxDeviceStatusLC_label.Location = new System.Drawing.Point(173, 13);
             this.ComboxDeviceStatusLC_label.Name = "ComboxDeviceStatusLC_label";
-            this.ComboxDeviceStatusLC_label.Size = new System.Drawing.Size(64, 33);
+            this.ComboxDeviceStatusLC_label.Size = new System.Drawing.Size(32, 16);
             this.ComboxDeviceStatusLC_label.TabIndex = 4;
             this.ComboxDeviceStatusLC_label.Text = "线别";
             // 
@@ -1896,7 +1897,7 @@ namespace UAS_PLCDataReader
             this.ComboxDeviceStatusWC_label.Appearance.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.ComboxDeviceStatusWC_label.Location = new System.Drawing.Point(22, 13);
             this.ComboxDeviceStatusWC_label.Name = "ComboxDeviceStatusWC_label";
-            this.ComboxDeviceStatusWC_label.Size = new System.Drawing.Size(64, 33);
+            this.ComboxDeviceStatusWC_label.Size = new System.Drawing.Size(32, 16);
             this.ComboxDeviceStatusWC_label.TabIndex = 2;
             this.ComboxDeviceStatusWC_label.Text = "车间";
             // 
@@ -1907,7 +1908,7 @@ namespace UAS_PLCDataReader
             | System.Windows.Forms.AnchorStyles.Right)));
             this.PanelDeviceStatus.Location = new System.Drawing.Point(0, 35);
             this.PanelDeviceStatus.Name = "PanelDeviceStatus";
-            this.PanelDeviceStatus.Size = new System.Drawing.Size(1028, 413);
+            this.PanelDeviceStatus.Size = new System.Drawing.Size(1034, 419);
             this.PanelDeviceStatus.TabIndex = 0;
             // 
             // PageWorkCenterStatus
@@ -1915,8 +1916,8 @@ namespace UAS_PLCDataReader
             this.PageWorkCenterStatus.Controls.Add(this.GridWorkCenterStatus);
             this.PageWorkCenterStatus.Name = "PageWorkCenterStatus";
             this.PageWorkCenterStatus.PageVisible = false;
-            this.PageWorkCenterStatus.Size = new System.Drawing.Size(1028, 448);
-            this.PageWorkCenterStatus.Text = "车间全局监控";
+            this.PageWorkCenterStatus.Size = new System.Drawing.Size(1034, 454);
+            this.PageWorkCenterStatus.Text = "设备工作中心";
             // 
             // GridWorkCenterStatus
             // 
@@ -1932,7 +1933,7 @@ namespace UAS_PLCDataReader
             this.GridWorkCenterStatus.MenuManager = this.RibbonNav;
             this.GridWorkCenterStatus.Name = "GridWorkCenterStatus";
             this.GridWorkCenterStatus.RowCount = 0;
-            this.GridWorkCenterStatus.Size = new System.Drawing.Size(1025, 445);
+            this.GridWorkCenterStatus.Size = new System.Drawing.Size(1031, 451);
             this.GridWorkCenterStatus.TabIndex = 0;
             this.GridWorkCenterStatus.TableName = null;
             this.GridWorkCenterStatus.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -1953,7 +1954,7 @@ namespace UAS_PLCDataReader
             this.PageDeviceRunLog.Controls.Add(this.GridDeviceRunLog);
             this.PageDeviceRunLog.Name = "PageDeviceRunLog";
             this.PageDeviceRunLog.PageVisible = false;
-            this.PageDeviceRunLog.Size = new System.Drawing.Size(1028, 448);
+            this.PageDeviceRunLog.Size = new System.Drawing.Size(1034, 454);
             this.PageDeviceRunLog.Text = "设备运行日志";
             // 
             // ButtonSearchDeviceRunLog
@@ -1970,7 +1971,7 @@ namespace UAS_PLCDataReader
             this.TextDrrDeCode.Location = new System.Drawing.Point(64, 5);
             this.TextDrrDeCode.MenuManager = this.RibbonNav;
             this.TextDrrDeCode.Name = "TextDrrDeCode";
-            this.TextDrrDeCode.Size = new System.Drawing.Size(100, 36);
+            this.TextDrrDeCode.Size = new System.Drawing.Size(100, 20);
             this.TextDrrDeCode.TabIndex = 2;
             // 
             // LabelDrrDeCode
@@ -1978,7 +1979,7 @@ namespace UAS_PLCDataReader
             this.LabelDrrDeCode.Appearance.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.LabelDrrDeCode.Location = new System.Drawing.Point(10, 7);
             this.LabelDrrDeCode.Name = "LabelDrrDeCode";
-            this.LabelDrrDeCode.Size = new System.Drawing.Size(96, 31);
+            this.LabelDrrDeCode.Size = new System.Drawing.Size(48, 17);
             this.LabelDrrDeCode.TabIndex = 1;
             this.LabelDrrDeCode.Text = "设备编号";
             // 
@@ -1996,7 +1997,7 @@ namespace UAS_PLCDataReader
             this.GridDeviceRunLog.MenuManager = this.RibbonNav;
             this.GridDeviceRunLog.Name = "GridDeviceRunLog";
             this.GridDeviceRunLog.RowCount = 0;
-            this.GridDeviceRunLog.Size = new System.Drawing.Size(1029, 424);
+            this.GridDeviceRunLog.Size = new System.Drawing.Size(1035, 430);
             this.GridDeviceRunLog.TabIndex = 0;
             this.GridDeviceRunLog.TableName = null;
             this.GridDeviceRunLog.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -2102,7 +2103,8 @@ namespace UAS_PLCDataReader
             this.PageClientParam.Controls.Add(this.label1);
             this.PageClientParam.Name = "PageClientParam";
             this.PageClientParam.PageVisible = false;
-            this.PageClientParam.Size = new System.Drawing.Size(1028, 448);
+            this.PageClientParam.Size = new System.Drawing.Size(1034, 454);
+            this.PageClientParam.Text = "客户端参数设置";
             this.PageClientParam.VisibleChanged += new System.EventHandler(this.PageClientParam_VisibleChanged);
             // 
             // ButtonSaveClientParam
@@ -2118,7 +2120,7 @@ namespace UAS_PLCDataReader
             // 
             this.UpdateTimeSpan.Location = new System.Drawing.Point(140, 30);
             this.UpdateTimeSpan.Name = "UpdateTimeSpan";
-            this.UpdateTimeSpan.Size = new System.Drawing.Size(53, 36);
+            this.UpdateTimeSpan.Size = new System.Drawing.Size(53, 22);
             this.UpdateTimeSpan.TabIndex = 1;
             // 
             // label1
@@ -2127,7 +2129,7 @@ namespace UAS_PLCDataReader
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.label1.Location = new System.Drawing.Point(28, 30);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(210, 41);
+            this.label1.Size = new System.Drawing.Size(106, 21);
             this.label1.TabIndex = 0;
             this.label1.Text = "数据上传时间";
             // 
@@ -2137,7 +2139,19 @@ namespace UAS_PLCDataReader
             this.PageDeviceData.Controls.Add(this.GridDeviceData);
             this.PageDeviceData.Name = "PageDeviceData";
             this.PageDeviceData.PageVisible = false;
-            this.PageDeviceData.Size = new System.Drawing.Size(1028, 448);
+            this.PageDeviceData.Size = new System.Drawing.Size(1034, 454);
+            this.PageDeviceData.Text = "设备运行数据";
+            // 
+            // ButtonRefreshDeviceData
+            // 
+            this.ButtonRefreshDeviceData.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.ButtonRefreshDeviceData.Grid = null;
+            this.ButtonRefreshDeviceData.Location = new System.Drawing.Point(954, 4);
+            this.ButtonRefreshDeviceData.Name = "ButtonRefreshDeviceData";
+            this.ButtonRefreshDeviceData.Size = new System.Drawing.Size(64, 23);
+            this.ButtonRefreshDeviceData.TabIndex = 7;
+            this.ButtonRefreshDeviceData.Text = "刷新";
+            this.ButtonRefreshDeviceData.Click += new System.EventHandler(this.ButtonRefreshDeviceData_Click);
             // 
             // GridDeviceData
             // 
@@ -2153,7 +2167,7 @@ namespace UAS_PLCDataReader
             this.GridDeviceData.MenuManager = this.RibbonNav;
             this.GridDeviceData.Name = "GridDeviceData";
             this.GridDeviceData.RowCount = 0;
-            this.GridDeviceData.Size = new System.Drawing.Size(1028, 416);
+            this.GridDeviceData.Size = new System.Drawing.Size(1034, 422);
             this.GridDeviceData.TabIndex = 0;
             this.GridDeviceData.TableName = null;
             this.GridDeviceData.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -2326,17 +2340,6 @@ namespace UAS_PLCDataReader
             this.TimerUpdateSQL.Interval = 5000;
             this.TimerUpdateSQL.Tick += new System.EventHandler(this.TimerUpdateSQL_Tick);
             // 
-            // ButtonRefreshDeviceData
-            // 
-            this.ButtonRefreshDeviceData.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.ButtonRefreshDeviceData.Grid = null;
-            this.ButtonRefreshDeviceData.Location = new System.Drawing.Point(948, 4);
-            this.ButtonRefreshDeviceData.Name = "ButtonRefreshDeviceData";
-            this.ButtonRefreshDeviceData.Size = new System.Drawing.Size(64, 23);
-            this.ButtonRefreshDeviceData.TabIndex = 7;
-            this.ButtonRefreshDeviceData.Text = "刷新";
-            this.ButtonRefreshDeviceData.Click += new System.EventHandler(this.ButtonRefreshDeviceData_Click);
-            // 
             // Main
             // 
             this.AllowFormGlass = DevExpress.Utils.DefaultBoolean.False;

+ 4 - 0
PLCDataReader/Program.cs

@@ -30,6 +30,10 @@ namespace UAS_PLCDataReader
                 #region 应用程序的主入口点
                 Application.EnableVisualStyles();
                 Application.SetCompatibleTextRenderingDefault(false);
+                //处理全局事件
+                GlobalEventsHandler g = new GlobalEventsHandler();
+                //添加全局事件的监听
+                Application.AddMessageFilter(g);
                 //启用异常记录日志的操作
                 string sysdisc = Environment.GetEnvironmentVariable("windir").Substring(0, 1);
                 //创建标签缓存的文件夹

+ 28 - 0
PLCDataReader/PublicMethod/GlobalEventsHandler.cs

@@ -0,0 +1,28 @@
+using System.Windows.Forms;
+using UAS_PLCDataReader.Entity;
+
+namespace UAS_PLCDataReader.PublicMethod
+{
+    /// <summary>
+    /// Author zhangz   2016/12/30
+    /// 全局事件处理,通过句柄获取触发事件的控件
+    /// 结合捕获的全局的键盘事件来验证用户进行的操作
+    /// </summary>
+    class GlobalEventsHandler : IMessageFilter
+    {
+        //鼠标左键点击
+        public const int WM_LBUTTONDOWN = 0x0201;
+        //键盘敲击事件
+        public const int WM_KEYDOWN = 0x100;
+
+        public bool PreFilterMessage(ref Message m)
+        {
+            Control c = Control.FromHandle(m.HWnd);
+            if (m.Msg == WM_LBUTTONDOWN && c.GetType().ToString().ToUpper().Contains("BUTTON"))
+            {
+                LogicHandler.DoCommandLog(User.UserCode, c.Parent.Text, "点击【" + c.Text + "】按钮");
+            }
+            return false;
+        }
+    }
+}

+ 8 - 0
PLCDataReader/PublicMethod/LogicHandler.cs

@@ -282,5 +282,13 @@ namespace UAS_PLCDataReader.PublicMethod
             sql.Append("'" + iDecode + "','" + iDename + "','" + iDestatus + "',sysdate)");
             Main.QueueUpdateDevice.Enqueue(sql.ToString());
         }
+
+        public static void DoCommandLog(string iUserCode, string iPageText, string iContent)
+        {
+            StringBuilder sql = new StringBuilder();
+            sql.Clear();
+            sql.Append("insert into commandlog(cL_id,cl_date,cl_man,cl_result,cl_caller)values(commandlog_seq.nextval,sysdate,'" + iUserCode + "','" + iContent + "','" + iPageText + "')");
+            dh.ExecuteSql(sql.ToString(), "insert");
+        }
     }
 }