// game goes to first page of the application private void button_Home_Click(object sender, RoutedEventArgs e) { MainWindow newwindow = new MainWindow(); newwindow.Show(); this.Hide(); }
// 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(); }
private void image_click(object sender, MouseButtonEventArgs e) { MainWindow newwindow = new MainWindow(); newwindow.Show(); this.Hide(); mediaPlayer.Stop(); Button_Soundplay.Content = "OFF"; soundON = false; }
// this module is active as soon as game counter is zero private void isGameOver() { MainWindow newwindow = new MainWindow(); GameOver gmover = new GameOver(newwindow,this, gameWinner, playerOneId, playerTwoId, gameMode); updateHistory(); this.Hide(); gmover.Show(); mediaPlayer.Stop(); Button_Soundplay.Content = "OFF"; soundON = false; }