Browse Source

注销按钮更改

Hcsy 8 years ago
parent
commit
99e3aee484

+ 42 - 18
UAS-MES/CustomControl/HeadBar/HeadBar.Designer.cs

@@ -29,15 +29,47 @@
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HeadBar));
+            this.TitleLabel = new System.Windows.Forms.Label();
+            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.MinWindow = new System.Windows.Forms.PictureBox();
-            this.TitleLabel = new System.Windows.Forms.Label();
+            ((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.MinWindow)).BeginInit();
             this.SuspendLayout();
             // 
+            // TitleLabel
+            // 
+            resources.ApplyResources(this.TitleLabel, "TitleLabel");
+            this.TitleLabel.ForeColor = System.Drawing.SystemColors.ControlLightLight;
+            this.TitleLabel.Name = "TitleLabel";
+            // 
+            // LoginOut
+            // 
+            resources.ApplyResources(this.LoginOut, "LoginOut");
+            this.LoginOut.Image = global::UAS_MES.Properties.Resources._0802192135;
+            this.LoginOut.Name = "LoginOut";
+            this.LoginOut.TabStop = false;
+            this.LoginOut.Click += new System.EventHandler(this.pictureBox1_Click);
+            // 
+            // MinWindow2
+            // 
+            resources.ApplyResources(this.MinWindow2, "MinWindow2");
+            this.MinWindow2.Name = "MinWindow2";
+            this.MinWindow2.TabStop = false;
+            // 
+            // MinWindow
+            // 
+            resources.ApplyResources(this.MinWindow, "MinWindow");
+            this.MinWindow.Image = global::UAS_MES.Properties.Resources.Close_up_32px_1181430_easyicon_net;
+            this.MinWindow.Name = "MinWindow";
+            this.MinWindow.TabStop = false;
+            this.MinWindow.Click += new System.EventHandler(this.MinWindow_Click);
+            // 
             // MinWindow1
             // 
             resources.ApplyResources(this.MinWindow1, "MinWindow1");
@@ -53,34 +85,24 @@
             this.CloseWindow.TabStop = false;
             this.CloseWindow.Click += new System.EventHandler(this.CloseWindow_Click);
             // 
-            // MinWindow
-            // 
-            resources.ApplyResources(this.MinWindow, "MinWindow");
-            this.MinWindow.Image = global::UAS_MES.Properties.Resources.Close_up_32px_1181430_easyicon_net;
-            this.MinWindow.Name = "MinWindow";
-            this.MinWindow.TabStop = false;
-            this.MinWindow.Click += new System.EventHandler(this.MinWindow_Click);
-            // 
-            // TitleLabel
-            // 
-            resources.ApplyResources(this.TitleLabel, "TitleLabel");
-            this.TitleLabel.ForeColor = System.Drawing.SystemColors.ControlLightLight;
-            this.TitleLabel.Name = "TitleLabel";
-            // 
             // HeadBar
             // 
             resources.ApplyResources(this, "$this");
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.SystemColors.ControlDarkDark;
+            this.Controls.Add(this.LoginOut);
+            this.Controls.Add(this.MinWindow2);
             this.Controls.Add(this.TitleLabel);
             this.Controls.Add(this.MinWindow);
             this.Controls.Add(this.MinWindow1);
             this.Controls.Add(this.CloseWindow);
             this.Name = "HeadBar";
             this.Load += new System.EventHandler(this.HeadBar_Load);
+            ((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.MinWindow)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -92,5 +114,7 @@
         private System.Windows.Forms.PictureBox CloseWindow;
         private System.Windows.Forms.PictureBox MinWindow;
         private System.Windows.Forms.Label TitleLabel;
+        private System.Windows.Forms.PictureBox MinWindow2;
+        private System.Windows.Forms.PictureBox LoginOut;
     }
 }

+ 36 - 0
UAS-MES/CustomControl/HeadBar/HeadBar.cs

@@ -2,7 +2,10 @@
 using System.Collections.Generic;
 using System.Drawing;
 using System.Runtime.InteropServices;
