Browse Source

回退主界面

章政 7 years ago
parent
commit
00e889322e
2 changed files with 80 additions and 80 deletions
  1. 77 71
      UAS-MES/Main.Designer.cs
  2. 3 9
      UAS-MES/Main.cs

+ 77 - 71
UAS-MES/Main.Designer.cs

@@ -43,13 +43,14 @@
             this.Inf_linecode_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();
             this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
             this.pictureBox1 = new System.Windows.Forms.PictureBox();
             this.headBar1 = new UAS_MES.CustomControl.HeadBar();
-            this.NavBar = new UAS_MES.CustomControl.AccordionMenu.NavagationBar();
             this.BasicInf.SuspendLayout();
+            this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.NavBar)).BeginInit();
             this.SuspendLayout();
             // 
             // ProductName
@@ -58,24 +59,25 @@
             this.ProductName.BackColor = System.Drawing.SystemColors.ControlDarkDark;
             this.ProductName.Font = new System.Drawing.Font("微软雅黑", 13F);
             this.ProductName.ForeColor = System.Drawing.SystemColors.ButtonFace;
-            this.ProductName.Location = new System.Drawing.Point(81, 4);
+            this.ProductName.Location = new System.Drawing.Point(108, 3);
+            this.ProductName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ProductName.Name = "ProductName";
-            this.ProductName.Size = new System.Drawing.Size(190, 24);
+            this.ProductName.Size = new System.Drawing.Size(233, 30);
             this.ProductName.TabIndex = 3;
             this.ProductName.Text = "优软科技制造执行系统";
             // 
             // 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.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed;
             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);
-            this.MainTabControl.Location = new System.Drawing.Point(170, 33);
+            this.MainTabControl.Location = new System.Drawing.Point(209, 41);
+            this.MainTabControl.Margin = new System.Windows.Forms.Padding(4);
             this.MainTabControl.Name = "MainTabControl";
             this.MainTabControl.SelectedIndex = 0;
-            this.MainTabControl.Size = new System.Drawing.Size(805, 560);
+            this.MainTabControl.Size = new System.Drawing.Size(1091, 700);
             this.MainTabControl.TabIndex = 7;
             this.MainTabControl.Selected += new System.Windows.Forms.TabControlEventHandler(this.MainTabControl_Selected);
             this.MainTabControl.ControlRemoved += new System.Windows.Forms.ControlEventHandler(this.MainTabControl_ControlRemoved);
@@ -85,9 +87,10 @@
             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.Location = new System.Drawing.Point(8, 10);
+            this.inf_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.inf_name_label.Name = "inf_name_label";
-            this.inf_name_label.Size = new System.Drawing.Size(35, 17);
+            this.inf_name_label.Size = new System.Drawing.Size(43, 20);
             this.inf_name_label.TabIndex = 4;
             this.inf_name_label.Text = "姓名:";
             // 
