浏览代码

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

章政 8 年之前
父节点
当前提交
7aeb07b781

+ 31 - 7
UAS-MES/CustomControl/HeadBar/HeadBar.Designer.cs

@@ -30,18 +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.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.pictureBox1 = 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.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.pictureBox1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.Change_psw)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
             this.SuspendLayout();
             // 
             // TitleLabel
@@ -50,6 +54,12 @@
             this.TitleLabel.ForeColor = System.Drawing.SystemColors.ControlLightLight;
             this.TitleLabel.Name = "TitleLabel";
             // 
+            // pictureBox1
+            // 
+            resources.ApplyResources(this.pictureBox1, "pictureBox1");
+            this.pictureBox1.Name = "pictureBox1";
+            this.pictureBox1.TabStop = false;
+            // 
             // LoginOut
             // 
             resources.ApplyResources(this.LoginOut, "LoginOut");
@@ -89,17 +99,27 @@
             this.CloseWindow.TabStop = false;
             this.CloseWindow.Click += new System.EventHandler(this.CloseWindow_Click);
             // 
-            // pictureBox1
+            // Change_psw
             // 
-            resources.ApplyResources(this.pictureBox1, "pictureBox1");
-            this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.TabStop = false;
+            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);
+            // 
+            // 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.Change_psw);
             this.Controls.Add(this.pictureBox1);
             this.Controls.Add(this.LoginOut);
             this.Controls.Add(this.MinWindow2);
@@ -109,12 +129,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.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.pictureBox1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.Change_psw)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -129,5 +151,7 @@
         private System.Windows.Forms.PictureBox MinWindow2;
         private System.Windows.Forms.PictureBox LoginOut;
         private System.Windows.Forms.PictureBox pictureBox1;
+        private System.Windows.Forms.PictureBox Change_psw;
+        private System.Windows.Forms.PictureBox pictureBox2;
     }
 }

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

@@ -7,6 +7,7 @@ using System.Windows.Forms;
 using UAS_MES.DataOperate;
 using UAS_MES.Entity;
 using UAS_MES.PublicMethod;
+using UAS_MES.PublicForm;
 
 namespace UAS_MES.CustomControl
 {
@@ -85,6 +86,7 @@ namespace UAS_MES.CustomControl
             if (!NeedConfirm.Contains(this.FindForm().Name))
             {
                 LoginOut.Visible = false;
+                Change_psw.Visible = false;
             }
         }
 
@@ -126,5 +128,12 @@ namespace UAS_MES.CustomControl
         {
             this.Cursor = Cursors.Default;
         }
+
+        private void Change_psw_Click(object sender, EventArgs e)
+        {
+            ChangePwd chagepwd = new ChangePwd();
+            BaseUtil.SetFormCenter(chagepwd);
+            chagepwd.ShowDialog();
+        }
     }
 }

+ 102 - 51
UAS-MES/CustomControl/HeadBar/HeadBar.resx

@@ -130,10 +130,13 @@
     <value>NoControl</value>
   </data>
   <data name="TitleLabel.Location" type="System.Drawing.Point, System.Drawing">
-    <value>16, 7</value>
+    <value>12, 6</value>
+  </data>
+  <data name="TitleLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>2, 0, 2, 0</value>
   </data>
   <data name="TitleLabel.Size" type="System.Drawing.Size, System.Drawing">
-    <value>0, 27</value>
+    <value>0, 21</value>
   </data>
   <data name="TitleLabel.TabIndex" type="System.Int32, mscorlib">
     <value>7</value>
@@ -148,7 +151,37 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;TitleLabel.ZOrder" xml:space="preserve">
-    <value>3</value>
+    <value>5</value>
+  </data>
+  <data name="pictureBox1.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">
+    <value>NoControl</value>
+  </data>
+  <data name="pictureBox1.Location" type="System.Drawing.Point, System.Drawing">
+    <value>445, 0</value>
+  </data>
+  <data name="pictureBox1.Size" type="System.Drawing.Size, System.Drawing">
+    <value>15, 32</value>
+  </data>
+  <data name="pictureBox1.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
+    <value>StretchImage</value>
+  </data>
+  <data name="pictureBox1.TabIndex" type="System.Int32, mscorlib">
+    <value>10</value>
+  </data>
+  <data name="&gt;&gt;pictureBox1.Name" xml:space="preserve">
+    <value>pictureBox1</value>
+  </data>
+  <data name="&gt;&gt;pictureBox1.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">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;pictureBox1.ZOrder" xml:space="preserve">
+    <value>2</value>
   </data>
   <data name="LoginOut.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>Right</value>
