Merge pull request 'Modification pageProfiles' (#98) from pageProfiles into dev
continuous-integration/drone/push Build is failing Details

Reviewed-on: #98
Reviewed-by: Remi NEVEU <remi.neveu@etu.uca.fr>
pull/99/head
Remi NEVEU 11 months ago
commit 4d9b1f2e67

@ -21,7 +21,7 @@
<ShellContent
Title="Profils"
ContentTemplate="{DataTemplate views:PageProfils}"
ContentTemplate="{DataTemplate views:PageProfiles}"
Route="Profils"/>
<ShellContent

@ -12,7 +12,7 @@ namespace Trek_12
InitializeComponent();
Routing.RegisterRoute(nameof(PageMenuPrincipal), typeof(PageMenuPrincipal));
Routing.RegisterRoute(nameof(PageProfils), typeof(PageProfils));
Routing.RegisterRoute(nameof(PageProfiles), typeof(PageProfiles));
Routing.RegisterRoute(nameof(PageSelectMap), typeof(PageSelectMap));
Routing.RegisterRoute(nameof(PageRegles), typeof(PageRegles));
Routing.RegisterRoute(nameof(PageLeaderBoard), typeof(PageLeaderBoard));

@ -78,8 +78,8 @@
<Compile Update="Views\PageLeaderBoard.xaml.cs">
<DependentUpon>PageLeaderBoard.xaml</DependentUpon>
</Compile>
<Compile Update="Views\pageProfils.xaml.cs">
<DependentUpon>PageProfils.xaml</DependentUpon>
<Compile Update="Views\pageProfiles.xaml.cs">
<DependentUpon>pageProfiles.xaml</DependentUpon>
</Compile>
<Compile Update="Views\pageRegles.xaml.cs">
<DependentUpon>PageRegles.xaml</DependentUpon>

@ -3,10 +3,11 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Trek_12.Views.Components.viewsProfils"
x:Name="this">
<VerticalStackLayout>
<Grid ColumnDefinitions="*,*,*,*" >
<Grid ColumnDefinitions="*,*,*">
<Frame Margin="10"
Grid.Column="1"
Grid.Column="0"
BorderColor="Black"
CornerRadius="50"
HeightRequest="60"
@ -18,7 +19,8 @@
Aspect="AspectFill"
Margin="-20"/>
</Frame>
<Label Text="{Binding Pseudo, Source={x:Reference this}}" Grid.Column="2" TextColor="Black" FontSize="Large" HorizontalTextAlignment="Center" Margin="100"/>
<Label Text="{Binding Pseudo, Source={x:Reference this}}" Grid.Column="1" TextColor="Black" FontSize="Large" HorizontalTextAlignment="Center"/>
<Label Text="{Binding CreationDate, Source={x:Reference this}}" Grid.Column="2" TextColor="Black" FontSize="Large" HorizontalTextAlignment="Center"/>
</Grid>
</VerticalStackLayout>
</ContentView>

@ -13,7 +13,7 @@ public partial class viewsProfils : ContentView
}
public static readonly BindableProperty PseudoProperty =
BindableProperty.Create("Pseudo", typeof(string), typeof(ContentLeaderBoard), "Profile n°*");
BindableProperty.Create("Pseudo", typeof(string), typeof(ContentLeaderBoard), "Profile n°*");
public string Pseudo
{
@ -30,4 +30,9 @@ public partial class viewsProfils : ContentView
get => converter.RetrieveImage((string)GetValue(ProfilePictureProperty));
set => SetValue(ProfilePictureProperty, value);
}
public static readonly BindableProperty CreationDateProperty =
BindableProperty.Create("CreationDate", typeof(string), typeof(viewsProfils), string.Empty);
public string CreationDate => (string)GetValue(CreationDateProperty);
}

@ -1,26 +1,23 @@
<?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="Trek_12.Views.PageProfils"
x:Class="Trek_12.Views.PageProfiles"
xmlns:views="clr-namespace:Trek_12.Views.Components"
xmlns:game="clr-namespace:Models.Game;assembly=Models"
Title="pageProfils">
<ContentPage.Resources>
<ResourceDictionary>
<game:Base64Converter x:Key="Base64Converter"/>
</ResourceDictionary>
</ContentPage.Resources>
Title="PageProfiles">
<ContentPage.Content>
<Grid RowDefinitions="2*,3*,*">
<Grid RowDefinitions="auto,3*,*">
<Image Source="bg_profils.jpg" Grid.RowSpan="3" Aspect="AspectFill"/>
<Frame BackgroundColor="WhiteSmoke" Opacity="0.5" Grid.Row="1" />
<Label Text="Profils" TextColor="black" HorizontalTextAlignment="Center" FontSize="Header" Margin="30"/>
<Label Grid.Row="0" Text="Profils" TextColor="black" HorizontalTextAlignment="Center" FontSize="Header" Margin="30"/>
<Grid Grid.Row="1" ColumnDefinitions="*,*,*">
<Label Text="Pseudo" TextColor="black" FontSize="Large" HorizontalTextAlignment="Center" Grid.Column="1"/>
<Label Text="Date de Création" TextColor="black" FontSize="Large" HorizontalTextAlignment="Center" Grid.Column="2"/>
</Grid>
<CollectionView Grid.Row="1" ItemsSource="{Binding Players}"
ItemsLayout="VerticalList"
VerticalOptions="Center">
@ -28,7 +25,8 @@
<DataTemplate>
<views:viewsProfils
Pseudo="{Binding Pseudo}"
ProfilePicture="{Binding ProfilePicture}"/>
ProfilePicture="{Binding ProfilePicture}"
CreationDate="{Binding CreationDate}"/>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>

@ -7,11 +7,11 @@ using Models.Interfaces;
namespace Trek_12.Views;
public partial class PageProfils : ContentPage
public partial class PageProfiles : ContentPage
{
public Game ProfileManager => (App.Current as App).Manager;
public PageProfils()
public PageProfiles()
{
InitializeComponent();
BindingContext = ProfileManager;
Loading…
Cancel
Save