Navigation fonctionnelle sur toutes les pages d'informations, début page favoris, nouvelles page infos
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
5a97193d4b
commit
00cbfbfdb2
@ -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.PageFavoris"
|
||||
Title="PageFavoris"
|
||||
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="200" HorizontalOptions="Center">
|
||||
<Image.Clip>
|
||||
<EllipseGeometry Center="150,90" RadiusX="80" RadiusY="80"/>
|
||||
</Image.Clip>
|
||||
</Image>
|
||||
|
||||
<Button Style="{StaticResource buttonMenu}" 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 buttonMenu2}" Text="Bestiaire" Clicked="Hyperlink_Bestiaire"/>
|
||||
<Button Style="{StaticResource buttonMenu}" Text="Équipages" Clicked="Hyperlink_Equip"/>
|
||||
<Button Style="{StaticResource buttonMenu}" Text="Favoris" />
|
||||
</VerticalStackLayout>
|
||||
|
||||
|
||||
|
||||
<CollectionView x:Name="listeFavs" Grid.Column="1" SelectionMode="Single" SelectionChanged="listeFavs_SelectionChanged">
|
||||
<CollectionView.ItemsLayout Style="">
|
||||
<GridItemsLayout Orientation="Vertical" Span="4" />
|
||||
</CollectionView.ItemsLayout>
|
||||
<CollectionView.Header>
|
||||
<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.Header>
|
||||
<CollectionView.ItemTemplate>
|
||||
|
||||
<DataTemplate>
|
||||
|
||||
|
||||
<Frame Style="{StaticResource frameObjet}" Margin="10">
|
||||
<StackLayout Orientation="Vertical" Padding="5">
|
||||
<Image
|
||||
Source="{Binding Image}"
|
||||
HeightRequest="290"
|
||||
WidthRequest="290" />
|
||||
|
||||
<Label
|
||||
HorizontalOptions="Center"
|
||||
VerticalOptions="Start"
|
||||
HorizontalTextAlignment="Center"
|
||||
Text="{Binding Nom}"
|
||||
|
||||
FontSize="19"
|
||||
TextColor="#72a3b3"
|
||||
FontAttributes="Bold" />
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
|
||||
|
||||
|
||||
|
||||
</DataTemplate>
|
||||
</CollectionView.ItemTemplate>
|
||||
</CollectionView>
|
||||
|
||||
|
||||
</Grid>
|
||||
</ContentPage>
|
@ -0,0 +1,81 @@
|
||||
using Model;
|
||||
using Plugin.Maui.Audio;
|
||||
|
||||
namespace Ohara;
|
||||
|
||||
public partial class PageFavoris : ContentPage
|
||||
{
|
||||
private readonly IAudioManager audioManager;
|
||||
private static string chemin = "Sons/test.wav";
|
||||
public Manager Mgr { get; private set; } = new Manager();
|
||||
|
||||
public PageFavoris(IAudioManager audioManager)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
||||
var manager = new Manager();
|
||||
listeFavs.ItemsSource = manager.GetFavoris();
|
||||
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(new Plugin.Maui.Audio.AudioManager()));
|
||||
player.Play();
|
||||
}
|
||||
|
||||
private async void Hyperlink_Equip(object sender, EventArgs e)
|
||||
{
|
||||
var player = audioManager.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(chemin));
|
||||
await Navigation.PushAsync(new PageEquipage(new Plugin.Maui.Audio.AudioManager()));
|
||||
player.Play();
|
||||
}
|
||||
|
||||
private async void Hyperlink_Perso(object sender, EventArgs e)
|
||||
{
|
||||
var player = audioManager.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(chemin));
|
||||
await Navigation.PushAsync(new PagePersonnage(new Plugin.Maui.Audio.AudioManager()));
|
||||
player.Play();
|
||||
}
|
||||
private async void Hyperlink_Bateau(object sender, EventArgs e)
|
||||
{
|
||||
var player = audioManager.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(chemin));
|
||||
await Navigation.PushAsync(new PageBateau(new Plugin.Maui.Audio.AudioManager()));
|
||||
player.Play();
|
||||
}
|
||||
|
||||
private async void Hyperlink_Bestiaire(object sender, EventArgs e)
|
||||
{
|
||||
var player = audioManager.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(chemin));
|
||||
await Navigation.PushAsync(new PageBestiaire(new Plugin.Maui.Audio.AudioManager()));
|
||||
player.Play();
|
||||
}
|
||||
private async void Hyperlink_Carte(object sender, EventArgs e)
|
||||
{
|
||||
var player = audioManager.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(chemin));
|
||||
await Navigation.PushAsync(new PageCarte(new Plugin.Maui.Audio.AudioManager()));
|
||||
player.Play();
|
||||
}
|
||||
private async void Hyperlink_Ile(object sender, EventArgs e)
|
||||
{
|
||||
var player = audioManager.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(chemin));
|
||||
await Navigation.PushAsync(new PageIle(new Plugin.Maui.Audio.AudioManager()));
|
||||
player.Play();
|
||||
}
|
||||
|
||||
async void listeFavs_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
|
||||
await Navigation.PushAsync(new PageInfoBateau((Bateau)listeFavs.SelectedItem));
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in new issue