.Net通用密码对话框

密码对话框有3种模式:

1,密码验证模式,只有一个文本框

2,密码创建模式,有两个文本框,用于输入两次相同的密码

3,密码修改模式,有三个文本框,第一个用于输入原密码,另外两个用于输入两次新密码

这3种模式可以用一个通用的密码对话框来实现,根据不同的密码模式,显示不同的文本框和标签,3种模式实现如下:

1,验证模式:

public PwdDialog query(Func<byte[], bool> verify)
        {
            hidePwdRows(1, 2);
            okBtn.Click += (s, e) =>
            {
                try
                {
                    var pwd = pwdUI.Text.utf8();
                    if (verify(pwd))
                    {
                        this.DialogResult = DialogResult.OK;
                        this.Close();
                    }
                    else
                        showMismatch();
                }
                catch (Exception err)
                {
                    this.error = err;
                    this.Close();
                }
            };
            return this;
        }

验证模式传入一个验证方法作为参数,当用户点击“确认”按钮时,对话框会自动调用验证方法,如果验证成功,则关闭对话框,否则提示验证失败。

 

2,创建模式:

public PwdDialog setup()
        {
            hidePwdRows(0);
            okBtn.Click += (s, e) =>
            {
                if (!checkNewPwd())
                    return;
                this.DialogResult = DialogResult.OK;
                Close();
            };
            return this;
        }

创建模式验证两次输入密码是否一致,如果输入密码为空,则提示是否使用空密码,验证成功则关闭对话框。

 

3,修改模式:

public PwdDialog modify(Func<byte[], bool> verify)
        {
            okBtn.Click += (s, e) =>
            {
                try
                {
                    if (!checkNewPwd())
                        return;
                    var oldPwd = pwdUI.Text.utf8();
                    if (verify(oldPwd))
                    {
                        this.DialogResult = DialogResult.OK;
                        this.Close();
                    }
                    else
                        showMismatch();
                }
                catch (Exception err)
                {
                    this.error = err;
                    this.Close();
                }
            };
            return this;
        }

修改模式是创建模式+新建模式的组合,验证成功后,关闭对话框。

 

应用使用密码对话框时,只需要根据需要,调用不同模式的方法,即可实现相应的密码输入:

var dlg = new PwdDialog().setup();
dlg.ShowDialog();

效果图如下:

完整代码:

PwdDialog.cs

using util;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using util.ext;
using util.crypt;

namespace util
{
    public partial class PwdDialog : Form
    {
        public string title;
        public Exception error;

        public PwdDialog()
        {
            InitializeComponent();
        }

        private void PwdDialog_Load(object sender, EventArgs e)
        {
            if (!title.empty())
                this.Text = $"{this.Text} - {title}";
        }

        public PwdDialog query(Func<byte[], bool> verify)
        {
            hidePwdRows(1, 2);
            okBtn.Click += (s, e) =>
            {
                try
                {
                    var pwd = pwdUI.Text.utf8();
                    if (verify(pwd))
                    {
                        this.DialogResult = DialogResult.OK;
                        this.Close();
                    }
                    else
                        showMismatch();
                }
                catch (Exception err)
                {
                    this.error = err;
                    this.Close();
                }
            };
            return this;
        }

        void showMismatch()
            => this.trans("Mismatch").dlgError();

        public PwdDialog modify(Func<byte[], bool> verify)
        {
            okBtn.Click += (s, e) =>
            {
                try
                {
                    if (!checkNewPwd())
                        return;
                    var oldPwd = pwdUI.Text.utf8();
                    if (verify(oldPwd))
                    {
                        this.DialogResult = DialogResult.OK;
                        this.Close();
                    }
                    else
                        showMismatch();
                }
                catch (Exception err)
                {
                    this.error = err;
                    this.Close();
                }
            };
            return this;
        }

        public byte[] newPwd => newPwdUI.Text.utf8();

        public PwdDialog setup()
        {
            hidePwdRows(0);
            okBtn.Click += (s, e) =>
            {
                if (!checkNewPwd())
                    return;
                this.DialogResult = DialogResult.OK;
                Close();
            };
            return this;
        }

