From d9c8149aafb12ad6913c2004909cfd0a2489313d Mon Sep 17 00:00:00 2001 From: V J Date: Fri, 2 Jun 2023 09:57:52 +0200 Subject: [PATCH] =?UTF-8?q?modification=20page=20de=20cr=C3=A9ation=20d'oe?= =?UTF-8?q?uvre?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MangaMap/Views/CreateOeuvre.xaml.cs | 7 +++---- MangaMap/Views/FicheAnime.xaml.cs | 11 +++-------- MangaMap/Views/createOeuvre.xaml | 11 +++++++---- MangaMap/Views/ficheAnime.xaml | 17 ++++++++--------- MangaMap/Views/listPage.xaml | 1 - MangaMap/Views/listPage.xaml.cs | 12 ------------ MangaMap/Views/settingsPage.xaml.cs | 8 ++++---- 7 files changed, 25 insertions(+), 42 deletions(-) diff --git a/MangaMap/Views/CreateOeuvre.xaml.cs b/MangaMap/Views/CreateOeuvre.xaml.cs index ee61349..de64a2f 100644 --- a/MangaMap/Views/CreateOeuvre.xaml.cs +++ b/MangaMap/Views/CreateOeuvre.xaml.cs @@ -4,20 +4,19 @@ using static System.Runtime.InteropServices.JavaScript.JSType; using System.Threading.Tasks; using Microsoft.Maui.Storage; - namespace MangaMap.Views; public partial class createOeuvre : ContentPage { public Manager my_manager => (App.Current as App).MyManager; + private string imagePath; public createOeuvre() { InitializeComponent(); + BindingContext = this; } - private string imagePath; - async void SelectImageClicked(object sender, EventArgs e) { var result = await FilePicker.PickAsync(new PickOptions @@ -33,7 +32,7 @@ public partial class createOeuvre : ContentPage imagePath = result.FullPath; // Affichez l'image sélectionnée dans l'interface utilisateur, si nécessaire - + } } diff --git a/MangaMap/Views/FicheAnime.xaml.cs b/MangaMap/Views/FicheAnime.xaml.cs index f2327b4..b83d928 100644 --- a/MangaMap/Views/FicheAnime.xaml.cs +++ b/MangaMap/Views/FicheAnime.xaml.cs @@ -12,11 +12,9 @@ public partial class ficheAnime : ContentPage, INotifyPropertyChanged public ficheAnime() { - - InitializeComponent(); - this.BindingContext = this; + BindingContext = this; } public ficheAnime(Oeuvre anime) @@ -25,11 +23,9 @@ public partial class ficheAnime : ContentPage, INotifyPropertyChanged InitializeComponent(); - this.BindingContext = this; + BindingContext = this; } - - public async void AjouterListe(object sender, EventArgs e) { if (my_manager.UtilisateurActuel.Email == null) @@ -40,7 +36,7 @@ public partial class ficheAnime : ContentPage, INotifyPropertyChanged string selectedOption = await DisplayActionSheet("Ajouter à quelle liste ?", "Annuler", null, "En Visionnage", "Déjà Vu", "Pour Plus Tard", "Favoris"); - if (selectedOption == "Annuler") + if (selectedOption == "Annuler" || selectedOption == null) return; Debug.WriteLine("Selected Option: " + selectedOption); @@ -75,7 +71,6 @@ public partial class ficheAnime : ContentPage, INotifyPropertyChanged my_manager.sauvegarder(); await Navigation.PushAsync(new listPage()); - //await Shell.Current.GoToAsync("//page/secondaire/listPage"); } diff --git a/MangaMap/Views/createOeuvre.xaml b/MangaMap/Views/createOeuvre.xaml index 1c4bdc3..03eb564 100644 --- a/MangaMap/Views/createOeuvre.xaml +++ b/MangaMap/Views/createOeuvre.xaml @@ -3,15 +3,18 @@ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="MangaMap.Views.createOeuvre" Background="{StaticResource Secondary}"> - + -