Ajout Binding PageProfil + Popup PageJeu (Bouton Ajouter) #45

Merged
remi.lavergne merged 5 commits from remi into master 2 years ago

@ -17,15 +17,18 @@ namespace GameAtlas.Models
public string Pseudo { get; private set; }
[DataMember]
public string Mdp { get; private set; }
//public List<Jeu> ListePossedes { get; private set; }
//public List<Jeu> ListeFavoris { get; private set; }
[DataMember]
public List<Jeu> ListePossedes { get; private set; }
[DataMember]
public List<Jeu> ListeFavoris { get; private set; }
public Utilisateur(string mail, string pseudo, string mdp)
{
Mail = mail;
Pseudo = pseudo;
Mdp = mdp;
ListePossedes = new List<Jeu>();
ListeFavoris = new List<Jeu>();
}

@ -1,32 +0,0 @@
using GameAtlas.Models;
namespace GameAtlas.Views;
public partial class PageAcceuil : ContentPage
{
public Manager AccueilManager => (App.Current as App).MyManager;
public PageAcceuil()
{
InitializeComponent();
BindingContext = AccueilManager;
}
private async void OnProfil_Tapped(object sender, EventArgs e)
{
await Navigation.PushAsync(new PageProfil());
}
private async void OnButtonClicked(object sender, EventArgs e)
{
var selectedjeu = (sender as ImageButton)?.BindingContext as Jeu;
if (selectedjeu != null)
{
await Navigation.PushAsync(new PageJeu(selectedjeu));
}
}
}

@ -81,6 +81,9 @@
<Image Source="plus" HeightRequest="15"/>
<Label Text="Ajouter à" FontFamily="PTSansCBold" FontSize="13" TextColor="{StaticResource Black}" VerticalOptions="Center"/>
</HorizontalStackLayout>
<Frame.GestureRecognizers>
<TapGestureRecognizer Tapped="OnAddTapped"/>
</Frame.GestureRecognizers>
</Frame>
<Grid RowDefinitions="50" ColumnDefinitions="auto,*,auto,*,auto,*,auto" Margin="0,5">

@ -25,6 +25,17 @@ public partial class PageJeu : ContentPage
this.BindingContext = this;
<<<<<<< HEAD
}
async void OnAddTapped(System.Object sender, Microsoft.Maui.Controls.TappedEventArgs e)
{
string action = await DisplayActionSheet("Choix de la liste:", "Annuler", null, "Mes Favoris", "Jeux Possédés", "Ma Wishlist");
Debug.WriteLine("Popup Action: " + action);
//if (action == "")
=======
>>>>>>> origin/master
}
async void Back_Tapped(System.Object sender, Microsoft.Maui.Controls.TappedEventArgs e)

@ -66,27 +66,7 @@
<Label Text="Liste de profil" FontFamily="PTSansCBold" FontSize="24" TextColor="{StaticResource Black}" HorizontalOptions="Center"/>
<Grid>
<CollectionView Margin="0,10,0,0" VerticalScrollBarVisibility="Never">
<CollectionView.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>https://cdn1.epicgames.com/offer/b7b42e2078524ab386a8b2a9856ef557/EGS_SifuDeluxeEditionUpgradeBundle_Sloclap_Bundles_S1_2560x1440-43bae7aa2089289442238bd1e2b55655</x:String>
<x:String>https://cdn.cloudflare.steamstatic.com/steam/apps/1562430/capsule_616x353.jpg?t=1682587412</x:String>
<x:String>https://i.ytimg.com/vi/0JdUZOZBi2g/maxresdefault.jpg</x:String>
<x:String>https://staticctf.ubisoft.com/J3yJr34U2pZ2Ieem48Dwy9uqj5PNUQTn/63JzhYgJbTQC1yW74tmZLJ/dd2912bbaf7c7a8a7e005f02d3e6cf4b/jd23-buy-keyart.jpg</x:String>
<x:String>https://gaming-cdn.com/images/products/8893/616x353/horizon-forbidden-west-ps5-playstation-5-jeu-playstation-store-cover.jpg</x:String>
<x:String>https://www.highgroundgaming.com/wp-content/uploads/2020/09/Uncharted-Games-Ranked.jpg</x:String>
<x:String>https://i.ytimg.com/vi/WQUU8jI1Sq8/maxresdefault.jpg</x:String>
<x:String>https://cdn1.epicgames.com/offer/e97659b501af4e3981d5430dad170911/EGS_HogwartsLegacy_AvalancheSoftware_S1_2560x1440-2baf3188eb3c1aa248bcc1af6a927b7e</x:String>
<x:String>https://cdn1.epicgames.com/offer/236c74b4cd2e4e3099cbe2ebdc9686fd/EGS_DeadIsland2_DeepSilverDambusterStudios_S1_2560x1440-fdc688ce46680914ee3c4a7949ce8a67</x:String>
<x:String>https://cdn.akamai.steamstatic.com/steam/apps/986130/capsule_616x353.jpg?t=1682348079</x:String>
<x:String>https://cdn1.epicgames.com/offer/b7b42e2078524ab386a8b2a9856ef557/EGS_SifuDeluxeEditionUpgradeBundle_Sloclap_Bundles_S1_2560x1440-43bae7aa2089289442238bd1e2b55655</x:String>
<x:String>https://cdn.cloudflare.steamstatic.com/steam/apps/1562430/capsule_616x353.jpg?t=1682587412</x:String>
<x:String>https://i.ytimg.com/vi/0JdUZOZBi2g/maxresdefault.jpg</x:String>
<x:String>https://staticctf.ubisoft.com/J3yJr34U2pZ2Ieem48Dwy9uqj5PNUQTn/63JzhYgJbTQC1yW74tmZLJ/dd2912bbaf7c7a8a7e005f02d3e6cf4b/jd23-buy-keyart.jpg</x:String>
<x:String>https://image.api.playstation.com/vulcan/ap/rnd/202010/2915/X8TO4UqHFGMQbHTDwKNlWU9z.jpg</x:String>
<x:String>https://www.highgroundgaming.com/wp-content/uploads/2020/09/Uncharted-Games-Ranked.jpg</x:String>
</x:Array>
</CollectionView.ItemsSource>
<CollectionView ItemsSource="{Binding ListeFavoris}" Margin="0,10,0,0" VerticalScrollBarVisibility="Never">
<CollectionView.ItemTemplate>
<DataTemplate>
<Border HeightRequest="97.5" StrokeShape="RoundRectangle 5" VerticalOptions="Start" HorizontalOptions="Center">

@ -1,10 +1,14 @@
using GameAtlas.Models;
namespace GameAtlas.Views;
public partial class PageProfil : ContentPage
{
public Manager ProfilManager => (App.Current as App).MyManager;
public PageProfil()
{
InitializeComponent();
BindingContext = ProfilManager;
}
async void OnGame_Tapped(System.Object sender, Microsoft.Maui.Controls.TappedEventArgs e)

Loading…
Cancel
Save