        bool checkNewPwd()
        {
            var pwd = newPwdUI.Text;
            if (pwd != repeatPwdUI.Text)
            {
                this.trans("RepeatMismatch").dlgError();
                return false;
            }
            return pwd.Length > 0 
                || this.trans("ConfirmEmpty").confirm();
        }

        void hidePwdRows(params int[] rows)
        {
            float sum = 0;
            foreach (var idx in rows)
            {
                sum += hidePwdRow(idx);
            }
            this.Height -= (int)sum;
        }

        float hidePwdRow(int idx)
        {
            idx += 1;
            var tb = fldsLayout;
            var height = tb.RowStyles[idx].Height;
            tb.RowStyles[idx].Height = 0;
            for (int i = 0; i < tb.ColumnCount; i++)
            {
                var ui = tb.GetControlFromPosition(i, idx);
                if (null != ui)
                    ui.Visible = false;
            }
            return height;
        }

        private void pwdIcon_Click(object sender, EventArgs e)
        {
            if (pwdIcon.Image == showIcon.Image)
            {
                pwdUI.PasswordChar = '*';
                pwdIcon.Image = hideIcon.Image;
            }
            else
            {
                pwdUI.PasswordChar = new char();
                pwdIcon.Image = showIcon.Image;
            }
        }

        private void newPwdIcon_Click(object sender, EventArgs e)
        {
            if (newPwdIcon.Image == showIcon.Image)
            {
                newPwdUI.PasswordChar = '*';
                repeatPwdUI.PasswordChar = '*';
                newPwdIcon.Image = hideIcon.Image;
            }
            else
            {
                newPwdUI.PasswordChar = new char();
                repeatPwdUI.PasswordChar = new char();
                newPwdIcon.Image = showIcon.Image;
            }
        }

        private void PwdDialog_Activated(object sender, EventArgs e)
        {
            if (pwdUI.Visible)
                pwdUI.Focus();
            else
                newPwdUI.Focus();
        }
    }
}
View Code

PwdDialog.Designer.cs

