readme création des classes pour diagramme de classe + début CI

devGuillaume
Guillaume REY 2 years ago
commit 992710ba86

@ -0,0 +1,26 @@
kind: pipeline
type: docker
name: CI_Ohara
trigger:
event:
- push
steps:
- name: build
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest
commands:
- cd Sources/
- dotnet restore Ohara.sln
- dotnet build Ohara.sln -c Release --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0
- dotnet publish Ohara/Ohara.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/release -f:net7.0-android /p:AndroidSdkDirectory=/usr/lib/android-sdk
- name: tests
image: mcr.microsoft.com/dotnet/sdk:7.0
commands:
- cd Sources/
- dotnet restore Ohara.sln
- dotnet test Ohara.sln --no-restore
depends_on: [build]

@ -1,2 +1,61 @@
# Ohara_MAUI # Ohara_MAUI
Test ```mermaid
classDiagram
class Bateau{
-NomRomanise : string
-PremierChap : int
-PremierEp : int
-Description : string
-Caracteristique : string
}
class Bestiaire {
-Origine : string
-Description : string
-Caracteristique : string
}
class Equipage {
-NomRomanise : string
-Region : string
-PremierChap : int
-PremierEp : int
-Statut : bool
-Description : string
}
class FruitDuDemon {
-NomRomanise : string
-Type : string
-PremierChap : int
-PremierEp : int
-Description : string
-Forces : string
-Faiblesses : string
}
class Ile {
-NomRomanise : string
-Region : string
-PremierChap : int
-PremierEp : int
-Description : string
Geographie : string
}
class Personnage {
-Prime : double
-Epithete : string
-Age : int
-Taille : double
-Origine : string
-Biographie : string
-Citation : string
}
class ObjetOhara {
-Nom : string
-Image : string?
}
```

@ -6,27 +6,27 @@ using System.Threading.Tasks;
namespace Model namespace Model
{ {
public class Bateau public class Bateau : ObjetOhara
{ {
public string Nom { get; set; }
public string NomRomanise { get; set; } public string NomRomanise { get; set; }
public Equipage? Affiliation { get; set; } public Equipage? Affiliation { get; set; }
public int PremierChap { get; set; } public int PremierChap { get; set; }
public int PremierEp { get; set; } public int PremierEp { get; set; }
public string Description { get; set; } public string Description { get; set; }
public string Caracteristique { 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; NomRomanise = nomRomanise;
PremierChap = premierChap; PremierChap = premierChap;
PremierEp = premierEp; PremierEp = premierEp;
Description = description; Description = description;
Caracteristique = caracteristique; 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) 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)

@ -7,25 +7,21 @@ using System.Threading.Tasks;
namespace Model namespace Model
{ {
public class Bestiaire public class Bestiaire : ObjetOhara
{ {
public string Nom { get; set; }
public string Origine { get; set; } public string Origine { get; set; }
public string Description { get; set; } public string Description { get; set; }
public string Caracteristique { 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; Origine = origine;
Description = description; Description = description;
Caracteristique = caracteristique; Caracteristique = caracteristique;
} }
public Bestiaire(string nom, string origine, string description, string caracteristique,string image) : this(nom,origine,description,caracteristique)
{
Image = image;
}
} }
} }

@ -6,11 +6,10 @@ using System.Threading.Tasks;
namespace Model namespace Model
{ {
public class Equipage public class Equipage : ObjetOhara
{ {
public string Nom { get; set; }
public string NomRomanise { get; set; }
public string NomRomanise { get; set; }
public string Region { get; set; } public string Region { get; set; }
public int PremierChap { get; set; } public int PremierChap { get; set; }
public int PremierEp { get; set; } public int PremierEp { get; set; }
@ -19,18 +18,18 @@ namespace Model
public Personnage? Capitaine { get; set; } public Personnage? Capitaine { get; set; }
public List<Personnage> Membre { get; set; } = new List<Personnage>(); public List<Personnage> Membre { get; set; } = new List<Personnage>();
public List<Equipage> Allie { get; set; } = new List<Equipage>(); public List<Equipage> Allie { get; set; } = new List<Equipage>();
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; NomRomanise = nomRomanise;
Region = region; Region = region;
PremierChap = premierChap; PremierChap = premierChap;
PremierEp = premierEp; PremierEp = premierEp;
Statut = statut; Statut = statut;
Description = description; Description = description;
Image = image;
} }
} }
} }

