private void Register_Click(object sender, RoutedEventArgs e) //Register button was clicked { UserModel user = reg.Register(); if (user != null) //Only open the board window if the Register was sucessful { ShowBoardWindow board = new ShowBoardWindow(user); board.Show(); this.Close(); } }
private void Login_Click(object sender, RoutedEventArgs e) //Login button was clicked { UserModel user = loginVM.Login(); if (user != null) //Only change windows if login was succesfull { ShowBoardWindow board = new ShowBoardWindow(user); board.Show(); this.Close(); } }