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.
37 lines
958 B
37 lines
958 B
using CoreLibrary;
|
|
using CoreLibrary.Events;
|
|
using CoreLibrary.Joueurs;
|
|
|
|
namespace MauiSpark.Pages;
|
|
|
|
|
|
public partial class ConnexionPage : ContentPage
|
|
{
|
|
private JoueurBuilder? joueurBuilder;
|
|
|
|
public ConnexionPage()
|
|
{
|
|
NavigationPage.SetHasBackButton(this, false);
|
|
NavigationPage.SetHasNavigationBar(this, false);
|
|
|
|
InitializeComponent();
|
|
}
|
|
|
|
public async void QuandDemanderNom(Object? sender, DemanderNomEventArgs e)
|
|
{
|
|
if(Application.Current != null && Application.Current.MainPage != null && ((NavigationPage)Application.Current.MainPage).CurrentPage != this)
|
|
await Application.Current.MainPage.Navigation.PushAsync(this);
|
|
|
|
Nom.Text = "";
|
|
joueurBuilder = e.JoueurBuilder;
|
|
BindingContext = $"Joueur {e.Indice}";
|
|
}
|
|
|
|
private void QuandSeConnecterPresse(Object sender, EventArgs e)
|
|
{
|
|
if(joueurBuilder != null)
|
|
joueurBuilder.Nom(Nom.Text);
|
|
|
|
joueurBuilder = null;
|
|
}
|
|
} |