From c5105406adb8ae84bc2ed4873da6959fec2fcbe8 Mon Sep 17 00:00:00 2001 From: "remi.lavergne" Date: Fri, 26 May 2023 12:19:25 +0200 Subject: [PATCH] (Ajout du CS) --- GameAtlas/GameAtlas/Views/PageAccueil.xaml.cs | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 GameAtlas/GameAtlas/Views/PageAccueil.xaml.cs diff --git a/GameAtlas/GameAtlas/Views/PageAccueil.xaml.cs b/GameAtlas/GameAtlas/Views/PageAccueil.xaml.cs new file mode 100644 index 0000000..af6087f --- /dev/null +++ b/GameAtlas/GameAtlas/Views/PageAccueil.xaml.cs @@ -0,0 +1,32 @@ +using GameAtlas.Models; + + +namespace GameAtlas.Views; + + +public partial class PageAcceuil : ContentPage +{ + public Manager AccueilManager => (App.Current as App).MyManager; + + public PageAcceuil() + { + InitializeComponent(); + + BindingContext = AccueilManager; + } + + private async void OnProfil_Tapped(object sender, EventArgs e) + { + await Navigation.PushAsync(new PageProfil()); + } + + private async void OnButtonClicked(object sender, EventArgs e) + { + var selectedjeu = (sender as ImageButton)?.BindingContext as Jeu; + if (selectedjeu != null) + { + await Navigation.PushAsync(new PageJeu(selectedjeu)); + } + } + +} \ No newline at end of file