From 1123f6df01d176d2ca3ef15d21b10d979f9caff4 Mon Sep 17 00:00:00 2001 From: Guillaume REY Date: Wed, 26 Apr 2023 15:16:29 +0200 Subject: [PATCH] page personnages avec les bidings --- Sources/Model/Personnage.cs | 8 +- Sources/Model/Stub/StubPersonnage.cs | 21 ++++ Sources/Ohara/AppShell.xaml | 4 +- Sources/Ohara/NewPage2.xaml | 175 --------------------------- Sources/Ohara/NewPage2.xaml.cs | 9 -- Sources/Ohara/Ohara.csproj | 5 +- Sources/Ohara/PagePersonnage.xaml | 138 +++++++++++++++++++++ Sources/Ohara/PagePersonnage.xaml.cs | 17 +++ 8 files changed, 187 insertions(+), 190 deletions(-) create mode 100644 Sources/Model/Stub/StubPersonnage.cs delete mode 100644 Sources/Ohara/NewPage2.xaml delete mode 100644 Sources/Ohara/NewPage2.xaml.cs create mode 100644 Sources/Ohara/PagePersonnage.xaml create mode 100644 Sources/Ohara/PagePersonnage.xaml.cs diff --git a/Sources/Model/Personnage.cs b/Sources/Model/Personnage.cs index 58866af..7358e33 100644 --- a/Sources/Model/Personnage.cs +++ b/Sources/Model/Personnage.cs @@ -11,10 +11,11 @@ public string Citation { get; set; } public Equipage? Equipage { get; set; } public List Fruit { get; set; } = new List(); + public string? Image { get; set; } - public Personnage(string nom, string epithete, int age, double taille, string origine, string biographie, string citation) + public Personnage(string nom, string epithete, int age, double taille, string origine, string biographie, string citation, string image) { Nom = nom; Epithete = epithete; @@ -22,10 +23,11 @@ Taille = taille; Origine = origine; Biographie = biographie; - Citation = citation; + Citation = citation; + Image = image; } - public Personnage(string nom, string epithete, int age, double taille, string origine, string biographie, string citation,Equipage equipage,List fruit) : this(nom,epithete,age,taille,origine,biographie,citation) + public Personnage(string nom, string epithete, int age, double taille, string origine, string biographie, string citation,string image ,Equipage equipage,List fruit) : this(nom,epithete,age,taille,origine,biographie,citation,image) { Equipage = equipage; Fruit = fruit; diff --git a/Sources/Model/Stub/StubPersonnage.cs b/Sources/Model/Stub/StubPersonnage.cs new file mode 100644 index 0000000..5f1b1c5 --- /dev/null +++ b/Sources/Model/Stub/StubPersonnage.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model.Stub +{ + public static class StubPersonnage + { + public static IEnumerable RecupererPersonnage() + { + List perso = new List() + { + new Personnage("Luffy", "Luffy au Chapeau de Paille", 19,1.74, "East Blue", "Feu Clé Noir", "Jean Neymar", "luffy.png"), + + }; + return perso; + } + } +} \ No newline at end of file diff --git a/Sources/Ohara/AppShell.xaml b/Sources/Ohara/AppShell.xaml index 797d050..5637476 100644 --- a/Sources/Ohara/AppShell.xaml +++ b/Sources/Ohara/AppShell.xaml @@ -13,8 +13,8 @@ + ContentTemplate="{DataTemplate local:PagePersonnage}" + Route="PageFDD" /> diff --git a/Sources/Ohara/NewPage2.xaml b/Sources/Ohara/NewPage2.xaml deleted file mode 100644 index cbb7349..0000000 --- a/Sources/Ohara/NewPage2.xaml +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -