Example #1
0
        private async void BtnLogin_Click()
        {
            // Call Business Api
            ILoginActivity loginActivity = Activity as ILoginActivity;

            if (loginActivity == null)
            {
                return;
            }

            var dialogTag = DialogGenerator.ShowWaitDialog(FragmentManager);

            LoginStatusEnum result = LoginStatusEnum.LoginFailure;

            try
            {
                result = await LoginUtil.Instance.ValidateUserLogin(
                    etEmail.Text, etPassword.Text,
                    ConfigurationService.GetAllCountryMap()[selectCountryIndex].CountryCode);
            }
            catch (Exception ee)
            {
                // force app exit
                // The common api should not throw any exception!
                throw ee;
            }

            AsyncUIOperationRepeater.INSTATNCE.SubmitAsyncUIOperation(
                (IAsyncTaskActivity)Activity,
                a =>
            {
                SimpleDialogFragment.DismissDialog(((FragmentActivity)a), dialogTag);
                ProcessLoginResult(result);
            });
        }
Example #2
0
        private async void ProcessSend()
        {
            ILoginActivity loginActivity = Activity as ILoginActivity;

            if (loginActivity == null)
            {
                return;
            }

            var dialogTag = DialogGenerator.ShowWaitDialog(FragmentManager);

            var result = await LoginUtil.Instance.ChangePassword(etNewPassword.Text, etRetypeNewPassword.Text);

            AsyncUIOperationRepeater.INSTATNCE.SubmitAsyncUIOperation(
                (IAsyncTaskActivity)Activity,
                a =>
            {
                SimpleDialogFragment.DismissDialog(((FragmentActivity)a), dialogTag);
                ProcessResetPasswordResult(result);
            });
        }
Example #3
0
        private async void processReminderPassword()
        {
            ILoginActivity loginActivity = Activity as ILoginActivity;

            if (loginActivity == null)
            {
                return;
            }

            var dialogTag = DialogGenerator.ShowWaitDialog(FragmentManager);

            var result = await LoginUtil.Instance.ResetPassword(
                etEmail.Text,
                ConfigurationService.GetAllCountryMap()[selectCountryIndex].CountryCode);

            AsyncUIOperationRepeater.INSTATNCE.SubmitAsyncUIOperation(
                (IAsyncTaskActivity)Activity,
                a =>
            {
                SimpleDialogFragment.DismissDialog(((FragmentActivity)a), dialogTag);
                ProcessResetPasswordResult(result);
            });
        }