@@ -157,10 +190,13 @@
     <value>NoControl</value>
   </data>
   <data name="LoginOut.Location" type="System.Drawing.Point, System.Drawing">
-    <value>613, 0</value>
+    <value>460, 0</value>
+  </data>
+  <data name="LoginOut.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>2, 2, 2, 2</value>
   </data>
   <data name="LoginOut.Size" type="System.Drawing.Size, System.Drawing">
-    <value>60, 40</value>
+    <value>45, 32</value>
   </data>
   <data name="LoginOut.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
     <value>CenterImage</value>
@@ -178,7 +214,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;LoginOut.ZOrder" xml:space="preserve">
-    <value>1</value>
+    <value>3</value>
   </data>
   <data name="MinWindow2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>Right</value>
@@ -187,13 +223,10 @@
     <value>NoControl</value>
   </data>
   <data name="MinWindow2.Location" type="System.Drawing.Point, System.Drawing">
-    <value>673, 0</value>
-  </data>
-  <data name="MinWindow2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
-    <value>4, 4, 4, 4</value>
+    <value>505, 0</value>
   </data>
   <data name="MinWindow2.Size" type="System.Drawing.Size, System.Drawing">
-    <value>20, 40</value>
+    <value>15, 32</value>
   </data>
   <data name="MinWindow2.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
     <value>StretchImage</value>
@@ -211,7 +244,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;MinWindow2.ZOrder" xml:space="preserve">
-    <value>2</value>
+    <value>4</value>
   </data>
   <data name="MinWindow.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>Right</value>
@@ -220,13 +253,10 @@
     <value>NoControl</value>
   </data>
   <data name="MinWindow.Location" type="System.Drawing.Point, System.Drawing">
-    <value>693, 0</value>
-  </data>
-  <data name="MinWindow.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
-    <value>4, 4, 4, 4</value>
+    <value>520, 0</value>
   </data>
   <data name="MinWindow.Size" type="System.Drawing.Size, System.Drawing">
-    <value>40, 40</value>
+    <value>30, 32</value>
   </data>
   <data name="MinWindow.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
     <value>StretchImage</value>
@@ -244,7 +274,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;MinWindow.ZOrder" xml:space="preserve">
-    <value>4</value>
+    <value>6</value>
   </data>
   <data name="MinWindow1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>Right</value>
@@ -253,13 +283,10 @@
     <value>NoControl</value>
   </data>
   <data name="MinWindow1.Location" type="System.Drawing.Point, System.Drawing">
-    <value>733, 0</value>
-  </data>
-  <data name="MinWindow1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
-    <value>4, 4, 4, 4</value>
+    <value>550, 0</value>
   </data>
   <data name="MinWindow1.Size" type="System.Drawing.Size, System.Drawing">
-    <value>20, 40</value>
+    <value>15, 32</value>
   </data>
   <data name="MinWindow1.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
     <value>StretchImage</value>
@@ -277,7 +304,7 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;MinWindow1.ZOrder" xml:space="preserve">
-    <value>5</value>
+    <value>7</value>
   </data>
   <data name="CloseWindow.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
     <value>Right</value>
@@ -286,13 +313,10 @@
     <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>
+    <value>565, 0</value>
   </data>
   <data name="CloseWindow.Size" type="System.Drawing.Size, System.Drawing">
-    <value>40, 40</value>
+    <value>30, 32</value>
   </data>
   <data name="CloseWindow.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
     <value>StretchImage</value>
@@ -310,52 +334,79 @@
     <value>$this</value>
   </data>
   <data name="&gt;&gt;CloseWindow.ZOrder" xml:space="preserve">
-    <value>6</value>
+    <value>8</value>
   </data>
-  <data name="pictureBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
+  <data name="Change_psw.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="Change_psw.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
     <value>NoControl</value>
   </data>
