验证.cs
上传用户:yan_wy
上传日期:2007-06-09
资源大小:112k
文件大小:7k
源码类别:

ICQ/即时通讯

开发平台:

C#

  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. namespace qq
  7. {
  8. /// <summary>
  9. /// 验证 的摘要说明。
  10. /// </summary>
  11. public class 验证 : System.Windows.Forms.Form
  12. {
  13. private System.Windows.Forms.Label label1;
  14. private System.Windows.Forms.Label label2;
  15. public System.Windows.Forms.TextBox textBox1;
  16. public System.Windows.Forms.TextBox textBox2;
  17. private System.Windows.Forms.Button button1;
  18. private System.Windows.Forms.Button button2;
  19. private System.Windows.Forms.Button button3;
  20. private System.Windows.Forms.Label label3;
  21. public System.Windows.Forms.TextBox textBox3;
  22. /// <summary>
  23. /// 必需的设计器变量。
  24. /// </summary>
  25. private System.ComponentModel.Container components = null;
  26. public 验证()
  27. {
  28. //
  29. // Windows 窗体设计器支持所必需的
  30. //
  31. InitializeComponent();
  32. //
  33. // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
  34. //
  35. }
  36. /// <summary>
  37. /// 清理所有正在使用的资源。
  38. /// </summary>
  39. /// 
  40. static void Main() 
  41. {
  42. Application.Run(new 验证());
  43. }
  44. protected override void Dispose( bool disposing )
  45. {
  46. if( disposing )
  47. {
  48. if(components != null)
  49. {
  50. components.Dispose();
  51. }
  52. }
  53. base.Dispose( disposing );
  54. }
  55. #region Windows 窗体设计器生成的代码
  56. /// <summary>
  57. /// 设计器支持所需的方法 - 不要使用代码编辑器修改
  58. /// 此方法的内容。
  59. /// </summary>
  60. private void InitializeComponent()
  61. {
  62. this.label1 = new System.Windows.Forms.Label();
  63. this.label2 = new System.Windows.Forms.Label();
  64. this.textBox1 = new System.Windows.Forms.TextBox();
  65. this.textBox2 = new System.Windows.Forms.TextBox();
  66. this.button1 = new System.Windows.Forms.Button();
  67. this.button2 = new System.Windows.Forms.Button();
  68. this.button3 = new System.Windows.Forms.Button();
  69. this.label3 = new System.Windows.Forms.Label();
  70. this.textBox3 = new System.Windows.Forms.TextBox();
  71. this.SuspendLayout();
  72. // 
  73. // label1
  74. // 
  75. this.label1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
  76. this.label1.Location = new System.Drawing.Point(48, 80);
  77. this.label1.Name = "label1";
  78. this.label1.Size = new System.Drawing.Size(48, 32);
  79. this.label1.TabIndex = 0;
  80. this.label1.Text = "QQ号码";
  81. this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  82. // 
  83. // label2
  84. // 
  85. this.label2.Location = new System.Drawing.Point(48, 136);
  86. this.label2.Name = "label2";
  87. this.label2.Size = new System.Drawing.Size(48, 24);
  88. this.label2.TabIndex = 1;
  89. this.label2.Text = "QQ密码";
  90. this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  91. // 
  92. // textBox1
  93. // 
  94. this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  95. this.textBox1.Location = new System.Drawing.Point(128, 88);
  96. this.textBox1.Name = "textBox1";
  97. this.textBox1.Size = new System.Drawing.Size(96, 21);
  98. this.textBox1.TabIndex = 2;
  99. this.textBox1.Text = "";
  100. // 
  101. // textBox2
  102. // 
  103. this.textBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  104. this.textBox2.Location = new System.Drawing.Point(128, 136);
  105. this.textBox2.Name = "textBox2";
  106. this.textBox2.PasswordChar = '*';
  107. this.textBox2.Size = new System.Drawing.Size(96, 21);
  108. this.textBox2.TabIndex = 3;
  109. this.textBox2.Text = "";
  110. // 
  111. // button1
  112. // 
  113. this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
  114. this.button1.Location = new System.Drawing.Point(48, 192);
  115. this.button1.Name = "button1";
  116. this.button1.Size = new System.Drawing.Size(40, 32);
  117. this.button1.TabIndex = 4;
  118. this.button1.Text = "登陆";
  119. this.button1.Click += new System.EventHandler(this.button1_Click);
  120. // 
  121. // button2
  122. // 
  123. this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
  124. this.button2.Location = new System.Drawing.Point(120, 192);
  125. this.button2.Name = "button2";
  126. this.button2.Size = new System.Drawing.Size(48, 32);
  127. this.button2.TabIndex = 5;
  128. this.button2.Text = "取消";
  129. this.button2.Click += new System.EventHandler(this.button2_Click);
  130. // 
  131. // button3
  132. // 
  133. this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
  134. this.button3.Location = new System.Drawing.Point(208, 192);
  135. this.button3.Name = "button3";
  136. this.button3.Size = new System.Drawing.Size(48, 32);
  137. this.button3.TabIndex = 6;
  138. this.button3.Text = "注册";
  139. this.button3.Click += new System.EventHandler(this.button3_Click);
  140. // 
  141. // label3
  142. // 
  143. this.label3.Location = new System.Drawing.Point(32, 48);
  144. this.label3.Name = "label3";
  145. this.label3.Size = new System.Drawing.Size(72, 23);
  146. this.label3.TabIndex = 7;
  147. this.label3.Text = "服务器地址";
  148. // 
  149. // textBox3
  150. // 
  151. this.textBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  152. this.textBox3.Location = new System.Drawing.Point(128, 48);
  153. this.textBox3.Name = "textBox3";
  154. this.textBox3.Size = new System.Drawing.Size(96, 21);
  155. this.textBox3.TabIndex = 1;
  156. this.textBox3.Text = "";
  157. // 
  158. // 验证
  159. // 
  160. this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
  161. this.BackColor = System.Drawing.SystemColors.ActiveBorder;
  162. this.ClientSize = new System.Drawing.Size(312, 237);
  163. this.Controls.Add(this.textBox3);
  164. this.Controls.Add(this.textBox2);
  165. this.Controls.Add(this.textBox1);
  166. this.Controls.Add(this.label3);
  167. this.Controls.Add(this.button3);
  168. this.Controls.Add(this.button2);
  169. this.Controls.Add(this.button1);
  170. this.Controls.Add(this.label2);
  171. this.Controls.Add(this.label1);
  172. this.MaximizeBox = false;
  173. this.Name = "验证";
  174. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
  175. this.Text = "QQ用户登陆";
  176. this.Load += new System.EventHandler(this.验证_Load);
  177. this.ResumeLayout(false);
  178. }
  179. #endregion
  180. private void 验证_Load(object sender, System.EventArgs e)
  181. {
  182. }
  183. private void button2_Click(object sender, System.EventArgs e)
  184. {
  185. this.Close();
  186. }
  187. private void button1_Click(object sender, System.EventArgs e)
  188. {
  189. if(this.textBox2.Text==""||this.textBox3.Text=="")
  190. MessageBox.Show("请填完 ");
  191. else
  192. {
  193. this.Visible=false;
  194. Form1 form=new Form1(this);
  195. form.Show();
  196. }
  197. }
  198. private void button3_Click(object sender, System.EventArgs e)
  199. {
  200. 注册 abc=new 注册(this);
  201. abc.Show();
  202. this.Visible=false;
  203. }
  204. }
  205. }