Explorar o código

修改主界面底部信息展示不全的问题

章政 %!s(int64=8) %!d(string=hai) anos
pai
achega
dca63025da
Modificáronse 2 ficheiros con 105 adicións e 91 borrados
  1. 88 87
      UAS-MES/Main.Designer.cs
  2. 17 4
      UAS-MES/Main.cs

+ 88 - 87
UAS-MES/Main.Designer.cs

@@ -1,4 +1,4 @@
- namespace UAS_MES
+namespace UAS_MES
 {
     partial class Main
     {
@@ -21,7 +21,7 @@
         }
 
         #region Windows 窗体设计器生成的代码
-         
+
         /// <summary>
         /// 设计器支持所需的方法 - 不要修改
         /// 使用代码编辑器修改此方法的内容。
@@ -32,16 +32,16 @@
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));
             this.ProductName = new System.Windows.Forms.Label();
             this.MainTabControl = new System.Windows.Forms.TabControl();
-            this.name_label = new System.Windows.Forms.Label();
+            this.inf_name_label = new System.Windows.Forms.Label();
             this.BasicInf = new System.Windows.Forms.Panel();
-            this.inf_currentstep = new System.Windows.Forms.Label();
-            this.step_label = new System.Windows.Forms.Label();
-            this.inf_name = new System.Windows.Forms.Label();
+            this.Inf_currentstep = new System.Windows.Forms.Label();
+            this.Inf_currentstep_label = new System.Windows.Forms.Label();
+            this.Inf_name = new System.Windows.Forms.Label();
             this.Inf_linecode = new System.Windows.Forms.Label();
-            this.inf_source = new System.Windows.Forms.Label();
-            this.inf_db = new System.Windows.Forms.Label();
+            this.Inf_source = new System.Windows.Forms.Label();
+            this.Inf_db = new System.Windows.Forms.Label();
             this.Inf_linecode_label = new System.Windows.Forms.Label();
-            this.db_label = new System.Windows.Forms.Label();
+            this.Inf_db_label = new System.Windows.Forms.Label();
             this.Inf_source_label = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
             this.Menu = new UAS_MES.CustomControl.AccordionMenu.AccordionMenu();
@@ -67,8 +67,8 @@
             // 
             // MainTabControl
             // 
-            this.MainTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
+            this.MainTabControl.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.MainTabControl.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.MainTabControl.ItemSize = new System.Drawing.Size(96, 25);
@@ -79,65 +79,66 @@
             this.MainTabControl.TabIndex = 7;
             this.MainTabControl.ControlRemoved += new System.Windows.Forms.ControlEventHandler(this.MainTabControl_ControlRemoved);
             // 
-            // name_label
+            // inf_name_label
             // 
-            this.name_label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
-            this.name_label.AutoSize = true;
-            this.name_label.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.name_label.Location = new System.Drawing.Point(6, 8);
-            this.name_label.Name = "name_label";
-            this.name_label.Size = new System.Drawing.Size(35, 17);
-            this.name_label.TabIndex = 4;
-            this.name_label.Text = "姓名:";
+            this.inf_name_label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
+            this.inf_name_label.AutoSize = true;
+            this.inf_name_label.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.inf_name_label.Location = new System.Drawing.Point(6, 8);
+            this.inf_name_label.Name = "inf_name_label";
+            this.inf_name_label.Size = new System.Drawing.Size(35, 17);
+            this.inf_name_label.TabIndex = 4;
+            this.inf_name_label.Text = "姓名:";
             // 
             // BasicInf
             // 
-            this.BasicInf.Controls.Add(this.inf_currentstep);
-            this.BasicInf.Controls.Add(this.step_label);
-            this.BasicInf.Controls.Add(this.inf_name);
+            this.BasicInf.Controls.Add(this.Inf_currentstep);
+            this.BasicInf.Controls.Add(this.Inf_currentstep_label);
+            this.BasicInf.Controls.Add(this.Inf_name);
             this.BasicInf.Controls.Add(this.Inf_linecode);
