private void BtnLogOut_Click(object sender, EventArgs e) //Main menu Button
        {
            frmUserDetails MainMenu = new frmUserDetails();

            this.Hide();
            MainMenu.Show();
        }
Esempio n. 2
0
        private void BtnEnter_Click(object sender, EventArgs e)
        {
            EnteredUserName = txtUserField.Text;
            EnteredPassword = txtPasswordField.Text;

            if ((EnteredUserName == UserName) && (EnteredPassword == Password))
            {
                frmUserDetails MainMenu = new frmUserDetails();
                this.Hide();
                MainMenu.Show();
            }
            else
            {
                MessageBox.Show("Detailed incorrect");
                attempts = attempts + 1;
            }

            if (attempts > 3)
            {
                Application.Exit();
            }
        }