Connexion fonctionne (mais faut appuyer sur Entrée) + ET OMG C'EST TROP COOL LE BINDING 🎉 -> vue SearchMob qui affiche certaines infos :) (+quelques surprises)
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
afa14c1b14
commit
7c9beff1c5
@ -1,9 +1,38 @@
|
||||
using Model;
|
||||
|
||||
namespace Vues;
|
||||
|
||||
public partial class Connexion : ContentPage
|
||||
{
|
||||
public Connexion()
|
||||
string id;
|
||||
string mdp;
|
||||
|
||||
public Connexion()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
BindingContext = (Application.Current as App).userManager;
|
||||
}
|
||||
|
||||
public async void ValiderClicked(object sender, EventArgs e)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 767 KiB After Width: | Height: | Size: 767 KiB |
Loading…
Reference in new issue