浏览代码

添加了两个顶部Icon

章政 8 年之前
父节点
当前提交
8401ad1bef

+ 35 - 33
UAS-MES/CustomControl/HeadBar/HeadBar.Designer.cs

@@ -30,22 +30,22 @@
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HeadBar));
             this.TitleLabel = new System.Windows.Forms.Label();
-            this.pictureBox1 = new System.Windows.Forms.PictureBox();
+            this.changepwdicon = new System.Windows.Forms.PictureBox();
+            this.Change_psw = new System.Windows.Forms.PictureBox();
+            this.logouticon = new System.Windows.Forms.PictureBox();
             this.LoginOut = new System.Windows.Forms.PictureBox();
             this.MinWindow2 = new System.Windows.Forms.PictureBox();
             this.MinWindow = new System.Windows.Forms.PictureBox();
             this.MinWindow1 = new System.Windows.Forms.PictureBox();
             this.CloseWindow = new System.Windows.Forms.PictureBox();
-            this.Change_psw = new System.Windows.Forms.PictureBox();
-            this.pictureBox2 = new System.Windows.Forms.PictureBox();
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.changepwdicon)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.Change_psw)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.logouticon)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.LoginOut)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.MinWindow2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.MinWindow)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.MinWindow1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.CloseWindow)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.Change_psw)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
             this.SuspendLayout();
             // 
             // TitleLabel
@@ -54,11 +54,29 @@
             this.TitleLabel.ForeColor = System.Drawing.SystemColors.ControlLightLight;
             this.TitleLabel.Name = "TitleLabel";
             // 
-            // pictureBox1
+            // changepwdicon
+            // 
+            resources.ApplyResources(this.changepwdicon, "changepwdicon");
+            this.changepwdicon.Image = global::UAS_MES.Properties.Resources.pwd;
+            this.changepwdicon.Name = "changepwdicon";
+            this.changepwdicon.TabStop = false;
+            // 
+            // Change_psw
+            // 
+            resources.ApplyResources(this.Change_psw, "Change_psw");
+            this.Change_psw.Image = global::UAS_MES.Properties.Resources.change_password;
+            this.Change_psw.Name = "Change_psw";
+            this.Change_psw.TabStop = false;
+            this.Change_psw.Click += new System.EventHandler(this.Change_psw_Click);
+            this.Change_psw.MouseEnter += new System.EventHandler(this.LoginOut_MouseEnter);
+            this.Change_psw.MouseLeave += new System.EventHandler(this.LoginOut_MouseLeave);
+            // 
+            // logouticon
             // 
-            resources.ApplyResources(this.pictureBox1, "pictureBox1");
-            this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.TabStop = false;
+            resources.ApplyResources(this.logouticon, "logouticon");
+            this.logouticon.Image = global::UAS_MES.Properties.Resources.Logout_32px_581264_easyicon_net;
+            this.logouticon.Name = "logouticon";
+            this.logouticon.TabStop = false;
             // 
             // LoginOut
             // 
@@ -99,30 +117,14 @@
             this.CloseWindow.TabStop = false;
             this.CloseWindow.Click += new System.EventHandler(this.CloseWindow_Click);
             // 
-            // Change_psw
-            // 
-            resources.ApplyResources(this.Change_psw, "Change_psw");
-            this.Change_psw.Image = global::UAS_MES.Properties.Resources.change_password;
-            this.Change_psw.Name = "Change_psw";
-            this.Change_psw.TabStop = false;
-            this.Change_psw.Click += new System.EventHandler(this.Change_psw_Click);
-            this.Change_psw.MouseEnter += new System.EventHandler(this.LoginOut_MouseEnter);
-            this.Change_psw.MouseLeave += new System.EventHandler(this.LoginOut_MouseLeave);
-            // 
-            // pictureBox2
-            // 
-            resources.ApplyResources(this.pictureBox2, "pictureBox2");
-            this.pictureBox2.Name = "pictureBox2";
-            this.pictureBox2.TabStop = false;
-            // 
             // HeadBar
             // 
             resources.ApplyResources(this, "$this");
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.SystemColors.ControlDarkDark;
-            this.Controls.Add(this.pictureBox2);
+            this.Controls.Add(this.changepwdicon);
             this.Controls.Add(this.Change_psw);
-            this.Controls.Add(this.pictureBox1);
+            this.Controls.Add(this.logouticon);
             this.Controls.Add(this.LoginOut);
             this.Controls.Add(this.MinWindow2);
             this.Controls.Add(this.TitleLabel);
@@ -131,14 +133,14 @@
             this.Controls.Add(this.CloseWindow);
             this.Name = "HeadBar";
             this.Load += new System.EventHandler(this.HeadBar_Load);
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.changepwdicon)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.Change_psw)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.logouticon)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.LoginOut)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.MinWindow2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.MinWindow)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.MinWindow1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.CloseWindow)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.Change_psw)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -152,8 +154,8 @@
         private System.Windows.Forms.Label TitleLabel;
         private System.Windows.Forms.PictureBox MinWindow2;
         private System.Windows.Forms.PictureBox LoginOut;
