Ejemplo n.º 1
0
        private void Login_button_Click(object sender, EventArgs e)
        {
            string userName = "******";
            string pass     = "******";

            if (Username_textBox.Text == "" || Password_textBox.Text == "")
            {
                MessageBox.Show("You can't leave any ogf the field empty!");
            }
            else if ((Username_textBox.Text == userName) && (Password_textBox.Text == pass))
            {
                MessageBox.Show("Welcome " + userName);
                Username_textBox.Clear();
                Password_textBox.Clear();
            }
            else
            {
                MessageBox.Show("Invalid User Name or Password");
                Username_textBox.Clear();
                Password_textBox.Clear();
                Username_textBox.Focus();
            }
        }
Ejemplo n.º 2
0
 private void Reset_button_Click(object sender, EventArgs e)
 {
     Username_textBox.Clear();
     Password_textBox.Clear();
     Username_textBox.Focus();
 }