From 7b9a792e0877792d46e613e8086950b9fffef411 Mon Sep 17 00:00:00 2001 From: Leana BESSON Date: Thu, 25 May 2023 11:46:12 +0200 Subject: [PATCH] Toolkit pour le boutton Animaux --- Sources/Model/Animal.cs | 2 +- Sources/Model/Stub.cs | 4 + Sources/Views/Animaux.xaml | 91 ++++++------ Sources/Views/Animaux.xaml.cs | 10 +- Sources/Views/App.xaml.cs | 8 +- Sources/Views/DetailAnimal.xaml | 66 +++++++++ Sources/Views/DetailAnimal.xaml.cs | 10 ++ Sources/Views/DetailEspece.xaml | 2 +- Sources/Views/DetailEspece.xaml.cs | 4 +- Sources/Views/DetailRace.xaml | 213 +++++++++++++++-------------- Sources/Views/Especes.xaml | 2 +- Sources/Views/Especes.xaml.cs | 4 +- Sources/Views/MainPage.xaml | 8 +- Sources/Views/MauiProgram.cs | 2 + Sources/Views/Views.csproj | 4 + 15 files changed, 272 insertions(+), 158 deletions(-) create mode 100644 Sources/Views/DetailAnimal.xaml create mode 100644 Sources/Views/DetailAnimal.xaml.cs diff --git a/Sources/Model/Animal.cs b/Sources/Model/Animal.cs index 6463463..c60dbde 100644 --- a/Sources/Model/Animal.cs +++ b/Sources/Model/Animal.cs @@ -18,7 +18,7 @@ namespace Model public Espece Espece { get; set; } public Race? Race { get; set; } - public Animal(string nom, string dateNaissance = "", string sexe = "", string dateAdpotion = "", float? taille = null, float? poids = null, string alimentation = "", Race? race = null) + public Animal(string nom, string dateNaissance = "Inconnue", string sexe = "Inconnu", string dateAdpotion = "Inconnue", float? taille = null, float? poids = null, string alimentation = "Inconnue", Race? race = null) { Nom = nom; DateNaissance = dateNaissance; diff --git a/Sources/Model/Stub.cs b/Sources/Model/Stub.cs index dfb5cca..8dda9fd 100644 --- a/Sources/Model/Stub.cs +++ b/Sources/Model/Stub.cs @@ -29,6 +29,10 @@ namespace Model listeAnimaux.Add(new("Kiki")); listeAnimaux.Add(new("PouetPouet")); + listeAnimaux.Add(new("Chouchou")); + listeAnimaux.Add(new("Pupuce")); + listeAnimaux.Add(new("AucuneIdée")); + listeAnimaux.Add(new("Minou")); return listeAnimaux; } diff --git a/Sources/Views/Animaux.xaml b/Sources/Views/Animaux.xaml index e87dff2..e09adeb 100644 --- a/Sources/Views/Animaux.xaml +++ b/Sources/Views/Animaux.xaml @@ -1,51 +1,58 @@ - - - - - - - - - - - - - - - - - - - - - -