-        private System.Windows.Forms.PictureBox pictureBox1;
+        private System.Windows.Forms.PictureBox logouticon;
         private System.Windows.Forms.PictureBox Change_psw;
-        private System.Windows.Forms.PictureBox pictureBox2;
+        private System.Windows.Forms.PictureBox changepwdicon;
     }
 }

+ 19 - 17
UAS-MES/CustomControl/HeadBar/HeadBar.cs

@@ -85,6 +85,8 @@ namespace UAS_MES.CustomControl
             TitleLabel.Text = Title1;
             if (!NeedConfirm.Contains(this.FindForm().Name))
             {
+                changepwdicon.Visible = false;
+                logouticon.Visible = false;
                 LoginOut.Visible = false;
                 Change_psw.Visible = false;
             }
@@ -98,24 +100,24 @@ namespace UAS_MES.CustomControl
                 string logout_confirm = MessageBox.Show(this.ParentForm, "退出登录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
                 if (logout_confirm == "Yes")
                 {
-                        //注销的时候切换回默认数据库
-                        SystemInf.ConnectionString = Properties.Settings.Default.Properties["MES"].DefaultValue.ToString();
-                        DataHelper.DBConnectionString = SystemInf.ConnectionString;
-                        //清除上个用户的权限信息
-                        SystemInf.Caller.Clear();
-                        //清除已经打开过的窗口的信息
-                        AccordionMenu.AccordionMenu.OpenedFormName.Clear();
-                        //注销的时候将除了登陆窗口之外的全部窗口关闭
-                        for (int i = 0; i < Application.OpenForms.Count; i++)
-                        {
-                            if (Application.OpenForms[i].Name != "Login")
-                                Application.OpenForms[i].Close();
-                        }
-                        this.FindForm().Hide();
-                        Login login = new Login();
-                        login.ShowDialog();
-                        this.FindForm().Close();
+                    //注销的时候切换回默认数据库
+                    SystemInf.ConnectionString = Properties.Settings.Default.Properties["MES"].DefaultValue.ToString();
+                    DataHelper.DBConnectionString = SystemInf.ConnectionString;
+                    //清除上个用户的权限信息
+                    SystemInf.Caller.Clear();
+                    //清除已经打开过的窗口的信息
+                    AccordionMenu.AccordionMenu.OpenedFormName.Clear();
+                    //注销的时候将除了登陆窗口之外的全部窗口关闭
+                    for (int i = 0; i < Application.OpenForms.Count; i++)
+                    {
+                        if (Application.OpenForms[i].Name != "Login")
+                            Application.OpenForms[i].Close();
                     }
+                    this.FindForm().Hide();
+                    Login login = new Login();
+                    login.ShowDialog();
+                    this.FindForm().Close();
+                }
             }
         }
 

+ 74 - 77
UAS-MES/CustomControl/HeadBar/HeadBar.resx

@@ -153,34 +153,94 @@
   <data name="&gt;&gt;TitleLabel.ZOrder" xml:space="preserve">
     <value>5</value>
   </data>
-  <data name="pictureBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+  <data name="changepwdicon.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>Right</value>
   </data>
-  <data name="pictureBox1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+  <data name="changepwdicon.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
     <value>NoControl</value>
   </data>
-  <data name="pictureBox1.Location" type="System.Drawing.Point, System.Drawing">
-    <value>445, 0</value>
+  <data name="changepwdicon.Location" type="System.Drawing.Point, System.Drawing">
+    <value>305, 0</value>
   </data>
-  <data name="pictureBox1.Size" type="System.Drawing.Size, System.Drawing">
-    <value>15, 32</value>
+  <data name="changepwdicon.Size" type="System.Drawing.Size, System.Drawing">
+    <value>26, 32</value>
   </data>
-  <data name="pictureBox1.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
-    <value>StretchImage</value>
+  <data name="changepwdicon.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
+    <value>Zoom</value>
+  </data>
+  <data name="changepwdicon.TabIndex" type="System.Int32, mscorlib">
+    <value>12</value>
+  </data>
+  <data name="&gt;&gt;changepwdicon.Name" xml:space="preserve">
+    <value>changepwdicon</value>
+  </data>
+  <data name="&gt;&gt;changepwdicon.Type" xml:space="preserve">
+    <value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;changepwdicon.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;changepwdicon.ZOrder" xml:space="preserve">
+    <value>0</value>
+  </data>
+  <data name="Change_psw.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Right</value>
+  </data>
+  <data name="Change_psw.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="Change_psw.Location" type="System.Drawing.Point, System.Drawing">
+    <value>331, 0</value>
+  </data>
+  <data name="Change_psw.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>2, 2, 2, 2</value>
+  </data>
+  <data name="Change_psw.Size" type="System.Drawing.Size, System.Drawing">
+    <value>96, 32</value>
   </data>