namespace util
{
    partial class PwdDialog
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PwdDialog));
            this.okBtn = new System.Windows.Forms.Button();
            this.cancelBtn = new System.Windows.Forms.Button();
            this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
            this.showIcon = new System.Windows.Forms.Label();
            this.fldsLayout = new System.Windows.Forms.TableLayoutPanel();
            this.pwdLabel = new System.Windows.Forms.Label();
            this.newPwdUI = new System.Windows.Forms.TextBox();
            this.hideIcon = new System.Windows.Forms.Label();
            this.repeatPwdUI = new System.Windows.Forms.TextBox();
            this.newPwdLabel = new System.Windows.Forms.Label();
            this.repeatPwdLabel = new System.Windows.Forms.Label();
            this.pwdIcon = new System.Windows.Forms.Label();
            this.newPwdIcon = new System.Windows.Forms.Label();
            this.pwdUI = new System.Windows.Forms.TextBox();
            this.tableLayoutPanel1.SuspendLayout();
            this.fldsLayout.SuspendLayout();
            this.SuspendLayout();
            // 
            // okBtn
            // 
            this.okBtn.Anchor = System.Windows.Forms.AnchorStyles.None;
            this.okBtn.Location = new System.Drawing.Point(206, 21);
            this.okBtn.Name = "okBtn";
            this.okBtn.Size = new System.Drawing.Size(137, 53);
            this.okBtn.TabIndex = 3;
            this.okBtn.Text = "OK";
            this.okBtn.UseVisualStyleBackColor = true;
            // 
            // cancelBtn
            // 
            this.cancelBtn.Anchor = System.Windows.Forms.AnchorStyles.None;
            this.cancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.cancelBtn.Location = new System.Drawing.Point(455, 21);
            this.cancelBtn.Name = "cancelBtn";
            this.cancelBtn.Size = new System.Drawing.Size(137, 53);
            this.cancelBtn.TabIndex = 4;
            this.cancelBtn.Text = "Cancel";
            this.cancelBtn.UseVisualStyleBackColor = true;
            // 
            // tableLayoutPanel1
            // 
            this.tableLayoutPanel1.ColumnCount = 4;
            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 150F));
            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 62F));
            this.tableLayoutPanel1.Controls.Add(this.okBtn, 1, 0);
            this.tableLayoutPanel1.Controls.Add(this.cancelBtn, 2, 0);
            this.tableLayoutPanel1.Controls.Add(this.hideIcon, 3, 0);
            this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 219);
            this.tableLayoutPanel1.Name = "tableLayoutPanel1";
            this.tableLayoutPanel1.RowCount = 1;
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.tableLayoutPanel1.Size = new System.Drawing.Size(710, 95);
            this.tableLayoutPanel1.TabIndex = 11;
            // 
            // showIcon
            // 
            this.showIcon.Anchor = System.Windows.Forms.AnchorStyles.Left;
            this.showIcon.Image = ((System.Drawing.Image)(resources.GetObject("showIcon.Image")));
            this.showIcon.Location = new System.Drawing.Point(665, 168);
            this.showIcon.Name = "showIcon";
            this.showIcon.Size = new System.Drawing.Size(32, 37);
            this.showIcon.TabIndex = 10;
            this.showIcon.Visible = false;
            // 
            // fldsLayout
            // 
            this.fldsLayout.ColumnCount = 3;
            this.fldsLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 157F));
            this.fldsLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.fldsLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 48F));
            this.fldsLayout.Controls.Add(this.pwdLabel, 0, 1);
            this.fldsLayout.Controls.Add(this.newPwdUI, 1, 2);
            this.fldsLayout.Controls.Add(this.repeatPwdUI, 1, 3);
            this.fldsLayout.Controls.Add(this.newPwdLabel, 0, 2);
            this.fldsLayout.Controls.Add(this.repeatPwdLabel, 0, 3);
            this.fldsLayout.Controls.Add(this.pwdIcon, 2, 1);
            this.fldsLayout.Controls.Add(this.newPwdIcon, 2, 2);
            this.fldsLayout.Controls.Add(this.pwdUI, 1, 1);
            this.fldsLayout.Controls.Add(this.showIcon, 2, 3);
            this.fldsLayout.Dock = System.Windows.Forms.DockStyle.Fill;
            this.fldsLayout.Location = new System.Drawing.Point(0, 0);
            this.fldsLayout.Name = "fldsLayout";
            this.fldsLayout.RowCount = 4;
            this.fldsLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.fldsLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 73F));
            this.fldsLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 64F));
            this.fldsLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 64F));
            this.fldsLayout.Size = new System.Drawing.Size(710, 219);
            this.fldsLayout.TabIndex = 12;
            // 
            // pwdLabel
            // 
            this.pwdLabel.Anchor = System.Windows.Forms.AnchorStyles.Right;
            this.pwdLabel.AutoSize = true;
            this.pwdLabel.Location = new System.Drawing.Point(91, 39);
            this.pwdLabel.Name = "pwdLabel";
            this.pwdLabel.Size = new System.Drawing.Size(63, 31);
            this.pwdLabel.TabIndex = 0;
            this.pwdLabel.Text = "Pwd";
            // 
            // newPwdUI
            // 
            this.newPwdUI.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
            this.newPwdUI.Location = new System.Drawing.Point(160, 103);
            this.newPwdUI.Name = "newPwdUI";
            this.newPwdUI.PasswordChar = '*';
            this.newPwdUI.Size = new System.Drawing.Size(499, 39);
            this.newPwdUI.TabIndex = 1;
            // 
            // hideIcon
            // 
            this.hideIcon.Anchor = System.Windows.Forms.AnchorStyles.Left;
            this.hideIcon.Image = ((System.Drawing.Image)(resources.GetObject("hideIcon.Image")));
            this.hideIcon.Location = new System.Drawing.Point(651, 29);
            this.hideIcon.Name = "hideIcon";
            this.hideIcon.Size = new System.Drawing.Size(32, 37);
            this.hideIcon.TabIndex = 9;
            this.hideIcon.Visible = false;
            // 
            // repeatPwdUI
            // 
            this.repeatPwdUI.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
            this.repeatPwdUI.Location = new System.Drawing.Point(160, 167);
            this.repeatPwdUI.Name = "repeatPwdUI";
            this.repeatPwdUI.PasswordChar = '*';
            this.repeatPwdUI.Size = new System.Drawing.Size(499, 39);
            this.repeatPwdUI.TabIndex = 2;
            // 
            // newPwdLabel
            // 
            this.newPwdLabel.Anchor = System.Windows.Forms.AnchorStyles.Right;
            this.newPwdLabel.AutoSize = true;
            this.newPwdLabel.Location = new System.Drawing.Point(38, 107);
            this.newPwdLabel.Name = "newPwdLabel";
            this.newPwdLabel.Size = new System.Drawing.Size(116, 31);
            this.newPwdLabel.TabIndex = 6;
            this.newPwdLabel.Text = "NewPwd";
            // 
            // repeatPwdLabel
            // 
            this.repeatPwdLabel.Anchor = System.Windows.Forms.AnchorStyles.Right;
            this.repeatPwdLabel.AutoSize = true;
            this.repeatPwdLabel.Location = new System.Drawing.Point(10, 171);
            this.repeatPwdLabel.Name = "repeatPwdLabel";
            this.repeatPwdLabel.Size = new System.Drawing.Size(144, 31);
            this.repeatPwdLabel.TabIndex = 7;
            this.repeatPwdLabel.Text = "RepeatPwd";
            // 
            // pwdIcon
            // 
            this.pwdIcon.Anchor = System.Windows.Forms.AnchorStyles.Left;
            this.pwdIcon.Image = ((System.Drawing.Image)(resources.GetObject("pwdIcon.Image")));
            this.pwdIcon.Location = new System.Drawing.Point(665, 36);
            this.pwdIcon.Name = "pwdIcon";
            this.pwdIcon.Size = new System.Drawing.Size(32, 37);
            this.pwdIcon.TabIndex = 10;
            this.pwdIcon.Click += new System.EventHandler(this.pwdIcon_Click);
            // 
            // newPwdIcon
            // 
            this.newPwdIcon.Anchor = System.Windows.Forms.AnchorStyles.Left;
            this.newPwdIcon.Image = ((System.Drawing.Image)(resources.GetObject("newPwdIcon.Image")));
            this.newPwdIcon.Location = new System.Drawing.Point(665, 104);
            this.newPwdIcon.Name = "newPwdIcon";
            this.newPwdIcon.Size = new System.Drawing.Size(32, 37);
            this.newPwdIcon.TabIndex = 11;
            this.newPwdIcon.Click += new System.EventHandler(this.newPwdIcon_Click);
            // 
            // pwdUI
            // 
            this.pwdUI.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
            this.pwdUI.Location = new System.Drawing.Point(160, 35);
            this.pwdUI.Name = "pwdUI";
            this.pwdUI.PasswordChar = '*';
            this.pwdUI.Size = new System.Drawing.Size(499, 39);
            this.pwdUI.TabIndex = 0;
            // 
            // PwdDialog
            // 
            this.AcceptButton = this.okBtn;
            this.AutoScaleDimensions = new System.Drawing.SizeF(14F, 31F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.CancelButton = this.cancelBtn;
            this.ClientSize = new System.Drawing.Size(710, 314);
            this.Controls.Add(this.fldsLayout);
            this.Controls.Add(this.tableLayoutPanel1);
            this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.Name = "PwdDialog";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "PwdDialog";
            this.Activated += new System.EventHandler(this.PwdDialog_Activated);
            this.Load += new System.EventHandler(this.PwdDialog_Load);
            this.tableLayoutPanel1.ResumeLayout(false);
            this.fldsLayout.ResumeLayout(false);
            this.fldsLayout.PerformLayout();
            this.ResumeLayout(false);

        }

        #endregion
        private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
        public System.Windows.Forms.Button okBtn;
        public System.Windows.Forms.Button cancelBtn;
        private System.Windows.Forms.TableLayoutPanel fldsLayout;
        private System.Windows.Forms.TextBox pwdUI;
        private System.Windows.Forms.TextBox newPwdUI;
        private System.Windows.Forms.TextBox repeatPwdUI;
        private System.Windows.Forms.Label hideIcon;
        private System.Windows.Forms.Label showIcon;
        private System.Windows.Forms.Label newPwdIcon;
        private System.Windows.Forms.Label pwdIcon;
        public System.Windows.Forms.Label pwdLabel;
        public System.Windows.Forms.Label newPwdLabel;
        public System.Windows.Forms.Label repeatPwdLabel;
    }
}
View Code

