protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); gererScore = (GererScore)e.Parameter; lbListeScores.DataContext = gererScore.TabScores; }
/// <summary> /// Constructeur /// </summary> public MainPage() { this.InitializeComponent(); /// Affichage de la page d'accueil gererScore = new GererScore(); contentFrame.Navigate(typeof(AccueilPage), gererScore); }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); gererScore = (GererScore)e.Parameter; moteurMenace = new MoteurMenace(grille, gererScore); moteurPlanete = new MoteurPlanete(); mpTheme = new MediaPlayer(); /// Création de la planète à protéger genererNouvellePlanete(); initialiserJeu(); }
/// <summary> /// Constructeur de la classe ContentDialogGameOver /// </summary> public ContentDialogGameOver(GererScore gererScore) { this.InitializeComponent(); this.gererScore = gererScore; /// Récupération du score du joueur if (Application.Current.Resources.ContainsKey("score")) { Score.Text = ((int)Application.Current.Resources["score"]).ToString(); } if (isSon()) { MediaPlayer mediaPlayer = new MediaPlayer(); mediaPlayer.Source = Windows.Media.Core.MediaSource.CreateFromUri(new System.Uri("ms-appx:///Assets/Sons/Game_Over_PacMan.mp3")); mediaPlayer.Play(); } }
/// <summary> /// Constructeur de la classe MoteurMenace /// </summary> /// <param name="grille">grille de la page GamePage.xaml</param> /// <param name="gererScore">Classe de gestion des scores</param> public MoteurMenace(Grid grille, GererScore gererScore) { this.grille = grille; this.gererScore = gererScore; }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); gererScore = (GererScore)e.Parameter; }