-            this.BasicInf.Controls.Add(this.inf_source);
-            this.BasicInf.Controls.Add(this.inf_db);
+            this.BasicInf.Controls.Add(this.Inf_source);
+            this.BasicInf.Controls.Add(this.Inf_db);
             this.BasicInf.Controls.Add(this.Inf_linecode_label);
-            this.BasicInf.Controls.Add(this.db_label);
+            this.BasicInf.Controls.Add(this.Inf_db_label);
             this.BasicInf.Controls.Add(this.Inf_source_label);
-            this.BasicInf.Controls.Add(this.name_label);
+            this.BasicInf.Controls.Add(this.inf_name_label);
             this.BasicInf.Dock = System.Windows.Forms.DockStyle.Bottom;
             this.BasicInf.Location = new System.Drawing.Point(0, 593);
             this.BasicInf.Name = "BasicInf";
             this.BasicInf.Size = new System.Drawing.Size(978, 31);
             this.BasicInf.TabIndex = 6;
+            this.BasicInf.SizeChanged += new System.EventHandler(this.BasicInf_SizeChanged);
             // 
             // inf_currentstep
             // 
-            this.inf_currentstep.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
-            this.inf_currentstep.AutoSize = true;
-            this.inf_currentstep.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.inf_currentstep.Location = new System.Drawing.Point(228, 8);
-            this.inf_currentstep.Name = "inf_currentstep";
-            this.inf_currentstep.Size = new System.Drawing.Size(0, 17);
-            this.inf_currentstep.TabIndex = 15;
-            // 
-            // step_label
-            // 
-            this.step_label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
-            this.step_label.AutoSize = true;
-            this.step_label.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.step_label.Location = new System.Drawing.Point(147, 8);
-            this.step_label.Name = "step_label";
-            this.step_label.Size = new System.Drawing.Size(59, 17);
-            this.step_label.TabIndex = 14;
-            this.step_label.Text = "岗位工序:";
+            this.Inf_currentstep.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
+            this.Inf_currentstep.AutoSize = true;
+            this.Inf_currentstep.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Inf_currentstep.Location = new System.Drawing.Point(228, 8);
+            this.Inf_currentstep.Name = "inf_currentstep";
+            this.Inf_currentstep.Size = new System.Drawing.Size(0, 17);
+            this.Inf_currentstep.TabIndex = 15;
+            // 
+            // inf_currentstep_label
+            // 
+            this.Inf_currentstep_label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
+            this.Inf_currentstep_label.AutoSize = true;
+            this.Inf_currentstep_label.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Inf_currentstep_label.Location = new System.Drawing.Point(147, 8);
+            this.Inf_currentstep_label.Name = "inf_currentstep_label";
+            this.Inf_currentstep_label.Size = new System.Drawing.Size(59, 17);
+            this.Inf_currentstep_label.TabIndex = 14;
+            this.Inf_currentstep_label.Text = "岗位工序:";
             // 
             // inf_name
             // 
-            this.inf_name.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
-            this.inf_name.AutoSize = true;
-            this.inf_name.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.inf_name.Location = new System.Drawing.Point(64, 8);
-            this.inf_name.Name = "inf_name";
-            this.inf_name.Size = new System.Drawing.Size(0, 17);
-            this.inf_name.TabIndex = 13;
+            this.Inf_name.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
+            this.Inf_name.AutoSize = true;
+            this.Inf_name.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Inf_name.Location = new System.Drawing.Point(64, 8);
+            this.Inf_name.Name = "inf_name";
+            this.Inf_name.Size = new System.Drawing.Size(0, 17);
+            this.Inf_name.TabIndex = 13;
             // 
             // Inf_linecode
             // 
@@ -151,23 +152,23 @@
             // 
             // inf_source
             // 
