private void OnRegisterButtonClicked( UIRegistrationDetails uiRegistrationDetails) { var email = uiRegistrationDetails.Email; var password = uiRegistrationDetails.Password; var confirmPassword = uiRegistrationDetails.ConfirmPassword; var firstName = uiRegistrationDetails.FirstName; var lastName = uiRegistrationDetails.LastName; if (authenticationValidator.IsEmptyEmailAddress(email, out var message) || authenticationValidator.IsInvalidEmailAddress(email, out message) || authenticationValidator.IsEmptyPassword(password, out message) || authenticationValidator.IsEmptyConfirmPassword(confirmPassword, out message) || authenticationValidator.IsPasswordTooShort(password, out message) || authenticationValidator.IsConfirmPasswordTooShort(confirmPassword, out message) || authenticationValidator.ArePasswordsDoNotMatch(password, confirmPassword, out message) || authenticationValidator.IsFirstNameEmpty(firstName, out message) || authenticationValidator.IsLastNameEmpty(lastName, out message) || authenticationValidator.IsFirstNameTooShort(firstName, out message) || authenticationValidator.IsLastNameTooShort(lastName, out message)) { NoticeUtils.ShowNotice(message); } else { registrationView?.DisableInteraction(); authenticatorInteractor.Register(uiRegistrationDetails); } }
public void OnRegistrationSucceed() { registrationView?.EnableInteraction(); HideRegistrationWindow(); ShowLoginWindow(); NoticeUtils.ShowNotice(message: NoticeMessages.AuthView.RegistrationSucceed); }
public void OnCreateCharacterFailed(UICharacterCreationFailed reason) { switch (reason) { case UICharacterCreationFailed.Unknown: { NoticeUtils.ShowNotice(message: NoticeMessages.CharacterView.CreationFailed); break; } case UICharacterCreationFailed.NameAlreadyInUse: { NoticeUtils.ShowNotice(message: NoticeMessages.CharacterView.NameAlreadyInUse); break; } } }
private void OnLoginButtonClicked( UIAuthenticationDetails uiAuthenticationDetails) { var email = uiAuthenticationDetails.Email; var password = uiAuthenticationDetails.Password; if (authenticationValidator.IsEmptyEmailAddress(email, out var message) || authenticationValidator.IsInvalidEmailAddress(email, out message) || authenticationValidator.IsEmptyPassword(password, out message) || authenticationValidator.IsPasswordTooShort(password, out message)) { NoticeUtils.ShowNotice(message); } else { loginView?.DisableInteraction(); authenticatorInteractor.Login(uiAuthenticationDetails); } }
public void OnRegistrationFailed(string reason) { registrationView?.EnableInteraction(); NoticeUtils.ShowNotice(message: reason); }
public void OnLoginFailed(string reason) { loginView?.EnableInteraction(); NoticeUtils.ShowNotice(message: reason); }
public void OnCharacterDeletionFailed() { NoticeUtils.ShowNotice(message: NoticeMessages.CharacterView.DeletionFailed); }
public void OnCharacterUnvalidated() { NoticeUtils.ShowNotice(message: NoticeMessages.CharacterView.ValidationFailed); }