You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
835 B
25 lines
835 B
using CommunityToolkit.Maui.Views;
|
|
using Model;
|
|
|
|
namespace Stim;
|
|
|
|
public partial class ProfilPage : ContentPage
|
|
{
|
|
public ProfilPage()
|
|
{
|
|
InitializeComponent();
|
|
BindingContext = ((App)App.Current).Manager;
|
|
}
|
|
|
|
private void CollectionView_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
{
|
|
((App)App.Current).Manager.CurrentUser.RemoveAGame((sender as CollectionView).SelectedItem as Game);
|
|
}
|
|
|
|
private async void ChangeUsername(object sender, EventArgs e)
|
|
{
|
|
var newName = await this.ShowPopupAsync(new EntryPopup("Username"));
|
|
if (string.IsNullOrWhiteSpace(newName as string)) await this.ShowPopupAsync(new MessagePopup("Nom d'utilisateur invalide"));
|
|
else ((App)App.Current).Manager.CurrentUser.Username = (newName as string);
|
|
}
|
|
} |