-            this.inf_source.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
-            this.inf_source.AutoSize = true;
-            this.inf_source.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.inf_source.Location = new System.Drawing.Point(565, 8);
-            this.inf_source.Name = "inf_source";
-            this.inf_source.Size = new System.Drawing.Size(0, 17);
-            this.inf_source.TabIndex = 10;
+            this.Inf_source.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
+            this.Inf_source.AutoSize = true;
+            this.Inf_source.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Inf_source.Location = new System.Drawing.Point(565, 8);
+            this.Inf_source.Name = "inf_source";
+            this.Inf_source.Size = new System.Drawing.Size(0, 17);
+            this.Inf_source.TabIndex = 10;
             // 
             // inf_db
             // 
-            this.inf_db.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
-            this.inf_db.AutoSize = true;
-            this.inf_db.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.inf_db.Location = new System.Drawing.Point(772, 8);
-            this.inf_db.Name = "inf_db";
-            this.inf_db.Size = new System.Drawing.Size(0, 17);
-            this.inf_db.TabIndex = 9;
+            this.Inf_db.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
+            this.Inf_db.AutoSize = true;
+            this.Inf_db.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Inf_db.Location = new System.Drawing.Point(772, 8);
+            this.Inf_db.Name = "inf_db";
+            this.Inf_db.Size = new System.Drawing.Size(0, 17);
+            this.Inf_db.TabIndex = 9;
             // 
             // Inf_linecode_label
             // 
@@ -180,31 +181,31 @@
             this.Inf_linecode_label.TabIndex = 8;
             this.Inf_linecode_label.Text = "线别:";
             // 
-            // db_label
+            // inf_db_label
             // 
-            this.db_label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
-            this.db_label.AutoSize = true;
-            this.db_label.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.db_label.Location = new System.Drawing.Point(701, 8);
-            this.db_label.Name = "db_label";
-            this.db_label.Size = new System.Drawing.Size(47, 17);
-            this.db_label.TabIndex = 7;
-            this.db_label.Text = "数据库:";
+            this.Inf_db_label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
+            this.Inf_db_label.AutoSize = true;
+            this.Inf_db_label.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Inf_db_label.Location = new System.Drawing.Point(701, 8);
+            this.Inf_db_label.Name = "inf_db_label";
+            this.Inf_db_label.Size = new System.Drawing.Size(47, 17);
+            this.Inf_db_label.TabIndex = 7;
+            this.Inf_db_label.Text = "数据库:";
             // 
-            // Inf_source_label
+            // inf_source_label
             // 
             this.Inf_source_label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
             this.Inf_source_label.AutoSize = true;
             this.Inf_source_label.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Inf_source_label.Location = new System.Drawing.Point(505, 8);
-            this.Inf_source_label.Name = "Inf_source_label";
+            this.Inf_source_label.Name = "inf_source_label";
             this.Inf_source_label.Size = new System.Drawing.Size(35, 17);
             this.Inf_source_label.TabIndex = 6;
             this.Inf_source_label.Text = "资源:";
             // 
             // panel1
             // 
-            this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
             | System.Windows.Forms.AnchorStyles.Left)));
             this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.panel1.Controls.Add(this.Menu);
@@ -217,7 +218,7 @@
             // 
             this.Menu.Dock = System.Windows.Forms.DockStyle.Fill;
             this.Menu.Location = new System.Drawing.Point(0, 0);
-            this.Menu.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Menu.Margin = new System.Windows.Forms.Padding(4);
             this.Menu.Name = "Menu";
             this.Menu.Size = new System.Drawing.Size(137, 560);
             this.Menu.TabIndex = 3;
@@ -242,7 +243,7 @@
             this.headBar1.BackColor = System.Drawing.SystemColors.ControlDarkDark;
             this.headBar1.Dock = System.Windows.Forms.DockStyle.Top;
             this.headBar1.Location = new System.Drawing.Point(0, 0);
-            this.headBar1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.headBar1.Margin = new System.Windows.Forms.Padding(4);
             this.headBar1.Name = "headBar1";
             this.headBar1.Size = new System.Drawing.Size(978, 32);
             this.headBar1.TabIndex = 0;
