factorisation du code avec ancien menu fonctionnel -> reste a changer l'affichage du bouton en fonction de la page où l'on se situe
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
aab60dce43
commit
9e18199167
@ -1,122 +1,108 @@
|
|||||||
<?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.PageInfoBateau"
|
xmlns:local="clr-namespace:Ohara"
|
||||||
Title="PageInfoBateau"
|
x:Class="Ohara.PageInfoBateau"
|
||||||
BackgroundColor="#e2edf1">
|
Title="PageInfoBateau"
|
||||||
<Grid>
|
BackgroundColor="#e2edf1">
|
||||||
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="2*" />
|
<Grid.RowDefinitions>
|
||||||
</Grid.RowDefinitions>
|
<RowDefinition Height="2*" />
|
||||||
<Grid.ColumnDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<ColumnDefinition Width="300" />
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="90*" />
|
<ColumnDefinition Width="300" />
|
||||||
</Grid.ColumnDefinitions>
|
<ColumnDefinition Width="90*" />
|
||||||
<VerticalStackLayout BackgroundColor="#72a3b3" Grid.Row="0" Grid.Column="0" Spacing="10">
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Image Source="ohara2.png" HeightRequest="300" HorizontalOptions="Center" >
|
<local:menuBoutons WidthRequest="300" Grid.Column="0"/>
|
||||||
<Image.Clip>
|
|
||||||
<EllipseGeometry Center="150,90" RadiusX="80" RadiusY="80"/>
|
<ScrollView Grid.Row="0" Grid.Column="1" Orientation="Vertical" VerticalScrollBarVisibility="Always">
|
||||||
</Image.Clip>
|
<VerticalStackLayout Spacing="40">
|
||||||
</Image>
|
<CollectionView x:Name="listeBateau">
|
||||||
|
<CollectionView.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
<Button Style="{StaticResource buttonMenu}" Text="Accueil" Clicked="Hyperlink_Accueil"/>
|
|
||||||
<Button Style="{StaticResource buttonMenu}" Text="Carte" Clicked="Hyperlink_Carte"/>
|
<VerticalStackLayout Spacing="10" Padding="40">
|
||||||
<Button Style="{StaticResource buttonMenu}" Text="Personnages" Clicked="Hyperlink_Perso"/>
|
|
||||||
<Button Style="{StaticResource buttonMenu}" Text="Fruits du démon" Clicked="Hyperlink_FDD"/>
|
<Grid ColumnSpacing="20">
|
||||||
<Button Style="{StaticResource buttonMenu2}" Text="Bateaux" Clicked="Hyperlink_Bateau"/>
|
|
||||||
<Button Style="{StaticResource buttonMenu}" Text="Îles" Clicked="Hyperlink_Ile"/>
|
<Grid.ColumnDefinitions>
|
||||||
<Button Style="{StaticResource buttonMenu}" Text="Bestiaire" Clicked="Hyperlink_Bestiaire"/>
|
<ColumnDefinition Width="40*"/>
|
||||||
<Button Style="{StaticResource buttonMenu}" Text="Équipages" Clicked="Hyperlink_Equip"/>
|
<ColumnDefinition Width="40*"/>
|
||||||
</VerticalStackLayout>
|
</Grid.ColumnDefinitions>
|
||||||
<ScrollView Grid.Row="0" Grid.Column="1" Orientation="Vertical" VerticalScrollBarVisibility="Always">
|
<VerticalStackLayout Grid.Column="0" Spacing="4">
|
||||||
<VerticalStackLayout Spacing="40">
|
<Frame Style="{StaticResource frameInfo}">
|
||||||
<CollectionView x:Name="listeBateau">
|
<Label Text="Sommaire" Style="{StaticResource titreInfo}"/>
|
||||||
<CollectionView.ItemTemplate>
|
</Frame>
|
||||||
<DataTemplate>
|
<Frame Style="{StaticResource frameInfo}">
|
||||||
|
<Label Text="1 - Description" TextColor="#72a3b3"/>
|
||||||
<VerticalStackLayout Spacing="10" Padding="40">
|
</Frame>
|
||||||
|
<Frame Style="{StaticResource frameInfo}">
|
||||||
<Grid ColumnSpacing="20">
|
<Label Text="2 - Caracteristiques" TextColor="#72a3b3"/>
|
||||||
|
</Frame>
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="40*"/>
|
</VerticalStackLayout>
|
||||||
<ColumnDefinition Width="40*"/>
|
<VerticalStackLayout Grid.Column="1" Spacing="4">
|
||||||
</Grid.ColumnDefinitions>
|
<Frame Style="{StaticResource frameInfo}">
|
||||||
<VerticalStackLayout Grid.Column="0" Spacing="4">
|
<Label Style="{StaticResource titreInfo}" Text="{Binding Nom}"/>
|
||||||
<Frame Style="{StaticResource frameInfo}">
|
</Frame>
|
||||||
<Label Text="Sommaire" Style="{StaticResource titreInfo}"/>
|
<Frame Style="{StaticResource frameInfo}" >
|
||||||
</Frame>
|
<Image
|
||||||
<Frame Style="{StaticResource frameInfo}">
|
Source="{Binding Image}"
|
||||||
<Label Text="1 - Description" TextColor="#72a3b3"/>
|
HeightRequest="200"
|
||||||
</Frame>
|
WidthRequest="300"
|
||||||
<Frame Style="{StaticResource frameInfo}">
|
|
||||||
<Label Text="2 - Caracteristiques" TextColor="#72a3b3"/>
|
|
||||||
</Frame>
|
/>
|
||||||
|
</Frame>
|
||||||
</VerticalStackLayout>
|
<Frame Style="{StaticResource frameInfo}">
|
||||||
<VerticalStackLayout Grid.Column="1" Spacing="4">
|
<StackLayout HorizontalOptions="Center" Orientation="Horizontal" Spacing="5">
|
||||||
<Frame Style="{StaticResource frameInfo}">
|
<Label Text="Nom Romanisé :" TextColor="#72a3b3" FontAttributes="Bold"/>
|
||||||
<Label Style="{StaticResource titreInfo}" Text="{Binding Nom}"/>
|
<Label Text="{Binding NomRomanise}" TextColor="#72a3b3"/>
|
||||||
</Frame>
|
</StackLayout>
|
||||||
<Frame Style="{StaticResource frameInfo}" >
|
</Frame>
|
||||||
<Image
|
<Frame Style="{StaticResource frameInfo}">
|
||||||
Source="{Binding Image}"
|
<StackLayout HorizontalOptions="Center" Orientation="Horizontal" Spacing="5">
|
||||||
HeightRequest="200"
|
<Label Text="Affiliation(s) :" TextColor="#72a3b3" FontAttributes="Bold"/>
|
||||||
WidthRequest="300"
|
<Label Text="{Binding Affiliation}" TextColor="#72a3b3"/>
|
||||||
|
</StackLayout>
|
||||||
|
</Frame>
|
||||||
/>
|
<Frame Style="{StaticResource frameInfo}">
|
||||||
</Frame>
|
<StackLayout HorizontalOptions="Center" Orientation="Horizontal" Spacing="5">
|
||||||
<Frame Style="{StaticResource frameInfo}">
|
<Label Text="Première apparition manga :" TextColor="#72a3b3" FontAttributes="Bold"/>
|
||||||
<StackLayout HorizontalOptions="Center" Orientation="Horizontal" Spacing="5">
|
<Label Text="{Binding PremierChap}" TextColor="#72a3b3"/>
|
||||||
<Label Text="Nom Romanisé :" TextColor="#72a3b3" FontAttributes="Bold"/>
|
</StackLayout>
|
||||||
<Label Text="{Binding NomRomanise}" TextColor="#72a3b3"/>
|
</Frame>
|
||||||
</StackLayout>
|
<Frame Style="{StaticResource frameInfo}">
|
||||||
</Frame>
|
<StackLayout HorizontalOptions="Center" Orientation="Horizontal" Spacing="5">
|
||||||
<Frame Style="{StaticResource frameInfo}">
|
<Label Text="Première apparition anime :" TextColor="#72a3b3" FontAttributes="Bold"/>
|
||||||
<StackLayout HorizontalOptions="Center" Orientation="Horizontal" Spacing="5">
|
<Label Text="{Binding PremierEp}" TextColor="#72a3b3"/>
|
||||||
<Label Text="Affiliation(s) :" TextColor="#72a3b3" FontAttributes="Bold"/>
|
</StackLayout>
|
||||||
<Label Text="{Binding Affiliation}" TextColor="#72a3b3"/>
|
</Frame>
|
||||||
</StackLayout>
|
</VerticalStackLayout>
|
||||||
</Frame>
|
|
||||||
<Frame Style="{StaticResource frameInfo}">
|
|
||||||
<StackLayout HorizontalOptions="Center" Orientation="Horizontal" Spacing="5">
|
|
||||||
<Label Text="Première apparition manga :" TextColor="#72a3b3" FontAttributes="Bold"/>
|
</Grid>
|
||||||
<Label Text="{Binding PremierChap}" TextColor="#72a3b3"/>
|
<Label Text="Description :" TextColor="#72a3b3" FontSize="20" FontAttributes="Bold"/>
|
||||||
</StackLayout>
|
<Line X1="0" Y1="0" X2="3000" Y2="0" StrokeThickness="2" Stroke="#72a3b3" />
|
||||||
</Frame>
|
<Label Text="{Binding Description}" TextColor="#72a3b3" />
|
||||||
<Frame Style="{StaticResource frameInfo}">
|
<Label Text="Caracteristiques :" TextColor="#72a3b3" FontSize="20" FontAttributes="Bold"/>
|
||||||
<StackLayout HorizontalOptions="Center" Orientation="Horizontal" Spacing="5">
|
<Line X1="0" Y1="0" X2="3000" Y2="0" StrokeThickness="2" Stroke="#72a3b3" />
|
||||||
<Label Text="Première apparition anime :" TextColor="#72a3b3" FontAttributes="Bold"/>
|
<Label Text="{Binding Caracteristique}" TextColor="#72a3b3" />
|
||||||
<Label Text="{Binding PremierEp}" TextColor="#72a3b3"/>
|
|
||||||
</StackLayout>
|
</VerticalStackLayout>
|
||||||
</Frame>
|
|
||||||
</VerticalStackLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
</DataTemplate>
|
||||||
</Grid>
|
</CollectionView.ItemTemplate>
|
||||||
<Label Text="Description :" TextColor="#72a3b3" FontSize="20" FontAttributes="Bold"/>
|
</CollectionView>
|
||||||
<Line X1="0" Y1="0" X2="3000" Y2="0" StrokeThickness="2" Stroke="#72a3b3" />
|
|
||||||
<Label Text="{Binding Description}" TextColor="#72a3b3" />
|
|
||||||
<Label Text="Caracteristiques :" TextColor="#72a3b3" FontSize="20" FontAttributes="Bold"/>
|
</VerticalStackLayout>
|
||||||
<Line X1="0" Y1="0" X2="3000" Y2="0" StrokeThickness="2" Stroke="#72a3b3" />
|
</ScrollView>
|
||||||
<Label Text="{Binding Caracteristique}" TextColor="#72a3b3" />
|
</Grid>
|
||||||
|
|
||||||
</VerticalStackLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</DataTemplate>
|
|
||||||
</CollectionView.ItemTemplate>
|
|
||||||
</CollectionView>
|
|
||||||
|
|
||||||
|
|
||||||
</VerticalStackLayout>
|
|
||||||
</ScrollView>
|
|
||||||
</Grid>
|
|
||||||
</ContentPage>
|
</ContentPage>
|
@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="Ohara.menuBoutons">
|
||||||
|
|
||||||
|
|
||||||
|
<VerticalStackLayout BackgroundColor="#72a3b3" Spacing="10">
|
||||||
|
|
||||||
|
<Image Source="ohara2.png" HeightRequest="200" HorizontalOptions="Center">
|
||||||
|
<Image.Clip>
|
||||||
|
<EllipseGeometry Center="150,90" RadiusX="80" RadiusY="80"/>
|
||||||
|
</Image.Clip>
|
||||||
|
</Image>
|
||||||
|
|
||||||
|
|
||||||
|
<Button Style="{StaticResource buttonMenu2}" Text="Accueil" Clicked="Hyperlink_Accueil"/>
|
||||||
|
<Button Style="{StaticResource buttonMenu}" Text="Carte" Clicked="Hyperlink_Carte"/>
|
||||||
|
<Button Style="{StaticResource buttonMenu}" Text="Personnages" Clicked="Hyperlink_Perso"/>
|
||||||
|
<Button Style="{StaticResource buttonMenu}" Text="Fruits du démon" Clicked="Hyperlink_FDD"/>
|
||||||
|
<Button Style="{StaticResource buttonMenu}" Text="Bateaux" Clicked="Hyperlink_Bateau"/>
|
||||||
|
<Button Style="{StaticResource buttonMenu}" Text="Îles" Clicked="Hyperlink_Ile"/>
|
||||||
|
<Button Style="{StaticResource buttonMenu}" Text="Bestiaire" Clicked="Hyperlink_Bestiaire"/>
|
||||||
|
<Button Style="{StaticResource buttonMenu}" Text="Équipages" Clicked="Hyperlink_Equip"/>
|
||||||
|
</VerticalStackLayout>
|
||||||
|
|
||||||
|
</ContentView>
|
@ -0,0 +1,78 @@
|
|||||||
|
using Microsoft.Maui.Platform;
|
||||||
|
using Plugin.Maui.Audio;
|
||||||
|
|
||||||
|
namespace Ohara;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public partial class menuBoutons : ContentView
|
||||||
|
{
|
||||||
|
private readonly IAudioManager audioManager;
|
||||||
|
private static string chemin = "Sons/test.wav";
|
||||||
|
|
||||||
|
public menuBoutons() : this(new AudioManager()) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public menuBoutons(IAudioManager audioManager)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.audioManager = audioManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void Hyperlink_Accueil(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var player = audioManager.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(chemin));
|
||||||
|
await Navigation.PushAsync(new MainPage());
|
||||||
|
player.Play();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void Hyperlink_FDD(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var player = audioManager.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(chemin));
|
||||||
|
await Navigation.PushAsync(new PageFDD());
|
||||||
|
player.Play();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void Hyperlink_Equip(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var player = audioManager.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(chemin));
|
||||||
|
await Navigation.PushAsync(new PageEquipage());
|
||||||
|
player.Play();
|
||||||
|
|
||||||
|
}
|
||||||
|
private async void Hyperlink_Perso(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var player = audioManager.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(chemin));
|
||||||
|
await Navigation.PushAsync(new PagePersonnage());
|
||||||
|
player.Play();
|
||||||
|
}
|
||||||
|
private async void Hyperlink_Carte(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var player = audioManager.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(chemin));
|
||||||
|
await Navigation.PushAsync(new PageCarte());
|
||||||
|
player.Play();
|
||||||
|
|
||||||
|
}
|
||||||
|
private async void Hyperlink_Bateau(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var player = audioManager.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(chemin));
|
||||||
|
await Navigation.PushAsync(new PageBateau());
|
||||||
|
player.Play();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void Hyperlink_Bestiaire(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var player = audioManager.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(chemin));
|
||||||
|
await Navigation.PushAsync(new PageBestiaire());
|
||||||
|
player.Play();
|
||||||
|
}
|
||||||
|
private async void Hyperlink_Ile(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var player = audioManager.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(chemin));
|
||||||
|
await Navigation.PushAsync(new PageIle());
|
||||||
|
player.Play();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue