using System;
using System.Windows.Forms;
using CRVM.SIDExcuter;

namespace CRVM
{
    public partial class login : Form
    {
        public login()
        {
            InitializeComponent(); 
        }

        private void button2_Click(object sender, EventArgs e)
        {
            if (DbHelper.GetInstance("").IsUser(textBox2.Text.Trim()))
            {
                this.DialogResult = DialogResult.OK;
            }
            else
            {
                MessageBox.Show("密码错误！");
            }
            //this.DialogResult = DialogResult.OK;
        }

        private void login_Load(object sender, EventArgs e)
        {

        }

        private void textBox2_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                button2_Click(sender, new EventArgs());
            }
        }


    }
}