+using UAS_MES.CustomControl.AccordionMenu;
 using System.Windows.Forms;
+using UAS_MES.DataOperate;
+using UAS_MES.Entity;
 using UAS_MES.PublicMethod;
 
 namespace UAS_MES.CustomControl
@@ -78,6 +81,39 @@ namespace UAS_MES.CustomControl
         private void HeadBar_Load(object sender, EventArgs e)
         {
             TitleLabel.Text = Title1;
+            if (!NeedConfirm.Contains(this.FindForm().Name))
+            {
+                LoginOut.Visible = false;
+            }
+        }
+
+        private void pictureBox1_Click(object sender, EventArgs e)
+        {
+            //判断是否需要关闭前的提示
+            if (NeedConfirm.Contains(this.FindForm().Name))
+            {
+                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();
+            }
+        }
         }
     }
 }

+ 121 - 55
UAS-MES/CustomControl/HeadBar/HeadBar.resx

@@ -117,74 +117,101 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="TitleLabel.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="TitleLabel.Font" type="System.Drawing.Font, System.Drawing">
+    <value>微软雅黑, 12pt</value>
+  </data>
   <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-  <data name="MinWindow1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+  <data name="TitleLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="TitleLabel.Location" type="System.Drawing.Point, System.Drawing">
+    <value>16, 7</value>
+  </data>
+  <data name="TitleLabel.Size" type="System.Drawing.Size, System.Drawing">
+    <value>0, 27</value>
+  </data>
+  <data name="TitleLabel.TabIndex" type="System.Int32, mscorlib">
+    <value>7</value>
+  </data>
+  <data name="&gt;&gt;TitleLabel.Name" xml:space="preserve">
+    <value>TitleLabel</value>
+  </data>
+  <data name="&gt;&gt;TitleLabel.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;TitleLabel.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;TitleLabel.ZOrder" xml:space="preserve">
+    <value>2</value>
+  </data>
+  <data name="LoginOut.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>Right</value>
   </data>
-  <data name="MinWindow1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+  <data name="LoginOut.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
     <value>NoControl</value>
   </data>
-  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-  <data name="MinWindow1.Location" type="System.Drawing.Point, System.Drawing">
-    <value>733, 0</value>
+  <data name="LoginOut.Location" type="System.Drawing.Point, System.Drawing">
+    <value>613, 0</value>
   </data>
-  <data name="MinWindow1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
-    <value>4, 4, 4, 4</value>
+  <data name="LoginOut.Size" type="System.Drawing.Size, System.Drawing">
+    <value>60, 40</value>
   </data>
-  <data name="MinWindow1.Size" type="System.Drawing.Size, System.Drawing">
-    <value>20, 40</value>
+  <data name="LoginOut.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
+    <value>CenterImage</value>
   </data>
-  <data name="MinWindow1.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
-    <value>StretchImage</value>
-  </data>
-  <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-  <data name="MinWindow1.TabIndex" type="System.Int32, mscorlib">
-    <value>5</value>
+  <data name="LoginOut.TabIndex" type="System.Int32, mscorlib">
+    <value>9</value>
   </data>
-  <data name="&gt;&gt;MinWindow1.Name" xml:space="preserve">
-    <value>MinWindow1</value>
+  <data name="&gt;&gt;LoginOut.Name" xml:space="preserve">
+    <value>LoginOut</value>
   </data>
-  <data name="&gt;&gt;MinWindow1.Type" xml:space="preserve">
+  <data name="&gt;&gt;LoginOut.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;MinWindow1.Parent" xml:space="preserve">
+  <data name="&gt;&gt;LoginOut.Parent" xml:space="preserve">
     <value>$this</value>
   </data>
-  <data name="&gt;&gt;MinWindow1.ZOrder" xml:space="preserve">
-    <value>2</value>
+  <data name="&gt;&gt;LoginOut.ZOrder" xml:space="preserve">
+    <value>0</value>
   </data>
