diff --git a/Sources/Model/Bateau.cs b/Sources/Model/Bateau.cs index 927d23a..1f4c31b 100644 --- a/Sources/Model/Bateau.cs +++ b/Sources/Model/Bateau.cs @@ -6,27 +6,27 @@ using System.Threading.Tasks; namespace Model { - public class Bateau + public class Bateau : ObjetOhara { - public string Nom { get; set; } + public string NomRomanise { 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 string? Image { get; set; } + - public Bateau(string nom, string nomRomanise, int premierChap, int premierEp, string description, string caracteristique, string image) + public Bateau(string nom, string nomRomanise, int premierChap, int premierEp, string description, string caracteristique, string image) : base(nom,image) { - Nom = nom; + NomRomanise = nomRomanise; 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) diff --git a/Sources/Model/Bestiaire.cs b/Sources/Model/Bestiaire.cs index 1b5e4d8..00731e5 100644 --- a/Sources/Model/Bestiaire.cs +++ b/Sources/Model/Bestiaire.cs @@ -7,25 +7,21 @@ using System.Threading.Tasks; namespace Model { - public class Bestiaire + public class Bestiaire : ObjetOhara { - public string Nom { get; set; } + public string Origine { get; set; } public string Description { get; set; } public string Caracteristique { get; set; } - public string? Image { get; set; } + - public Bestiaire(string nom, string origine, string description, string caracteristique) + public Bestiaire(string nom, string origine, string description, string caracteristique,string image) : base(nom, image) { - Nom = nom; Origine = origine; Description = description; Caracteristique = caracteristique; } - public Bestiaire(string nom, string origine, string description, string caracteristique,string image) : this(nom,origine,description,caracteristique) - { - Image = image; - } + } } diff --git a/Sources/Model/Equipage.cs b/Sources/Model/Equipage.cs index 1c7490f..9b386d5 100644 --- a/Sources/Model/Equipage.cs +++ b/Sources/Model/Equipage.cs @@ -6,11 +6,10 @@ using System.Threading.Tasks; namespace Model { - public class Equipage + public class Equipage : ObjetOhara { - public string Nom { get; set; } + public string NomRomanise { get; set; } - public string Region { get; set; } public int PremierChap { get; set; } public int PremierEp { get; set; } @@ -19,18 +18,18 @@ namespace Model public Personnage? Capitaine { get; set; } public List Membre { get; set; } = new List(); public List Allie { get; set; } = new List(); - public string? Image { get; set; } + - public Equipage(string nom, string nomRomanise, string region, int premierChap, int premierEp, bool statut, string description,string image) + public Equipage(string nom, string nomRomanise, string region, int premierChap, int premierEp, bool statut, string description,string image) : base(nom,image) { - Nom = nom; + NomRomanise = nomRomanise; Region = region; PremierChap = premierChap; PremierEp = premierEp; Statut = statut; Description = description; - Image = image; + } } } diff --git a/Sources/Model/FruitDuDemon.cs b/Sources/Model/FruitDuDemon.cs index 81145b8..fce2c01 100644 --- a/Sources/Model/FruitDuDemon.cs +++ b/Sources/Model/FruitDuDemon.cs @@ -6,9 +6,9 @@ using System.Threading.Tasks; namespace Model { - public class FruitDuDemon + public class FruitDuDemon : ObjetOhara { - public string Nom { get; set; } + public string NomRomanise { get; set; } public string Type { get; set; } public int PremierChap { get; set; } @@ -17,11 +17,12 @@ namespace Model public string Forces { get; set; } public string Faiblesses { get; set; } public List Utilisateur { get; set; }= new List(); - public string? Image { get; set; } + + - public FruitDuDemon(string nom, string nomRomanise, string type, int premierChap, int premierEp, string description, string forces, string faiblesses) + public FruitDuDemon(string nom, string nomRomanise, string type, int premierChap, int premierEp, string description, string forces, string faiblesses, string image) : base(nom,image) { - Nom = nom; + NomRomanise = nomRomanise; Type = type; PremierChap = premierChap; @@ -29,13 +30,9 @@ namespace Model Description = description; Forces = forces; Faiblesses = faiblesses; - - } - public FruitDuDemon(string nom, string nomRomanise, string type, int premierChap, int premierEp, string description, string forces, string faiblesses,string image) : this(nom, nomRomanise, type, premierChap, premierEp, description, forces, faiblesses) - { - Image = image; } - public FruitDuDemon(string nom, string nomRomanise, string type, int premierChap, int premierEp, string description, string forces, string faiblesses, List utilisateur) : this( nom, nomRomanise, type, premierChap, premierEp, description, forces, faiblesses) + + public FruitDuDemon(string nom, string nomRomanise, string type, int premierChap, int premierEp, string description, string forces, string faiblesses,string image, List utilisateur) : this( nom, nomRomanise, type, premierChap, premierEp, description, forces, faiblesses, image) { Utilisateur = utilisateur; } diff --git a/Sources/Model/Ile.cs b/Sources/Model/Ile.cs index 6567933..14fb050 100644 --- a/Sources/Model/Ile.cs +++ b/Sources/Model/Ile.cs @@ -6,28 +6,28 @@ using System.Threading.Tasks; namespace Model { - public class Ile + public class Ile : ObjetOhara { - public string Nom { get; set; } + public string NomRomanise { get; set; } public string Region { get; set; } public int PremierChap { get; set; } public int PremierEp { get; set; } public string Description { get; set; } public string Geographie { get; set; } - public string? Image { get; set; } + - public Ile(string nom, string nomRomanise, string region, int premierChap, int premierEp, string description, string geographie, string image) + public Ile(string nom, string nomRomanise, string region, int premierChap, int premierEp, string description, string geographie, string image) : base(nom,image) { - Nom = nom; + NomRomanise = nomRomanise; Region = region; PremierChap = premierChap; PremierEp = premierEp; Description = description; Geographie = geographie; - Image = image; + } } } diff --git a/Sources/Model/Manager.cs b/Sources/Model/Manager.cs index 21b510c..a7dfd30 100644 --- a/Sources/Model/Manager.cs +++ b/Sources/Model/Manager.cs @@ -42,5 +42,18 @@ namespace Model { return DataManager.GetIles().ToList(); } + + public List FiltrerFDD(string type) + { + List fdd = GetFruits(); + foreach(FruitDuDemon f in fdd.ToList()) + { + if(f.Type != type) + { + fdd.Remove(f); + } + } + return fdd; + } } } diff --git a/Sources/Model/Personnage.cs b/Sources/Model/Personnage.cs index adbdeb8..ec2b7b6 100644 --- a/Sources/Model/Personnage.cs +++ b/Sources/Model/Personnage.cs @@ -1,8 +1,8 @@ namespace Model { - public class Personnage + public class Personnage : ObjetOhara { - public string Nom { get; set; } + public double Prime { get; set; } public string Epithete { get; set; } public int Age { get; set; } @@ -12,13 +12,13 @@ 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, double prime, string epithete, int age, double taille, string origine, string biographie, string citation, string image) + public Personnage(string nom, double prime, string epithete, int age, double taille, string origine, string biographie, string citation, string image) : base(nom,image) { - Nom = nom; + Prime = prime; Epithete = epithete; Age = age; @@ -26,7 +26,7 @@ Origine = origine; Biographie = biographie; Citation = citation; - Image = image; + } 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) diff --git a/Sources/Ohara/PageBateau.xaml b/Sources/Ohara/PageBateau.xaml index ceb2475..f788a0e 100644 --- a/Sources/Ohara/PageBateau.xaml +++ b/Sources/Ohara/PageBateau.xaml @@ -54,7 +54,7 @@ - + diff --git a/Sources/Ohara/PageBestiaire.xaml b/Sources/Ohara/PageBestiaire.xaml index 27a104e..0507e86 100644 --- a/Sources/Ohara/PageBestiaire.xaml +++ b/Sources/Ohara/PageBestiaire.xaml @@ -50,7 +50,7 @@ - + diff --git a/Sources/Ohara/PageEquipage.xaml b/Sources/Ohara/PageEquipage.xaml index 4441b67..123eb44 100644 --- a/Sources/Ohara/PageEquipage.xaml +++ b/Sources/Ohara/PageEquipage.xaml @@ -52,7 +52,7 @@ - + diff --git a/Sources/Ohara/PageEquipage.xaml.cs b/Sources/Ohara/PageEquipage.xaml.cs index af9d29e..b2c2a16 100644 --- a/Sources/Ohara/PageEquipage.xaml.cs +++ b/Sources/Ohara/PageEquipage.xaml.cs @@ -1,54 +1,54 @@ -namespace Ohara; -using Model; -using Model.Stub; - -public partial class PageEquipage : ContentPage -{ - public PageEquipage() - { - InitializeComponent(); +namespace Ohara; +using Model; +using Model.Stub; + +public partial class PageEquipage : ContentPage +{ + public PageEquipage() + { + InitializeComponent(); var manager = new Manager(); listeEquip.ItemsSource = manager.GetEquipages(); - } - private async void Hyperlink_Accueil(object sender, EventArgs e) - { - await Navigation.PushAsync(new MainPage()); - } - - private async void Hyperlink_FDD(object sender, EventArgs e) - { - await Navigation.PushAsync(new PageFDD()); - } - - private async void Hyperlink_Equip(object sender, EventArgs e) - { - await Navigation.PushAsync(new PageEquipage()); - } - - private async void Hyperlink_Perso(object sender, EventArgs e) - { - await Navigation.PushAsync(new PagePersonnage()); - } - private async void Hyperlink_Bateau(object sender, EventArgs e) - { - await Navigation.PushAsync(new PageBateau()); - } - - private async void Hyperlink_Bestiaire(object sender, EventArgs e) - { - await Navigation.PushAsync(new PageBestiaire()); - } - private async void Hyperlink_Carte(object sender, EventArgs e) - { - await Navigation.PushAsync(new PageCarte()); - } - private async void Hyperlink_Ile(object sender, EventArgs e) - { - await Navigation.PushAsync(new PageIle()); - } - - private void listeEquip_ScrollToRequested(object sender, ScrollToRequestEventArgs e) - { - - } + } + private async void Hyperlink_Accueil(object sender, EventArgs e) + { + await Navigation.PushAsync(new MainPage()); + } + + private async void Hyperlink_FDD(object sender, EventArgs e) + { + await Navigation.PushAsync(new PageFDD()); + } + + private async void Hyperlink_Equip(object sender, EventArgs e) + { + await Navigation.PushAsync(new PageEquipage()); + } + + private async void Hyperlink_Perso(object sender, EventArgs e) + { + await Navigation.PushAsync(new PagePersonnage()); + } + private async void Hyperlink_Bateau(object sender, EventArgs e) + { + await Navigation.PushAsync(new PageBateau()); + } + + private async void Hyperlink_Bestiaire(object sender, EventArgs e) + { + await Navigation.PushAsync(new PageBestiaire()); + } + private async void Hyperlink_Carte(object sender, EventArgs e) + { + await Navigation.PushAsync(new PageCarte()); + } + private async void Hyperlink_Ile(object sender, EventArgs e) + { + await Navigation.PushAsync(new PageIle()); + } + + private void listeEquip_ScrollToRequested(object sender, ScrollToRequestEventArgs e) + { + + } } \ No newline at end of file diff --git a/Sources/Ohara/PageFDD.xaml b/Sources/Ohara/PageFDD.xaml index e02ed06..dabb1ed 100644 --- a/Sources/Ohara/PageFDD.xaml +++ b/Sources/Ohara/PageFDD.xaml @@ -4,7 +4,7 @@ x:Class="Ohara.PageFDD" Title="PageFDD" BackgroundColor="#e2edf1"> - + @@ -46,16 +46,16 @@ - -