private void btnlogin_Click(object sender, RoutedEventArgs e) { if (textBox.Text == "TommyK") { if (Accounts[0].checkPassword("stuff")) { Window accountWindow1 = new AccountScreen(); accountWindow1.Closed += AccountWindow_Closed; accountWindow1.Show(); this.Hide(); } else { Label.Visibility.Show() } } Window accountWindow = new AccountScreen(); accountWindow.Closed += AccountWindow_Closed; accountWindow.Show(); this.Hide(); }
private void button_Click(object sender, RoutedEventArgs e) { Window AccountScreen = new AccountScreen(); AccountScreen.Closed += AccountScreen_Closed; AccountScreen.Show(); this.Hide(); }