-  <data name="CloseWindow.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+  <data name="MinWindow2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>Right</value>
   </data>
-  <data name="CloseWindow.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+  <data name="MinWindow2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
     <value>NoControl</value>
   </data>
-  <data name="CloseWindow.Location" type="System.Drawing.Point, System.Drawing">
-    <value>753, 0</value>
+  <data name="MinWindow2.Location" type="System.Drawing.Point, System.Drawing">
+    <value>673, 0</value>
   </data>
-  <data name="CloseWindow.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
+  <data name="MinWindow2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
     <value>4, 4, 4, 4</value>
   </data>
-  <data name="CloseWindow.Size" type="System.Drawing.Size, System.Drawing">
-    <value>40, 40</value>
+  <data name="MinWindow2.Size" type="System.Drawing.Size, System.Drawing">
+    <value>20, 40</value>
   </data>
-  <data name="CloseWindow.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
+  <data name="MinWindow2.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
     <value>StretchImage</value>
   </data>
-  <data name="CloseWindow.TabIndex" type="System.Int32, mscorlib">
-    <value>4</value>
+  <data name="MinWindow2.TabIndex" type="System.Int32, mscorlib">
+    <value>8</value>
   </data>
-  <data name="&gt;&gt;CloseWindow.Name" xml:space="preserve">
-    <value>CloseWindow</value>
+  <data name="&gt;&gt;MinWindow2.Name" xml:space="preserve">
+    <value>MinWindow2</value>
   </data>
-  <data name="&gt;&gt;CloseWindow.Type" xml:space="preserve">
+  <data name="&gt;&gt;MinWindow2.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;CloseWindow.Parent" xml:space="preserve">
+  <data name="&gt;&gt;MinWindow2.Parent" xml:space="preserve">
     <value>$this</value>
   </data>
-  <data name="&gt;&gt;CloseWindow.ZOrder" xml:space="preserve">
-    <value>3</value>
+  <data name="&gt;&gt;MinWindow2.ZOrder" xml:space="preserve">
+    <value>1</value>
   </data>
   <data name="MinWindow.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>Right</value>
@@ -217,34 +244,73 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;MinWindow.ZOrder" xml:space="preserve">
-    <value>1</value>
+    <value>3</value>
   </data>
-  <data name="TitleLabel.AutoSize" type="System.Boolean, mscorlib">
-    <value>True</value>
+  <data name="MinWindow1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Right</value>
   </data>
-  <data name="TitleLabel.Font" type="System.Drawing.Font, System.Drawing">
-    <value>微软雅黑, 12pt</value>
+  <data name="MinWindow1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
   </data>
-  <data name="TitleLabel.Location" type="System.Drawing.Point, System.Drawing">
-    <value>16, 7</value>
+  <data name="MinWindow1.Location" type="System.Drawing.Point, System.Drawing">
+    <value>733, 0</value>
   </data>
-  <data name="TitleLabel.Size" type="System.Drawing.Size, System.Drawing">
-    <value>0, 27</value>
+  <data name="MinWindow1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>4, 4, 4, 4</value>
   </data>
-  <data name="TitleLabel.TabIndex" type="System.Int32, mscorlib">
-    <value>7</value>
+  <data name="MinWindow1.Size" type="System.Drawing.Size, System.Drawing">
+    <value>20, 40</value>
   </data>
-  <data name="&gt;&gt;TitleLabel.Name" xml:space="preserve">
-    <value>TitleLabel</value>
+  <data name="MinWindow1.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
+    <value>StretchImage</value>
   </data>
-  <data name="&gt;&gt;TitleLabel.Type" xml:space="preserve">
-    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  <data name="MinWindow1.TabIndex" type="System.Int32, mscorlib">
+    <value>5</value>
   </data>
-  <data name="&gt;&gt;TitleLabel.Parent" xml:space="preserve">
+  <data name="&gt;&gt;MinWindow1.Name" xml:space="preserve">
+    <value>MinWindow1</value>
+  </data>
+  <data name="&gt;&gt;MinWindow1.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;MinWindow1.Parent" xml:space="preserve">
     <value>$this</value>
   </data>