PwdDialog.resx

<?xml version="1.0" encoding="utf-8"?>
<root>
  <!-- 
    Microsoft ResX Schema 
    
    Version 2.0
    
    The primary goals of this format is to allow a simple XML format 
    that is mostly human readable. The generation and parsing of the 
    various data types are done through the TypeConverter classes 
    associated with the data types.
    
    Example:
    
    ... ado.net/XML headers & schema ...
    <resheader name="resmimetype">text/microsoft-resx</resheader>
    <resheader name="version">2.0</resheader>
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
        <value>[base64 mime encoded serialized .NET Framework object]</value>
    </data>
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
        <comment>This is a comment</comment>
    </data>
                
    There are any number of "resheader" rows that contain simple 
    name/value pairs.
    
    Each data row contains a name, and value. The row also contains a 
    type or mimetype. Type corresponds to a .NET class that support 
    text/value conversion through the TypeConverter architecture. 
    Classes that don't support this are serialized and stored with the 
    mimetype set.
    
    The mimetype is used for serialized objects, and tells the 
    ResXResourceReader how to depersist the object. This is currently not 
    extensible. For a given mimetype the value must be set accordingly:
    
    Note - application/x-microsoft.net.object.binary.base64 is the format 
    that the ResXResourceWriter will generate, however the reader can 
    read any of the formats listed below.
    
    mimetype: application/x-microsoft.net.object.binary.base64
    value   : The object must be serialized with 
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.
    
    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with 
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
            : and then encoded with base64 encoding.

    mimetype: application/x-microsoft.net.object.bytearray.base64
    value   : The object must be serialized into a byte array 
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
  <data name="hideIcon.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAA1ZJREFUWEft
        lk1IVFEcxSf6AisiVy0KhCwpaOPaMAhahIsiBEsJF5VBGoUJQpG1aNPHwqBkopCgDxhCJKm08WtGkwjN
        LBeFiygoMgoiCWs1/f7Xcx9vctJpYy08cLjzzjn//73vvpn7JjKPefwX6OnpSYn1kuYWvb2970OLaOnu
        7i6QNQ3JZHIT+VJyDTBG9j5jM+O5rq6u7Yr9HWhQRNMXjG4RWlCF7ABoBr/QjGQhI4y17e3tuSrLDqlU
        agGFTeFmLKSxo6NjmSK2gFF5T5joEmM5mT2MF6AhqIWj5qk0e1BYAb+GGg3CrbJnxMDAQC7ZcphUre3I
        jb6+vg2KZAcK8+Aj38TI3dTJDoB+CDbbyPMvlByJxWJL0M5bnfiRhRyRPTMIl8DK/v7+FYyn1cDzHsxX
        1LJh7wesluXApLvRXoUyx2VlBoGtFP1U2G27jfClNNvScf9sGUthFD3u/UQikfZLQFsDY96HVbLSEY/H
        N2K+UahVsgPXi5joujxHFhIdGxtbqkiER+B3a4JemyUHQA8WwSL3Sp4CX5JVGAMK9PzpJ4RVxcRflDMO
        c11sXltbWw7Xz0xnscdcwW/A84uY5DzZJtkZd1U4xJ2sk5wGJjqozAHGh/Y5xAbL4F2xa7K3XVEG4LtF
        kH0tyYkGazTM9qyXnAa8WsvYJHbNeEY1ng+0OPvc7IoywDxlUpKcuNOLNHnMuFpWAHQ7cMwfkWS7Uoz2
        3NfCz3C/7Gkgf9Fn+bxP8hQQT3oTxgcHB3NkOdgXC31Cvttyg30RaXZVuue1aDS6WBEHMu4Rioclp4O7
        qwmFWpl0pSwH+4mF/KfQju5y82yH4HjIt59ucIKGep+QlBkEKhW0bRpi0h2yHNCroR06fiKjPzPyYVtI
        t0d2yhUCrrM60u03vYtwcILR5CzH60LZ5heiu2PY7kxyALQ6X2vkRjoY82RnB96Caym6GWqSYCyTPSvI
        2qk6FKq3F9y0V/ysoOgonPSN4Ds79WhoX6oS7jb8Ov4GLeO22l7l+I3SPJvs1e+aZwuKiuAdmn0PNcpI
        MvZnJu1Zc22v+A+hjP35KZKdPXTclnH3lxkNn2j2Ft6CNZ2dnVvQliueBmoK8FpgsFBZcwsmr/eLkDSP
        efxLRCK/AHXQGGduGmI4AAAAAElFTkSuQmCC
