瀏覽代碼

添加记录用户名

章政 7 年之前
父節點
當前提交
77c2dfc9b1
共有 4 個文件被更改,包括 39 次插入35 次删除
  1. 2 2
      PLCDataReader/Login.Designer.cs
  2. 4 0
      PLCDataReader/Login.cs
  3. 29 29
      PLCDataReader/Main.Designer.cs
  4. 4 4
      PLCDataReader/Main.resx

+ 2 - 2
PLCDataReader/Login.Designer.cs

@@ -47,7 +47,7 @@
             this.UserName.Properties.Appearance.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.UserName.Properties.Appearance.Options.UseFont = true;
             this.UserName.Size = new System.Drawing.Size(145, 28);
-            this.UserName.TabIndex = 0;
+            this.UserName.TabIndex = 1;
             // 
             // PassWord
             // 
@@ -57,7 +57,7 @@
             this.PassWord.Properties.Appearance.Options.UseFont = true;
             this.PassWord.Properties.PasswordChar = '*';
             this.PassWord.Size = new System.Drawing.Size(145, 28);
-            this.PassWord.TabIndex = 1;
+            this.PassWord.TabIndex = 0;
             this.PassWord.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PassWord_KeyDown);
             // 
             // UserName_label

+ 4 - 0
PLCDataReader/Login.cs

@@ -24,7 +24,10 @@ namespace UAS_PLCDataReader
             DataTable dt = (DataTable)dh.ExecuteSql("select ma_user,ma_function from master", "select");
             BaseUtil.FillComBoxEditWidthDataTable(Master, "ma_function", "ma_user", dt, false);
             string index = BaseUtil.GetCacheData("Master").ToString();
+            UserName.Text = BaseUtil.GetCacheData("UserName").ToString();
             Master.SelectedIndex = int.Parse(index == "" ? "0" : index);
+            if (UserName.Text != "")
+                PassWord.Focus();
         }
 
         private void LoginButton_Click(object sender, EventArgs e)
@@ -39,6 +42,7 @@ namespace UAS_PLCDataReader
                     dh = new DataHelper();
                     SystemInf.dh = dh;
                     BaseUtil.SetCacheData("Master", Master.SelectedIndex);
+                    BaseUtil.SetCacheData("UserName", UserName.Text);
                     SetInf();
                     Main main = new Main();
                     Hide();

+ 29 - 29
PLCDataReader/Main.Designer.cs

@@ -789,7 +789,7 @@ namespace UAS_PLCDataReader
             this.PageCommandSet.Controls.Add(this.GridCommandSetting);
             this.PageCommandSet.Name = "PageCommandSet";
             this.PageCommandSet.PageVisible = false;
-            this.PageCommandSet.Size = new System.Drawing.Size(1027, 577);
+            this.PageCommandSet.Size = new System.Drawing.Size(1034, 578);
             this.PageCommandSet.Text = "xtraTabPage1";
             this.PageCommandSet.VisibleChanged += new System.EventHandler(this.PageCommandSet_VisibleChanged);
             // 
