Browse Source

修改导航栏,引用DevExpress

章政 7 years ago
parent
commit
20184ac272

+ 58 - 0
UAS-MES/CustomControl/AccordionMenu/NavagationBar.Designer.cs

@@ -0,0 +1,58 @@
+namespace UAS_MES.CustomControl.AccordionMenu
+{
+    partial class NavagationBar
+    {
+        /// <summary> 
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Component Designer generated code
+
+        /// <summary> 
+        /// Required method for Designer support - do not modify 
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // NavagationBar
+            // 
+            this.Appearance.Item.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.Appearance.Item.Options.UseFont = true;
+            this.Appearance.ItemActive.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.Appearance.ItemActive.Options.UseFont = true;
+            this.Appearance.ItemHotTracked.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.Appearance.ItemHotTracked.Options.UseFont = true;
+            this.Appearance.ItemPressed.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.Appearance.ItemPressed.Options.UseFont = true;
+            this.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.LinkInterval = 2;
+            this.NavigationPaneGroupClientHeight = 300;
+            this.OptionsNavPane.ExpandedWidth = 140;
+            this.ShowGroupHint = false;
+            this.ShowLinkHint = false;
+            this.Text = " ";
+            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+    }
+}

+ 141 - 0
UAS-MES/CustomControl/AccordionMenu/NavagationBar.cs

