示例#1
0
        private void HandleError(AccountCreationErrorType errorType)
        {
            switch (errorType)
            {
            case AccountCreationErrorType.UsernameExists:
                usernameEditText.Error = "Username already exists";
                break;

            case AccountCreationErrorType.EmailExists:
                emailEditText.Error = "Email already exists";
                break;

            case AccountCreationErrorType.ServerError:
                _dialogHelper.ShowError(this);
                break;

            case AccountCreationErrorType.Other:
                Toast.MakeText(BaseContext, "Some of the information you entered is incorrect", ToastLength.Short);
                break;
            }
        }
示例#2
0
 public static AccountCreationResultDto Failed(AccountCreationErrorType errorType)
 => new AccountCreationResultDto()
 {
     ErrorType = errorType, Succeeded = false
 };