@ -6,9 +6,9 @@ using System.Threading.Tasks;
namespace Model namespace Model
{ {
public class FruitDuDemon public class FruitDuDemon : ObjetOhara
{ {
public string Nom { get; set; }
public string NomRomanise { get; set; } public string NomRomanise { get; set; }
public string Type { get; set; } public string Type { get; set; }
public int PremierChap { get; set; } public int PremierChap { get; set; }
@ -17,11 +17,12 @@ namespace Model
public string Forces { get; set; } public string Forces { get; set; }
public string Faiblesses { get; set; } public string Faiblesses { get; set; }
public List<Personnage> Utilisateur { get; set; }= new List<Personnage>(); public List<Personnage> Utilisateur { get; set; }= new List<Personnage>();
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; NomRomanise = nomRomanise;
Type = type; Type = type;
PremierChap = premierChap; PremierChap = premierChap;
@ -29,13 +30,9 @@ namespace Model
Description = description; Description = description;
Forces = forces; Forces = forces;
Faiblesses = faiblesses; 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<Personnage> 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<Personnage> utilisateur) : this( nom, nomRomanise, type, premierChap, premierEp, description, forces, faiblesses, image)
{ {
Utilisateur = utilisateur; Utilisateur = utilisateur;
} }

@ -8,11 +8,11 @@ namespace Model
{ {
public interface IDataManager public interface IDataManager
{ {
IEnumerable<Bateau> RecupererBateau(); IEnumerable<Bateau> GetBateaux();
IEnumerable<Bestiaire> RecupererBestiaire(); IEnumerable<Bestiaire> GetBestiaires();
IEnumerable<Equipage> RecupererEquipage(); IEnumerable<Equipage> GetEquipages();
IEnumerable<FruitDuDemon> RecupererFruit(); IEnumerable<FruitDuDemon> GetFruits();
IEnumerable<Ile> RecupererIle(); IEnumerable<Ile> GetIles();
IEnumerable<Personnage> RecupererPersonnage(); IEnumerable<Personnage> GetPersonnages();
} }
} }

@ -6,28 +6,28 @@ using System.Threading.Tasks;
namespace Model namespace Model
{ {
public class Ile public class Ile : ObjetOhara
{ {
public string Nom { get; set; }
public string NomRomanise { get; set; } public string NomRomanise { get; set; }
public string Region { get; set; } public string Region { get; set; }
public int PremierChap { get; set; } public int PremierChap { get; set; }
public int PremierEp { get; set; } public int PremierEp { get; set; }
public string Description { get; set; } public string Description { get; set; }
public string Geographie { 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; NomRomanise = nomRomanise;
Region = region; Region = region;
PremierChap = premierChap; PremierChap = premierChap;
PremierEp = premierEp; PremierEp = premierEp;
Description = description; Description = description;
Geographie = geographie; Geographie = geographie;
Image = image;
} }
} }
} }

@ -1,12 +1,59 @@
using System; using Model.Stub;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Model namespace Model
{ {
internal class Manager public class Manager
{
public IDataManager DataManager { get; set; }
public Manager() {
DataManager = new StubManager();
}
public List<Personnage> GetPersonnages()
{
return DataManager.GetPersonnages().ToList();
}
public List<FruitDuDemon> GetFruits()
{
return DataManager.GetFruits().ToList();
}
public List<Equipage> GetEquipages()
{
return DataManager.GetEquipages().ToList();
}
public List<Bateau> GetBateaux()
{ {
return DataManager.GetBateaux().ToList();
}
public List<Bestiaire> GetBestiaires()
{
return DataManager.GetBestiaires().ToList();
}
public List<Ile> GetIles()
{
return DataManager.GetIles().ToList();
}
public List<FruitDuDemon> FiltrerFDD(string type)
{
List<FruitDuDemon> fdd = GetFruits();
foreach(FruitDuDemon f in fdd.ToList())
{
if(f.Type != type)
{
fdd.Remove(f);
}
}
return fdd;
}
} }
} }

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
public class ObjetOhara
{
public string Nom { get; set; }
public string? Image { get; set;}
public ObjetOhara(string nom,string image) {
Nom = nom;
Image = image;
}
}
}

@ -1,8 +1,8 @@
namespace Model namespace Model
{ {
public class Personnage public class Personnage : ObjetOhara
{ {
public string Nom { get; set; }
public double Prime { get; set; } public double Prime { get; set; }
public string Epithete { get; set; } public string Epithete { get; set; }
public int Age { get; set; } public int Age { get; set; }
@ -12,13 +12,13 @@
public string Citation { get; set; } public string Citation { get; set; }
public Equipage? Equipage { get; set; } public Equipage? Equipage { get; set; }
public List<FruitDuDemon> Fruit { get; set; } = new List<FruitDuDemon>(); public List<FruitDuDemon> Fruit { get; set; } = new List<FruitDuDemon>();
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; Prime = prime;
Epithete = epithete; Epithete = epithete;
Age = age; Age = age;
@ -26,7 +26,7 @@
Origine = origine; Origine = origine;
Biographie = biographie; Biographie = biographie;
Citation = citation; 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<FruitDuDemon> fruit) : this(nom,prime,epithete,age,taille,origine,biographie,citation,image) public Personnage(string nom, double prime, string epithete, int age, double taille, string origine, string biographie, string citation,string image ,Equipage equipage,List<FruitDuDemon> fruit) : this(nom,prime,epithete,age,taille,origine,biographie,citation,image)

@ -7,9 +7,9 @@ using static System.Net.Mime.MediaTypeNames;
namespace Model.Stub namespace Model.Stub
{ {
public static class StubBateau public class StubBateau
{ {
public static IEnumerable<Bateau> RecupererBateau() public IEnumerable<Bateau> RecupererBateau()
{ {
List<Bateau> bateau = new List<Bateau>() List<Bateau> bateau = new List<Bateau>()
{ {

@ -6,9 +6,9 @@ using System.Threading.Tasks;
namespace Model.Stub namespace Model.Stub
{ {
public static class StubBestiaire public class StubBestiaire
{ {
public static IEnumerable<Bestiaire> RecupererBestiaire() public IEnumerable<Bestiaire> RecupererBestiaire()
{ {
List<Bestiaire> best = new List<Bestiaire>() List<Bestiaire> best = new List<Bestiaire>()
{ {

@ -6,9 +6,9 @@ using System.Threading.Tasks;
namespace Model.Stub namespace Model.Stub
{ {
public static class StubEquipage public class StubEquipage
{ {
public static IEnumerable<Equipage> RecupererEquipage() public IEnumerable<Equipage> RecupererEquipage()
{ {
List<Equipage> Lequipage = new List<Equipage>() List<Equipage> Lequipage = new List<Equipage>()
{ {

@ -6,9 +6,9 @@ using System.Threading.Tasks;
namespace Model.Stub namespace Model.Stub
{ {
public static class StubFruitDuDemon public class StubFruitDuDemon
{ {
public static IEnumerable<FruitDuDemon> RecupererFruit() public IEnumerable<FruitDuDemon> RecupererFruit()
{ {
List<FruitDuDemon> fdd = new List<FruitDuDemon>() List<FruitDuDemon> fdd = new List<FruitDuDemon>()
{ {

@ -7,9 +7,9 @@ using static System.Net.Mime.MediaTypeNames;
namespace Model.Stub namespace Model.Stub
{ {
public static class StubIle public class StubIle
{ {
public static IEnumerable<Ile> RecupererIle() public IEnumerable<Ile> RecupererIle()
{ {
List<Ile> ile = new List<Ile>() List<Ile> ile = new List<Ile>()
{ {

@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model.Stub
{
public class StubManager : IDataManager
{
public StubPersonnage StubPersonnage { get; set; }
public StubFruitDuDemon StubFruitDuDemon { get; set; }
public StubEquipage StubEquipage { get; set; }
public StubBateau StubBateau { get; set; }
public StubBestiaire StubBestiaire { get; set; }
public StubIle StubIle { get; set; }
public StubManager()
{
StubPersonnage = new StubPersonnage();
StubFruitDuDemon = new StubFruitDuDemon();
StubEquipage = new StubEquipage();
StubBateau = new StubBateau();
StubBestiaire = new StubBestiaire();
StubIle = new StubIle();
}
public IEnumerable<Personnage> GetPersonnages()
{
return StubPersonnage.RecupererPersonnage();
}
public IEnumerable<FruitDuDemon> GetFruits()
{
return StubFruitDuDemon.RecupererFruit();
}
public IEnumerable<Equipage> GetEquipages()
{
return StubEquipage.RecupererEquipage();
}
public IEnumerable<Bateau> GetBateaux()
{
return StubBateau.RecupererBateau();
}
public IEnumerable<Bestiaire> GetBestiaires()
{
return StubBestiaire.RecupererBestiaire();
}
public IEnumerable<Ile> GetIles()
{
return StubIle.RecupererIle();
}
}
}

@ -6,9 +6,9 @@ using System.Threading.Tasks;
namespace Model.Stub namespace Model.Stub
{ {
public static class StubPersonnage public class StubPersonnage
{ {
public static IEnumerable<Personnage> RecupererPersonnage() public IEnumerable<Personnage> RecupererPersonnage()
{ {
List<Personnage> perso = new List<Personnage>() List<Personnage> perso = new List<Personnage>()
{ {

@ -13,7 +13,7 @@
<ShellContent <ShellContent
ContentTemplate="{DataTemplate local:PageInfoPersonnage}" ContentTemplate="{DataTemplate local:PageFDD}"
Route="PageInfoBestiaire" /> Route="PageInfoBestiaire" />

@ -54,7 +54,7 @@
</Grid> </Grid>
<ScrollView Orientation="Horizontal" HorizontalScrollBarVisibility="Always"> <ScrollView Orientation="Horizontal" HorizontalScrollBarVisibility="Always">
<CollectionView x:Name="listeBateau" ItemsLayout="HorizontalList"> <CollectionView x:Name="listeBateau" ItemsLayout="HorizontalList" EmptyView="Aucun résultat trouvé.">
<CollectionView.ItemTemplate> <CollectionView.ItemTemplate>
<DataTemplate> <DataTemplate>

@ -12,17 +12,10 @@ public partial class PageBateau : ContentPage
public PageBateau(IAudioManager audioManager) public PageBateau(IAudioManager audioManager)
{ {
InitializeComponent(); InitializeComponent();
List<Bateau> bateau = StubBateau.RecupererBateau().ToList(); var manager = new Manager();
listeBateau.ItemsSource = bateau;
this.audioManager = audioManager;
}
private async void Hyperlink_Accueil(object sender, EventArgs e) listeBateau.ItemsSource = manager.GetBateaux();
{
var player = audioManager.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(chemin));
await Navigation.PushAsync(new MainPage(new Plugin.Maui.Audio.AudioManager()));
player.Play();
} }
private async void Hyperlink_FDD(object sender, EventArgs e) private async void Hyperlink_FDD(object sender, EventArgs e)

@ -50,7 +50,7 @@
</Frame> </Frame>
</Grid> </Grid>
<CollectionView x:Name="listeBest" ItemsUpdatingScrollMode="KeepScrollOffset" VerticalScrollBarVisibility="Always" ItemsLayout="VerticalGrid, 4"> <CollectionView x:Name="listeBest" ItemsLayout="VerticalGrid, 4" EmptyView="Aucun résultat trouvé.">
<CollectionView.ItemTemplate> <CollectionView.ItemTemplate>
<DataTemplate> <DataTemplate>
<Grid Padding="20" ColumnSpacing="20" RowSpacing="20"> <Grid Padding="20" ColumnSpacing="20" RowSpacing="20">

@ -10,10 +10,10 @@ public partial class PageBestiaire : ContentPage
{ {
InitializeComponent(); InitializeComponent();
List<Bestiaire> Lbest = StubBestiaire.RecupererBestiaire().ToList(); var manager = new Manager();
listeBest.ItemsSource = Lbest; listeBest.ItemsSource = manager.GetBestiaires();
} }
private async void Hyperlink_Accueil(object sender, EventArgs e) private async void Hyperlink_Accueil(object sender, EventArgs e)
{ {

@ -52,7 +52,7 @@
</Frame> </Frame>
</Grid> </Grid>
<CollectionView x:Name="listeEquip" ItemsLayout="VerticalGrid, 4"> <CollectionView x:Name="listeEquip" ItemsLayout="VerticalGrid, 4" EmptyView="Aucun résultat trouvé.">
<CollectionView.ItemTemplate> <CollectionView.ItemTemplate>
<DataTemplate> <DataTemplate>
<Grid Padding="20" ColumnSpacing="20" RowSpacing="20"> <Grid Padding="20" ColumnSpacing="20" RowSpacing="20">

@ -7,12 +7,12 @@ public partial class PageEquipage : ContentPage
public PageEquipage() public PageEquipage()
{ {
InitializeComponent(); InitializeComponent();
List<Equipage> Lequipage = StubEquipage.RecupererEquipage().ToList(); var manager = new Manager();
listeEquip.ItemsSource = Lequipage; listeEquip.ItemsSource = manager.GetEquipages();
} }
private async void Hyperlink_Accueil(object sender, EventArgs e) private async void Hyperlink_Accueil(object sender, EventArgs e)
{ {
await Navigation.PushAsync(new MainPage(new Plugin.Maui.Audio.AudioManager())); await Navigation.PushAsync(new MainPage());
} }
private async void Hyperlink_FDD(object sender, EventArgs e) private async void Hyperlink_FDD(object sender, EventArgs e)
@ -31,7 +31,7 @@ public partial class PageEquipage : ContentPage
} }
private async void Hyperlink_Bateau(object sender, EventArgs e) private async void Hyperlink_Bateau(object sender, EventArgs e)
{ {
await Navigation.PushAsync(new PageBateau(new Plugin.Maui.Audio.AudioManager())); await Navigation.PushAsync(new PageBateau());
} }
private async void Hyperlink_Bestiaire(object sender, EventArgs e) private async void Hyperlink_Bestiaire(object sender, EventArgs e)

@ -46,21 +46,21 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<SearchBar Placeholder="Rechercher..." BackgroundColor="#bfe5ef" Grid.Column="0" x:Name="searchBar" /> <SearchBar Placeholder="Rechercher..." BackgroundColor="#bfe5ef" Grid.Column="0" x:Name="searchBar" />
<Frame CornerRadius="20" BackgroundColor="#bfe5ef" BorderColor="#bfe5ef" Grid.Column="2"> <Button Text="Filtrer" x:Name="Logia" BackgroundColor="#bfe5ef" BorderColor="#bfe5ef" Grid.Column="2"/>
<Label Text="Filtrer" HorizontalTextAlignment="Center" />
</Frame>
<Frame CornerRadius="20" BackgroundColor="#bfe5ef" BorderColor="#bfe5ef" Grid.Column="3"> <Frame CornerRadius="20" BackgroundColor="#bfe5ef" BorderColor="#bfe5ef" Grid.Column="3">
<Label Text="Trier" HorizontalTextAlignment="Center" /> <Label Text="Trier" HorizontalTextAlignment="Center" />
</Frame> </Frame>
</Grid> </Grid>
<CollectionView x:Name="listeFDD" ItemsLayout="VerticalGrid, 4"> <CollectionView x:Name="listeFDD" ItemsLayout="VerticalGrid, 4" EmptyView="Aucun résultat trouvé.">
<CollectionView.ItemTemplate> <CollectionView.ItemTemplate>
<DataTemplate> <DataTemplate>
<Grid Padding="20" ColumnSpacing="20" RowSpacing="20" > <Grid Padding="20" >
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="25*"/> <ColumnDefinition Width="33*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>

@ -1,18 +1,25 @@
namespace Ohara; namespace Ohara;
using Model; using Model;
using Model.Stub; using Model.Stub;
using System.Windows.Input;
public partial class PageFDD : ContentPage public partial class PageFDD : ContentPage
{ {
public ICommand FiltrerType { get; private set; }
public PageFDD() public PageFDD()
{ {
InitializeComponent(); InitializeComponent();
List<FruitDuDemon> fdd = StubFruitDuDemon.RecupererFruit().ToList();
var manager = new Manager();
listeFDD.ItemsSource = manager.GetFruits();
FiltrerType = new Command(() => listeFDD.ItemsSource = manager.FiltrerFDD("Logia"));
Logia.Command = FiltrerType;
listeFDD.ItemsSource = fdd;
} }
private void listeFDD_ScrollToRequested(object sender, ScrollToRequestEventArgs e) private void listeFDD_ScrollToRequested(object sender, ScrollToRequestEventArgs e)

@ -54,7 +54,7 @@
</Grid> </Grid>
<ScrollView Orientation="Horizontal" HorizontalScrollBarVisibility="Always"> <ScrollView Orientation="Horizontal" HorizontalScrollBarVisibility="Always">
<CollectionView x:Name="listeIle" ItemsLayout="HorizontalList"> <CollectionView x:Name="listeIle" ItemsLayout="HorizontalList" EmptyView="Aucun résultat trouvé.">
<CollectionView.ItemTemplate> <CollectionView.ItemTemplate>
<DataTemplate> <DataTemplate>

@ -8,10 +8,10 @@ public partial class PageIle : ContentPage
public PageIle() public PageIle()
{ {
InitializeComponent(); InitializeComponent();
List<Ile> ile = StubIle.RecupererIle().ToList(); var manager = new Manager();
listeIle.ItemsSource = ile; listeIle.ItemsSource = manager.GetIles();
} }
private void listeFDD_ScrollToRequested(object sender, ScrollToRequestEventArgs e) private void listeFDD_ScrollToRequested(object sender, ScrollToRequestEventArgs e)

@ -8,10 +8,10 @@ public partial class PageInfoBestiaire : ContentPage
public PageInfoBestiaire() public PageInfoBestiaire()
{ {
InitializeComponent(); InitializeComponent();
List<Bestiaire> Lbest = StubBestiaire.RecupererBestiaire().ToList(); var manager = new Manager();
listeBest.ItemsSource = Lbest; listeBest.ItemsSource = manager.GetBestiaires();
} }
private async void Hyperlink_Accueil(object sender, EventArgs e) private async void Hyperlink_Accueil(object sender, EventArgs e)

@ -10,10 +10,10 @@ public partial class PageInfoEquipage : ContentPage
InitializeComponent(); InitializeComponent();
List<Equipage> Lequipage = StubEquipage.RecupererEquipage().ToList(); var manager = new Manager();
listeEquip.ItemsSource = Lequipage; listeEquip.ItemsSource = manager.GetEquipages();
} }
private async void Hyperlink_Accueil(object sender, EventArgs e) private async void Hyperlink_Accueil(object sender, EventArgs e)
{ {

@ -8,8 +8,8 @@ public partial class PageInfoFdd : ContentPage
public PageInfoFdd() public PageInfoFdd()
{ {
InitializeComponent(); InitializeComponent();
List<FruitDuDemon> fdd = StubFruitDuDemon.RecupererFruit().ToList(); var manager = new Manager();
listObj.ItemsSource = fdd; listObj.ItemsSource = manager.GetFruits();
} }
private async void Hyperlink_Accueil(object sender, EventArgs e) private async void Hyperlink_Accueil(object sender, EventArgs e)

@ -57,7 +57,7 @@
</Grid> </Grid>
<ScrollView Orientation="Horizontal" HorizontalScrollBarVisibility="Always"> <ScrollView Orientation="Horizontal" HorizontalScrollBarVisibility="Always">
<CollectionView x:Name="listePerso" ItemsLayout="HorizontalList"> <CollectionView x:Name="listePerso" ItemsLayout="HorizontalList" EmptyView="Aucun résultat trouvé.">
<CollectionView.ItemTemplate> <CollectionView.ItemTemplate>
<DataTemplate> <DataTemplate>

@ -9,10 +9,10 @@ public partial class PagePersonnage : ContentPage
{ {
InitializeComponent(); InitializeComponent();
List<Personnage> perso = StubPersonnage.RecupererPersonnage().ToList(); var manager = new Manager();
listePerso.ItemsSource = perso; listePerso.ItemsSource = manager.GetPersonnages();
} }
private async void Hyperlink_Accueil(object sender, EventArgs e) private async void Hyperlink_Accueil(object sender, EventArgs e)

@ -1,3 +1,8 @@
// See https://aka.ms/new-console-template for more information // See https://aka.ms/new-console-template for more information
using Model; using Model;
var manager = new Manager();
foreach (Bateau b in manager.GetBateaux()){
Console.WriteLine(b.Nom);
}
Loading…
Cancel
Save