Beispiel #1
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            //thoa man ??
            if (txtName.Text.Trim().Length == 0 || txtPass.Text.Length == 0)
            {
                dem++;
                MessageBox.Show("???");
            }
            else if (txtName.Text.Equals("LanRung") && txtPass.Text.Trim().Equals("RungLan"))

            {
                DangNhap          = new clsDangNhap(txtName.Text.Trim(), txtPass.Text.Trim());
                this.DialogResult = DialogResult.OK;
            }
            else
            {
                dem++;
                MessageBox.Show("???");
            }
            if (dem == 3)
            {
                MessageBox.Show("over lần???");
                this.Close();
            }
        }
Beispiel #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            frmLogin frm = new frmLogin();

            if (frm.ShowDialog() == DialogResult.OK)
            {
                clsDangNhap obj = frm.DangNhap;
                //Application.Run(new frmMainQLPMay());
                Application.Run(new frmMainQLMayTinh(obj));
            }
        }
Beispiel #3
0
 public frmMainQLMayTinh(clsDangNhap obj)
 {
     InitializeComponent();
     this.Text = "Ban vừa đăng nhập user " + obj.UserName + " và pass " + obj.PassWord;
 }