@@ -0,0 +1,141 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Linq;
+using System.Windows.Forms;
+using DevExpress.XtraEditors;
+using UAS_MES.DataOperate;
+using UAS_MES.Entity;
+using DevExpress.XtraNavBar;
+using System.Collections;
+using System.Reflection;
+using DevExpress.Utils;
+
+namespace UAS_MES.CustomControl.AccordionMenu
+{
+    public partial class NavagationBar : DevExpress.XtraNavBar.NavBarControl
+    {
+
+        StringBuilder sql = new StringBuilder();
+
+        public static int WinIndex = 0;
+        /// <summary>
+        /// 记录当前功能面板中的按钮
+        /// </summary>
+        private ArrayList ArrFunButton = new ArrayList();
+        /// <summary>
+        /// 记录当前功能面板中的listview
+        /// </summary>
+        private ArrayList ArrFunListView = new ArrayList();
+        /// <summary>
+        /// 已经打开的Form
+        /// </summary>
+        public static Dictionary<string, int> OpenedFormName = new Dictionary<string, int>();
+
+        public NavagationBar()
+        {
+            InitializeComponent();
+            DataHelper dh = SystemInf.dh;
+            if (dh == null)
+                return;
+            if (User.UserAccountType == "admin")
+            {
+                sql.Clear();
+                sql.Append("select distinct sn_id,sn_detno,sn_module,sn_modulecode,sn_classname,sn_displayname,sn_caller ugp_caller,1 ugp_ifdelete,1 ugp_ifread,1 ugp_ifspecial,1 ugp_ifall,");
+                sql.Append("1 ugp_ifwrite from CS$SYSNAVATION left join CS$USERGROUPPOWER on sn_caller=ugp_caller  where sn_using=1  order by sn_modulecode,sn_detno");
+            }
+            else
+            {
+                sql.Clear();
+                sql.Append("select  sn_id,sn_detno,sn_module,sn_displayname,sn_classname,ugp_caller,max(ugp_ifdelete)ugp_ifdelete,max(ugp_ifread)ugp_ifread");
+                sql.Append(",max(ugp_ifspecial)ugp_ifspecial,max(ugp_ifwrite)ugp_ifwrite,max(ugp_ifall)ugp_ifall from CS$USERGROUPPOWER ");
+                sql.Append("left join CS$SYSNAVATION on sn_caller=ugp_caller  where sn_using=1 and ugp_groupcode in ( select eg_groupcode from cs$empgroup ");
+                sql.Append("left join cs$userresource on ur_groupcode = eg_groupcode where eg_emcode = '" + User.UserCode + "') group by sn_id,sn_caller,sn_detno,sn_classname,sn_module,sn_displayname,ugp_caller order by sn_detno");
+            }
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
+            if (dt.Rows.Count == 0 && User.UserAccountType != "admin")
+            {
+                return;
+            }
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                bool ContainGroup = false;
+                string module_name = dt.Rows[i]["sn_module"].ToString();
+                string caller = dt.Rows[i]["sn_displayname"].ToString();
+                NavBarItem nbi = new NavBarItem(caller);
+                nbi.Tag = dt.Rows[i]["sn_classname"].ToString();
+                nbi.LinkClicked += Nbi_LinkClicked;
+                nbi.Tag = dt.Rows[i]["sn_classname"].ToString();
+                nbi.Hint = dt.Rows[i]["ugp_caller"].ToString();
+                nbi.Name = dt.Rows[i]["sn_id"].ToString();
+                for (int j = 0; j < Groups.Count; j++)
+                {
+                    if (Groups[j].Caption == module_name)
+                    {
+                        ContainGroup = true;
+                        Groups[j].ItemLinks.Add(nbi);
+                    }
+                    else
+                    {
+                        ContainGroup = false;
+                    }
+                }
+                if (!ContainGroup)
+                {
+                    NavBarGroup nbg = new NavBarGroup(module_name);
+                    Groups.Add(nbg);
+                    nbg.ItemLinks.Add(nbi);
+                }
+            }
+            //查询出的用户可见的Caller
+            //将查询出的数据添加到队列中
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                //添加权限
+                Dictionary<string, bool> dic = new Dictionary<string, bool>();
+                dic.Add("IFDELETE", dt.Rows[i]["UGP_IFDELETE"].ToString() != "1" ? false : true);
+                dic.Add("IFREAD", dt.Rows[i]["UGP_IFREAD"].ToString() != "1" ? false : true);
+                dic.Add("IFWRITE", dt.Rows[i]["UGP_IFWRITE"].ToString() != "1" ? false : true);
+                dic.Add("IFSPECIAL", dt.Rows[i]["UGP_IFSPECIAL"].ToString() != "1" ? false : true);
+                dic.Add("IFALL", dt.Rows[i]["UGP_IFALL"].ToString() != "1" ? false : true);
+                //之后通过Call来获取页面操作的权限
+                if (SystemInf.Caller.ContainsKey(dt.Rows[i]["ugp_caller"].ToString()))
+                {
+                    SystemInf.Caller.Remove(dt.Rows[i]["ugp_caller"].ToString());
+                }
+                SystemInf.Caller.Add(dt.Rows[i]["ugp_caller"].ToString(), dic);
+            }
+        }
+
+        private void Nbi_LinkClicked(object sender, NavBarLinkEventArgs e)
+        {
+            NavBarItem nbi = (sender as NavBarItem);
+            Form OpenForm = (Form)Assembly.GetExecutingAssembly().CreateInstance("UAS_MES." + nbi.Tag);
+            OpenForm.Dock = DockStyle.Fill;
+            OpenForm.Text = nbi.Caption;
+            //用Tag保存Caller
+            OpenForm.Tag = nbi.Hint;
+            TabControl tc = (TabControl)this.Parent.Controls["MainTabControl"];
+            //如果窗体不存在进行打开,item.ToolTip是Caller
+            if (!OpenedFormName.ContainsKey(nbi.Hint))
+            {
+                TabPage tb = new TabPage { Name = nbi.Name, Tag = nbi.Hint, Text = OpenForm.Text };
+                OpenForm.TopLevel = false;
+                tc.TabPages.Add(tb);
+                //直接选中新打开的界面
+                tc.SelectedTab = tb;
+                tb.Controls.Add(OpenForm);
+                OpenedFormName.Add(nbi.Hint, WinIndex);
+                tc.TabIndex = WinIndex;
+                WinIndex++;
+                OpenForm.Show();
+            }
+            //如果窗体已存在展示该窗体
+            else
+                tc.SelectTab(nbi.Name);
+        }
+    }
+}

+ 123 - 0
UAS-MES/CustomControl/AccordionMenu/NavagationBar.resx

@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </metadata>
+</root>

+ 120 - 0
UAS-MES/CustomControl/PowerControlForm/PowerControlForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 48 - 0
UAS-MES/CustomControl/TextBoxWithIcon/RoundTextBox.Designer.cs

@@ -0,0 +1,48 @@
+namespace UAS_MES.CustomControl.TextBoxWithIcon
+{
+    partial class RoundTextBox
+    {
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.SuspendLayout();
+            // 
+            // RoundTextBox
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.Transparent;
+            this.Name = "RoundTextBox";
+            this.Size = new System.Drawing.Size(150, 26);
+            this.Paint += new System.Windows.Forms.PaintEventHandler(this.RoundTextBox_Paint);
+            this.Resize += new System.EventHandler(this.RoundTextBox_Resize);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+    }
+}

+ 91 - 0
UAS-MES/CustomControl/TextBoxWithIcon/RoundTextBox.cs

