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
706 B
25 lines
706 B
using Model;
|
|
using Persistance;
|
|
namespace Vues;
|
|
|
|
public partial class Inscription : ContentPage
|
|
{
|
|
List<User> users = new List<User>();
|
|
UserManager userMngr = new UserManager(new LoaderXml());
|
|
public User user { get; set; } = new User();
|
|
public Inscription()
|
|
{
|
|
InitializeComponent();
|
|
BindingContext=user;
|
|
}
|
|
private async void Valid_Clicked(object sender, EventArgs e)
|
|
{
|
|
if (!(Application.Current as App).userManager.checkIfPseudoExists(user.Pseudo))
|
|
{
|
|
users.Add(user);
|
|
userMngr.saveUsers(users);
|
|
userMngr.loadUsers();
|
|
await Navigation.PushAsync(new Accueil());
|
|
}
|
|
}
|
|
} |