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.
40 lines
998 B
40 lines
998 B
using Model;
|
|
|
|
namespace Vues;
|
|
|
|
public partial class Connexion : ContentPage
|
|
{
|
|
string id;
|
|
string mdp;
|
|
|
|
public Connexion()
|
|
{
|
|
InitializeComponent();
|
|
BindingContext = (Application.Current as App).userManager;
|
|
}
|
|
|
|
public async void ValiderClicked(object sender, EventArgs e)
|
|
{
|
|
id = IdEntry.Text;
|
|
mdp = PsswEntry.Text;
|
|
foreach (User u in (Application.Current as App).userManager.ListUsers)
|
|
{
|
|
if ((Application.Current as App).userManager.checkIfExists(id, mdp) && u.verifyPssw(mdp))
|
|
{
|
|
(Application.Current as App).User = u;
|
|
await Navigation.PushAsync(new SearchMob());
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
/*
|
|
private void Id_Entry_Completed(object sender, EventArgs e)
|
|
{
|
|
id = ((Entry)sender).Text;
|
|
}
|
|
|
|
private void Mdp_Entry_Completed(object sender, EventArgs e)
|
|
{
|
|
mdp = ((Entry)sender).Text;
|
|
}*/
|
|
} |