</value>
  </data>
  <data name="showIcon.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAlBJREFUWEft
        lr+LE0EcxVOpWApqdjYHB0aYmTsttLFQsFIsDxt/VHYWVyj+AVqr7RUWcgiizbUiaCEINoKKhXD/h3jJ
        7gbG75t5s9m91WzCCQHZD3zJ8N6b726yM7PpdXR0LIJy54+qibmhMvNY5XY7ycwbFMbQkonZWHWrRxj/
        d6jCXpQLvFa5+SXlZlZhfia5eYE5nH4wpNk9aTyqXkS0D/Ktn6pM3/Ql46BVbkTmYC7bLI7aW19RuX5Z
        afhRLnSn74bHGWkwcGvHkszeDtk4T3pIL0bmQ57rhkzeLZtk+on9YQ/Rxq9yLs3tXf/spTCGRruHLOZM
        b8Lsoift2fQn9lpt4kRfp+WRb7Qp+riSiSWa3mTMg7miT7+I/IK0/kwyspdiOC3sTro3HNDyqEJfmTYz
        X6W2WBgHXTKMe9AjzexO6Wf6Fq06aW4ulKHcvBu64WFankGmz2CFs8kjbElaYXtCgycZZGl50Ev8t7F/
        MtZXaQX6I305mlKfTrqzJ2iVyA3ep/+eUgN4yCBLqQSLV7xycfbdmqXlF1XcQt8GY3Oacg05B14hIwvu
        GaUG8HwfyVKqseLWT4n/BRlck/KcN+BXvM9sUWoAL2TsNqUaf72B+R4Btp33v1NqAA8ZZCmVzHwEoG0R
        Yp+LHrZfoR9SLikXoWSQpexpXYSR1m0YzoDg5/qzfD5Hcez1/WfB3Nsw0noQ4SyI27Fa0PadAQsfRJG2
        o9ifCfISSsf6AQrj6t4/0FEcWerLqIosqOW8jqss9Q9JlaX9Jevo+I/p9X4DY85axvE287gAAAAASUVO
        RK5CYII=
