Merge branch 'devYoan'
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
commit
6485cffabe
@ -0,0 +1,59 @@
|
||||
<?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.ModalBateau"
|
||||
Title="ModalBateau"
|
||||
BackgroundColor="#e2edf1"
|
||||
Shell.PresentationMode="ModalAnimated">
|
||||
<ScrollView>
|
||||
<FlexLayout AlignItems="End" Wrap="Wrap" Direction="Row" JustifyContent="Center" HorizontalOptions="Center" VerticalOptions="Center" >
|
||||
<VerticalStackLayout Spacing="4" Margin="2">
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Nom :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding Nom}" WidthRequest="170" Placeholder="Nom de l'objet ..." PlaceholderColor="LightGrey"/>
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Grid>
|
||||
<Frame Padding="0" IsClippedToBounds="True">
|
||||
|
||||
<Image x:Name="image" Source="{Binding Image}" WidthRequest="300" HeightRequest="300" Grid.Row="2" Grid.Column="1"/>
|
||||
|
||||
</Frame>
|
||||
<Button Text="Choisir une image ..." Clicked="ButtonImage_Clicked" Grid.Row="2" VerticalOptions="End" />
|
||||
</Grid>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Premier Chapitre :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding PremierChap}" />
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Premier Episode :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding PremierEp}" />
|
||||
</HorizontalStackLayout >
|
||||
</Frame>
|
||||
<Button Text="Annuler" Style="{StaticResource buttonRetirerFavInfo}" Clicked="ButtonAnnuler_Clicked" />
|
||||
</VerticalStackLayout >
|
||||
<VerticalStackLayout Spacing="5" Margin="2">
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Carectiristique :" TextColor="White" FontAttributes="Bold" Grid.Row="2"/>
|
||||
<Editor Text="{Binding Caracteristique}" Grid.Column="1" Grid.Row="2" WidthRequest="300" HeightRequest="200"/>
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Description :" FontAttributes="Bold"/>
|
||||
<Editor Text="{Binding Description}" WidthRequest="300" HeightRequest="200"/>
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
|
||||
<Button Text="Confirmer" Style="{StaticResource buttonFavsInfo}" Clicked="ButtonConfirmer_Clicked" />
|
||||
</VerticalStackLayout>
|
||||
</FlexLayout>
|
||||
</ScrollView>
|
||||
|
||||
</ContentPage>
|
@ -0,0 +1,58 @@
|
||||
using Model.Classes;
|
||||
using Model.Managers;
|
||||
|
||||
namespace Ohara;
|
||||
|
||||
public partial class ModalBateau : ContentPage
|
||||
{
|
||||
public Manager manager => (App.Current as App).manager;
|
||||
public Bateau nouveauBateau;
|
||||
public string ancienNom;
|
||||
public ModalBateau()
|
||||
{
|
||||
if (manager.SelectedItem != null)
|
||||
{
|
||||
nouveauBateau = manager.SelectedItem as Bateau;
|
||||
ancienNom = nouveauBateau.Nom;
|
||||
}
|
||||
else
|
||||
{
|
||||
nouveauBateau = new Bateau("Bateau", " ",0,0," ", " ");
|
||||
}
|
||||
InitializeComponent();
|
||||
BindingContext = nouveauBateau;
|
||||
}
|
||||
|
||||
private async void ButtonConfirmer_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
if (manager.SelectedItem != null)
|
||||
{
|
||||
manager.ModifierBateau(nouveauBateau, ancienNom);
|
||||
nouveauBateau = manager.SelectedItem as Bateau;
|
||||
}
|
||||
else
|
||||
{
|
||||
manager.AjouterBateau(nouveauBateau);
|
||||
}
|
||||
|
||||
await Navigation.PopModalAsync();
|
||||
}
|
||||
private async void ButtonAnnuler_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
await Navigation.PopModalAsync();
|
||||
}
|
||||
|
||||
private async void ButtonImage_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
var result = await FilePicker.PickAsync(new PickOptions
|
||||
{
|
||||
PickerTitle = "Choisissez une image ...",
|
||||
FileTypes = FilePickerFileType.Images,
|
||||
});
|
||||
if (result != null)
|
||||
{
|
||||
var stream = result.FullPath;
|
||||
nouveauBateau.Image = stream;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
<?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.ModalBestiaire"
|
||||
Title="ModalBestiaire"
|
||||
BackgroundColor="#e2edf1"
|
||||
Shell.PresentationMode="ModalAnimated">
|
||||
|
||||
<ScrollView>
|
||||
<FlexLayout AlignItems="End" Wrap="Wrap" Direction="Row" JustifyContent="Center" HorizontalOptions="Center" VerticalOptions="Center" >
|
||||
<VerticalStackLayout Spacing="4" Margin="2">
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Nom :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding Nom}" WidthRequest="170" Placeholder="Nom de l'objet ..." PlaceholderColor="LightGrey"/>
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Grid>
|
||||
<Frame Padding="0" IsClippedToBounds="True">
|
||||
|
||||
<Image x:Name="image" Source="{Binding Image}" WidthRequest="300" HeightRequest="300" Grid.Row="2" Grid.Column="1"/>
|
||||
|
||||
</Frame>
|
||||
<Button Text="Choisir une image ..." Clicked="ButtonImage_Clicked" Grid.Row="2" VerticalOptions="End" />
|
||||
</Grid>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Origine :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding Origine}" />
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Button Text="Annuler" Style="{StaticResource buttonRetirerFavInfo}" Clicked="ButtonAnnuler_Clicked" />
|
||||
</VerticalStackLayout >
|
||||
<VerticalStackLayout Spacing="5" Margin="2">
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Carectiristique :" TextColor="White" FontAttributes="Bold" Grid.Row="2"/>
|
||||
<Editor Text="{Binding Caracteristique}" Grid.Column="1" Grid.Row="2" WidthRequest="300" HeightRequest="200"/>
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Description :" FontAttributes="Bold"/>
|
||||
<Editor Text="{Binding Description}" WidthRequest="300" HeightRequest="200"/>
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
|
||||
<Button Text="Confirmer" Style="{StaticResource buttonFavsInfo}" Clicked="ButtonConfirmer_Clicked" />
|
||||
</VerticalStackLayout>
|
||||
</FlexLayout>
|
||||
</ScrollView>
|
||||
|
||||
</ContentPage>
|
@ -0,0 +1,58 @@
|
||||
using Model.Classes;
|
||||
using Model.Managers;
|
||||
|
||||
namespace Ohara;
|
||||
|
||||
public partial class ModalBestiaire : ContentPage
|
||||
{
|
||||
public Manager manager => (App.Current as App).manager;
|
||||
public Bestiaire nouveauBest;
|
||||
public string ancienNom;
|
||||
public ModalBestiaire()
|
||||
{
|
||||
if (manager.SelectedItem != null)
|
||||
{
|
||||
nouveauBest = manager.SelectedItem as Bestiaire;
|
||||
ancienNom = nouveauBest.Nom;
|
||||
}
|
||||
else
|
||||
{
|
||||
nouveauBest = new Bestiaire("Bestiaire", " ", " ", " ");
|
||||
}
|
||||
InitializeComponent();
|
||||
BindingContext = nouveauBest;
|
||||
}
|
||||
|
||||
private async void ButtonConfirmer_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
if (manager.SelectedItem != null)
|
||||
{
|
||||
manager.ModifierBest(nouveauBest, ancienNom);
|
||||
nouveauBest = manager.SelectedItem as Bestiaire;
|
||||
}
|
||||
else
|
||||
{
|
||||
manager.AjouterBest(nouveauBest);
|
||||
}
|
||||
|
||||
await Navigation.PopModalAsync();
|
||||
}
|
||||
private async void ButtonAnnuler_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
await Navigation.PopModalAsync();
|
||||
}
|
||||
private async void ButtonImage_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
var result = await FilePicker.PickAsync(new PickOptions
|
||||
{
|
||||
PickerTitle = "Choisissez une image ...",
|
||||
FileTypes = FilePickerFileType.Images,
|
||||
});
|
||||
if (result != null)
|
||||
{
|
||||
var stream = result.FullPath;
|
||||
nouveauBest.Image = stream;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
<?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.ModalEquipage"
|
||||
Title="ModalEquipage"
|
||||
BackgroundColor="#e2edf1"
|
||||
Shell.PresentationMode="ModalAnimated">
|
||||
<ScrollView>
|
||||
<FlexLayout AlignItems="End" Wrap="Wrap" Direction="Row" JustifyContent="Center" HorizontalOptions="Center" VerticalOptions="Center" >
|
||||
<VerticalStackLayout Spacing="4" Margin="2">
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Nom :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding Nom}" WidthRequest="170" Placeholder="Nom de l'objet ..." PlaceholderColor="LightGrey"/>
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Grid>
|
||||
<Frame Padding="0" IsClippedToBounds="True">
|
||||
|
||||
<Image x:Name="image" Source="{Binding Image}" WidthRequest="300" HeightRequest="300" Grid.Row="2" Grid.Column="1"/>
|
||||
|
||||
</Frame>
|
||||
<Button Text="Choisir une image ..." Clicked="ButtonImage_Clicked" Grid.Row="2" VerticalOptions="End" />
|
||||
</Grid>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Nom Romanise :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding NomRomanise}" />
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Région :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding Region}" />
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Premier Chapitre :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding PremierChap}" />
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Premier Episode :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding PremierEp}" />
|
||||
</HorizontalStackLayout >
|
||||
</Frame>
|
||||
<Button Text="Annuler" Style="{StaticResource buttonRetirerFavInfo}" Clicked="ButtonAnnuler_Clicked" />
|
||||
</VerticalStackLayout >
|
||||
<VerticalStackLayout Spacing="5" Margin="2">
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Statut :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding Statut}" />
|
||||
</HorizontalStackLayout >
|
||||
</Frame>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Description :" FontAttributes="Bold"/>
|
||||
<Editor Text="{Binding Description}" WidthRequest="300" HeightRequest="200"/>
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
|
||||
<Button Text="Confirmer" Style="{StaticResource buttonFavsInfo}" Clicked="ButtonConfirmer_Clicked" />
|
||||
</VerticalStackLayout>
|
||||
</FlexLayout>
|
||||
</ScrollView>
|
||||
</ContentPage>
|
@ -0,0 +1,57 @@
|
||||
using Model.Classes;
|
||||
using Model.Managers;
|
||||
|
||||
namespace Ohara;
|
||||
|
||||
public partial class ModalEquipage : ContentPage
|
||||
{
|
||||
public Manager manager => (App.Current as App).manager;
|
||||
public Equipage nouvelEquipage;
|
||||
public string ancienNom;
|
||||
public ModalEquipage()
|
||||
{
|
||||
if (manager.SelectedItem != null)
|
||||
{
|
||||
nouvelEquipage = manager.SelectedItem as Equipage;
|
||||
ancienNom = nouvelEquipage.Nom;
|
||||
}
|
||||
else
|
||||
{
|
||||
nouvelEquipage = new Equipage("Equipage", " ", " ", 0,0,true," ");
|
||||
}
|
||||
InitializeComponent();
|
||||
BindingContext = nouvelEquipage;
|
||||
}
|
||||
|
||||
private async void ButtonConfirmer_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
if (manager.SelectedItem != null)
|
||||
{
|
||||
manager.ModifierEquipage(nouvelEquipage, ancienNom);
|
||||
nouvelEquipage = manager.SelectedItem as Equipage;
|
||||
}
|
||||
else
|
||||
{
|
||||
manager.AjouterEquip(nouvelEquipage);
|
||||
}
|
||||
|
||||
await Navigation.PopModalAsync();
|
||||
}
|
||||
private async void ButtonAnnuler_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
await Navigation.PopModalAsync();
|
||||
}
|
||||
private async void ButtonImage_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
var result = await FilePicker.PickAsync(new PickOptions
|
||||
{
|
||||
PickerTitle = "Choisissez une image ...",
|
||||
FileTypes = FilePickerFileType.Images,
|
||||
});
|
||||
if (result != null)
|
||||
{
|
||||
var stream = result.FullPath;
|
||||
nouvelEquipage.Image = stream;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
<?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.ModalFDD"
|
||||
Title="ModalFDD"
|
||||
BackgroundColor="#e2edf1"
|
||||
Shell.PresentationMode="ModalAnimated">
|
||||
<ScrollView>
|
||||
<FlexLayout AlignItems="End" Wrap="Wrap" Direction="Row" JustifyContent="Center" HorizontalOptions="Center" VerticalOptions="Center" >
|
||||
<VerticalStackLayout Spacing="4" Margin="2">
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Nom :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding Nom}" WidthRequest="170" Placeholder="Nom de l'objet ..." PlaceholderColor="LightGrey"/>
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Grid>
|
||||
<Frame Padding="0" IsClippedToBounds="True">
|
||||
|
||||
<Image x:Name="image" Source="{Binding Image}" WidthRequest="300" HeightRequest="300" Grid.Row="2" Grid.Column="1"/>
|
||||
|
||||
</Frame>
|
||||
<Button Text="Choisir une image ..." Clicked="ButtonImage_Clicked" Grid.Row="2" VerticalOptions="End" />
|
||||
</Grid>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Nom Romanise :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding NomRomanise}" />
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Type :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding Type}" />
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Premier Chapitre :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding PremierChap}" />
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Premier Episode :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding PremierEp}" />
|
||||
</HorizontalStackLayout >
|
||||
</Frame>
|
||||
<Button Text="Annuler" Style="{StaticResource buttonRetirerFavInfo}" Clicked="ButtonAnnuler_Clicked" />
|
||||
</VerticalStackLayout >
|
||||
<VerticalStackLayout Spacing="5" Margin="2">
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Description :" FontAttributes="Bold"/>
|
||||
<Editor Text="{Binding Description}" WidthRequest="300" HeightRequest="200"/>
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Forces :" FontAttributes="Bold"/>
|
||||
<Editor Text="{Binding Forces}" WidthRequest="300" HeightRequest="200"/>
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Faiblesses :" FontAttributes="Bold" />
|
||||
<Editor Text="{Binding Faiblesses}" WidthRequest="300" HeightRequest="200"/>
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Button Text="Confirmer" Style="{StaticResource buttonFavsInfo}" Clicked="ButtonConfirmer_Clicked" />
|
||||
</VerticalStackLayout>
|
||||
</FlexLayout>
|
||||
</ScrollView>
|
||||
</ContentPage>
|
@ -0,0 +1,57 @@
|
||||
using Model.Classes;
|
||||
using Model.Managers;
|
||||
|
||||
namespace Ohara;
|
||||
|
||||
public partial class ModalFDD : ContentPage
|
||||
{
|
||||
public Manager manager => (App.Current as App).manager;
|
||||
public FruitDuDemon nouveauFdd;
|
||||
public string ancienNom;
|
||||
public ModalFDD()
|
||||
{
|
||||
if (manager.SelectedItem != null)
|
||||
{
|
||||
nouveauFdd = manager.SelectedItem as FruitDuDemon;
|
||||
ancienNom = nouveauFdd.Nom;
|
||||
}
|
||||
else
|
||||
{
|
||||
nouveauFdd = new FruitDuDemon("Fruit", " ", " ",0,0, " "," ","");
|
||||
}
|
||||
InitializeComponent();
|
||||
BindingContext = nouveauFdd;
|
||||
}
|
||||
|
||||
private async void ButtonConfirmer_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
if (manager.SelectedItem != null)
|
||||
{
|
||||
manager.ModifierFDD(nouveauFdd, ancienNom);
|
||||
nouveauFdd = manager.SelectedItem as FruitDuDemon;
|
||||
}
|
||||
else
|
||||
{
|
||||
manager.AjouterFDD(nouveauFdd);
|
||||
}
|
||||
|
||||
await Navigation.PopModalAsync();
|
||||
}
|
||||
private async void ButtonAnnuler_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
await Navigation.PopModalAsync();
|
||||
}
|
||||
private async void ButtonImage_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
var result = await FilePicker.PickAsync(new PickOptions
|
||||
{
|
||||
PickerTitle = "Choisissez une image ...",
|
||||
FileTypes = FilePickerFileType.Images,
|
||||
});
|
||||
if (result != null)
|
||||
{
|
||||
var stream = result.FullPath;
|
||||
nouveauFdd.Image = stream;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
<?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.ModalIle"
|
||||
Title="ModalIle"
|
||||
BackgroundColor="#e2edf1"
|
||||
Shell.PresentationMode="ModalAnimated">
|
||||
<ScrollView>
|
||||
<FlexLayout AlignItems="End" Wrap="Wrap" Direction="Row" JustifyContent="Center" HorizontalOptions="Center" VerticalOptions="Center" >
|
||||
<VerticalStackLayout Spacing="4" Margin="2">
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Nom :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding Nom}" WidthRequest="170" Placeholder="Nom de l'objet ..." PlaceholderColor="LightGrey"/>
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Grid>
|
||||
<Frame Padding="0" IsClippedToBounds="True">
|
||||
|
||||
<Image x:Name="image" Source="{Binding Image}" WidthRequest="300" HeightRequest="300" Grid.Row="2" Grid.Column="1"/>
|
||||
|
||||
</Frame>
|
||||
<Button Text="Choisir une image ..." Clicked="ButtonImage_Clicked" Grid.Row="2" VerticalOptions="End" />
|
||||
</Grid>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Nom Romanise :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding NomRomanise}" />
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Region :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding Region}" />
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Premier Chapitre :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding PremierChap}" />
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Premier Episode :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding PremierEp}" />
|
||||
</HorizontalStackLayout >
|
||||
</Frame>
|
||||
<Button Text="Annuler" Style="{StaticResource buttonRetirerFavInfo}" Clicked="ButtonAnnuler_Clicked" />
|
||||
</VerticalStackLayout >
|
||||
<VerticalStackLayout Spacing="5" Margin="2">
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Description :" FontAttributes="Bold"/>
|
||||
<Editor Text="{Binding Description}" WidthRequest="300" HeightRequest="200"/>
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Geographie :" FontAttributes="Bold"/>
|
||||
<Editor Text="{Binding Geographie}" WidthRequest="300" HeightRequest="200"/>
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Button Text="Confirmer" Style="{StaticResource buttonFavsInfo}" Clicked="ButtonConfirmer_Clicked" />
|
||||
</VerticalStackLayout>
|
||||
</FlexLayout>
|
||||
</ScrollView>
|
||||
</ContentPage>
|
@ -0,0 +1,59 @@
|
||||
using Model.Classes;
|
||||
using Model.Managers;
|
||||
|
||||
namespace Ohara;
|
||||
|
||||
public partial class ModalIle : ContentPage
|
||||
{
|
||||
public Manager manager => (App.Current as App).manager;
|
||||
public Ile nouvelIle;
|
||||
public string ancienNom;
|
||||
public ModalIle()
|
||||
{
|
||||
if(manager.SelectedItem != null)
|
||||
{
|
||||
nouvelIle=(Ile)manager.SelectedItem;
|
||||
ancienNom = manager.SelectedItem.Nom;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.nouvelIle = new Ile("Ile", "", "", 0, 0, "", "");
|
||||
}
|
||||
|
||||
InitializeComponent();
|
||||
BindingContext = nouvelIle;
|
||||
|
||||
}
|
||||
|
||||
private async void ButtonConfirmer_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
if (manager.SelectedItem != null)
|
||||
{
|
||||
manager.ModifierIle(nouvelIle,ancienNom);
|
||||
manager.SelectedItem=nouvelIle;
|
||||
}
|
||||
else
|
||||
{
|
||||
manager.AjouterIle(nouvelIle);
|
||||
}
|
||||
|
||||
await Navigation.PopModalAsync();
|
||||
}
|
||||
private async void ButtonAnnuler_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
await Navigation.PopModalAsync();
|
||||
}
|
||||
private async void ButtonImage_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
var result = await FilePicker.PickAsync(new PickOptions
|
||||
{
|
||||
PickerTitle = "Choisissez une image ...",
|
||||
FileTypes = FilePickerFileType.Images,
|
||||
});
|
||||
if (result != null)
|
||||
{
|
||||
var stream = result.FullPath;
|
||||
nouvelIle.Image = stream;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
<?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.ModalPersonnage"
|
||||
Title="ModalPersonnage"
|
||||
BackgroundColor="#e2edf1">
|
||||
<ScrollView>
|
||||
<FlexLayout AlignItems="End" Wrap="Wrap" Direction="Row" JustifyContent="Center" HorizontalOptions="Center" VerticalOptions="Center" >
|
||||
<VerticalStackLayout Spacing="4" Margin="2">
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Nom :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding Nom}" WidthRequest="170" Placeholder="Nom de l'objet ..." PlaceholderColor="LightGrey"/>
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Grid>
|
||||
<Frame Padding="0" IsClippedToBounds="True">
|
||||
|
||||
<Image x:Name="image" Source="{Binding Image}" WidthRequest="300" HeightRequest="300" Grid.Row="2" Grid.Column="1"/>
|
||||
|
||||
</Frame>
|
||||
<Button Text="Choisir une image ..." Clicked="ButtonImage_Clicked" Grid.Row="2" VerticalOptions="End" />
|
||||
</Grid>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Nom Romanise :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding NomRomanise}" />
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Prime :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding Prime}" />
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Epithete :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding Epithete}" />
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
|
||||
<Button Text="Annuler" Style="{StaticResource buttonRetirerFavInfo}" Clicked="ButtonAnnuler_Clicked" />
|
||||
</VerticalStackLayout >
|
||||
<VerticalStackLayout Spacing="5" Margin="2">
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Origine :" FontAttributes="Bold"/>
|
||||
<Entry Text="{Binding Origine}" />
|
||||
</HorizontalStackLayout >
|
||||
</Frame>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Description :" FontAttributes="Bold"/>
|
||||
<Editor Text="{Binding Description}" WidthRequest="300" HeightRequest="200"/>
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Frame Style="{StaticResource frameModif}">
|
||||
<HorizontalStackLayout HorizontalOptions="Center">
|
||||
<Label Text="Geographie :" FontAttributes="Bold"/>
|
||||
<Editor Text="{Binding Geographie}" WidthRequest="300" HeightRequest="150"/>
|
||||
</HorizontalStackLayout>
|
||||
</Frame>
|
||||
<Button Text="Confirmer" Style="{StaticResource buttonFavsInfo}" Clicked="ButtonConfirmer_Clicked" />
|
||||
</VerticalStackLayout>
|
||||
</FlexLayout>
|
||||
</ScrollView>
|
||||
</ContentPage>
|
@ -0,0 +1,38 @@
|
||||
using Model.Classes;
|
||||
using Model.Managers;
|
||||
|
||||
namespace Ohara;
|
||||
|
||||
public partial class ModalPersonnage : ContentPage
|
||||
{
|
||||
public Manager manager => (App.Current as App).manager;
|
||||
public Personnage nouveauPerso = new Personnage("Personnage", 0, "", 0, 0, "", "", "");
|
||||
public ModalPersonnage()
|
||||
{
|
||||
InitializeComponent();
|
||||
BindingContext = nouveauPerso;
|
||||
}
|
||||
private async void ButtonConfirmer_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
manager.AjouterPerso(nouveauPerso);
|
||||
await Navigation.PopModalAsync();
|
||||
}
|
||||
private async void ButtonAnnuler_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
await Navigation.PopModalAsync();
|
||||
}
|
||||
|
||||
private async void ButtonImage_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
var result = await FilePicker.PickAsync(new PickOptions
|
||||
{
|
||||
PickerTitle = "Choisissez une image ...",
|
||||
FileTypes = FilePickerFileType.Images,
|
||||
});
|
||||
if (result != null)
|
||||
{
|
||||
var stream = result.FullPath;
|
||||
nouveauPerso.Image = stream;
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 788 KiB |
After Width: | Height: | Size: 8.4 KiB |
After Width: | Height: | Size: 224 KiB |
After Width: | Height: | Size: 48 KiB |
Loading…
Reference in new issue