-  <data name="pictureBox1.Location" type="System.Drawing.Point, System.Drawing">
-    <value>593, 0</value>
+  <data name="Change_psw.Location" type="System.Drawing.Point, System.Drawing">
+    <value>354, 0</value>
   </data>
-  <data name="pictureBox1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
-    <value>4, 4, 4, 4</value>
+  <data name="Change_psw.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>2, 2, 2, 2</value>
   </data>
-  <data name="pictureBox1.Size" type="System.Drawing.Size, System.Drawing">
-    <value>20, 40</value>
+  <data name="Change_psw.Size" type="System.Drawing.Size, System.Drawing">
+    <value>91, 32</value>
   </data>
-  <data name="pictureBox1.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
+  <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="pictureBox1.TabIndex" type="System.Int32, mscorlib">
-    <value>10</value>
+  <data name="pictureBox2.TabIndex" type="System.Int32, mscorlib">
+    <value>12</value>
   </data>
-  <data name="&gt;&gt;pictureBox1.Name" xml:space="preserve">
-    <value>pictureBox1</value>
+  <data name="&gt;&gt;pictureBox2.Name" xml:space="preserve">
+    <value>pictureBox2</value>
   </data>
-  <data name="&gt;&gt;pictureBox1.Type" xml:space="preserve">
+  <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;pictureBox1.Parent" xml:space="preserve">
+  <data name="&gt;&gt;pictureBox2.Parent" xml:space="preserve">
     <value>$this</value>
   </data>
-  <data name="&gt;&gt;pictureBox1.ZOrder" xml:space="preserve">
+  <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>
   <data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
-    <value>8, 15</value>
-  </data>
-  <data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
-    <value>4, 4, 4, 4</value>
+    <value>6, 12</value>
   </data>
   <data name="$this.Size" type="System.Drawing.Size, System.Drawing">
-    <value>793, 40</value>
+    <value>595, 32</value>
   </data>
   <data name="&gt;&gt;$this.Name" xml:space="preserve">
     <value>HeadBar</value>

+ 1 - 1
UAS-MES/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.cs

