//Echange l'input de mail avec celui de password, et ensuite affiche le menu. (Animation) void ShowNext(object sender, EventArgs e) { if (EmailEntry.IsVisible) { EmailEntry.FadeTo(0, 300, Easing.SinIn); EmailEntry.IsVisible = false; PassEntry.IsVisible = true; PassEntry.FadeTo(1, 300, Easing.SinOut); PassEntry.Focus(); } else { Navigation.PushAsync(new MenuPage()); } }
async void AuthButtonClicked(object sender, EventArgs e) { await btnAuthenticate.FadeTo(0, App.AnimationSpeed, Easing.SinIn); btnAuthenticate.IsVisible = false; LoadingIndicator.IsVisible = true; LoadingIndicator.IsRunning = true; LodingLabel.IsVisible = true; if (LabPicker.SelectedIndex == App.labs.Count - 1) { JsonRequests.labID = 99; } else { JsonRequests.labID = LabPicker.SelectedIndex; } JsonRequests.password = PassEntry.Text; if (!await JsonRequests.getUsers()) { System.Diagnostics.Debug.WriteLine("Connection Error!"); LoadingIndicator.IsVisible = false; LoadingIndicator.IsRunning = false; LodingLabel.IsVisible = false; btnAuthenticate.IsVisible = true; await btnAuthenticate.FadeTo(1, App.AnimationSpeed, Easing.SinIn); return; } LoadingIndicator.IsVisible = false; LoadingIndicator.IsRunning = false; LodingLabel.IsVisible = false; await label1.FadeTo(0, App.AnimationSpeed, Easing.SinIn); await LabPicker.FadeTo(0, App.AnimationSpeed, Easing.SinIn); await PassEntry.FadeTo(0, App.AnimationSpeed, Easing.SinIn); await Navigation.PushAsync(new MainPage()); }