merging avec master

devGuillaume
Guillaume REY 2 years ago
commit 635b256fcf

@ -16,11 +16,12 @@ namespace Model
public int PremierEp { get; set; } public int PremierEp { get; set; }
public bool Statut { get; set; } public bool Statut { get; set; }
public string Description { get; set; } public string Description { get; set; }
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, Personnage capitaine) public Equipage(string nom, string nomRomanise, string region, int premierChap, int premierEp, bool statut, string description,string image)
{ {
Nom = nom; Nom = nom;
NomRomanise = nomRomanise; NomRomanise = nomRomanise;
@ -29,7 +30,7 @@ namespace Model
PremierEp = premierEp; PremierEp = premierEp;
Statut = statut; Statut = statut;
Description = description; Description = description;
Capitaine = capitaine; Image = image;
} }
} }
} }

@ -17,6 +17,7 @@ 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)
{ {
@ -30,6 +31,10 @@ namespace Model
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, List<Personnage> utilisateur) : this( nom, nomRomanise, type, premierChap, premierEp, description, forces, faiblesses)
{ {
Utilisateur = utilisateur; Utilisateur = utilisateur;

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model.Stub
{
public static class StubEquipage
{
public static IEnumerable<Equipage> RecupererEquipage()
{
List<Equipage> Lequipage = new List<Equipage>()
{
new Equipage("Équipage au chapeau de paille", "Mugiwara No Ichimi", "East Blue", 1, 1, true, "L'équipage du Chapeau de Paille ...","mugiwara.jpg"),
new Equipage("Équipage du Roux", "Akagami Kalzokudan", "East Blue", 1, 4, true, "L'équipage du Roux ...","roux.png"),
new Equipage("Équipage du Clown", "Bagï Kalzokudan", "East Blue", 8, 4, true, "L'équipage du Clown ...","clown.png"),
new Equipage("Équipage de Barbe Blanche", "Shirohige Kaizokudan", "East Blue", 234, 151, true, "L'équipage de Barbe Blanche ...","blanche.jpg"),
new Equipage("Équipage de Barbe Noire", "Kurohige Kaizokudan", "East Blue", 234, 151, true, "L'équipage de Barbe Noire ...","noire.png"),
};
return Lequipage;
}
}
}

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model.Stub
{
public static class StubFruitDuDemon
{
public static IEnumerable<FruitDuDemon> RecupererFruit()
{
List<FruitDuDemon> fdd = new List<FruitDuDemon>()
{
new FruitDuDemon("Fruit de la fumée", "Moku Moky No Mi", "Logia", 97, 48, "Le fruit est ..", "Forces :", "Faiblesses :","fumer.png"),
new FruitDuDemon("Fruit de l'humain modèle Nika", "Nika Nika No Mi", "Zoan Mythique", 1, 1, "Le fruit ...", "Forces :", "Faiblesses :","nika.png"),
new FruitDuDemon("Pyro fruit", "Nika Nika No Mi", "Logia", 158, 94, "Le fruit ...", "Forces :", "Faiblesses :","feu.png"),
new FruitDuDemon("Fruit des Éclosions", "Hana Hana no Mi", "Paramecia", 1, 1, "Le fruit ...", "Forces :", "Faiblesses :","eclosion.png"),
new FruitDuDemon("Fruit du Félin, modèle Léopard", "Neko Neko no Mi", "Zoan Carnivore", 348, 245, "Le fruit ...", "Forces :", "Faiblesses :","leopard.png"),
};
return fdd;
}
}
}

@ -13,8 +13,8 @@
<ShellContent <ShellContent
ContentTemplate="{DataTemplate local:NewPage4}" ContentTemplate="{DataTemplate local:PageEquipage}"
Route="NewPage4" /> Route="PageEquipage" />
</Shell> </Shell>

@ -27,11 +27,11 @@
<Button Style="{StaticResource buttonMenu2}" Text="Accueil"/> <Button Style="{StaticResource buttonMenu2}" Text="Accueil"/>
<Button Style="{StaticResource buttonMenu}" Text="Carte"/> <Button Style="{StaticResource buttonMenu}" Text="Carte"/>
<Button Style="{StaticResource buttonMenu}" Text="Personnages"/> <Button Style="{StaticResource buttonMenu}" Text="Personnages"/>
<Button Style="{StaticResource buttonMenu}" Text="Fruits du démon"/> <Button Style="{StaticResource buttonMenu}" Text="Fruits du démon" Clicked="Hyperlink_FDD"/>
<Button Style="{StaticResource buttonMenu}" Text="Bateaux"/> <Button Style="{StaticResource buttonMenu}" Text="Bateaux"/>
<Button Style="{StaticResource buttonMenu}" Text="Îles"/> <Button Style="{StaticResource buttonMenu}" Text="Îles"/>
<Button Style="{StaticResource buttonMenu}" Text="Bestiaire"/> <Button Style="{StaticResource buttonMenu}" Text="Bestiaire"/>
<Button Style="{StaticResource buttonMenu}" Text="Équipages"/> <Button Style="{StaticResource buttonMenu}" Text="Équipages" Clicked="Hyperlink_Equip"/>
</VerticalStackLayout> </VerticalStackLayout>
<VerticalStackLayout Grid.Row="0" Grid.Column="1" Spacing="40" Margin="0,20,0,0"> <VerticalStackLayout Grid.Row="0" Grid.Column="1" Spacing="40" Margin="0,20,0,0">
<Frame CornerRadius="20" WidthRequest="600" HeightRequest="75"> <Frame CornerRadius="20" WidthRequest="600" HeightRequest="75">

@ -4,11 +4,19 @@ namespace Ohara;
public partial class MainPage : ContentPage public partial class MainPage : ContentPage
{ {
int count = 0;
public MainPage() public MainPage()
{ {
InitializeComponent(); InitializeComponent();
} }
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());
}
} }

@ -1,10 +0,0 @@
namespace Ohara;
public partial class NewPage3 : ContentPage
{
public NewPage3()
{
InitializeComponent();
}
}

@ -52,6 +52,19 @@
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Model\Model.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="PageEquipage.xaml.cs">
<DependentUpon>PageEquipage.xaml</DependentUpon>
</Compile>
<Compile Update="PageFDD.xaml.cs">
<DependentUpon>PageFDD.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup> <ItemGroup>
<MauiXaml Update="NewPage1.xaml"> <MauiXaml Update="NewPage1.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
@ -59,7 +72,10 @@
<MauiXaml Update="NewPage2.xaml"> <MauiXaml Update="NewPage2.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="NewPage3.xaml"> <MauiXaml Update="PageFDD.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="PageEquipage.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="NewPage4.xaml"> <MauiXaml Update="NewPage4.xaml">

@ -1,19 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Ohara.NewPage3" x:Class="Ohara.PageEquipage"
Title="NewPage3" Title="PageEquipage"
BackgroundColor="#e2edf1"> BackgroundColor="#e2edf1">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="2*" /> <RowDefinition Height="2*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="300" /> <ColumnDefinition Width="300" />
<ColumnDefinition Width="*" /> <ColumnDefinition Width="90*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<VerticalStackLayout BackgroundColor="#72a3b3" Grid.Row="0" Grid.Column="0" Spacing="10"> <VerticalStackLayout BackgroundColor="#72a3b3" Grid.Row="0" Grid.Column="0" Spacing="10">
@ -24,14 +21,14 @@
</Image> </Image>
<Button Style="{StaticResource buttonMenu}" Text="Accueil"/> <Button Style="{StaticResource buttonMenu}" Text="Accueil" Clicked="Hyperlink_Acceuil"/>
<Button Style="{StaticResource buttonMenu}" Text="Carte"/> <Button Style="{StaticResource buttonMenu}" Text="Carte"/>
<Button Style="{StaticResource buttonMenu2}" Text="Personnages"/> <Button Style="{StaticResource buttonMenu}" Text="Personnages"/>
<Button Style="{StaticResource buttonMenu}" Text="Fruits du démon"/> <Button Style="{StaticResource buttonMenu}" Text="Fruits du démon" Clicked="Hyperlink_FDD"/>
<Button Style="{StaticResource buttonMenu}" Text="Bateaux"/> <Button Style="{StaticResource buttonMenu}" Text="Bateaux"/>
<Button Style="{StaticResource buttonMenu}" Text="Îles"/> <Button Style="{StaticResource buttonMenu}" Text="Îles"/>
<Button Style="{StaticResource buttonMenu}" Text="Bestiaire"/> <Button Style="{StaticResource buttonMenu}" Text="Bestiaire"/>
<Button Style="{StaticResource buttonMenu}" Text="Équipages"/> <Button Style="{StaticResource buttonMenu2}" Text="Équipages"/>
</VerticalStackLayout> </VerticalStackLayout>
<VerticalStackLayout Grid.Row="0" Grid.Column="1" Spacing="40"> <VerticalStackLayout Grid.Row="0" Grid.Column="1" Spacing="40">
<Grid BackgroundColor="#72a3b3" Padding="10" ColumnSpacing="50" > <Grid BackgroundColor="#72a3b3" Padding="10" ColumnSpacing="50" >
@ -53,9 +50,37 @@
<Label Text="Trier" HorizontalTextAlignment="Center" /> <Label Text="Trier" HorizontalTextAlignment="Center" />
</Frame> </Frame>
</Grid> </Grid>
<ScrollView Orientation="Vertical" VerticalScrollBarVisibility="Always">
<CollectionView x:Name="listeEquip" ItemsUpdatingScrollMode="KeepScrollOffset" VerticalScrollBarVisibility="Always" ItemsLayout="VerticalGrid, 4">
</ScrollView> <CollectionView.ItemTemplate>
<DataTemplate>
<Grid Padding="10" ColumnSpacing="10" RowSpacing="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="25*"/>
</Grid.ColumnDefinitions>
<Image
Source="{Binding Image}"
HeightRequest="270"
WidthRequest="270"
BackgroundColor="Black"
/>
<Label
VerticalOptions="End"
HorizontalOptions="Center"
HorizontalTextAlignment="Center"
Padding="5"
Margin="10"
Text="{Binding Nom}"
BackgroundColor="#72a3b3"
FontAttributes="Bold" />
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</VerticalStackLayout> </VerticalStackLayout>
</Grid> </Grid>
</ContentPage> </ContentPage>

@ -0,0 +1,25 @@
namespace Ohara;
using Model;
using Model.Stub;
public partial class PageEquipage : ContentPage
{
public PageEquipage()
{
InitializeComponent();
List<Equipage> Lequipage = StubEquipage.RecupererEquipage().ToList();
listeEquip.ItemsSource = Lequipage;
}
private async void Hyperlink_FDD(object sender, EventArgs e)
{
await Navigation.PushAsync(new PageFDD());
}
private async void Hyperlink_Acceuil(object sender, EventArgs e)
{
await Navigation.PushAsync(new MainPage());
}
}

@ -0,0 +1,94 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Ohara.PageFDD"
Title="PageFDD"
BackgroundColor="#e2edf1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="2*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300" />
<ColumnDefinition Width="90*" />
</Grid.ColumnDefinitions>
<VerticalStackLayout BackgroundColor="#72a3b3" Grid.Row="0" Grid.Column="0" Spacing="10">
<Image Source="ohara2.png" HeightRequest="300" HorizontalOptions="Center" >
<Image.Clip>
<EllipseGeometry Center="150,90" RadiusX="80" RadiusY="80"/>
</Image.Clip>
</Image>
<Button Style="{StaticResource buttonMenu}" Text="Accueil" Clicked="Hyperlink_Acceuil"/>
<Button Style="{StaticResource buttonMenu}" Text="Carte"/>
<Button Style="{StaticResource buttonMenu}" Text="Personnages"/>
<Button Style="{StaticResource buttonMenu2}" Text="Fruits du démon"/>
<Button Style="{StaticResource buttonMenu}" Text="Bateaux"/>
<Button Style="{StaticResource buttonMenu}" Text="Îles"/>
<Button Style="{StaticResource buttonMenu}" Text="Bestiaire"/>
<Button Style="{StaticResource buttonMenu}" Text="Équipages" Clicked="Hyperlink_Equip"/>
</VerticalStackLayout>
<VerticalStackLayout Grid.Row="0" Grid.Column="1" Spacing="40">
<Grid BackgroundColor="#72a3b3" Padding="10" ColumnSpacing="50" >
<Grid.RowDefinitions>
<RowDefinition Height="10*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions >
<ColumnDefinition Width="20*"/>
<ColumnDefinition Width="25*"/>
<ColumnDefinition Width="10*"/>
<ColumnDefinition Width="10*"/>
</Grid.ColumnDefinitions>
<SearchBar Placeholder="Rechercher..." BackgroundColor="#bfe5ef" Grid.Column="0"/>
<Frame CornerRadius="20" BackgroundColor="#bfe5ef" BorderColor="#bfe5ef" Grid.Column="2">
<Label Text="Filtrer" HorizontalTextAlignment="Center" />
</Frame>
<Frame CornerRadius="20" BackgroundColor="#bfe5ef" BorderColor="#bfe5ef" Grid.Column="3">
<Label Text="Trier" HorizontalTextAlignment="Center" />
</Frame>
</Grid>
<CollectionView x:Name="listeFDD" ItemsUpdatingScrollMode="KeepScrollOffset" VerticalScrollBarVisibility="Always" ItemsLayout="VerticalGrid, 4">
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Padding="10" ColumnSpacing="10" RowSpacing="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="25*"/>
</Grid.ColumnDefinitions>
<Image
Source="{Binding Image}"
HeightRequest="300"
WidthRequest="300" />
<Label
VerticalOptions="End"
Padding="7"
HorizontalTextAlignment="Center"
HorizontalOptions="Center"
Text="{Binding Type}"
FontAttributes="Italic"
BackgroundColor="#72a3b3"/>
<Label
VerticalOptions="End"
Margin="25"
HorizontalOptions="Center"
HorizontalTextAlignment="Center"
Padding="5"
Text="{Binding Nom}"
BackgroundColor="#72a3b3"
FontAttributes="Bold" />
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</VerticalStackLayout>
</Grid>
</ContentPage>

@ -0,0 +1,32 @@
namespace Ohara;
using Model;
using Model.Stub;
public partial class PageFDD : ContentPage
{
public PageFDD()
{
InitializeComponent();
List<FruitDuDemon> fdd = StubFruitDuDemon.RecupererFruit().ToList();
listeFDD.ItemsSource = fdd;
}
private void listeFDD_ScrollToRequested(object sender, ScrollToRequestEventArgs e)
{
}
private async void Hyperlink_Acceuil(object sender, EventArgs e)
{
await Navigation.PushAsync(new MainPage());
}
private async void Hyperlink_Equip(object sender, EventArgs e)
{
await Navigation.PushAsync(new PageEquipage());
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 970 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 555 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

@ -409,7 +409,6 @@
<Setter Property="FontSize" Value="20"/> <Setter Property="FontSize" Value="20"/>
<Setter Property="TextColor" Value="White"/> <Setter Property="TextColor" Value="White"/>
<Setter Property="CornerRadius" Value="0"/> <Setter Property="CornerRadius" Value="0"/>
<Setter Property="WidthRequest" Value="250"/> <Setter Property="WidthRequest" Value="250"/>
</Style> </Style>
@ -426,9 +425,8 @@
<Setter Property="FontAttributes" Value="Bold" /> <Setter Property="FontAttributes" Value="Bold" />
<Setter Property="FontSize" Value="20"/> <Setter Property="FontSize" Value="20"/>
<Setter Property="TextColor" Value="White"/> <Setter Property="TextColor" Value="White"/>
<Setter Property="CornerRadius" Value="0"/> <Setter Property="CornerRadius" Value="0"/>
<Setter Property="WidthRequest" Value="275" />
<Setter Property="WidthRequest" Value="275" />
</Style> </Style>
</ResourceDictionary> </ResourceDictionary>

@ -2,24 +2,11 @@
using Model; using Model;
FruitDuDemon nika = new FruitDuDemon("Fruit de l'humain modèle Nika", "Nika Nika No Mi", "Zoan Mythologique", 1, 1, "Le fruit ...", "Forces :", "Faiblesses :"); FruitDuDemon nika = new FruitDuDemon("Fruit de l'humain modèle Nika", "Nika Nika No Mi", "Zoan Mythologique", 1, 1, "Le fruit ...", "Forces :", "Faiblesses :");
FruitDuDemon fumer = new FruitDuDemon("Fruit de la fumée", "Moku Moky No Mi", "Logia", 50, 50, "Le fruit est ..", "Forces :", "Faiblesses :", "fumer.png");
Personnage luffy = new Personnage("Monkey D. Luffy", "Chapeau de paille", 19,1.74,"East Blue","Monkey D. Luffy est...","Le Roi des Pirates ce sera moi !" ); Personnage luffy = new Personnage("Monkey D. Luffy", "Chapeau de paille", 19,1.74,"East Blue","Monkey D. Luffy est...","Le Roi des Pirates ce sera moi !" );
Personnage zoro = new Personnage("Roronoa Zoro", "Chasseur de pirates", 21, 1.81, "East Blue", "Roronoa Zoro est ...", "Le plus grand des racistes ce sera moi !"); Personnage zoro = new Personnage("Roronoa Zoro", "Chasseur de pirates", 21, 1.81, "East Blue", "Roronoa Zoro est ...", "Le plus grand des racistes ce sera moi !");
Personnage sanji = new Personnage("Sanji", "La jambe noire", 21, 1.80, "East Blue", "Sanji né Vinsmoke Sanji ..", "As-tu déjà entendu parler de All Blue ?"); Personnage sanji = new Personnage("Sanji", "La jambe noire", 21, 1.80, "East Blue", "Sanji né Vinsmoke Sanji ..", "As-tu déjà entendu parler de All Blue ?");
Equipage mugi = new Equipage("Équipage au chapeau de paille","Mugiwara No Ichimi","East Blue",1,1,true,"L'équipage du Chapeau de Paille ...",luffy);
nika.Utilisateur = new List<Personnage> { luffy }; nika.Utilisateur = new List<Personnage> { luffy };
luffy.Fruit = new List<FruitDuDemon> { nika }; luffy.Fruit = new List<FruitDuDemon> { nika };
luffy.Equipage= mugi;
zoro.Equipage = mugi;
sanji.Equipage = mugi;
mugi.Membre = new List<Personnage> { luffy, zoro, sanji };
foreach(Personnage p in mugi.Membre)
{
Console.WriteLine(p.Nom);
Console.WriteLine(p.Citation);
Console.WriteLine(p.Epithete);
}
Console.WriteLine(mugi.Capitaine.Nom);
Loading…
Cancel
Save