@@ -78,7 +78,7 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
         {
             get
             {
-                return TextBox.Text;
+                return TextBox.Text.ToUpper();
             }
             set
             {

+ 1 - 1
UAS-MES/CustomControl/TextBoxWithIcon/SearchTextBox.cs

@@ -326,7 +326,7 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
             //将查询到的结果返回界面
             if (TextBox.Text != "")
             {
-                sql = "select " + BaseUtil.AddField(setValueField) + " from " + tableName + " where " + Name + "='" + TextBox.Text.ToUpper() + "'";
+                sql = "select " + BaseUtil.AddField(setValueField) + " from " + tableName + " where " + Name + "='" + TextBox.Text + "'";
             }
             else if (db != null)
             {

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

@@ -220,6 +220,16 @@ namespace UAS_MES.Properties {
             }
         }
         
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap change_password {
+            get {
+                object obj = ResourceManager.GetObject("change_password", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>
@@ -401,7 +411,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 {
@@ -501,7 +511,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 {
@@ -651,7 +661,7 @@ namespace UAS_MES.Properties {
         }
         
         /// <summary>
-        ///   查找类似于 (Icon) 的 System.Drawing.Icon 类型的本地化资源。
+        ///   查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
         /// </summary>
         internal static System.Drawing.Icon U_Icon {
             get {
@@ -721,7 +731,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 {

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

@@ -325,4 +325,7 @@
   <data name="WhiteImage" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\WhiteImage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <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>
 </root>

+ 113 - 86
UAS-MES/PublicForm/ChangePwd.Designer.cs

@@ -29,111 +29,48 @@
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChangePwd));
-            this.headBar1 = new UAS_MES.CustomControl.HeadBar();
-            this.Confirm = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.EarlyWarning = new UAS_MES.CustomControl.TextBoxWithIcon.MaCodeTextBox();
             this.label3 = new System.Windows.Forms.Label();
-            this.UnitTime = new UAS_MES.CustomControl.TextBoxWithIcon.MaCodeTextBox();
             this.label2 = new System.Windows.Forms.Label();
-            this.Cycle = new UAS_MES.CustomControl.TextBoxWithIcon.MaCodeTextBox();
             this.mc_madeqty_label = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
+            this.UserName = new System.Windows.Forms.Label();
+            this.Confirm = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.checkpwd = new UAS_MES.CustomControl.TextBoxWithIcon.MaCodeTextBox();
+            this.newpwd = new UAS_MES.CustomControl.TextBoxWithIcon.MaCodeTextBox();
+            this.pwd = new UAS_MES.CustomControl.TextBoxWithIcon.MaCodeTextBox();
+            this.headBar1 = new UAS_MES.CustomControl.HeadBar();
             this.SuspendLayout();
             // 
-            // headBar1
-            // 
-            this.headBar1.BackColor = System.Drawing.SystemColors.ControlDarkDark;
-            this.headBar1.Dock = System.Windows.Forms.DockStyle.Top;
-            this.headBar1.Location = new System.Drawing.Point(0, 0);
-            this.headBar1.Margin = new System.Windows.Forms.Padding(4);
-            this.headBar1.Name = "headBar1";
-            this.headBar1.Size = new System.Drawing.Size(441, 40);
-            this.headBar1.TabIndex = 0;
-            // 
-            // Confirm
-            // 
-            this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
-            this.Confirm.Location = new System.Drawing.Point(178, 210);
-            this.Confirm.Margin = new System.Windows.Forms.Padding(4);
-            this.Confirm.Name = "Confirm";
-            this.Confirm.Power = null;
-            this.Confirm.Size = new System.Drawing.Size(80, 35);
-            this.Confirm.TabIndex = 25;
-            this.Confirm.Text = "确认";
-            this.Confirm.UseVisualStyleBackColor = true;
-            // 
-            // EarlyWarning
-            // 
-            this.EarlyWarning.ID = null;
-            this.EarlyWarning.Location = new System.Drawing.Point(178, 160);
-            this.EarlyWarning.Margin = new System.Windows.Forms.Padding(4);
-            this.EarlyWarning.Name = "EarlyWarning";
-            this.EarlyWarning.Power = null;
-            this.EarlyWarning.Size = new System.Drawing.Size(199, 25);
-            this.EarlyWarning.Str = null;
-            this.EarlyWarning.Str1 = null;
-            this.EarlyWarning.Str2 = null;
-            this.EarlyWarning.TabIndex = 20;
-            // 
             // label3
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label3.ForeColor = System.Drawing.Color.Red;
-            this.label3.Location = new System.Drawing.Point(56, 160);
-            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Location = new System.Drawing.Point(42, 128);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(92, 27);
+            this.label3.Size = new System.Drawing.Size(74, 21);
             this.label3.TabIndex = 24;
             this.label3.Text = "确认密码";
             // 
-            // UnitTime
-            // 
-            this.UnitTime.ID = null;
-            this.UnitTime.Location = new System.Drawing.Point(178, 124);
-            this.UnitTime.Margin = new System.Windows.Forms.Padding(4);
-            this.UnitTime.Name = "UnitTime";
-            this.UnitTime.Power = null;
-            this.UnitTime.Size = new System.Drawing.Size(199, 25);
-            this.UnitTime.Str = null;
-            this.UnitTime.Str1 = null;
-            this.UnitTime.Str2 = null;
-            this.UnitTime.TabIndex = 19;
-            // 
             // label2
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label2.ForeColor = System.Drawing.Color.Red;
-            this.label2.Location = new System.Drawing.Point(76, 124);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Location = new System.Drawing.Point(57, 99);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(72, 27);
+            this.label2.Size = new System.Drawing.Size(58, 21);
             this.label2.TabIndex = 23;
             this.label2.Text = "新密码";
             // 
-            // Cycle
-            // 
-            this.Cycle.ID = null;
-            this.Cycle.Location = new System.Drawing.Point(178, 85);
-            this.Cycle.Margin = new System.Windows.Forms.Padding(4);
-            this.Cycle.Name = "Cycle";
-            this.Cycle.Power = null;
-            this.Cycle.Size = new System.Drawing.Size(199, 25);
-            this.Cycle.Str = null;
-            this.Cycle.Str1 = null;
-            this.Cycle.Str2 = null;
-            this.Cycle.TabIndex = 18;
-            // 
             // mc_madeqty_label
             // 
             this.mc_madeqty_label.AutoSize = true;
             this.mc_madeqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mc_madeqty_label.ForeColor = System.Drawing.Color.Red;
-            this.mc_madeqty_label.Location = new System.Drawing.Point(77, 85);
-            this.mc_madeqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mc_madeqty_label.Location = new System.Drawing.Point(58, 68);
             this.mc_madeqty_label.Name = "mc_madeqty_label";
-            this.mc_madeqty_label.Size = new System.Drawing.Size(72, 27);
+            this.mc_madeqty_label.Size = new System.Drawing.Size(58, 21);
             this.mc_madeqty_label.TabIndex = 21;
             this.mc_madeqty_label.Text = "原密码";
             // 
@@ -143,30 +80,119 @@
             this.label1.BackColor = System.Drawing.SystemColors.ControlDarkDark;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label1.ForeColor = System.Drawing.Color.White;
-            this.label1.Location = new System.Drawing.Point(10, 7);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Location = new System.Drawing.Point(8, 6);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(92, 27);
+            this.label1.Size = new System.Drawing.Size(74, 21);
             this.label1.TabIndex = 27;
             this.label1.Text = "修改密码";
             // 
+            // UserName
+            // 
+            this.UserName.AutoSize = true;
+            this.UserName.Location = new System.Drawing.Point(12, 187);
+            this.UserName.Name = "UserName";
+            this.UserName.Size = new System.Drawing.Size(0, 12);
+            this.UserName.TabIndex = 28;
+            this.UserName.Visible = false;
+            // 
+            // Confirm
+            // 
+            this.Confirm.AllPower = null;
+            this.Confirm.BackColor = System.Drawing.Color.Transparent;
+            this.Confirm.DownImage = ((System.Drawing.Image)(resources.GetObject("Confirm.DownImage")));
+            this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
+            this.Confirm.IsShowBorder = true;
+            this.Confirm.Location = new System.Drawing.Point(134, 168);
+            this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
+            this.Confirm.Name = "Confirm";
+            this.Confirm.NormalImage = ((System.Drawing.Image)(resources.GetObject("Confirm.NormalImage")));
+            this.Confirm.Power = null;
+            this.Confirm.Size = new System.Drawing.Size(60, 28);
+            this.Confirm.TabIndex = 25;
+            this.Confirm.Text = "确认";
+            this.Confirm.UseVisualStyleBackColor = true;
+            this.Confirm.Click += new System.EventHandler(this.Confirm_Click);
+            // 
+            // checkpwd
+            // 
+            this.checkpwd.AllPower = null;
+            this.checkpwd.BackColor = System.Drawing.Color.White;
+            this.checkpwd.ID = null;
+            this.checkpwd.Location = new System.Drawing.Point(134, 128);
+            this.checkpwd.Lock = false;
+            this.checkpwd.Name = "checkpwd";
+            this.checkpwd.PasswordChar = '*';
+            this.checkpwd.Power = null;
+            this.checkpwd.Size = new System.Drawing.Size(150, 21);
+            this.checkpwd.Str = null;
+            this.checkpwd.Str1 = null;
+            this.checkpwd.Str2 = null;
+            this.checkpwd.TabIndex = 20;
+            this.checkpwd.TextChanged += new System.EventHandler(this.checkpwd_TextChanged);
+            // 
+            // newpwd
+            // 
+            this.newpwd.AllPower = null;
+            this.newpwd.BackColor = System.Drawing.Color.White;
+            this.newpwd.ID = null;
+            this.newpwd.Location = new System.Drawing.Point(134, 99);
+            this.newpwd.Lock = false;
+            this.newpwd.Name = "newpwd";
+            this.newpwd.PasswordChar = '*';
+            this.newpwd.Power = null;
+            this.newpwd.Size = new System.Drawing.Size(150, 21);
+            this.newpwd.Str = null;
+            this.newpwd.Str1 = null;
+            this.newpwd.Str2 = null;
+            this.newpwd.TabIndex = 19;
+            // 
+            // pwd
+            // 
+            this.pwd.AllPower = null;
+            this.pwd.BackColor = System.Drawing.Color.White;
+            this.pwd.ID = null;
+            this.pwd.Location = new System.Drawing.Point(134, 68);
+            this.pwd.Lock = false;
+            this.pwd.Name = "pwd";
+            this.pwd.PasswordChar = '*';
+            this.pwd.Power = null;
+            this.pwd.Size = new System.Drawing.Size(150, 21);
+            this.pwd.Str = null;
+            this.pwd.Str1 = null;
+            this.pwd.Str2 = null;
+            this.pwd.TabIndex = 18;
+            // 
+            // headBar1
+            // 
+            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.Name = "headBar1";
+            this.headBar1.Size = new System.Drawing.Size(331, 32);
+            this.headBar1.TabIndex = 0;
+            this.headBar1.Title = null;
+            // 
             // ChangePwd
             // 
-            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(441, 264);
+            this.ClientSize = new System.Drawing.Size(331, 211);
+            this.Controls.Add(this.UserName);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.Confirm);
-            this.Controls.Add(this.EarlyWarning);
+            this.Controls.Add(this.checkpwd);
             this.Controls.Add(this.label3);
-            this.Controls.Add(this.UnitTime);
+            this.Controls.Add(this.newpwd);
             this.Controls.Add(this.label2);
-            this.Controls.Add(this.Cycle);
+            this.Controls.Add(this.pwd);
             this.Controls.Add(this.mc_madeqty_label);
             this.Controls.Add(this.headBar1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.Name = "ChangePwd";
+            this.Tag = "ChangePwd";
             this.Text = "ChangePwd";
+            this.Load += new System.EventHandler(this.ChangePwd_Load);
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -176,12 +202,13 @@
 
         private CustomControl.HeadBar headBar1;
         private CustomControl.ButtonUtil.NormalButton Confirm;
-        private CustomControl.TextBoxWithIcon.MaCodeTextBox EarlyWarning;
+        private CustomControl.TextBoxWithIcon.MaCodeTextBox checkpwd;
         private System.Windows.Forms.Label label3;
-        private CustomControl.TextBoxWithIcon.MaCodeTextBox UnitTime;
+        private CustomControl.TextBoxWithIcon.MaCodeTextBox newpwd;
         private System.Windows.Forms.Label label2;
-        private CustomControl.TextBoxWithIcon.MaCodeTextBox Cycle;
+        private CustomControl.TextBoxWithIcon.MaCodeTextBox pwd;
         private System.Windows.Forms.Label mc_madeqty_label;
         private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label UserName;
     }
 }

+ 40 - 0
UAS-MES/PublicForm/ChangePwd.cs

@@ -6,14 +6,54 @@ using System.Drawing;
 using System.Linq;
 using System.Text;
 using System.Windows.Forms;
+using UAS_MES.DataOperate;
+using UAS_MES.Entity;
+using UAS_MES.PublicMethod;
 
 namespace UAS_MES.PublicForm
 {
     public partial class ChangePwd : Form
     {
+
+        DataHelper dh;
+        string ErrorMessage;
+
         public ChangePwd()
         {
             InitializeComponent();
+
+        }
+
+        private void Confirm_Click(object sender, EventArgs e)
+        {
+            if (LogicHandler.CheckUserLogin(UserName.Text, pwd.Text, out ErrorMessage))
+            {
+                ErrorMessage = "";
+                string SQL = "update  employee set em_password = '"+newpwd.Text+"' where em_code='"+UserName.Text+"' ";
+                dh.ExecuteSql(SQL, "update");
+                MessageBox.Show("修改密码成功");
+                Close();
+            }
+            else
+            MessageBox.Show(ErrorMessage);     
+        }
+
+        private void ChangePwd_Load(object sender, EventArgs e)
+        {
+            dh = new DataHelper();
+            UserName.Text = BaseUtil.GetCacheData("LastLoginUser").ToString();
+            Confirm.Enabled = false;
+        }
+
+        private void checkpwd_TextChanged(object sender, EventArgs e)
+        {
+            if (!(checkpwd.Text != "" && checkpwd.Text == newpwd.Text))
+            {
+                Confirm.Enabled = false;
+            }
+            else {
+                Confirm.Enabled = true;
+            }
         }
     }
 }

+ 38 - 0
UAS-MES/PublicForm/ChangePwd.resx

@@ -118,6 +118,18 @@
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="Confirm.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
   <data name="Confirm.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
@@ -209,6 +221,32 @@
         wY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCDHQFksCOADHYEkMGO
         ADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="Confirm.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="Confirm.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
 </root>

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