-  <data name="pictureBox1.TabIndex" type="System.Int32, mscorlib">
+  <data name="Change_psw.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
+    <value>Zoom</value>
+  </data>
+  <data name="Change_psw.TabIndex" type="System.Int32, mscorlib">
+    <value>11</value>
+  </data>
+  <data name="&gt;&gt;Change_psw.Name" xml:space="preserve">
+    <value>Change_psw</value>
+  </data>
+  <data name="&gt;&gt;Change_psw.Type" xml:space="preserve">
+    <value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;Change_psw.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;Change_psw.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="logouticon.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Right</value>
+  </data>
+  <data name="logouticon.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="logouticon.Location" type="System.Drawing.Point, System.Drawing">
+    <value>427, 0</value>
+  </data>
+  <data name="logouticon.Size" type="System.Drawing.Size, System.Drawing">
+    <value>33, 32</value>
+  </data>
+  <data name="logouticon.TabIndex" type="System.Int32, mscorlib">
     <value>10</value>
   </data>
-  <data name="&gt;&gt;pictureBox1.Name" xml:space="preserve">
-    <value>pictureBox1</value>
+  <data name="&gt;&gt;logouticon.Name" xml:space="preserve">
+    <value>logouticon</value>
   </data>
-  <data name="&gt;&gt;pictureBox1.Type" xml:space="preserve">
+  <data name="&gt;&gt;logouticon.Type" xml:space="preserve">
     <value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="&gt;&gt;pictureBox1.Parent" xml:space="preserve">
+  <data name="&gt;&gt;logouticon.Parent" xml:space="preserve">
     <value>$this</value>
   </data>
-  <data name="&gt;&gt;pictureBox1.ZOrder" xml:space="preserve">
+  <data name="&gt;&gt;logouticon.ZOrder" xml:space="preserve">
     <value>2</value>
   </data>
   <data name="LoginOut.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
@@ -336,69 +396,6 @@
   <data name="&gt;&gt;CloseWindow.ZOrder" xml:space="preserve">
     <value>8</value>
   </data>
-  <data name="Change_psw.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Right</value>
-  </data>
-  <data name="Change_psw.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
-    <value>NoControl</value>
-  </data>
-  <data name="Change_psw.Location" type="System.Drawing.Point, System.Drawing">
-    <value>354, 0</value>
-  </data>
-  <data name="Change_psw.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
-    <value>2, 2, 2, 2</value>
-  </data>
-  <data name="Change_psw.Size" type="System.Drawing.Size, System.Drawing">
-    <value>91, 32</value>
-  </data>
-  <data name="Change_psw.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
-    <value>CenterImage</value>
-  </data>
-  <data name="Change_psw.TabIndex" type="System.Int32, mscorlib">
-    <value>11</value>
-  </data>
-  <data name="&gt;&gt;Change_psw.Name" xml:space="preserve">
-    <value>Change_psw</value>
-  </data>
-  <data name="&gt;&gt;Change_psw.Type" xml:space="preserve">
-    <value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;Change_psw.Parent" xml:space="preserve">
-    <value>$this</value>
-  </data>
-  <data name="&gt;&gt;Change_psw.ZOrder" xml:space="preserve">
-    <value>1</value>
-  </data>
-  <data name="pictureBox2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
-    <value>Right</value>
-  </data>
-  <data name="pictureBox2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
-    <value>NoControl</value>
-  </data>
-  <data name="pictureBox2.Location" type="System.Drawing.Point, System.Drawing">
-    <value>339, 0</value>
-  </data>
-  <data name="pictureBox2.Size" type="System.Drawing.Size, System.Drawing">
-    <value>15, 32</value>
-  </data>
-  <data name="pictureBox2.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
-    <value>StretchImage</value>
-  </data>
-  <data name="pictureBox2.TabIndex" type="System.Int32, mscorlib">
-    <value>12</value>
-  </data>
-  <data name="&gt;&gt;pictureBox2.Name" xml:space="preserve">
-    <value>pictureBox2</value>
-  </data>
-  <data name="&gt;&gt;pictureBox2.Type" xml:space="preserve">
-    <value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;pictureBox2.Parent" xml:space="preserve">
-    <value>$this</value>
-  </data>
-  <data name="&gt;&gt;pictureBox2.ZOrder" xml:space="preserve">
-    <value>0</value>
-  </data>
   <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 20 - 0
UAS-MES/Properties/Resources.Designer.cs

@@ -500,6 +500,16 @@ namespace UAS_MES.Properties {
             }
         }
         
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap Logout_32px_581264_easyicon_net {
+            get {
+                object obj = ResourceManager.GetObject("Logout_32px_581264_easyicon_net", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         /// <summary>
         ///   查找 System.Byte[] 类型的本地化资源。
         /// </summary>
@@ -610,6 +620,16 @@ namespace UAS_MES.Properties {
             }
         }
         
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap pwd {
+            get {
+                object obj = ResourceManager.GetObject("pwd", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>

+ 6 - 0
UAS-MES/Properties/Resources.resx

@@ -328,4 +328,10 @@
   <data name="change_password" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\change_password.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="Logout_32px_581264_easyicon_net" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Logout_32px_581264_easyicon.net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="pwd" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\pwd.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
 </root>

二进制
UAS-MES/Resources/Logout_32px_581264_easyicon.net.png


二进制
UAS-MES/Resources/pwd.png