www.pudn.com > QQShield.rar > PWD.cs
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace QQShield
{
///
/// PWD 的摘要说明。
///
public class PWD : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
///
/// 必需的设计器变量。
///
private System.ComponentModel.Container components = null;
public PWD()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
///
/// 清理所有正在使用的资源。
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
///
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
///
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(PWD));
this.textBox1 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBox1.ForeColor = System.Drawing.Color.Orange;
this.textBox1.Location = new System.Drawing.Point(80, 12);
this.textBox1.Name = "textBox1";
this.textBox1.PasswordChar = '#';
this.textBox1.Size = new System.Drawing.Size(120, 21);
this.textBox1.TabIndex = 0;
this.textBox1.Text = "";
//
// button1
//
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Location = new System.Drawing.Point(72, 44);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(50, 24);
this.button1.TabIndex = 1;
this.button1.Text = "确定";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label1
//
this.label1.Location = new System.Drawing.Point(8, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(66, 16);
this.label1.TabIndex = 2;
this.label1.Text = "请输入密码";
//
// PWD
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(211, 74);
this.Controls.Add(this.label1);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "PWD";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "聊天记录保护器 V2.1";
this.ResumeLayout(false);
}
#endregion
private void button1_Click(object sender, System.EventArgs e)
{
Form1.password=this.textBox1.Text;
this.Close();
}
}
}