From 0b67b1af993dcb1fc1879be4f3cfcd666868b05c Mon Sep 17 00:00:00 2001 From: thchazot1 Date: Fri, 10 Jun 2022 11:51:27 +0200 Subject: [PATCH] =?UTF-8?q?tout=20=C3=A7a=20(utiliser=20des=20photos=20dep?= =?UTF-8?q?uis=20internet)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Modèle/Expert.cs | 5 ++++ Modèle/Personne.cs | 2 ++ Modèle/Utilisateur.cs | 5 ++++ WpfApp1/AddAShark.xaml.cs | 5 ++-- WpfApp1/ChangerMotDePasse.xaml | 21 +++++++++----- WpfApp1/ChangerMotDePasse.xaml.cs | 40 +++++++++++++++++++++++++- WpfApp1/DescriptionAdd.xaml.cs | 22 +++++++++++--- WpfApp1/DescriptionEdit.xaml.cs | 16 ++++++++--- WpfApp1/InfoUtilisateur.xaml | 2 +- WpfApp1/InfoUtilisateur.xaml.cs | 5 ++++ WpfApp1/Persistance/ficReqs | 18 +++++++++++- WpfApp1/Persistance/ficUsers | 2 +- WpfApp1/UserControlRequin.xaml.cs | 15 +++++++++- WpfApp1/userControlDescription.xaml.cs | 18 ++++++++++-- 14 files changed, 151 insertions(+), 25 deletions(-) diff --git a/Modèle/Expert.cs b/Modèle/Expert.cs index 74a5d8a..79a950d 100644 --- a/Modèle/Expert.cs +++ b/Modèle/Expert.cs @@ -105,5 +105,10 @@ namespace Modèle { requins.Add(req); } + + public override void ChangerMotDePasse(string nvMdp) + { + MotDePasse = nvMdp; + } } } diff --git a/Modèle/Personne.cs b/Modèle/Personne.cs index d440c76..4dff978 100644 --- a/Modèle/Personne.cs +++ b/Modèle/Personne.cs @@ -25,5 +25,7 @@ namespace Modèle public abstract override string ToString(); public abstract void AjouterRequin(Requin req, ObservableCollection requins); + + public abstract void ChangerMotDePasse(string nvMdp); } } diff --git a/Modèle/Utilisateur.cs b/Modèle/Utilisateur.cs index b2bf463..3b58107 100644 --- a/Modèle/Utilisateur.cs +++ b/Modèle/Utilisateur.cs @@ -39,5 +39,10 @@ namespace Modèle requins.Add(req); NbSubmit++; } + + public override void ChangerMotDePasse(string nvMdp) + { + MotDePasse = nvMdp; + } } } diff --git a/WpfApp1/AddAShark.xaml.cs b/WpfApp1/AddAShark.xaml.cs index 0c3512d..e93e022 100644 --- a/WpfApp1/AddAShark.xaml.cs +++ b/WpfApp1/AddAShark.xaml.cs @@ -54,7 +54,6 @@ namespace WpfApp1 private void submit_Click(object sender, RoutedEventArgs e) { - int testCons = 0; Conservation cons = new Conservation(); List lesZones = new List(); string nom = name.LeContenu.Text; @@ -108,7 +107,7 @@ namespace WpfApp1 lesZones.Add(Zone.PACIFIQUE); } - if (testCons == 0 || lesZones.Count() == 0 || string.IsNullOrWhiteSpace(nom) || string.IsNullOrWhiteSpace(sciNam) || string.IsNullOrWhiteSpace(descri) + if (lesZones.Count() == 0 || string.IsNullOrWhiteSpace(nom) || string.IsNullOrWhiteSpace(sciNam) || string.IsNullOrWhiteSpace(descri) || string.IsNullOrWhiteSpace(photo) || string.IsNullOrWhiteSpace(video) || string.IsNullOrWhiteSpace(map) || string.IsNullOrWhiteSpace(fun)) { MessageBox.Show("Veuillez remplir toutes les informations"); @@ -123,7 +122,7 @@ namespace WpfApp1 } else if (MgrUser.SelectedUser is Expert exp) { - exp.AjouterRequin(requin, Mgr.RequinsAdd); + exp.AjouterRequin(requin, Mgr.Requins); } Close(); diff --git a/WpfApp1/ChangerMotDePasse.xaml b/WpfApp1/ChangerMotDePasse.xaml index e219229..988656a 100644 --- a/WpfApp1/ChangerMotDePasse.xaml +++ b/WpfApp1/ChangerMotDePasse.xaml @@ -8,7 +8,7 @@ Title="ChangerMotDePasse" Height="450" Width="800"> - + @@ -20,25 +20,32 @@ - - + + + + + + + + - - + + - - + + +