Browse Source

Merge branch 'master' of ssh://10.10.100.21/source/mes-client

Hcsy 8 years ago
parent
commit
7f762bff07

+ 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>

+ 12 - 0
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -321,7 +321,19 @@ namespace UAS_MES.Make
 
         private void Make_Repair_SizeChanged(object sender, EventArgs e)
         {
+            mbc_component.BringToFront();
+            so_name.BringToFront();
+            mbl_loc.BringToFront();
+            bd_soncode.BringToFront();
+            mbp_partdgv.BringToFront();
+            mbp_part_label.BringToFront();
             asc.controlAutoSize(this);
+            mbc_component.SendToBack();
+            so_name.SendToBack();
+            mbl_loc.SendToBack();
+            bd_soncode.SendToBack();
+            mbp_partdgv.SendToBack();
+            mbp_part_label.SendToBack();
         }
 
         private void BadCodeTree_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)

+ 134 - 143
UAS-MES/Login.Designer.cs

@@ -29,125 +29,37 @@
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Login));
-            this.UserName = new System.Windows.Forms.TextBox();
-            this.PassWord = new System.Windows.Forms.TextBox();
-            this.ForGetPwd = new System.Windows.Forms.LinkLabel();
-            this.label1 = new System.Windows.Forms.Label();
-            this.label2 = new System.Windows.Forms.Label();
-            this.panel1 = new System.Windows.Forms.Panel();
             this.label4 = new System.Windows.Forms.Label();
-            this.Source = new System.Windows.Forms.TextBox();
-            this.DB = new UAS_MES.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
             this.label3 = new System.Windows.Forms.Label();
             this.LoginButton = new System.Windows.Forms.Button();
-            this.panel2 = new System.Windows.Forms.Panel();
-            this.pictureBox1 = new System.Windows.Forms.PictureBox();
-            this.panel1.SuspendLayout();
-            this.panel2.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.ForGetPwd = new System.Windows.Forms.LinkLabel();
+            this.ChineseTitle = new System.Windows.Forms.Label();
+            this.Source = new UAS_MES.CustomControl.TextBoxWithIcon.RoundTextBox();
+            this.PassWord = new UAS_MES.CustomControl.TextBoxWithIcon.RoundTextBox();
+            this.UserName = new UAS_MES.CustomControl.TextBoxWithIcon.RoundTextBox();
+            this.DB = new UAS_MES.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
             this.SuspendLayout();
             // 
-            // UserName
-            // 
-            this.UserName.Location = new System.Drawing.Point(94, 62);
-            this.UserName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
-            this.UserName.Name = "UserName";
-            this.UserName.Size = new System.Drawing.Size(200, 27);
-            this.UserName.TabIndex = 0;
-            this.UserName.KeyDown += new System.Windows.Forms.KeyEventHandler(this.UserName_KeyDown);
-            // 
-            // PassWord
-            // 
-            this.PassWord.Location = new System.Drawing.Point(94, 107);
-            this.PassWord.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
-            this.PassWord.Name = "PassWord";
-            this.PassWord.PasswordChar = '*';
-            this.PassWord.Size = new System.Drawing.Size(200, 27);
-            this.PassWord.TabIndex = 1;
-            this.PassWord.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PassWord_KeyDown);
-            // 
-            // ForGetPwd
-            // 
-            this.ForGetPwd.AutoSize = true;
-            this.ForGetPwd.Location = new System.Drawing.Point(295, 66);
-            this.ForGetPwd.Name = "ForGetPwd";
-            this.ForGetPwd.Size = new System.Drawing.Size(84, 20);
-            this.ForGetPwd.TabIndex = 5;
-            this.ForGetPwd.TabStop = true;
-            this.ForGetPwd.Text = "忘记密码?";
-            this.ForGetPwd.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.ForGetPwd_LinkClicked);
-            // 
-            // label1
-            // 
-            this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(42, 66);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(54, 20);
-            this.label1.TabIndex = 4;
-            this.label1.Text = "用户名";
-            // 
-            // label2
-            // 
-            this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(42, 111);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(51, 20);
-            this.label2.TabIndex = 5;
-            this.label2.Text = "密   码";
-            // 
-            // panel1
-            // 
-            this.panel1.BackColor = System.Drawing.SystemColors.ButtonHighlight;
-            this.panel1.Controls.Add(this.label4);
-            this.panel1.Controls.Add(this.Source);
-            this.panel1.Controls.Add(this.DB);
-            this.panel1.Controls.Add(this.label3);
-            this.panel1.Controls.Add(this.LoginButton);
-            this.panel1.Controls.Add(this.panel2);
-            this.panel1.Controls.Add(this.UserName);
-            this.panel1.Controls.Add(this.ForGetPwd);
-            this.panel1.Controls.Add(this.PassWord);
-            this.panel1.Controls.Add(this.label2);
-            this.panel1.Controls.Add(this.label1);
-            this.panel1.Location = new System.Drawing.Point(164, 86);
-            this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(381, 297);
-            this.panel1.TabIndex = 9;
-            // 
             // label4
             // 
             this.label4.AutoSize = true;
