diff --git a/Solution/Wikipet's/Model/Espece.cs b/Solution/Wikipet's/Model/Espece.cs index b8fb84b..56ab307 100644 --- a/Solution/Wikipet's/Model/Espece.cs +++ b/Solution/Wikipet's/Model/Espece.cs @@ -8,7 +8,7 @@ using static System.Runtime.InteropServices.JavaScript.JSType; namespace Model { - public class Espece + public class Espece { public string Nom { get; } public string NomScientifique { get; } @@ -23,7 +23,6 @@ namespace Model public string Entretien { get; } public string Cout { get; } public string Conseil { get; } - public Espece(string nom = "", string nomScientifique = "", string image = "", string esperanceVie = "", string poidsMoyen = "", string tailleMoyenne = "", HashSet? races = null, string comportement = "", string sante = "", string education = "", string entretien = "", string cout = "", string conseil = "") { diff --git a/Solution/Wikipet's/Model/Especetheque.cs b/Solution/Wikipet's/Model/Especetheque.cs index d69cf75..507ba4b 100644 --- a/Solution/Wikipet's/Model/Especetheque.cs +++ b/Solution/Wikipet's/Model/Especetheque.cs @@ -25,8 +25,8 @@ namespace Model Races.Add(new("Abyssin")); Races.Add(new("American curl")); - listeEspeces.Add(new("Chien", "Canis lupus familiaris", "chien.png")); - listeEspeces.Add(new("Chat", "Felis catus", "chat.png", "15 à 20 ans", "15 à 20 kg", "10 à 15 cm", Races)); + listeEspeces.Add(new("Chien", "Canis lupus familiaris", "chien.jpg")); + listeEspeces.Add(new("Chat", "Felis catus", "chat.jpg", "15 à 20 ans", "15 à 20 kg", "10 à 15 cm", Races, "Les chats ont un comportement très solitaire", "Les chats ont une bonne santé", "Les chats s'éduque assez facilement", "Il faut changé leur caisse mais il se nettoie seul, sauf les chatons", "Vétérinaire, alimentation adapté, jouet", "Un conseil")); listeEspeces.Add(new("Hamster", "Cricetinae")); listeEspeces.Add(new("Lapin", "Oryctolagus cuniculus")); } diff --git a/Solution/Wikipet's/Views/App.xaml.cs b/Solution/Wikipet's/Views/App.xaml.cs index 68818dd..eb92446 100644 --- a/Solution/Wikipet's/Views/App.xaml.cs +++ b/Solution/Wikipet's/Views/App.xaml.cs @@ -1,18 +1,13 @@ using Model; +using System.ComponentModel; +using System.Runtime.CompilerServices; namespace Views { - public partial class App : Application + public partial class App : Application, INotifyPropertyChanged { public Especetheque Especetheque { get; private set; } = new Especetheque(); - public Espece EspeceSelectionner { - get => EspeceSelectionner; - set - { - EspeceSelectionner = value; - OnPropertyChanged(nameof(EspeceSelectionner)); - } - } + public Espece EspeceSelectionner; public App() { InitializeComponent(); diff --git a/Solution/Wikipet's/Views/DetailEspece.xaml b/Solution/Wikipet's/Views/DetailEspece.xaml index cfee7d0..b1817b3 100644 --- a/Solution/Wikipet's/Views/DetailEspece.xaml +++ b/Solution/Wikipet's/Views/DetailEspece.xaml @@ -2,10 +2,152 @@ - - + Title="{Binding Nom}"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Solution/Wikipet's/Views/DetailEspece.xaml.cs b/Solution/Wikipet's/Views/DetailEspece.xaml.cs index c230654..251dec3 100644 --- a/Solution/Wikipet's/Views/DetailEspece.xaml.cs +++ b/Solution/Wikipet's/Views/DetailEspece.xaml.cs @@ -1,10 +1,11 @@ using Model; +using System.ComponentModel; namespace Views; public partial class DetailEspece : ContentPage { - public DetailEspece() + public DetailEspece() { InitializeComponent(); BindingContext = (App.Current as App).EspeceSelectionner; diff --git a/Solution/Wikipet's/Views/Especes.xaml b/Solution/Wikipet's/Views/Especes.xaml index 81ec872..7a99595 100644 --- a/Solution/Wikipet's/Views/Especes.xaml +++ b/Solution/Wikipet's/Views/Especes.xaml @@ -2,12 +2,10 @@ + Title="Les espèces"> -