From 9118f7a5abb88992b34d9bce01d8a5d9afab5caa Mon Sep 17 00:00:00 2001 From: Anthony RICHARD Date: Fri, 2 Jun 2023 19:00:32 +0200 Subject: [PATCH] =?UTF-8?q?popup=20suivre=20un=20jeu=20et=20popup=20pour?= =?UTF-8?q?=20le=20chagement=20sur=20info=20de=20l'utilisateur=20(reste=20?= =?UTF-8?q?plus=20qu'=C3=A0=20la=20mettre=20sur=20les=20boutons)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/Stim/AddGameMessagePopup.xaml.cs | 17 ----------------- Sources/Stim/AddGamePage.xaml.cs | 2 +- Sources/Stim/DetailledPage.xaml.cs | 4 +++- Sources/Stim/EntryPopup.xaml | 14 ++++++++++++++ Sources/Stim/EntryPopup.xaml.cs | 17 +++++++++++++++++ Sources/Stim/FollowPage.xaml | 6 +++--- ...dGameMessagePopup.xaml => MessagePopup.xaml} | 7 ++++--- Sources/Stim/MessagePopup.xaml.cs | 17 +++++++++++++++++ Sources/Stim/ProfilPage.xaml.cs | 8 ++++++++ Sources/Stim/Stim.csproj | 9 ++++++--- 10 files changed, 73 insertions(+), 28 deletions(-) delete mode 100644 Sources/Stim/AddGameMessagePopup.xaml.cs create mode 100644 Sources/Stim/EntryPopup.xaml create mode 100644 Sources/Stim/EntryPopup.xaml.cs rename Sources/Stim/{AddGameMessagePopup.xaml => MessagePopup.xaml} (76%) create mode 100644 Sources/Stim/MessagePopup.xaml.cs diff --git a/Sources/Stim/AddGameMessagePopup.xaml.cs b/Sources/Stim/AddGameMessagePopup.xaml.cs deleted file mode 100644 index 6bbee1d..0000000 --- a/Sources/Stim/AddGameMessagePopup.xaml.cs +++ /dev/null @@ -1,17 +0,0 @@ -using CommunityToolkit.Maui.Views; - -namespace Stim; - -public partial class AddGameMessagePopup : Popup -{ - public AddGameMessagePopup(string message) - { - InitializeComponent(); - placeholder.Text = message; - } - - public void CloseButton(object sender, EventArgs e) - { - Close(); - } -} \ No newline at end of file diff --git a/Sources/Stim/AddGamePage.xaml.cs b/Sources/Stim/AddGamePage.xaml.cs index 7655369..db7d2c8 100644 --- a/Sources/Stim/AddGamePage.xaml.cs +++ b/Sources/Stim/AddGamePage.xaml.cs @@ -34,7 +34,7 @@ public partial class AddGamePage : ContentPage } // //if (_ImgPath!=null) NameEntry.Text + ".png"; // //System.IO.File.Copy(_ImgPath, /**/, true); - await this.ShowPopupAsync(new AddGameMessagePopup(message)); + await this.ShowPopupAsync(new MessagePopup(message)); } private async void Button_Clicked(object sender, EventArgs e) diff --git a/Sources/Stim/DetailledPage.xaml.cs b/Sources/Stim/DetailledPage.xaml.cs index cc3b869..ceae734 100644 --- a/Sources/Stim/DetailledPage.xaml.cs +++ b/Sources/Stim/DetailledPage.xaml.cs @@ -1,3 +1,4 @@ +using CommunityToolkit.Maui.Views; using Model; using StimPersistance; @@ -39,8 +40,9 @@ public partial class DetailledPage : ContentPage //popup add review } - private void AddFollow(object sender, EventArgs e) + private async void AddFollow(object sender, EventArgs e) { + await this.ShowPopupAsync(new MessagePopup("Jeu ajouté dans les suivis !")); ((App)App.Current).Manager.CurrentUser.FollowAGame(CurrGame); } } \ No newline at end of file diff --git a/Sources/Stim/EntryPopup.xaml b/Sources/Stim/EntryPopup.xaml new file mode 100644 index 0000000..2a0b30b --- /dev/null +++ b/Sources/Stim/EntryPopup.xaml @@ -0,0 +1,14 @@ + + + + +