Browse Source

所有错误Messagebox统一在NG时提示。

Jeff 3 years ago
parent
commit
a533068557
3 changed files with 212 additions and 164 deletions
  1. 173 127
      Views/OperationPanel.cs
  2. 32 26
      Views/Verify.Designer.cs
  3. 7 11
      Views/Verify.cs

File diff suppressed because it is too large
+ 173 - 127
Views/OperationPanel.cs


+ 32 - 26
Views/Verify.Designer.cs

@@ -28,58 +28,64 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Verify));
-            this.skinLabel1 = new CCWin.SkinControl.SkinLabel();
-            this.TB_PASSWORD = new System.Windows.Forms.TextBox();
+            this.LB_MSG = new CCWin.SkinControl.SkinLabel();
+            this.BT_OK = new CCWin.SkinControl.SkinButton();
             this.SuspendLayout();
             // 
-            // skinLabel1
+            // LB_MSG
             // 
-            this.skinLabel1.AutoSize = true;
-            this.skinLabel1.BackColor = System.Drawing.Color.Transparent;
-            this.skinLabel1.BorderColor = System.Drawing.Color.White;
-            this.skinLabel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.skinLabel1.Location = new System.Drawing.Point(39, 86);
-            this.skinLabel1.Name = "skinLabel1";
-            this.skinLabel1.Size = new System.Drawing.Size(138, 21);
-            this.skinLabel1.TabIndex = 0;
-            this.skinLabel1.Text = "请输入解锁密码:";
+            this.LB_MSG.BackColor = System.Drawing.Color.Transparent;
+            this.LB_MSG.BorderColor = System.Drawing.Color.White;
+            this.LB_MSG.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.LB_MSG.Location = new System.Drawing.Point(42, 59);
+            this.LB_MSG.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.LB_MSG.Name = "LB_MSG";
+            this.LB_MSG.Size = new System.Drawing.Size(435, 90);
+            this.LB_MSG.TabIndex = 0;
             // 
-            // TB_PASSWORD
+            // BT_OK
             // 
-            this.TB_PASSWORD.Location = new System.Drawing.Point(183, 86);
-            this.TB_PASSWORD.Name = "TB_PASSWORD";
-            this.TB_PASSWORD.PasswordChar = '*';
-            this.TB_PASSWORD.Size = new System.Drawing.Size(151, 21);
-            this.TB_PASSWORD.TabIndex = 1;
-            this.TB_PASSWORD.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox1_KeyDown);
+            this.BT_OK.BackColor = System.Drawing.Color.Transparent;
+            this.BT_OK.ControlState = CCWin.SkinClass.ControlState.Normal;
+            this.BT_OK.DownBack = null;
+            this.BT_OK.Location = new System.Drawing.Point(392, 157);
+            this.BT_OK.MouseBack = null;
+            this.BT_OK.Name = "BT_OK";
+            this.BT_OK.NormlBack = null;
+            this.BT_OK.Size = new System.Drawing.Size(111, 38);
+            this.BT_OK.TabIndex = 1;
+            this.BT_OK.Text = "确定";
+            this.BT_OK.UseVisualStyleBackColor = false;
+            this.BT_OK.Click += new System.EventHandler(this.BT_OK_Click);
             // 
             // Verify
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
             this.CanResize = false;
             this.CaptionBackColorBottom = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
             this.CaptionBackColorTop = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
-            this.ClientSize = new System.Drawing.Size(392, 168);
+            this.ClientSize = new System.Drawing.Size(523, 210);
             this.ControlBox = false;
-            this.Controls.Add(this.TB_PASSWORD);
-            this.Controls.Add(this.skinLabel1);
+            this.Controls.Add(this.BT_OK);
+            this.Controls.Add(this.LB_MSG);
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.MaximizeBox = false;
             this.MinimizeBox = false;
             this.Name = "Verify";
             this.Text = "Verify";
             this.Load += new System.EventHandler(this.Verify_Load);
             this.ResumeLayout(false);
-            this.PerformLayout();
 
         }
 
         #endregion
 
-        private CCWin.SkinControl.SkinLabel skinLabel1;
-        private System.Windows.Forms.TextBox TB_PASSWORD;
+        private CCWin.SkinControl.SkinLabel LB_MSG;
+        private CCWin.SkinControl.SkinButton BT_OK;
     }
 }

+ 7 - 11
Views/Verify.cs

@@ -13,26 +13,22 @@ namespace MOKA_Factory_Tools
 {
     public partial class Verify : Skin_Color
     {
-        public Verify()
+        private string _Msg = "";
+        public Verify(string strMsg)
         {
+            _Msg = strMsg;
             InitializeComponent();
         }
 
         private void Verify_Load(object sender, EventArgs e)
         {
-
+            LB_MSG.Text = _Msg;
+            LB_MSG.AutoSize = true;
         }
 
-        private void textBox1_KeyDown(object sender, KeyEventArgs e)
+        private void BT_OK_Click(object sender, EventArgs e)
         {
-            // 判断是否回车登录;
-            if (e.KeyCode == Keys.Enter)
-            {
-                if ( TB_PASSWORD.Text == "123456" )
-                {
-                    this.Close();
-                }
-            }
+            this.Close();
         }
     }
 }

Some files were not shown because too many files changed in this diff