diff --git a/Sources/Model/Bateau.cs b/Sources/Model/Bateau.cs index bbc197c..927d23a 100644 --- a/Sources/Model/Bateau.cs +++ b/Sources/Model/Bateau.cs @@ -10,21 +10,28 @@ namespace Model { public string Nom { get; set; } public string NomRomanise { get; set; } - public Equipage Affiliation { get; set; } + public Equipage? Affiliation { get; set; } public int PremierChap { get; set; } public int PremierEp { get; set; } public string Description { get; set; } public string Caracteristique { get; set; } - - public Bateau(string nom, string nomRomanise, Equipage affiliation, int premierChap, int premierEp, string description, string caracteristique) + public string? Image { get; set; } + + + public Bateau(string nom, string nomRomanise, int premierChap, int premierEp, string description, string caracteristique, string image) { Nom = nom; NomRomanise = nomRomanise; - Affiliation = affiliation; PremierChap = premierChap; PremierEp = premierEp; Description = description; Caracteristique = caracteristique; + Image= image; + } + + public Bateau(string nom, string nomRomanise, Equipage affiliation, int premierChap, int premierEp, string description, string caracteristique, string image) : this(nom,nomRomanise,premierChap,premierEp,description,caracteristique,image) + { + Affiliation = affiliation; } } } diff --git a/Sources/Model/Personnage.cs b/Sources/Model/Personnage.cs index 58866af..adbdeb8 100644 --- a/Sources/Model/Personnage.cs +++ b/Sources/Model/Personnage.cs @@ -3,6 +3,7 @@ public class Personnage { public string Nom { get; set; } + public double Prime { get; set; } public string Epithete { get; set; } public int Age { get; set; } public double Taille { get; set; } @@ -11,21 +12,24 @@ 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, double prime, string epithete, int age, double taille, string origine, string biographie, string citation, string image) { Nom = nom; + Prime = prime; Epithete = epithete; Age = age; 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, double prime, string epithete, int age, double taille, string origine, string biographie, string citation,string image ,Equipage equipage,List fruit) : this(nom,prime,epithete,age,taille,origine,biographie,citation,image) { Equipage = equipage; Fruit = fruit; diff --git a/Sources/Model/Stub/StubBateau.cs b/Sources/Model/Stub/StubBateau.cs new file mode 100644 index 0000000..c1f0603 --- /dev/null +++ b/Sources/Model/Stub/StubBateau.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using static System.Net.Mime.MediaTypeNames; + +namespace Model.Stub +{ + public static class StubBateau + { + public static IEnumerable RecupererBateau() + { + List bateau = new List() + { + new Bateau("Sunny", "Sauzando Sani-go", 435, 321, "Le Thousand Sunny est...", "Ce bateau a pour particularités ...", "sunny.png"), + new Bateau("Vogue Merry", "Goingu Merri-go", 41, 17, "Le Vogue Merry est...", "Ce bateau a pour particularités ...", "sunny.png"), + new Bateau("Moby Dick", "Mobi Dikku-go", 234, 151, "Le Moby Dick est...", "Ce bateau a pour particularités ...", "sunny.png"), + }; + return bateau; + } + } +} diff --git a/Sources/Model/Stub/StubPersonnage.cs b/Sources/Model/Stub/StubPersonnage.cs new file mode 100644 index 0000000..8a9da65 --- /dev/null +++ b/Sources/Model/Stub/StubPersonnage.cs @@ -0,0 +1,23 @@ +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", 3000000000,"Luffy au Chapeau de Paille", 19, 1.74, "East Blue", "Monkey D. Luffy est...", "Le Roi des Pirates, ce sera moi !", "luffy.png"), + new Personnage("Nami", 366000000, "Le Chatte Voleuse", 20, 1.70, "East Blue", "Nami est...", "Je n'aime que deux choses, l'argent et les mandarines !!", "nami.png"), + new Personnage("Usopp", 500000000,"Dieu Usopp", 19, 1.76, "East Blue", "Usopp est...", "Je suis le grand capitaine Usopp ! J'ai 8 000 hommes sous mon commandement ! C'est moi qui fait la loi sur cette île ! Je vous préviens, quittez ce village pendant qu'il est encore temps sinon vous aurez à faire à moi et à mes hommes!", "usopp.png"), + new Personnage("Zoro", 1111000000,"Le Chasseur de Pirates", 21, 1.81, "East Blue", "Zoro est...", "Un coup dans le dos est le déshonneur pour un sabreur !", "zoro.png"), + }; + return perso; + } + } +} \ No newline at end of file diff --git a/Sources/Ohara/AppShell.xaml b/Sources/Ohara/AppShell.xaml index 82197fd..ff3a83a 100644 --- a/Sources/Ohara/AppShell.xaml +++ b/Sources/Ohara/AppShell.xaml @@ -13,8 +13,8 @@ - + ContentTemplate="{DataTemplate local:PageEquipage}" + Route="PageFDD" /> + diff --git a/Sources/Ohara/MainPage.xaml b/Sources/Ohara/MainPage.xaml index eaa63aa..bdc4636 100644 --- a/Sources/Ohara/MainPage.xaml +++ b/Sources/Ohara/MainPage.xaml @@ -25,10 +25,10 @@