-            this.label4.Location = new System.Drawing.Point(42, 160);
+            this.label4.BackColor = System.Drawing.Color.Transparent;
+            this.label4.Location = new System.Drawing.Point(242, 245);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(51, 20);
-            this.label4.TabIndex = 14;
+            this.label4.Size = new System.Drawing.Size(44, 17);
+            this.label4.TabIndex = 24;
             this.label4.Text = "资   源";
             // 
-            // Source
-            // 
-            this.Source.Location = new System.Drawing.Point(94, 157);
-            this.Source.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
-            this.Source.Name = "Source";
-            this.Source.Size = new System.Drawing.Size(200, 27);
-            this.Source.TabIndex = 2;
-            this.Source.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Source_KeyDown);
-            // 
-            // DB
-            // 
-            this.DB.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.DB.FormattingEnabled = true;
-            this.DB.Location = new System.Drawing.Point(94, 204);
-            this.DB.Name = "DB";
-            this.DB.Size = new System.Drawing.Size(200, 28);
-            this.DB.TabIndex = 3;
-            // 
             // label3
             // 
             this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(42, 209);
+            this.label3.BackColor = System.Drawing.Color.Transparent;
+            this.label3.Location = new System.Drawing.Point(242, 294);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(54, 20);
-            this.label3.TabIndex = 11;
+            this.label3.Size = new System.Drawing.Size(44, 17);
+            this.label3.TabIndex = 23;
             this.label3.Text = "数据库";
             // 
             // LoginButton
@@ -157,74 +69,153 @@
             this.LoginButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
             this.LoginButton.Enabled = false;
             this.LoginButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.LoginButton.Location = new System.Drawing.Point(153, 250);
+            this.LoginButton.Location = new System.Drawing.Point(355, 341);
             this.LoginButton.Name = "LoginButton";
             this.LoginButton.Size = new System.Drawing.Size(75, 30);
-            this.LoginButton.TabIndex = 4;
+            this.LoginButton.TabIndex = 19;
             this.LoginButton.Text = "登陆";
             this.LoginButton.UseVisualStyleBackColor = false;
             this.LoginButton.Click += new System.EventHandler(this.LoginButton_Click);
             // 
-            // panel2
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.BackColor = System.Drawing.Color.Transparent;
+            this.label2.Location = new System.Drawing.Point(242, 203);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(44, 17);
+            this.label2.TabIndex = 22;
+            this.label2.Text = "密   码";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.BackColor = System.Drawing.Color.Transparent;
+            this.label1.Location = new System.Drawing.Point(242, 155);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(44, 17);
+            this.label1.TabIndex = 20;
+            this.label1.Text = "用户名";
+            // 
+            // ForGetPwd
+            // 
+            this.ForGetPwd.AutoSize = true;
+            this.ForGetPwd.BackColor = System.Drawing.Color.Transparent;
+            this.ForGetPwd.Location = new System.Drawing.Point(519, 153);
+            this.ForGetPwd.Name = "ForGetPwd";
+            this.ForGetPwd.Size = new System.Drawing.Size(68, 17);
+            this.ForGetPwd.TabIndex = 21;
+            this.ForGetPwd.TabStop = true;
+            this.ForGetPwd.Text = "忘记密码?";
+            this.ForGetPwd.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.ForGetPwd_LinkClicked);
+            // 
+            // ChineseTitle
+            // 
+            this.ChineseTitle.AutoSize = true;
+            this.ChineseTitle.BackColor = System.Drawing.Color.Transparent;
+            this.ChineseTitle.Font = new System.Drawing.Font("微软雅黑", 18F);
+            this.ChineseTitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(6)))), ((int)(((byte)(60)))), ((int)(((byte)(130)))));
+            this.ChineseTitle.Location = new System.Drawing.Point(297, 98);
+            this.ChineseTitle.Name = "ChineseTitle";
+            this.ChineseTitle.Size = new System.Drawing.Size(207, 31);
+            this.ChineseTitle.TabIndex = 28;
+            this.ChineseTitle.Text = "UAS制造执行系统";
             // 
