private async void Btn_LogOut_Clicked(object sender, EventArgs e) { bool logout = await DisplayAlert("LOGOUT", "Vuoi davvero fare il logout?", "OK", "ANNULLA"); if (logout) { bool result = await auth.LogOut(); if (result) { await Navigation.PushAsync(new MainPage()); } else { await DisplayAlert("Logout Failed", "Errore nel logout", "OK"); } } }
public async void ToolbarItem_Clicked(object sender, EventArgs e) { bool logout = await DisplayAlert("LOGOUT", "Vuoi davvero fare il logout?", "OK", "ANNULLA"); if (logout) { bool result = await auth.LogOut(); if (result) { await Navigation.PushAsync(new MainPage()); Navigation.RemovePage(this); } else { ShowError(); } } }