@@ -0,0 +1,91 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.Drawing.Drawing2D;
+
+namespace UAS_MES.CustomControl.TextBoxWithIcon
+{
+    public partial class RoundTextBox : UserControl
+    {
+        TextBox box = new TextBox();
+
+        public RoundTextBox()
+        {
+            InitializeComponent();
+            box.BorderStyle = BorderStyle.None;
+            box.Width = this.Width;
+            box.KeyDown += Box_KeyDown;
+            this.Controls.Add(box);
+        }
+
+        private void Box_KeyDown(object sender, KeyEventArgs e)
+        {
+            UserKeyDown?.Invoke(sender, e);
+        }
+
+        public new char PassWordChar
+        {
+            get { return box.PasswordChar; }
+            set
+            {
+                box.PasswordChar = value;
+            }
+        }
+
+        [DefaultValue("")]
+        public new string Text
+        {
+            get { return box.Text; }
+            set
+            {
+                box.Text = value;
+            }
+        }
+
+        public delegate void OnUserKeyDown(object sender, KeyEventArgs e);
+        //定义事件
+        public event OnUserKeyDown UserKeyDown;
+
+        int r = 6;
+        [Category("布局"), Description("倒角半径。")]
+        public int R
+        {
+            get { return r; }
+            set
+            {
+                r = value;
+            }
+        }
+
+        private void RoundTextBox_Paint(object sender, PaintEventArgs e)
+        {
+            int w = R * 2;
+            base.OnPaintBackground(e);
+            e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
+            using (GraphicsPath path = new GraphicsPath())
+            {
+                path.AddArc(0, 0, w, w, 180, 90);
+                path.AddArc(this.Width - w - 1, 0, w, w, -90, 90);
+                path.AddArc(this.Width - w - 1, this.Height - w - 1, w, w, 0, 90);
+                path.AddArc(0, this.Height - w - 1, w, w, 90, 90);
+                path.CloseFigure();
+                e.Graphics.FillPath(Brushes.White, path);
+                using (Pen pen = new Pen(Color.Gray))
+                {
+                    e.Graphics.DrawPath(pen, path);
+                }
+            }
+        }
+
+        private void RoundTextBox_Resize(object sender, EventArgs e)
+        {
+            box.Left = 5;
+            box.Top = 3;
+        }
+    }
+}

+ 120 - 0
UAS-MES/CustomControl/TextBoxWithIcon/RoundTextBox.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 68 - 75
UAS-MES/Main.Designer.cs

@@ -43,14 +43,13 @@
             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
@@ -59,10 +58,9 @@
             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(108, 3);
-            this.ProductName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ProductName.Location = new System.Drawing.Point(81, 4);
             this.ProductName.Name = "ProductName";
-            this.ProductName.Size = new System.Drawing.Size(233, 30);
+            this.ProductName.Size = new System.Drawing.Size(190, 24);
             this.ProductName.TabIndex = 3;
             this.ProductName.Text = "优软科技制造执行系统";
             // 
@@ -71,13 +69,13 @@
             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(209, 41);
-            this.MainTabControl.Margin = new System.Windows.Forms.Padding(4);
+            this.MainTabControl.Location = new System.Drawing.Point(173, 33);
             this.MainTabControl.Name = "MainTabControl";
             this.MainTabControl.SelectedIndex = 0;
-            this.MainTabControl.Size = new System.Drawing.Size(1091, 700);
+            this.MainTabControl.Size = new System.Drawing.Size(802, 560);
             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);
@@ -87,10 +85,9 @@
             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(8, 10);
-            this.inf_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            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(43, 20);
+            this.inf_name_label.Size = new System.Drawing.Size(35, 17);
             this.inf_name_label.TabIndex = 4;
             this.inf_name_label.Text = "姓名:";
             // 
@@ -107,10 +104,9 @@
             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, 741);
-            this.BasicInf.Margin = new System.Windows.Forms.Padding(4);
+            this.BasicInf.Location = new System.Drawing.Point(0, 593);
             this.BasicInf.Name = "BasicInf";
-            this.BasicInf.Size = new System.Drawing.Size(1304, 39);
+            this.BasicInf.Size = new System.Drawing.Size(978, 31);
             this.BasicInf.TabIndex = 6;
             this.BasicInf.SizeChanged += new System.EventHandler(this.BasicInf_SizeChanged);
             // 
@@ -119,10 +115,9 @@
             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(304, 10);
-            this.Inf_currentstep.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            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, 20);
+            this.Inf_currentstep.Size = new System.Drawing.Size(0, 17);
             this.Inf_currentstep.TabIndex = 15;
             // 
             // Inf_currentstep_label
@@ -130,10 +125,9 @@
             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(196, 10);