-  <data name="&gt;&gt;TitleLabel.ZOrder" xml:space="preserve">
-    <value>0</value>
+  <data name="&gt;&gt;MinWindow1.ZOrder" xml:space="preserve">
+    <value>4</value>
+  </data>
+  <data name="CloseWindow.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+    <value>Right</value>
+  </data>
+  <data name="CloseWindow.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="CloseWindow.Location" type="System.Drawing.Point, System.Drawing">
+    <value>753, 0</value>
+  </data>
+  <data name="CloseWindow.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>4, 4, 4, 4</value>
+  </data>
+  <data name="CloseWindow.Size" type="System.Drawing.Size, System.Drawing">
+    <value>40, 40</value>
+  </data>
+  <data name="CloseWindow.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
+    <value>StretchImage</value>
+  </data>
+  <data name="CloseWindow.TabIndex" type="System.Int32, mscorlib">
+    <value>4</value>
+  </data>
+  <data name="&gt;&gt;CloseWindow.Name" xml:space="preserve">
+    <value>CloseWindow</value>
+  </data>
+  <data name="&gt;&gt;CloseWindow.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;CloseWindow.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;CloseWindow.ZOrder" xml:space="preserve">
+    <value>5</value>
   </data>
   <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>

+ 0 - 21
UAS-MES/Main.Designer.cs

@@ -43,7 +43,6 @@
             this.Inf_linecode_label = new System.Windows.Forms.Label();
             this.db_label = new System.Windows.Forms.Label();
             this.Inf_source_label = new System.Windows.Forms.Label();
-            this.LoginOut = new System.Windows.Forms.LinkLabel();
             this.panel1 = new System.Windows.Forms.Panel();
             this.Menu = new UAS_MES.CustomControl.AccordionMenu.AccordionMenu();
             this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
@@ -217,24 +216,6 @@
             this.Inf_source_label.TabIndex = 6;
             this.Inf_source_label.Text = "资源:";
             // 
-            // LoginOut
-            // 
-            this.LoginOut.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.LoginOut.AutoSize = true;
-            this.LoginOut.BackColor = System.Drawing.SystemColors.ControlDarkDark;
-            this.LoginOut.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.LoginOut.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
-            this.LoginOut.LinkColor = System.Drawing.Color.White;
-            this.LoginOut.Location = new System.Drawing.Point(1099, 4);
-            this.LoginOut.Margin = new System.Windows.Forms.Padding(4, 0, 51, 0);
-            this.LoginOut.Name = "LoginOut";
-            this.LoginOut.Size = new System.Drawing.Size(52, 27);
-            this.LoginOut.TabIndex = 4;
-            this.LoginOut.TabStop = true;
-            this.LoginOut.Text = "注销";
-            this.LoginOut.VisitedLinkColor = System.Drawing.Color.White;
-            this.LoginOut.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LoginOut_LinkClicked);
-            // 
             // panel1
             // 
             this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
@@ -288,7 +269,6 @@
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1277, 780);
-            this.Controls.Add(this.LoginOut);
             this.Controls.Add(this.BasicInf);
             this.Controls.Add(this.MainTabControl);
             this.Controls.Add(this.pictureBox1);
@@ -319,7 +299,6 @@
         private System.Windows.Forms.Label name_label;
         private System.Windows.Forms.Panel BasicInf;
         private System.Windows.Forms.Label db_label;
-        private System.Windows.Forms.LinkLabel LoginOut;
         private System.Windows.Forms.Label inf_name;
         private System.Windows.Forms.Label inf_db;
         private System.Windows.Forms.Panel panel1;

+ 1 - 27
UAS-MES/Main.cs

@@ -45,7 +45,7 @@ namespace UAS_MES
             DoubleBuffered = true;
             SetStyle(ControlStyles.UserPaint, true);
             SetStyle(ControlStyles.AllPaintingInWmPaint, true); // 禁止擦除背景.
