Compare commits

..

No commits in common. 'PageAccueil' and 'master' have entirely different histories.

@ -23,7 +23,7 @@
RowDefinitions="auto, auto, auto, auto, auto, auto, *">
<Grid HorizontalOptions="Start" Padding="25,20,0,20" IsVisible="{Binding IsConnected}">
<Grid HorizontalOptions="Start" Padding="25,20,0,20">
<HorizontalStackLayout Spacing="10">
<Frame Grid.Row="0" WidthRequest="50" HeightRequest="50" CornerRadius="25" VerticalOptions="Start" >
<Frame.Background>
@ -35,12 +35,11 @@
</LinearGradientBrush>
</Frame.Background>
<Frame HeightRequest="48" WidthRequest="48" CornerRadius="24" VerticalOptions="Center" HorizontalOptions="Center" IsClippedToBounds="True">
<Image Source="{Binding ConnectedUser.PhotoProfil}" Aspect="AspectFill"/>
<Image Source="{Binding AccueilManager.ConnectedUser.PhotoProfil}" Aspect="AspectFill"/>
</Frame>
</Frame>
<Label Text="{Binding ConnectedUser.Pseudo}" FontSize="18" FontFamily="AladinRegular" TextColor="{StaticResource Black}" VerticalTextAlignment="Center"/>
<Label Text="{Binding AccueilManager.ConnectedUser.Pseudo}" FontSize="18" FontFamily="AladinRegular" TextColor="{StaticResource Black}" VerticalTextAlignment="Center"/>
</HorizontalStackLayout>
</Grid>
@ -53,7 +52,7 @@
/>
<ScrollView Orientation="Horizontal" Grid.Row="4" Padding="20,0,20,0" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" HorizontalScrollBarVisibility="Never">
<HorizontalStackLayout BindableLayout.ItemsSource="{Binding ListJeuxAffiches}" Spacing="15">
<HorizontalStackLayout BindableLayout.ItemsSource="{Binding AccueilManager.ListJeuxAffiches}" Spacing="15">
<BindableLayout.ItemTemplate>
<DataTemplate>
<Grid>
@ -107,7 +106,7 @@
/>
<Grid Grid.Row="6" Padding="0,0,0,20">
<VerticalStackLayout Spacing="30" BindableLayout.ItemsSource="{Binding TopRatedGames}">
<VerticalStackLayout Spacing="30" BindableLayout.ItemsSource="{Binding AccueilManager.TopRatedGames}">
<BindableLayout.ItemTemplate>
<DataTemplate>
<Grid ColumnDefinitions="auto,*,auto">

@ -16,7 +16,7 @@ public partial class PageAcceuil : ContentPage
{
InitializeComponent();
BindingContext = AccueilManager;
BindingContext = this;
}
private async void OnProfil_Tapped(object sender, EventArgs e)

@ -110,7 +110,6 @@ public partial class PageConnexion : ContentPage
{
Debug.WriteLine("Mot de Passe verifié et valide");
ConnexionManager.ConnectedUser = user;
ConnexionManager.IsConnected = true;
return true;
}
}
@ -118,7 +117,6 @@ public partial class PageConnexion : ContentPage
Debug.WriteLine("La connexion a échoué (pseudo ou mot de passe invalide)");
DisplayAlert("Erreur", "Utilisateur ou Mot de Passe invalide.", "Ok");
ConnexionManager.ConnectedUser = null;
ConnexionManager.IsConnected = false;
return false;
}

@ -74,6 +74,5 @@ public partial class PageProfil : ContentPage
{
await Shell.Current.GoToAsync("//page/PageAccueil");
ProfilManager.ConnectedUser = null;
ProfilManager.IsConnected = false;
}
}

@ -78,20 +78,6 @@ namespace Models
}
}
private bool _isConnected;
/// <summary>
/// Indique si un utilisateur est connecté sur l'application.
/// </summary>
public bool IsConnected
{
get => _isConnected;
set
{
_isConnected = value;
OnPropertyChanged();
}
}
/// <summary>
/// Gestionnaire de persistance utilisé pour charger et sauvegarder les donnees.
/// </summary>
@ -130,7 +116,6 @@ namespace Models
Admins = new List<Admin>();
ListJeux = new ObservableCollection<Jeu>();
Persistance = persistance;
IsConnected = false;
ConnectedUser = null;
}
@ -142,7 +127,6 @@ namespace Models
ListJeux = new ObservableCollection<Jeu>();
Admins = new List<Admin>();
Utilisateurs = new List<Utilisateur>();
IsConnected = false;
ConnectedUser = null;
}

Loading…
Cancel
Save