@@ -797,7 +797,7 @@ namespace UAS_PLCDataReader
             // 
             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(945, 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;
@@ -830,7 +830,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(805, 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;
@@ -841,7 +841,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(875, 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;
@@ -866,7 +866,7 @@ namespace UAS_PLCDataReader
             this.CommandSetRepositoryItemComboBox1,
             this.repositoryItemDateEdit1});
             this.GridCommandSetting.RowCount = 0;
-            this.GridCommandSetting.Size = new System.Drawing.Size(1027, 546);
+            this.GridCommandSetting.Size = new System.Drawing.Size(1034, 547);
             this.GridCommandSetting.TabIndex = 1;
             this.GridCommandSetting.TableName = null;
             this.GridCommandSetting.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -1040,13 +1040,13 @@ namespace UAS_PLCDataReader
             this.PageDeviceNetSetting.Controls.Add(this.GridDeviceNetSetting);
             this.PageDeviceNetSetting.Name = "PageDeviceNetSetting";
             this.PageDeviceNetSetting.PageVisible = false;
-            this.PageDeviceNetSetting.Size = new System.Drawing.Size(1027, 577);
+            this.PageDeviceNetSetting.Size = new System.Drawing.Size(1034, 578);
             // 
             // 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(942, 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;
@@ -1056,7 +1056,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(802, 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;
@@ -1067,7 +1067,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(872, 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;
@@ -1089,7 +1089,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(1024, 543);
+            this.GridDeviceNetSetting.Size = new System.Drawing.Size(1031, 544);
             this.GridDeviceNetSetting.TabIndex = 0;
             this.GridDeviceNetSetting.TableName = null;
             this.GridDeviceNetSetting.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -1190,7 +1190,7 @@ namespace UAS_PLCDataReader
             this.PagePollingSetting.Controls.Add(this.GridPollingSetting);
             this.PagePollingSetting.Name = "PagePollingSetting";
             this.PagePollingSetting.PageVisible = false;
-            this.PagePollingSetting.Size = new System.Drawing.Size(1027, 577);
+            this.PagePollingSetting.Size = new System.Drawing.Size(1034, 578);
             this.PagePollingSetting.Text = "xtraTabPage1";
             this.PagePollingSetting.VisibleChanged += new System.EventHandler(this.PagePollingSetting_VisibleChanged);
             // 
@@ -1198,7 +1198,7 @@ namespace UAS_PLCDataReader
             // 
             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(950, 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;
@@ -1208,7 +1208,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(810, 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;
@@ -1219,7 +1219,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(880, 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;
@@ -1229,7 +1229,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(729, 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;
@@ -1239,7 +1239,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(648, 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;
@@ -1265,7 +1265,7 @@ namespace UAS_PLCDataReader
             this.PollSettingItemSearchLookUpEdit,
             this.PollSettingDeviceSearchLookUpEdit});
             this.GridPollingSetting.RowCount = 0;
-            this.GridPollingSetting.Size = new System.Drawing.Size(1027, 543);
+            this.GridPollingSetting.Size = new System.Drawing.Size(1034, 544);
             this.GridPollingSetting.TabIndex = 0;
             this.GridPollingSetting.TableName = null;
             this.GridPollingSetting.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -1487,14 +1487,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(1027, 577);
+            this.PagePolling.Size = new System.Drawing.Size(1034, 578);
             this.PagePolling.Text = "xtraTabPage1";
             // 
             // ButtonAddPolling
             // 
             this.ButtonAddPolling.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
             this.ButtonAddPolling.Grid = null;
-            this.ButtonAddPolling.Location = new System.Drawing.Point(878, 551);
+            this.ButtonAddPolling.Location = new System.Drawing.Point(885, 552);
             this.ButtonAddPolling.Name = "ButtonAddPolling";
             this.ButtonAddPolling.Size = new System.Drawing.Size(64, 23);
             this.ButtonAddPolling.TabIndex = 9;
@@ -1504,7 +1504,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(807, 551);
+            this.ButtonDeletePolling.Location = new System.Drawing.Point(814, 552);
             this.ButtonDeletePolling.Name = "ButtonDeletePolling";
             this.ButtonDeletePolling.Size = new System.Drawing.Size(64, 23);
             this.ButtonDeletePolling.TabIndex = 8;
@@ -1515,7 +1515,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(949, 551);
+            this.ButtonSavePolling.Location = new System.Drawing.Point(956, 552);
             this.ButtonSavePolling.Name = "ButtonSavePolling";
             this.ButtonSavePolling.Size = new System.Drawing.Size(64, 23);
             this.ButtonSavePolling.TabIndex = 7;
@@ -1537,7 +1537,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(1027, 549);
+            this.GridPolling.Size = new System.Drawing.Size(1034, 550);
             this.GridPolling.TabIndex = 0;
             this.GridPolling.TableName = null;
             this.GridPolling.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -1626,7 +1626,7 @@ namespace UAS_PLCDataReader
             this.PageDeviceStatus.Controls.Add(this.PanelDeviceStatus);
             this.PageDeviceStatus.Name = "PageDeviceStatus";
             this.PageDeviceStatus.PageVisible = false;
-            this.PageDeviceStatus.Size = new System.Drawing.Size(1027, 577);
+            this.PageDeviceStatus.Size = new System.Drawing.Size(1034, 578);
             this.PageDeviceStatus.Text = "xtraTabPage1";
             this.PageDeviceStatus.VisibleChanged += new System.EventHandler(this.PageDeviceStatus_VisibleChanged);
             // 
@@ -1695,7 +1695,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(1027, 542);
+            this.PanelDeviceStatus.Size = new System.Drawing.Size(1034, 543);
             this.PanelDeviceStatus.TabIndex = 0;
             // 
             // PageWorkCenterStatus
@@ -1703,7 +1703,7 @@ namespace UAS_PLCDataReader
             this.PageWorkCenterStatus.Controls.Add(this.GridWorkCenterStatus);
             this.PageWorkCenterStatus.Name = "PageWorkCenterStatus";
             this.PageWorkCenterStatus.PageVisible = false;
-            this.PageWorkCenterStatus.Size = new System.Drawing.Size(1027, 577);
+            this.PageWorkCenterStatus.Size = new System.Drawing.Size(1034, 578);
             this.PageWorkCenterStatus.Text = "车间全局监控";
             // 
             // GridWorkCenterStatus
@@ -1720,7 +1720,7 @@ namespace UAS_PLCDataReader
             this.GridWorkCenterStatus.MenuManager = this.RibbonNav;
             this.GridWorkCenterStatus.Name = "GridWorkCenterStatus";
             this.GridWorkCenterStatus.RowCount = 0;
-            this.GridWorkCenterStatus.Size = new System.Drawing.Size(1024, 574);
+            this.GridWorkCenterStatus.Size = new System.Drawing.Size(1031, 575);
             this.GridWorkCenterStatus.TabIndex = 0;
             this.GridWorkCenterStatus.TableName = null;
             this.GridWorkCenterStatus.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -1741,7 +1741,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(1027, 577);
+            this.PageDeviceRunLog.Size = new System.Drawing.Size(1034, 578);
             this.PageDeviceRunLog.Text = "设备运行日志";
             // 
             // ButtonSearchDeviceRunLog
@@ -1784,7 +1784,7 @@ namespace UAS_PLCDataReader
             this.GridDeviceRunLog.MenuManager = this.RibbonNav;
             this.GridDeviceRunLog.Name = "GridDeviceRunLog";
             this.GridDeviceRunLog.RowCount = 0;
-            this.GridDeviceRunLog.Size = new System.Drawing.Size(1028, 553);
+            this.GridDeviceRunLog.Size = new System.Drawing.Size(1035, 554);
             this.GridDeviceRunLog.TabIndex = 0;
             this.GridDeviceRunLog.TableName = null;
             this.GridDeviceRunLog.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -1890,7 +1890,7 @@ namespace UAS_PLCDataReader
             this.PageClientParam.Controls.Add(this.label1);
             this.PageClientParam.Name = "PageClientParam";
             this.PageClientParam.PageVisible = false;
-            this.PageClientParam.Size = new System.Drawing.Size(1027, 577);
+            this.PageClientParam.Size = new System.Drawing.Size(1034, 578);
             this.PageClientParam.VisibleChanged += new System.EventHandler(this.PageClientParam_VisibleChanged);
             // 
             // ButtonSaveClientParam

+ 4 - 4
PLCDataReader/Main.resx

@@ -535,16 +535,16 @@
 </value>
   </data>
   <metadata name="TimerDeviceStatus.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
+    <value>17, 20</value>
   </metadata>
   <metadata name="CommonTipController.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>164, 18</value>
+    <value>195, 21</value>
   </metadata>
   <metadata name="TimerUpdateDevice.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>350, 20</value>
+    <value>401, 21</value>
   </metadata>
   <metadata name="TimerUpdateSQL.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>520, 25</value>
+    <value>582, 23</value>
   </metadata>
   <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>