@@ -104,9 +107,10 @@
             this.BasicInf.Controls.Add(this.Inf_source_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.Location = new System.Drawing.Point(0, 741);
+            this.BasicInf.Margin = new System.Windows.Forms.Padding(4);
             this.BasicInf.Name = "BasicInf";
-            this.BasicInf.Size = new System.Drawing.Size(978, 31);
+            this.BasicInf.Size = new System.Drawing.Size(1304, 39);
             this.BasicInf.TabIndex = 6;
             this.BasicInf.SizeChanged += new System.EventHandler(this.BasicInf_SizeChanged);
             // 
@@ -115,9 +119,10 @@
             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.Location = new System.Drawing.Point(304, 10);
+            this.Inf_currentstep.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Inf_currentstep.Name = "Inf_currentstep";
-            this.Inf_currentstep.Size = new System.Drawing.Size(0, 17);
+            this.Inf_currentstep.Size = new System.Drawing.Size(0, 20);
             this.Inf_currentstep.TabIndex = 15;
             // 
             // Inf_currentstep_label
@@ -125,9 +130,10 @@
             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.Location = new System.Drawing.Point(196, 10);
+            this.Inf_currentstep_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Inf_currentstep_label.Name = "Inf_currentstep_label";
-            this.Inf_currentstep_label.Size = new System.Drawing.Size(59, 17);
+            this.Inf_currentstep_label.Size = new System.Drawing.Size(73, 20);
             this.Inf_currentstep_label.TabIndex = 14;
             this.Inf_currentstep_label.Text = "岗位工序:";
             // 
@@ -136,9 +142,10 @@
             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.Location = new System.Drawing.Point(85, 10);
+            this.Inf_name.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Inf_name.Name = "Inf_name";
-            this.Inf_name.Size = new System.Drawing.Size(0, 17);
+            this.Inf_name.Size = new System.Drawing.Size(0, 20);
             this.Inf_name.TabIndex = 13;
             // 
             // Inf_linecode
@@ -146,9 +153,10 @@
             this.Inf_linecode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
             this.Inf_linecode.AutoSize = true;
             this.Inf_linecode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Inf_linecode.Location = new System.Drawing.Point(406, 8);
+            this.Inf_linecode.Location = new System.Drawing.Point(541, 10);
+            this.Inf_linecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Inf_linecode.Name = "Inf_linecode";
-            this.Inf_linecode.Size = new System.Drawing.Size(0, 17);
+            this.Inf_linecode.Size = new System.Drawing.Size(0, 20);
             this.Inf_linecode.TabIndex = 11;
             // 
             // Inf_source
@@ -156,9 +164,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.Location = new System.Drawing.Point(753, 10);
+            this.Inf_source.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Inf_source.Name = "Inf_source";
-            this.Inf_source.Size = new System.Drawing.Size(0, 17);
+            this.Inf_source.Size = new System.Drawing.Size(0, 20);
             this.Inf_source.TabIndex = 10;
             // 
             // Inf_db
@@ -166,9 +175,10 @@
             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.Location = new System.Drawing.Point(1029, 10);
+            this.Inf_db.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Inf_db.Name = "Inf_db";
-            this.Inf_db.Size = new System.Drawing.Size(0, 17);
+            this.Inf_db.Size = new System.Drawing.Size(0, 20);
             this.Inf_db.TabIndex = 9;
             // 
             // Inf_linecode_label
@@ -176,9 +186,10 @@
             this.Inf_linecode_label.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
             this.Inf_linecode_label.AutoSize = true;
             this.Inf_linecode_label.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Inf_linecode_label.Location = new System.Drawing.Point(346, 8);
+            this.Inf_linecode_label.Location = new System.Drawing.Point(461, 10);
+            this.Inf_linecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Inf_linecode_label.Name = "Inf_linecode_label";
-            this.Inf_linecode_label.Size = new System.Drawing.Size(35, 17);
+            this.Inf_linecode_label.Size = new System.Drawing.Size(43, 20);
             this.Inf_linecode_label.TabIndex = 8;
             this.Inf_linecode_label.Text = "线别:";
             // 
@@ -187,9 +198,10 @@
             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.Location = new System.Drawing.Point(935, 10);
+            this.Inf_db_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Inf_db_label.Name = "Inf_db_label";
-            this.Inf_db_label.Size = new System.Drawing.Size(47, 17);
+            this.Inf_db_label.Size = new System.Drawing.Size(58, 20);
             this.Inf_db_label.TabIndex = 7;
             this.Inf_db_label.Text = "数据库:";
             // 
@@ -198,12 +210,34 @@
             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.Location = new System.Drawing.Point(673, 10);
+            this.Inf_source_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.Inf_source_label.Name = "Inf_source_label";
-            this.Inf_source_label.Size = new System.Drawing.Size(35, 17);
+            this.Inf_source_label.Size = new System.Drawing.Size(43, 20);
             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)
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.panel1.Controls.Add(this.Menu);
+            this.panel1.Location = new System.Drawing.Point(0, 40);
+            this.panel1.Margin = new System.Windows.Forms.Padding(4);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(206, 702);
+            this.panel1.TabIndex = 1;
+            // 
+            // Menu
+            // 
+            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(5);
+            this.Menu.Name = "Menu";
+            this.Menu.Size = new System.Drawing.Size(204, 700);
+            this.Menu.TabIndex = 3;
+            // 
             // notifyIcon1
             // 
             this.notifyIcon1.Text = "notifyIcon1";
@@ -213,8 +247,9 @@
             // 
             this.pictureBox1.Image = global::UAS_MES.Properties.Resources.uas_blue;
             this.pictureBox1.Location = new System.Drawing.Point(0, 0);
+            this.pictureBox1.Margin = new System.Windows.Forms.Padding(4);
             this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(75, 33);
+            this.pictureBox1.Size = new System.Drawing.Size(100, 41);
             this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
             this.pictureBox1.TabIndex = 4;
             this.pictureBox1.TabStop = false;
@@ -224,65 +259,35 @@
             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);
+            this.headBar1.Margin = new System.Windows.Forms.Padding(5);
             this.headBar1.Name = "headBar1";
-            this.headBar1.Size = new System.Drawing.Size(978, 32);
+            this.headBar1.Size = new System.Drawing.Size(1304, 40);
             this.headBar1.TabIndex = 0;
             this.headBar1.Title = null;
             // 
