|
C#编写的一个简单的登陆界面对话框的原代码(4) this.textBox1, this.label3, this.label2, this.label1}); this.Name = "Form1"; this.Text = "Login"; this.ResumeLayout(false); } #endregion /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] static void Main() { Application.Run(new Form1()); } private void button1_Click(object sender, System.EventArgs e) { if(textBox1.Text=="yxq" && textBox2.Text=="1016") { MessageBox.Show("Good! it's sUCsess to login"); } else { MessageBox.Show("please try again to login!"); } } private void button2_Click(object sender, System.EventArgs e) { Dispose(); } } }
|