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

namespace GcDevicePc.CK_UI
{
    public partial class LandIn : Form
    {
        private string user = "admin";
        public static bool Island = false;
        CKVocAnalyzer.NumForm form;
        public LandIn()
        {
            InitializeComponent();
            this.ControlBox = false;
        }

        private void button1_Click(object sender, EventArgs e)  //登录系统
        {
            string strpw = DateTime.Now.ToString("HHmm");
            if (textBox1.Text == user && textBox2.Text == strpw)
            {
                Island = true;
            }
            else
            {
                Island = false;
            }
            if(form!=null)
            {
                form.Dispose();
            }
        }

        private void button2_Click(object sender, EventArgs e)  //放弃
        {
            Island = false;
        }

        private void LandIn_Load(object sender, EventArgs e)
        {
            textBox1.Text = user;
        }

        private void textBox2_Click(object sender, EventArgs e)
        {
            form = CKVocAnalyzer.NumForm.GetInstance((TextBox)sender);// new CKVocAnalyzer.NumForm((TextBox)sender);
            
            form.Show();
        }
    }
}
