using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private bool ISLOGIN = false;
        //就加在其构造函数的前面。这东西我们等下要用。
        //然后加一个属性，该属性用来判别是否登录
        public bool isLogin
         {
           get 
           {
             return this.ISLOGIN;
           }
         }
        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (this.textBox1.Text == "qq" && this.textBox2.Text == "qq")
            {
                this.ISLOGIN = true;
                //frmEditor f2 = new frmEditor();
                //f2.ShowDialog();
                this.Close();//登陆成功才关闭登陆登陆窗体
            }
            else
            {
                MessageBox.Show("非法用户名或密码，请再重试一次！");
            }
        }
    }
}