Esempio n. 1
0
 private void Login_Button_Click(object sender, RoutedEventArgs e)
 {
     if (sessionViewModel.Login())
     {
         var mainWindow = new MainWindow();
         mainWindow.Show();
         loggedIn = true;
         Close();
     }
 }
Esempio n. 2
0
        /*
         * public void infsdsfas()
         * {
         *  context.userLoginServices
         *      if
         * }*/
        //await contentPage.Navigation.PushAsync(new CoursesView());
        //Task RemoveLastFromBackStackAsync();

        async void Login_Clicked(object sender, EventArgs e)
        {
            if (await context.Login())
            {
                //await context.Refresh();
                await Navigation.PushAsync(new CoursesView());

                /*await Navigation.PopToRootAsync();*/

                /*var existingPages = Navigation.NavigationStack.ToList();
                 * foreach (var page in existingPages)
                 * {
                 *  Navigation.RemovePage(page);
                 * }*/
            }
            else
            {
                await DisplayAlert("Error", "Usuario o Contraseña Incorrectos!", "OK");
            }
        }