コード例 #1
0
        /// <summary>
        /// Performs login
        /// </summary>
        /// <returns></returns>
        private async Task LoginAsync()
        {
            IsBusy = true;

            try
            {
                //log in and get access token
                await KryptPadApi.AuthenticateAsync(Email, Password);

                //save credentials
                SaveCredentialsIfAutoSignIn();

                //navigate to the select profile page
                NavigationHelper.Navigate(typeof(SelectProfilePage), null);
            }
            catch (WebException ex)
            {
                await DialogHelper.ShowMessageDialogAsync(ex.Message);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
                // Failed
                await DialogHelper.ShowGenericErrorDialogAsync(ex);
            }


            IsBusy = false;
        }