private void LoginBtn_Click(object sender, RoutedEventArgs e) { if (userNameTxtBox.Text.ToUpper() == "USER" && passwordBox.Password.ToUpper() == "USER") { MenuWindow menuWindow = new MenuWindow(); menuWindow.Show(); menuWindow.CreateRosterBtn.IsEnabled = false; this.Hide(); } else if (userNameTxtBox.Text.ToUpper() == "ADMIN" && passwordBox.Password.ToUpper() == "ADMIN") { MenuWindow menuWindow = new MenuWindow(); menuWindow.Show(); this.Hide(); } else { MessageBox.Show("Forkert Brugernavn eller Password"); } }
private void LoginBtn_Click(object sender, RoutedEventArgs e) { //if (userNameTxtBox.Text.ToUpper() == "USER" && passwordBox.Password.ToUpper() == "USER") //{ //MenuWindow menuWindow = new MenuWindow(); //menuWindow.Show(); //menuWindow.CreateRosterBtn.IsEnabled = false; //this.Hide(); //} // else if (userNameTxtBox.Text.ToUpper() == "ADMIN" && passwordBox.Password.ToUpper() == "ADMIN") //{ MenuWindow menuWindow = new MenuWindow(); //-------- VI HACKER OS IND! xD menuWindow.Show(); this.Hide(); //} //else //{ // MessageBox.Show("Forkert Brugernavn eller Password"); //} }