-            this.Inf_currentstep_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            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(73, 20);
+            this.Inf_currentstep_label.Size = new System.Drawing.Size(59, 17);
             this.Inf_currentstep_label.TabIndex = 14;
             this.Inf_currentstep_label.Text = "岗位工序:";
             // 
@@ -142,10 +136,9 @@
             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(85, 10);
-            this.Inf_name.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            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, 20);
+            this.Inf_name.Size = new System.Drawing.Size(0, 17);
             this.Inf_name.TabIndex = 13;
             // 
             // Inf_linecode
@@ -153,10 +146,9 @@
             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(541, 10);
-            this.Inf_linecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.Inf_linecode.Location = new System.Drawing.Point(406, 8);
             this.Inf_linecode.Name = "Inf_linecode";
-            this.Inf_linecode.Size = new System.Drawing.Size(0, 20);
+            this.Inf_linecode.Size = new System.Drawing.Size(0, 17);
             this.Inf_linecode.TabIndex = 11;
             // 
             // Inf_source
@@ -164,10 +156,9 @@
             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(753, 10);
-            this.Inf_source.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            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, 20);
+            this.Inf_source.Size = new System.Drawing.Size(0, 17);
             this.Inf_source.TabIndex = 10;
             // 
             // Inf_db
@@ -175,10 +166,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(1029, 10);
-            this.Inf_db.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            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, 20);
+            this.Inf_db.Size = new System.Drawing.Size(0, 17);
             this.Inf_db.TabIndex = 9;
             // 
             // Inf_linecode_label
@@ -186,10 +176,9 @@
             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(461, 10);
-            this.Inf_linecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.Inf_linecode_label.Location = new System.Drawing.Point(346, 8);
             this.Inf_linecode_label.Name = "Inf_linecode_label";
-            this.Inf_linecode_label.Size = new System.Drawing.Size(43, 20);
+            this.Inf_linecode_label.Size = new System.Drawing.Size(35, 17);
             this.Inf_linecode_label.TabIndex = 8;
             this.Inf_linecode_label.Text = "线别:";
             // 
@@ -198,10 +187,9 @@
             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(935, 10);
-            this.Inf_db_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            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(58, 20);
+            this.Inf_db_label.Size = new System.Drawing.Size(47, 17);
             this.Inf_db_label.TabIndex = 7;
             this.Inf_db_label.Text = "数据库:";
             // 
@@ -210,34 +198,12 @@
             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(673, 10);
-            this.Inf_source_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.Inf_source_label.Location = new System.Drawing.Point(505, 8);
             this.Inf_source_label.Name = "Inf_source_label";
-            this.Inf_source_label.Size = new System.Drawing.Size(43, 20);
+            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) 
-            | 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";
@@ -247,9 +213,8 @@
             // 
             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(100, 41);
+            this.pictureBox1.Size = new System.Drawing.Size(75, 33);
             this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
             this.pictureBox1.TabIndex = 4;
             this.pictureBox1.TabStop = false;
@@ -259,35 +224,64 @@
             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(5);
+            this.headBar1.Margin = new System.Windows.Forms.Padding(4);
             this.headBar1.Name = "headBar1";
-            this.headBar1.Size = new System.Drawing.Size(1304, 40);
+            this.headBar1.Size = new System.Drawing.Size(978, 32);
             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.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(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1304, 780);
+            this.ClientSize = new System.Drawing.Size(978, 624);
+            this.Controls.Add(this.NavBar);
             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();
 
@@ -304,15 +298,14 @@
         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;
     }
 }
 

+ 9 - 3
UAS-MES/Main.cs

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

BIN
UAS-MES/Resources/5600c803afc2d.png


BIN
UAS-MES/Resources/dialog_close_24px_1173781_easyicon.net.png


BIN
UAS-MES/Tool/DevExpress.BonusSkins.v15.2.dll


BIN
UAS-MES/Tool/DevExpress.Data.v15.2.dll


BIN
UAS-MES/Tool/DevExpress.Printing.v15.2.Core.dll


BIN
UAS-MES/Tool/DevExpress.RichEdit.v15.2.Core.dll


BIN
UAS-MES/Tool/DevExpress.Sparkline.v15.2.Core.dll


BIN
UAS-MES/Tool/DevExpress.Utils.v15.2.dll


BIN
UAS-MES/Tool/DevExpress.XtraEditors.v15.2.dll


BIN
UAS-MES/Tool/DevExpress.XtraNavBar.v15.2.dll


BIN
UAS-MES/Tool/DevExpress.XtraRichEdit.v15.2.dll


BIN
UAS-MES/Tool/DevExpress.XtraScheduler.v15.2.Core.dll