www.pudn.com > 20071920285172.rar > Loginfrm.cs


using System; 
using System.Collections.Generic; 
using System.ComponentModel; 
using System.Drawing; 
using System.Text; 
using System.Windows.Forms; 
using Login.Logic; 
 
namespace Login.View 
{ 
    public partial class Loginfrm : Form 
    { 
        public Loginfrm() 
        { 
            InitializeComponent(); 
        } 
 
        private void button1_Click(object sender, EventArgs e) 
        { 
            string a=LoginAction.canLogin(textBox1.Text, textBox2.Text); 
            if (a == "") 
            { 
                MessageBox.Show("用户名或密码不正确!"); 
            } 
            else  
            { 
                this.Hide(); 
                this.MdiParent.MainMenuStrip.Enabled=true; 
            } 
        } 
 
        private void button2_Click(object sender, EventArgs e) 
        { 
            Application.Exit(); 
        } 
    } 
}