-            this.panel2.BackColor = System.Drawing.SystemColors.ActiveCaption;
-            this.panel2.Controls.Add(this.pictureBox1);
-            this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
-            this.panel2.Location = new System.Drawing.Point(0, 0);
-            this.panel2.Name = "panel2";
-            this.panel2.Size = new System.Drawing.Size(381, 33);
-            this.panel2.TabIndex = 6;
+            // Source
             // 
-            // pictureBox1
+            this.Source.BackColor = System.Drawing.Color.Transparent;
+            this.Source.Location = new System.Drawing.Point(303, 240);
+            this.Source.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
+            this.Source.Name = "Source";
+            this.Source.PassWordChar = '\0';
+            this.Source.R = 7;
+            this.Source.Size = new System.Drawing.Size(200, 26);
+            this.Source.TabIndex = 27;
+            this.Source.UserKeyDown += new UAS_MES.CustomControl.TextBoxWithIcon.RoundTextBox.OnUserKeyDown(this.Source_KeyDown);
             // 
-            this.pictureBox1.Image = global::UAS_MES.Properties.Resources.uas_blue;
-            this.pictureBox1.Location = new System.Drawing.Point(1, 0);
-            this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(83, 33);
-            this.pictureBox1.TabIndex = 0;
-            this.pictureBox1.TabStop = false;
+            // PassWord
+            // 
+            this.PassWord.BackColor = System.Drawing.Color.Transparent;
+            this.PassWord.Location = new System.Drawing.Point(303, 198);
+            this.PassWord.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
+            this.PassWord.Name = "PassWord";
+            this.PassWord.PassWordChar = '*';
+            this.PassWord.R = 7;
+            this.PassWord.Size = new System.Drawing.Size(200, 26);
+            this.PassWord.TabIndex = 26;
+            this.PassWord.UserKeyDown += new UAS_MES.CustomControl.TextBoxWithIcon.RoundTextBox.OnUserKeyDown(this.PassWord_KeyDown);
+            // 
+            // UserName
+            // 
+            this.UserName.BackColor = System.Drawing.Color.Transparent;
+            this.UserName.Location = new System.Drawing.Point(303, 150);
+            this.UserName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.UserName.Name = "UserName";
+            this.UserName.PassWordChar = '\0';
+            this.UserName.R = 7;
+            this.UserName.Size = new System.Drawing.Size(200, 26);
+            this.UserName.TabIndex = 25;
+            this.UserName.UserKeyDown += new UAS_MES.CustomControl.TextBoxWithIcon.RoundTextBox.OnUserKeyDown(this.UserName_KeyDown);
+            // 
+            // DB
+            // 
+            this.DB.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.DB.FormattingEnabled = true;
+            this.DB.Location = new System.Drawing.Point(303, 289);
+            this.DB.Name = "DB";
+            this.DB.Size = new System.Drawing.Size(200, 25);
+            this.DB.TabIndex = 18;
             // 
             // Login
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.SystemColors.Control;
-            this.BackgroundImage = global::UAS_MES.Properties.Resources.LoginBG;
+            this.BackgroundImage = global::UAS_MES.Properties.Resources._5600c803afc2d;
             this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
-            this.ClientSize = new System.Drawing.Size(705, 461);
-            this.Controls.Add(this.panel1);
-            this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
+            this.ClientSize = new System.Drawing.Size(781, 445);
+            this.Controls.Add(this.ChineseTitle);
+            this.Controls.Add(this.Source);
+            this.Controls.Add(this.PassWord);
+            this.Controls.Add(this.UserName);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.DB);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.LoginButton);
+            this.Controls.Add(this.ForGetPwd);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label1);
+            this.DoubleBuffered = true;
+            this.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
             this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
             this.Name = "Login";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.Tag = "ShowDialogWindow";
-            this.Text = "UAS-MES";
+            this.Text = "UAS制造执行系统";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Login_FormClosing);
             this.Load += new System.EventHandler(this.Login_Load);
-            this.panel1.ResumeLayout(false);
-            this.panel1.PerformLayout();
-            this.panel2.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+            this.Paint += new System.Windows.Forms.PaintEventHandler(this.Login_Paint);
+            this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Login_MouseDown);
+            this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Login_MouseMove);
             this.ResumeLayout(false);
+            this.PerformLayout();
 
         }
 
         #endregion
 
