private void LoginButton_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(usernameT.Text)) { MessageBox.Show("Please enter username"); return; } if (string.IsNullOrEmpty(passwordT.Text)) { MessageBox.Show("Please enter password"); return; } if ((usernameT.Text == "monitor") && (passwordT.Text == "123456")) { this.Hide(); ManagerMainScreen mainScreen = new ManagerMainScreen(); mainScreen.ShowDialog(); this.Close(); } else { MessageBox.Show("Invalid username or password"); usernameT.Text = ""; passwordT.Text = ""; } //ManagerMainScreen mainScreen = new ManagerMainScreen(); //mainScreen.Show(); //this.Close(); }
private void backBtn_Click(object sender, EventArgs e) { this.Hide(); ManagerMainScreen mainScreen = new ManagerMainScreen(); mainScreen.ShowDialog(); this.Close(); }
private void button3_Click(object sender, EventArgs e) { ManagerMainScreen mngScreen = new ManagerMainScreen(); this.Hide(); mngScreen.ShowDialog(); this.Close(); }