</value>
  </data>
  <data name="pwdIcon.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAA1ZJREFUWEft
        lk1IVFEcxSf6AisiVy0KhCwpaOPaMAhahIsiBEsJF5VBGoUJQpG1aNPHwqBkopCgDxhCJKm08WtGkwjN
        LBeFiygoMgoiCWs1/f7Xcx9vctJpYy08cLjzzjn//73vvpn7JjKPefwX6OnpSYn1kuYWvb2970OLaOnu
        7i6QNQ3JZHIT+VJyDTBG9j5jM+O5rq6u7Yr9HWhQRNMXjG4RWlCF7ABoBr/QjGQhI4y17e3tuSrLDqlU
        agGFTeFmLKSxo6NjmSK2gFF5T5joEmM5mT2MF6AhqIWj5qk0e1BYAb+GGg3CrbJnxMDAQC7ZcphUre3I
        jb6+vg2KZAcK8+Aj38TI3dTJDoB+CDbbyPMvlByJxWJL0M5bnfiRhRyRPTMIl8DK/v7+FYyn1cDzHsxX
        1LJh7wesluXApLvRXoUyx2VlBoGtFP1U2G27jfClNNvScf9sGUthFD3u/UQikfZLQFsDY96HVbLSEY/H
        N2K+UahVsgPXi5joujxHFhIdGxtbqkiER+B3a4JemyUHQA8WwSL3Sp4CX5JVGAMK9PzpJ4RVxcRflDMO
        c11sXltbWw7Xz0xnscdcwW/A84uY5DzZJtkZd1U4xJ2sk5wGJjqozAHGh/Y5xAbL4F2xa7K3XVEG4LtF
        kH0tyYkGazTM9qyXnAa8WsvYJHbNeEY1ng+0OPvc7IoywDxlUpKcuNOLNHnMuFpWAHQ7cMwfkWS7Uoz2
        3NfCz3C/7Gkgf9Fn+bxP8hQQT3oTxgcHB3NkOdgXC31Cvttyg30RaXZVuue1aDS6WBEHMu4Rioclp4O7
        qwmFWpl0pSwH+4mF/KfQju5y82yH4HjIt59ucIKGep+QlBkEKhW0bRpi0h2yHNCroR06fiKjPzPyYVtI
        t0d2yhUCrrM60u03vYtwcILR5CzH60LZ5heiu2PY7kxyALQ6X2vkRjoY82RnB96Caym6GWqSYCyTPSvI
        2qk6FKq3F9y0V/ysoOgonPSN4Ds79WhoX6oS7jb8Ov4GLeO22l7l+I3SPJvs1e+aZwuKiuAdmn0PNcpI
        MvZnJu1Zc22v+A+hjP35KZKdPXTclnH3lxkNn2j2Ft6CNZ2dnVvQliueBmoK8FpgsFBZcwsmr/eLkDSP
        efxLRCK/AHXQGGduGmI4AAAAAElFTkSuQmCC