-        private System.Windows.Forms.TextBox UserName;
-        private System.Windows.Forms.TextBox PassWord;
-        private System.Windows.Forms.LinkLabel ForGetPwd;
-        private System.Windows.Forms.Label label1;
-        private System.Windows.Forms.Label label2;
-        private System.Windows.Forms.Panel panel1;
-        private System.Windows.Forms.Panel panel2;
-        private System.Windows.Forms.PictureBox pictureBox1;
-        private System.Windows.Forms.Button LoginButton;
+        private CustomControl.TextBoxWithIcon.RoundTextBox Source;
+        private CustomControl.TextBoxWithIcon.RoundTextBox PassWord;
+        private CustomControl.TextBoxWithIcon.RoundTextBox UserName;
+        private System.Windows.Forms.Label label4;
         private CustomControl.ComBoxWithFocus.ComBoxWithFocus DB;
         private System.Windows.Forms.Label label3;
-        private System.Windows.Forms.Label label4;
-        private System.Windows.Forms.TextBox Source;
+        private System.Windows.Forms.Button LoginButton;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.LinkLabel ForGetPwd;
+        private System.Windows.Forms.Label ChineseTitle;
     }
 }

+ 63 - 0
UAS-MES/Login.cs

@@ -8,6 +8,9 @@ using System.Security.Cryptography.X509Certificates;
 using System.Net;
 using System.Net.Sockets;
 using System.Threading;
+using System.Drawing.Drawing2D;
+using System.Drawing;
+using UAS_MES.Properties;
 
 namespace UAS_MES
 {
@@ -21,6 +24,8 @@ namespace UAS_MES
         //注销的时候会重新生成这边变量,所以需要用static
         static LogicHandler lgc;
 
+        int Close_Size = 24;
+
         Thread LoadMasterInf;
 
         public Login()
@@ -225,5 +230,63 @@ namespace UAS_MES
             if (e.KeyCode == Keys.Enter)
                 PassWord.Focus();
         }
+
+        private void Login_Paint(object sender, PaintEventArgs e)
+        {
+            //简单的画一个浅蓝色的背景
+            Graphics gra = e.Graphics;
+            //绘制背景框
+            int startheight = 65;
+            int startwidth = 100;
+            int boxheight = 330;
+            Rectangle Rect = new Rectangle(startwidth, startheight, Width - startwidth * 2 - 5, boxheight);
+            LinearGradientBrush Bru = new LinearGradientBrush(Rect, Color.FromArgb(125, Color.WhiteSmoke), Color.FromArgb(229, 237, 248), LinearGradientMode.Vertical);
+            gra.FillRectangle(Bru, Rect);
+            Pen ArcPen = new Pen(Color.FromArgb(77, 109, 148), 3);
+            int R = 14;
+            GraphicsPath path = new GraphicsPath();
+            gra.SmoothingMode = SmoothingMode.HighQuality;
+            path.AddArc(startwidth, startheight - 3, R, R, 180, 90);
+            path.AddArc(this.Width - startwidth - 19, startheight - 3, R, R, -90, 90);
+            path.AddArc(this.Width - startwidth - 19, startheight + boxheight - R, R, R, 0, 90);
+            path.AddArc(startwidth, startheight + boxheight - R, R, R, 90, 90);
+            path.CloseFigure();
+            gra.DrawPath(ArcPen, path);
+
+            Bitmap image = Resources.dialog_close_24px_1173781_easyicon_net;
+            Rectangle rect = this.ClientRectangle;
+            //画关闭符号
+            using (Pen objpen = new Pen(Color.Black))
+            {
+                //使用图片
+                Bitmap bt = new Bitmap(image);
+                Point p5 = new Point(Width-Close_Size-4, 4);
+                e.Graphics.DrawImage(bt, p5);
+            }
+        }
+
+        private Point offset;
+        private void Login_MouseDown(object sender, MouseEventArgs e)
+        {
+            if (MouseButtons.Left != e.Button) return;
+            Point cur = this.PointToScreen(e.Location);
+            offset = new Point(cur.X - this.Left, cur.Y - this.Top);
+
+            Rectangle rect = this.ClientRectangle;
+            rect.Offset(Width - Close_Size - 4, 4);
+            rect.Width = Close_Size;
+            rect.Height = Close_Size;
+            int x = e.X, y = e.Y;
+            bool isClose = x > rect.X && x < rect.Right && y > rect.Y && y < rect.Bottom;
+            if (isClose)
+                Close();
+        }
+
+        private void Login_MouseMove(object sender, MouseEventArgs e)
+        {
+            if (MouseButtons.Left != e.Button) return;
+            Point cur = MousePosition;
+            this.Location = new Point(cur.X - offset.X, cur.Y - offset.Y);
+        }
     }
 }

+ 69 - 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(170, 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(805, 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,65 @@
             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.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(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 +299,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