验证.cs
上传用户:yan_wy
上传日期:2007-06-09
资源大小:112k
文件大小:7k
- using System;
- using System.Drawing;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- namespace qq
- {
- /// <summary>
- /// 验证 的摘要说明。
- /// </summary>
- public class 验证 : System.Windows.Forms.Form
- {
-
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Label label2;
- public System.Windows.Forms.TextBox textBox1;
- public System.Windows.Forms.TextBox textBox2;
- private System.Windows.Forms.Button button1;
- private System.Windows.Forms.Button button2;
- private System.Windows.Forms.Button button3;
- private System.Windows.Forms.Label label3;
- public System.Windows.Forms.TextBox textBox3;
- /// <summary>
- /// 必需的设计器变量。
- /// </summary>
- private System.ComponentModel.Container components = null;
- public 验证()
- {
- //
- // Windows 窗体设计器支持所必需的
- //
-
- InitializeComponent();
-
-
- //
- // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
- //
- }
- /// <summary>
- /// 清理所有正在使用的资源。
- /// </summary>
- ///
- static void Main()
- {
- Application.Run(new 验证());
- }
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
- #region Windows 窗体设计器生成的代码
- /// <summary>
- /// 设计器支持所需的方法 - 不要使用代码编辑器修改
- /// 此方法的内容。
- /// </summary>
- private void InitializeComponent()
- {
- this.label1 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.textBox1 = new System.Windows.Forms.TextBox();
- this.textBox2 = new System.Windows.Forms.TextBox();
- this.button1 = new System.Windows.Forms.Button();
- this.button2 = new System.Windows.Forms.Button();
- this.button3 = new System.Windows.Forms.Button();
- this.label3 = new System.Windows.Forms.Label();
- this.textBox3 = new System.Windows.Forms.TextBox();
- this.SuspendLayout();
- //
- // label1
- //
- this.label1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
- this.label1.Location = new System.Drawing.Point(48, 80);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(48, 32);
- this.label1.TabIndex = 0;
- this.label1.Text = "QQ号码";
- this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
- //
- // label2
- //
- this.label2.Location = new System.Drawing.Point(48, 136);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(48, 24);
- this.label2.TabIndex = 1;
- this.label2.Text = "QQ密码";
- this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
- //
- // textBox1
- //
- this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.textBox1.Location = new System.Drawing.Point(128, 88);
- this.textBox1.Name = "textBox1";
- this.textBox1.Size = new System.Drawing.Size(96, 21);
- this.textBox1.TabIndex = 2;
- this.textBox1.Text = "";
- //
- // textBox2
- //
- this.textBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.textBox2.Location = new System.Drawing.Point(128, 136);
- this.textBox2.Name = "textBox2";
- this.textBox2.PasswordChar = '*';
- this.textBox2.Size = new System.Drawing.Size(96, 21);
- this.textBox2.TabIndex = 3;
- this.textBox2.Text = "";
- //
- // button1
- //
- this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
- this.button1.Location = new System.Drawing.Point(48, 192);
- this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(40, 32);
- this.button1.TabIndex = 4;
- this.button1.Text = "登陆";
- this.button1.Click += new System.EventHandler(this.button1_Click);
- //
- // button2
- //
- this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
- this.button2.Location = new System.Drawing.Point(120, 192);
- this.button2.Name = "button2";
- this.button2.Size = new System.Drawing.Size(48, 32);
- this.button2.TabIndex = 5;
- this.button2.Text = "取消";
- this.button2.Click += new System.EventHandler(this.button2_Click);
- //
- // button3
- //
- this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
- this.button3.Location = new System.Drawing.Point(208, 192);
- this.button3.Name = "button3";
- this.button3.Size = new System.Drawing.Size(48, 32);
- this.button3.TabIndex = 6;
- this.button3.Text = "注册";
- this.button3.Click += new System.EventHandler(this.button3_Click);
- //
- // label3
- //
- this.label3.Location = new System.Drawing.Point(32, 48);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(72, 23);
- this.label3.TabIndex = 7;
- this.label3.Text = "服务器地址";
- //
- // textBox3
- //
- this.textBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.textBox3.Location = new System.Drawing.Point(128, 48);
- this.textBox3.Name = "textBox3";
- this.textBox3.Size = new System.Drawing.Size(96, 21);
- this.textBox3.TabIndex = 1;
- this.textBox3.Text = "";
- //
- // 验证
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
- this.BackColor = System.Drawing.SystemColors.ActiveBorder;
- this.ClientSize = new System.Drawing.Size(312, 237);
- this.Controls.Add(this.textBox3);
- this.Controls.Add(this.textBox2);
- this.Controls.Add(this.textBox1);
- this.Controls.Add(this.label3);
- this.Controls.Add(this.button3);
- this.Controls.Add(this.button2);
- this.Controls.Add(this.button1);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.label1);
- this.MaximizeBox = false;
- this.Name = "验证";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "QQ用户登陆";
- this.Load += new System.EventHandler(this.验证_Load);
- this.ResumeLayout(false);
- }
- #endregion
- private void 验证_Load(object sender, System.EventArgs e)
- {
-
- }
- private void button2_Click(object sender, System.EventArgs e)
- {
- this.Close();
- }
- private void button1_Click(object sender, System.EventArgs e)
- {
- if(this.textBox2.Text==""||this.textBox3.Text=="")
- MessageBox.Show("请填完 ");
- else
- {
- this.Visible=false;
- Form1 form=new Form1(this);
- form.Show();
- }
-
- }
- private void button3_Click(object sender, System.EventArgs e)
- {
- 注册 abc=new 注册(this);
- abc.Show();
- this.Visible=false;
- }
- }
- }