// game goes to profile page private void button_profile_Click(object sender, RoutedEventArgs e) { MainWindow newwindow = new MainWindow(); Profile profile = new Profile(newwindow, playerOneId); profile.Show(); this.Hide(); }
// Button to open the Profile window private void button_Profile_Click(object sender, RoutedEventArgs e) { // Profile is open with two arguments // 1. current window, 2. Player One user ID Profile profile = new Profile(this, playerOneUserID); profile.Show(); this.Hide(); }
// Button to open the Profile window private void Button_ViewProfilePlayer2_Click(object sender, RoutedEventArgs e) { // Profile window is opened using Player Two username Profile profile = new Profile(this, playerTwoUserID); profile.Show(); this.Hide(); }
// Button is used to open the Profile window for Player One private void Button_ViewProfilePlayer1_Click(object sender, RoutedEventArgs e) { Profile profile = new Profile(this, playerOneUserID); profile.Show(); this.Hide(); }