@@ -280,18 +281,18 @@
         private System.Windows.Forms.Label ProductName;
         private System.Windows.Forms.PictureBox pictureBox1;
         private System.Windows.Forms.TabControl MainTabControl;
-        private System.Windows.Forms.Label name_label;
+        private System.Windows.Forms.Label inf_name_label;
         private System.Windows.Forms.Panel BasicInf;
-        private System.Windows.Forms.Label db_label;
-        private System.Windows.Forms.Label inf_name;
-        private System.Windows.Forms.Label inf_db;
+        private System.Windows.Forms.Label Inf_db_label;
+        private System.Windows.Forms.Label Inf_name;
+        private System.Windows.Forms.Label Inf_db;
         private System.Windows.Forms.Panel panel1;
         private System.Windows.Forms.NotifyIcon notifyIcon1;
         private new CustomControl.AccordionMenu.AccordionMenu Menu;
-        private System.Windows.Forms.Label inf_currentstep;
-        private System.Windows.Forms.Label step_label;
+        private System.Windows.Forms.Label Inf_currentstep;
+        private System.Windows.Forms.Label Inf_currentstep_label;
         private System.Windows.Forms.Label Inf_linecode;
-        private System.Windows.Forms.Label inf_source;
+        private System.Windows.Forms.Label Inf_source;
         private System.Windows.Forms.Label Inf_linecode_label;
         private System.Windows.Forms.Label Inf_source_label;
     }

+ 17 - 4
UAS-MES/Main.cs

@@ -94,12 +94,12 @@ namespace UAS_MES
             this.MainTabControl.DrawItem += new DrawItemEventHandler(this.MainTabControl_DrawItem);
             this.MainTabControl.MouseDown += new MouseEventHandler(this.MainTabControl_MouseDown);
             //设置底部栏目的基础信息
-            inf_name.Text = User.UserName;
+            Inf_name.Text = User.UserName;
             //inf_position.Text = User.UserPosition;
             Inf_linecode.Text = User.UserLineCode;
-            inf_source.Text = User.UserSourceCode;
-            inf_db.Text = SystemInf.CurrentDB;
-            inf_currentstep.Text = User.CurrentStepName;
+            Inf_source.Text = User.UserSourceCode;
+            Inf_db.Text = SystemInf.CurrentDB;
+            Inf_currentstep.Text = User.CurrentStepName;
             //设置获取当前屏幕大小自动全屏但是保留任务栏
             Rectangle ScreenArea = Screen.GetWorkingArea(this);
             Top = 0;
@@ -352,5 +352,18 @@ namespace UAS_MES
             }
             BaseUtil.FormStepInOrOut(this, false);
         }
+
+        private void BasicInf_SizeChanged(object sender, EventArgs e)
+        {
+            Inf_name.Location = new Point(inf_name_label.Location.X + inf_name_label.Width + 5, inf_name_label.Location.Y);
+            Inf_currentstep_label.Location = new Point(Inf_name.Location.X + Inf_name.Width + 45, Inf_name.Location.Y);
+            Inf_currentstep.Location = new Point(Inf_currentstep_label.Location.X + Inf_currentstep_label.Width + 5, Inf_currentstep_label.Location.Y);
+            Inf_linecode_label.Location = new Point(Inf_currentstep.Location.X + Inf_currentstep.Width + 45, Inf_currentstep.Location.Y);
+            Inf_linecode.Location = new Point(Inf_linecode_label.Location.X + Inf_linecode_label.Width + 5, Inf_linecode_label.Location.Y);
+            Inf_source_label.Location = new Point(Inf_linecode.Location.X + Inf_linecode.Width + 45, Inf_linecode.Location.Y);
+            Inf_source.Location = new Point(Inf_source_label.Location.X + Inf_source_label.Width + 5, Inf_source_label.Location.Y);
+            Inf_db_label.Location = new Point(Inf_source.Location.X + Inf_source.Width + 45, Inf_source.Location.Y);
+            Inf_db.Location = new Point(Inf_db_label.Location.X + Inf_db_label.Width + 5, Inf_db_label.Location.Y);
+        }
     }
 }