-            // NavBar
-            // 
-            this.NavBar.ActiveGroup = null;
-            this.NavBar.Appearance.GroupHeader.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.NavBar.Appearance.GroupHeader.Options.UseFont = true;
-            this.NavBar.Appearance.Item.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.NavBar.Appearance.Item.Options.UseFont = true;
-            this.NavBar.Appearance.ItemActive.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.NavBar.Appearance.ItemActive.Options.UseFont = true;
-            this.NavBar.Appearance.ItemHotTracked.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.NavBar.Appearance.ItemHotTracked.Options.UseFont = true;
-            this.NavBar.Appearance.ItemPressed.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.NavBar.Appearance.ItemPressed.Options.UseFont = true;
-            this.NavBar.BackColor = System.Drawing.SystemColors.Control;
-            this.NavBar.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.HotFlat;
-            this.NavBar.Dock = System.Windows.Forms.DockStyle.Left;
-            this.NavBar.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.NavBar.LinkInterval = 2;
-            this.NavBar.Location = new System.Drawing.Point(0, 32);
-            this.NavBar.Name = "NavBar";
-            this.NavBar.NavigationPaneGroupClientHeight = 300;
-            this.NavBar.OptionsNavPane.ExpandedWidth = 167;
-            this.NavBar.OptionsNavPane.ShowOverflowButton = false;
-            this.NavBar.OptionsNavPane.ShowOverflowPanel = false;
-            this.NavBar.PaintStyleKind = DevExpress.XtraNavBar.NavBarViewKind.NavigationPane;
-            this.NavBar.ShowGroupHint = false;
-            this.NavBar.ShowLinkHint = false;
-            this.NavBar.Size = new System.Drawing.Size(167, 561);
-            this.NavBar.TabIndex = 8;
-            this.NavBar.Text = " ";
-            this.NavBar.SizeChanged += new System.EventHandler(this.NavBar_SizeChanged);
-            // 
             // Main
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(978, 624);
-            this.Controls.Add(this.NavBar);
+            this.ClientSize = new System.Drawing.Size(1304, 780);
             this.Controls.Add(this.BasicInf);
             this.Controls.Add(this.MainTabControl);
             this.Controls.Add(this.pictureBox1);
             this.Controls.Add(this.ProductName);
+            this.Controls.Add(this.panel1);
             this.Controls.Add(this.headBar1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Main";
             this.Text = "优软科技MES系统";
+            this.TopMost = false;
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Main_FormClosing);
             this.Load += new System.EventHandler(this.Main_Load);
             this.BasicInf.ResumeLayout(false);
             this.BasicInf.PerformLayout();
+            this.panel1.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.NavBar)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -299,14 +304,15 @@
         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 Inf_currentstep_label;
         private System.Windows.Forms.Label Inf_linecode;
         private System.Windows.Forms.Label Inf_source;
         private System.Windows.Forms.Label Inf_linecode_label;
         private System.Windows.Forms.Label Inf_source_label;
-        private CustomControl.AccordionMenu.NavagationBar NavBar;
     }
 }
 

+ 3 - 9
UAS-MES/Main.cs

@@ -111,6 +111,7 @@ namespace UAS_MES
             Height = ScreenArea.Height;
             SetForm();
             //设置导航栏宽度
+            SystemInf.NavWidth = Menu.Width;
             SystemInf.HeadBarHeight = headBar1.Height;
         }
 
@@ -360,7 +361,7 @@ namespace UAS_MES
         {
             //移除已打开的Form中的Form
             TabPage tb = e.Control as TabPage;
-            NavagationBar.OpenedFormName.Remove(tb.Tag.ToString());
+            AccordionMenu.OpenedFormName.Remove(tb.Tag.ToString());
             (tb.Controls[0] as Form).Close();
             //掉用了串口的程序需要在这个步骤关闭串口
             try
@@ -385,7 +386,7 @@ namespace UAS_MES
                 //清除上个用户的权限信息
                 SystemInf.Caller.Clear();
                 //清除已经打开过的窗口的信息
-                NavagationBar.OpenedFormName.Clear();
+                AccordionMenu.OpenedFormName.Clear();
                 //注销的时候将除了登陆窗口之外的全部窗口关闭
                 for (int i = 0; i < System.Windows.Forms.Application.OpenForms.Count; i++)
                 {
@@ -483,12 +484,5 @@ namespace UAS_MES
             {
             }
         }
-
-        private void NavBar_SizeChanged(object sender, EventArgs e)
-        {
-            MainTabControl.Location = new Point(NavBar.Width + 5, MainTabControl.Location.Y);
-            MainTabControl.Width = Width - NavBar.Width;
-            MainTabControl.Height = Height - headBar1.Height - BasicInf.Height;
-        }
     }
 }