Пример #1
0
        private async void LogInProcedure(object sender, EventArgs e)
        {
            if (ConnectionCheck.CheckForInternetConnection())
            {
                //LOGIN REQUEST
                FrontendUserModel user = await LogUserInAsync(Entry_email.Text, Entry_Password.Text);

                if (user != null)
                {
                    Navigation.RemovePage(this);
                    await Navigation.PushModalAsync(new EntrancePage(user));
                }
                else
                {
                    await DisplayAlert("Login", "Such user is not found", "Ok");
                }
            }
            else
            {
                await DisplayAlert("Login", "Check your internet connection", "Ok");
            }
        }
 private async void SignUpProcedure(object sender, EventArgs e)
 {
     if (Check())
     {
         if (ConnectionCheck.CheckForInternetConnection())
         {
             // REGISTRATION REQUEST
             if (await RegisterUserAsync(new FilledUser(this).InputInfo()))
             {
                 Navigation.RemovePage(this);
                 await Navigation.PushModalAsync(new LoginPage());
             }
         }
         else
         {
             await DisplayAlert("Sign Up", "Check your internet connection", "Ok");
         }
     }
     else
     {
         await DisplayAlert("Sign Up", "Something went wrong. Please try again", "Ok");
     }
 }