-            SetStyle(ControlStyles.DoubleBuffer, true); // 双缓冲
+            SetStyle(ControlStyles.DoubleBuffer, true); // 双缓冲         
         }
 
         /// <summary>
@@ -234,31 +234,5 @@ namespace UAS_MES
             }
             catch (Exception) { }
         }
-
-        private void LoginOut_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
-        {
-            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.OpenedFormName.Clear();
-                //注销的时候将除了登陆窗口之外的全部窗口关闭
-                for (int i = 0; i < Application.OpenForms.Count; i++)
-                {
-                    if (Application.OpenForms[i].Name != "Login")
-                        Application.OpenForms[i].Close();
-                }
-                this.Hide();
-                Login login = new Login();
-                login.ShowDialog();
-                RefreshDBConnect.Stop();
-                this.Close();
-            }
-        }
     }
 }

+ 24 - 4
UAS-MES/Properties/Resources.Designer.cs

@@ -60,6 +60,16 @@ namespace UAS_MES.Properties {
             }
         }
         
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap _0802192135 {
+            get {
+                object obj = ResourceManager.GetObject("_0802192135", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>
@@ -150,6 +160,16 @@ namespace UAS_MES.Properties {
             }
         }
         
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap bindingNavigatorMoveLastItem_Image1 {
+            get {
+                object obj = ResourceManager.GetObject("bindingNavigatorMoveLastItem_Image1", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>
@@ -381,7 +401,7 @@ namespace UAS_MES.Properties {
         }
         
         /// <summary>
-        ///   查找类似于 (Icon) 的 System.Drawing.Icon 类型的本地化资源。
+        ///   查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
         /// </summary>
         internal static System.Drawing.Icon Internet_Explorer_Windows_8_Windows8_32px_566667_easyicon_net {
             get {
@@ -481,7 +501,7 @@ namespace UAS_MES.Properties {
         }
         
         /// <summary>
-        ///   查找类似于 (Icon) 的 System.Drawing.Icon 类型的本地化资源。
+        ///   查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
         /// </summary>
         internal static System.Drawing.Icon matte_white_square_icon_business_tool_hammer_128px_571061_easyicon_net {
             get {
@@ -631,7 +651,7 @@ namespace UAS_MES.Properties {
         }
         
         /// <summary>
-        ///   查找类似于 (Icon) 的 System.Drawing.Icon 类型的本地化资源。
+        ///   查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
         /// </summary>
         internal static System.Drawing.Icon U_Icon {
             get {
@@ -691,7 +711,7 @@ namespace UAS_MES.Properties {
         }
         
         /// <summary>
-        ///   查找类似于 (Icon) 的 System.Drawing.Icon 类型的本地化资源。
+        ///   查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
         /// </summary>
         internal static System.Drawing.Icon Windows_32px_1063981_easyicon_net {
             get {

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

@@ -316,4 +316,10 @@
   <data name="refresh" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="bindingNavigatorMoveLastItem_Image1" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\bindingNavigatorMoveLastItem.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="_0802192135" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\0802192135.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
 </root>

BIN
UAS-MES/Resources/0802192135.png


+ 2 - 1
UAS-MES/UAS-MES.csproj

@@ -79,7 +79,7 @@
     <GenerateManifests>true</GenerateManifests>
   </PropertyGroup>
   <PropertyGroup>
-    <SignManifests>true</SignManifests>
+    <SignManifests>false</SignManifests>
   </PropertyGroup>
   <PropertyGroup>
     <StartupObject>UAS_MES.Program</StartupObject>
@@ -1104,6 +1104,7 @@
     <None Include="Resources\mailattachment.zip" />
   </ItemGroup>
   <ItemGroup>
+    <None Include="Resources\0802192135.png" />
     <Content Include="Resources\Sound\3291.wav" />
     <Content Include="Resources\Sound\5185.wav" />
     <Content Include="U_Icon.ico" />