예제 #1
0
        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");
                }
            }
        }
예제 #2
0
        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();
                }
            }
        }