</value>
  </data>
  <data name="newPwdIcon.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAA1ZJREFUWEft
        lk1IVFEcxSf6AisiVy0KhCwpaOPaMAhahIsiBEsJF5VBGoUJQpG1aNPHwqBkopCgDxhCJKm08WtGkwjN
        LBeFiygoMgoiCWs1/f7Xcx9vctJpYy08cLjzzjn//73vvpn7JjKPefwX6OnpSYn1kuYWvb2970OLaOnu
        7i6QNQ3JZHIT+VJyDTBG9j5jM+O5rq6u7Yr9HWhQRNMXjG4RWlCF7ABoBr/QjGQhI4y17e3tuSrLDqlU
        agGFTeFmLKSxo6NjmSK2gFF5T5joEmM5mT2MF6AhqIWj5qk0e1BYAb+GGg3CrbJnxMDAQC7ZcphUre3I
        jb6+vg2KZAcK8+Aj38TI3dTJDoB+CDbbyPMvlByJxWJL0M5bnfiRhRyRPTMIl8DK/v7+FYyn1cDzHsxX
        1LJh7wesluXApLvRXoUyx2VlBoGtFP1U2G27jfClNNvScf9sGUthFD3u/UQikfZLQFsDY96HVbLSEY/H
        N2K+UahVsgPXi5joujxHFhIdGxtbqkiER+B3a4JemyUHQA8WwSL3Sp4CX5JVGAMK9PzpJ4RVxcRflDMO
        c11sXltbWw7Xz0xnscdcwW/A84uY5DzZJtkZd1U4xJ2sk5wGJjqozAHGh/Y5xAbL4F2xa7K3XVEG4LtF
        kH0tyYkGazTM9qyXnAa8WsvYJHbNeEY1ng+0OPvc7IoywDxlUpKcuNOLNHnMuFpWAHQ7cMwfkWS7Uoz2
        3NfCz3C/7Gkgf9Fn+bxP8hQQT3oTxgcHB3NkOdgXC31Cvttyg30RaXZVuue1aDS6WBEHMu4Rioclp4O7
        qwmFWpl0pSwH+4mF/KfQju5y82yH4HjIt59ucIKGep+QlBkEKhW0bRpi0h2yHNCroR06fiKjPzPyYVtI
        t0d2yhUCrrM60u03vYtwcILR5CzH60LZ5heiu2PY7kxyALQ6X2vkRjoY82RnB96Caym6GWqSYCyTPSvI
        2qk6FKq3F9y0V/ysoOgonPSN4Ds79WhoX6oS7jb8Ov4GLeO22l7l+I3SPJvs1e+aZwuKiuAdmn0PNcpI
        MvZnJu1Zc22v+A+hjP35KZKdPXTclnH3lxkNn2j2Ft6CNZ2dnVvQliueBmoK8FpgsFBZcwsmr/eLkDSP
        efxLRCK/AHXQGGduGmI4AAAAAElFTkSuQmCC
</value>
  </data>
</root>
View Code

Github链接:

https://github.com/bsmith-zhao/vfs/blob/main/util/PwdDialog.cs

posted @ 2023-10-15 10:27  bsmith  阅读(76)  评论(0)    收藏  举报