void ReleaseDesignerOutlets() { if (ConfirmPasswordTextField != null) { ConfirmPasswordTextField.Dispose(); ConfirmPasswordTextField = null; } if (EmailTextfield != null) { EmailTextfield.Dispose(); EmailTextfield = null; } if (PasswordTextField != null) { PasswordTextField.Dispose(); PasswordTextField = null; } if (RegisterButton != null) { RegisterButton.Dispose(); RegisterButton = null; } }
void ReleaseDesignerOutlets() { if (CancelButton != null) { CancelButton.Dispose(); CancelButton = null; } if (ConfirmPasswordTextField != null) { ConfirmPasswordTextField.Dispose(); ConfirmPasswordTextField = null; } if (PasswordTextField != null) { PasswordTextField.Dispose(); PasswordTextField = null; } if (SignUpButton != null) { SignUpButton.Dispose(); SignUpButton = null; } if (UserNameTextView != null) { UserNameTextView.Dispose(); UserNameTextView = null; } }
void ReleaseDesignerOutlets() { if (ConfirmPasswordTextField != null) { ConfirmPasswordTextField.Dispose(); ConfirmPasswordTextField = null; } if (PasswordTextField != null) { PasswordTextField.Dispose(); PasswordTextField = null; } if (RegisterSaveButton != null) { RegisterSaveButton.Dispose(); RegisterSaveButton = null; } if (UsenameTextField != null) { UsenameTextField.Dispose(); UsenameTextField = null; } }
void ReleaseDesignerOutlets() { if (ConfirmPasswordTextField != null) { ConfirmPasswordTextField.Dispose(); ConfirmPasswordTextField = null; } if (EmailRegisterTextField != null) { EmailRegisterTextField.Dispose(); EmailRegisterTextField = null; } if (FullNameRegisterTextField != null) { FullNameRegisterTextField.Dispose(); FullNameRegisterTextField = null; } if (LanguagePicker != null) { LanguagePicker.Dispose(); LanguagePicker = null; } if (LoadingOverlay != null) { LoadingOverlay.Dispose(); LoadingOverlay = null; } if (PasswordRegisterTextField != null) { PasswordRegisterTextField.Dispose(); PasswordRegisterTextField = null; } if (RegisterMasterView != null) { RegisterMasterView.Dispose(); RegisterMasterView = null; } if (RegisterUIButton != null) { RegisterUIButton.Dispose(); RegisterUIButton = null; } if (Terms != null) { Terms.Dispose(); Terms = null; } }
public void UpdatePassword(string newPassword, string confirmPassword) { Browser.Wait(); NewPasswordTextField.Clear(); NewPasswordTextField.SendKeys(newPassword); ConfirmPasswordTextField.Clear(); ConfirmPasswordTextField.SendKeys(newPassword); HelpMeButton.Click(); }
void ReleaseDesignerOutlets() { if (NewPasswordTextField != null) { NewPasswordTextField.Dispose(); NewPasswordTextField = null; } if (ConfirmPasswordTextField != null) { ConfirmPasswordTextField.Dispose(); ConfirmPasswordTextField = null; } }
private void GestureGecognizer() { var gestureRecognizer = new UITapGestureRecognizer(() => { FirstNameTextField.ResignFirstResponder(); LastNameTextField.ResignFirstResponder(); EmailTextField.ResignFirstResponder(); PasswordTextField.ResignFirstResponder(); ConfirmPasswordTextField.ResignFirstResponder(); PhoneNumberTextField.ResignFirstResponder(); }); View.AddGestureRecognizer(gestureRecognizer); }
void ReleaseDesignerOutlets() { if (ConfirmPasswordTextField != null) { ConfirmPasswordTextField.Dispose(); ConfirmPasswordTextField = null; } if (EmailTextField != null) { EmailTextField.Dispose(); EmailTextField = null; } if (FirstNameTextField != null) { FirstNameTextField.Dispose(); FirstNameTextField = null; } if (LastNameTextField != null) { LastNameTextField.Dispose(); LastNameTextField = null; } if (PasswordTextField != null) { PasswordTextField.Dispose(); PasswordTextField = null; } if (PhoneNumberTextField != null) { PhoneNumberTextField.Dispose(); PhoneNumberTextField = null; } if (RegistrationNavigationBar != null) { RegistrationNavigationBar.Dispose(); RegistrationNavigationBar = null; } if (RegistrationNavigationItem != null) { RegistrationNavigationItem.Dispose(); RegistrationNavigationItem = null; } }
private void SetDataAndStyleToView() { // init strings in view InitializeAllStrings(); // set up the background //BackgroundImageView2.Image = UIImage.FromBundle("LoginBackground"); // dissmiss the keyboard when i press return key on email TextField EmailTextField.ShouldReturn += (textField) => { EmailTextField.ResignFirstResponder(); PasswordTextField.BecomeFirstResponder(); return(true); }; // dissmiss the keyboard when i press return key on password TextField PasswordTextField.ShouldReturn += (textField) => { PasswordTextField.ResignFirstResponder(); LoginButton_TouchUpInside(null, null); return(true); }; // dissmiss the keyboard when i press return key on Name TextField FirstNameTextField.ShouldReturn += (textField) => { FirstNameTextField.ResignFirstResponder(); LastNameTextField.BecomeFirstResponder(); return(true); }; // dissmiss the keyboard when i press return key on FirstName TextField LastNameTextField.ShouldReturn += (textField) => { LastNameTextField.ResignFirstResponder(); EmailTextFieldOfRegistration.BecomeFirstResponder(); return(true); }; // dissmiss the keyboard when i press return key on email TextField EmailTextFieldOfRegistration.ShouldReturn += (textField) => { EmailTextFieldOfRegistration.ResignFirstResponder(); PasswordTextFieldOfRegistration.BecomeFirstResponder(); return(true); }; // dissmiss the keyboard when i press return key on password TextField PasswordTextFieldOfRegistration.ShouldReturn += (textField) => { PasswordTextFieldOfRegistration.ResignFirstResponder(); ConfirmPasswordTextField.BecomeFirstResponder(); return(true); }; PasswordTextFieldOfRegistration.EditingChanged += (o, e) => { ErrorMessageLabel.Hidden = true; }; PasswordTextFieldOfRegistration.ShouldBeginEditing += (textField) => { if (View.Frame.Y >= 0) { bottom = ((float)(RegistrationContainer.Frame.Y + PasswordTextFieldOfRegistration.Frame.Y + PasswordTextFieldOfRegistration.Frame.Height + 10)); } return(true); }; // dissmiss the keyboard when i press return key on Confirm Password TextField ConfirmPasswordTextField.ShouldReturn += (textField) => { ConfirmPasswordTextField.ResignFirstResponder(); return(true); }; ConfirmPasswordTextField.EditingChanged += (o, e) => { ErrorMessageLabel.Hidden = true; }; ConfirmPasswordTextField.ShouldBeginEditing += (textField) => { if (View.Frame.Y >= 0) { bottom = ((float)(RegistrationContainer.Frame.Y + ConfirmPasswordTextField.Frame.Y + ConfirmPasswordTextField.Frame.Height + 10)); } return(true); }; // dissmiss the keyboard when i press return key on Confirm Password TextField EmailTextFieldOfForgetPassword.ShouldReturn += (textField) => { EmailTextFieldOfForgetPassword.ResignFirstResponder(); return(true); }; EmailTextField.KeyboardType = UIKeyboardType.EmailAddress; EmailTextField.AutocorrectionType = UITextAutocorrectionType.No; PasswordTextField.AutocorrectionType = UITextAutocorrectionType.No; FirstNameTextField.ReturnKeyType = UIReturnKeyType.Next; LastNameTextField.AutocorrectionType = UITextAutocorrectionType.No; LastNameTextField.ReturnKeyType = UIReturnKeyType.Next; EmailTextFieldOfRegistration.KeyboardType = UIKeyboardType.EmailAddress; EmailTextFieldOfRegistration.AutocorrectionType = UITextAutocorrectionType.No; EmailTextFieldOfRegistration.ReturnKeyType = UIReturnKeyType.Next; PasswordTextFieldOfRegistration.ReturnKeyType = UIReturnKeyType.Next; ConfirmPasswordTextField.ReturnKeyType = UIReturnKeyType.Next; EmailTextFieldOfForgetPassword.KeyboardType = UIKeyboardType.EmailAddress; EmailTextFieldOfForgetPassword.AutocorrectionType = UITextAutocorrectionType.No; // set up the rounded corner fot the button LoadingIndicator.Hidden = true; LoginButton.Layer.CornerRadius = 4; LoginButton.Layer.MasksToBounds = true; RegistrationButton.Layer.CornerRadius = 4; RegistrationButton.Layer.MasksToBounds = true; RegistrationButton.Enabled = false; ResetPasswordButton.Layer.CornerRadius = 4; ResetPasswordButton.Layer.MasksToBounds = true; ResetPasswordButton.Enabled = false; //DisplayFacebookButton(); //_facebookButton.Layer.CornerRadius = 4; //_facebookButton.Layer.MasksToBounds = true; CreateAccountButton.ContentEdgeInsets = new UIEdgeInsets(5, 0, 5, 5); ForgetPasswordButton.ContentEdgeInsets = new UIEdgeInsets(5, 5, 5, 0); LoginContainer.Hidden = false; RegistrationContainer.Hidden = true; ForgetPasswordContainer.Hidden = true; BackButton.Hidden = true; CreateAccountButton.Hidden = false; ForgetPasswordButton.Hidden = false; ErrorMessageLabel.Hidden = true; ErrorMessageLabel.TextColor = UIColor.FromRGB(255, 76, 56); }
void ReleaseDesignerOutlets() { if (BackButton != null) { BackButton.Dispose(); BackButton = null; } if (BackgroundImageView != null) { BackgroundImageView.Dispose(); BackgroundImageView = null; } if (ConfirmPasswordTextField != null) { ConfirmPasswordTextField.Dispose(); ConfirmPasswordTextField = null; } if (CreateAccountButton != null) { CreateAccountButton.Dispose(); CreateAccountButton = null; } if (EmailTextField != null) { EmailTextField.Dispose(); EmailTextField = null; } if (EmailTextFieldOfForgetPassword != null) { EmailTextFieldOfForgetPassword.Dispose(); EmailTextFieldOfForgetPassword = null; } if (EmailTextFieldOfRegistration != null) { EmailTextFieldOfRegistration.Dispose(); EmailTextFieldOfRegistration = null; } if (ErrorMessageLabel != null) { ErrorMessageLabel.Dispose(); ErrorMessageLabel = null; } if (FirstNameTextField != null) { FirstNameTextField.Dispose(); FirstNameTextField = null; } if (ForgetPasswordButton != null) { ForgetPasswordButton.Dispose(); ForgetPasswordButton = null; } if (ForgetPasswordContainer != null) { ForgetPasswordContainer.Dispose(); ForgetPasswordContainer = null; } if (LastNameTextField != null) { LastNameTextField.Dispose(); LastNameTextField = null; } if (LoadingIndicator != null) { LoadingIndicator.Dispose(); LoadingIndicator = null; } if (LoginButton != null) { LoginButton.Dispose(); LoginButton = null; } if (LoginContainer != null) { LoginContainer.Dispose(); LoginContainer = null; } if (PasswordTextField != null) { PasswordTextField.Dispose(); PasswordTextField = null; } if (PasswordTextFieldOfRegistration != null) { PasswordTextFieldOfRegistration.Dispose(); PasswordTextFieldOfRegistration = null; } if (RegistrationButton != null) { RegistrationButton.Dispose(); RegistrationButton = null; } if (RegistrationContainer != null) { RegistrationContainer.Dispose(); RegistrationContainer = null; } if (ResetPasswordButton != null) { ResetPasswordButton.Dispose(); ResetPasswordButton = null; } if (WhatIsSeekiosButton != null) { WhatIsSeekiosButton.Dispose(); WhatIsSeekiosButton = null; } }
async partial void Register(UIButton sender) { var fname = FullNameRegisterTextField.Text; var email = EmailRegisterTextField.Text; var passw = PasswordRegisterTextField.Text; // TODO: Should refactor validation to a helper class as this is shared with LoginVC if (string.IsNullOrWhiteSpace(fname)) { ErrorMessageDialog(StringResources.register_ui_fullname_validate_empty); } else if (string.IsNullOrWhiteSpace(email)) { ErrorMessageDialog(StringResources.common_ui_forms_email_validate_empty); } else if (string.IsNullOrWhiteSpace(passw)) { ErrorMessageDialog(StringResources.common_ui_forms_password_validate_empty); } else if (!Regex.Match(email, @"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$").Success) { ErrorMessageDialog(StringResources.common_ui_forms_email_validate_invalid); } else if (PasswordRegisterTextField.Text != ConfirmPasswordTextField.Text) { ErrorMessageDialog(StringResources.common_ui_forms_password_validate_mismatch); } else if (pickerModel.GetChoice(LanguagePicker) == null) { ErrorMessageDialog(StringResources.common_ui_forms_language_error); } else { ConfirmPasswordTextField.BecomeFirstResponder(); ConfirmPasswordTextField.ResignFirstResponder(); RegisterUIButton.Enabled = false; Logger.LOG_EVENT_WITH_ACTION("REGISTER", "ATTEMPT"); LoadingOverlay.Alpha = 1; var response = await RestClient.Register(fname, email, passw, pickerModel.GetChoice(LanguagePicker).Id); RegisterUIButton.Enabled = true; LoadingOverlay.Alpha = 0; if (response.Meta.Success) { Logger.LOG_EVENT_WITH_ACTION("REGISTER", "SUCCESS"); NSUserDefaults.StandardUserDefaults.SetString(email, "username"); PerformSegue("ShowVerifySegue", this); } else if (response.Meta.Messages.Count > 0) { Logger.LOG_EVENT_WITH_ACTION("REGISTER", "ERROR"); // Note: errors returned by register are the same as logjn, hence using that for lookup. var err = StringResources.ResourceManager.GetString($"login.api.error.{response.Meta.Messages[0]}"); ErrorMessageDialog(err); } } }
void ReleaseDesignerOutlets() { if (CancelButton != null) { CancelButton.Dispose(); CancelButton = null; } if (ConfirmPasswordTextField != null) { ConfirmPasswordTextField.Dispose(); ConfirmPasswordTextField = null; } if (EmailTextView != null) { EmailTextView.Dispose(); EmailTextView = null; } if (OtherNamesTextView != null) { OtherNamesTextView.Dispose(); OtherNamesTextView = null; } if (PasswordTextField != null) { PasswordTextField.Dispose(); PasswordTextField = null; } if (PhoneTextView != null) { PhoneTextView.Dispose(); PhoneTextView = null; } if (registerContentView != null) { registerContentView.Dispose(); registerContentView = null; } if (registerScrollView != null) { registerScrollView.Dispose(); registerScrollView = null; } if (SignUpButton != null) { SignUpButton.Dispose(); SignUpButton = null; } if (SurNameTextView != null) { SurNameTextView.Dispose(); SurNameTextView = null; } if (UserNameTextView != null) { UserNameTextView.Dispose(); UserNameTextView = null; } }
public override void ViewDidLoad() { base.ViewDidLoad(); // Perform any additional setup after loading the view, typically from a nib. var set = this.CreateBindingSet <BaseUserViewController, BaseUserViewModel>(); //set.Bind(TakeButton).To(vm => vm.TakePictureCommand); //set.Bind(PhotoImageTapGestureRecognizer).To(vm => vm.ChoosePictureCommand); //set.Bind(LoginButton).To(vm => vm.LoginCommand); set.Bind <UITextField>(CompanyNameTextField).To(vm => vm.CompanyName); set.Bind <UITextField>(FullNameTextField).To(vm => vm.FullName); set.Bind <UITextField>(UsernameTextField).To(vm => vm.Username); set.Bind <UITextField>(PasswordTextField).To(vm => vm.Password); set.Bind <UITextField>(ConfirmPasswordTextField).To(vm => vm.ConfirmPassword); // set.Bind(AddButtonItem).To(vm => vm.AddUserCommand); set.Bind <UIImageView>(PhotoImageView).To(vm => vm.PhotoDataBytes).WithConversion("InMemoryImage"); set.Apply(); PropertiesTapGestureRecognizer.AddTarget(() => { var controller = this.CreateViewControllerFor <PropertyPickerViewModel>(new { viewOnlyMode = !Editing, jsonSelectedPropertyList = JsonConvert.SerializeObject(ViewModel.Properties), requestedViewId = ViewModel.ViewInstanceId, userId = ViewModel.UserId }) as PropertyPickerViewController; NavigationController.PushViewController(controller, true); }); PhotoImageTapGestureRecognizer.AddTarget(() => { if (Editing) { if (Runtime.Arch == Arch.DEVICE) { ViewModel.TakePictureCommand.Execute(null); } else if (Runtime.Arch == Arch.SIMULATOR) { ViewModel.ChoosePictureCommand.Execute(null); } } }); ViewModel.OnPictureEventHandler += (object sender, EventArgs e) => { PlaceholderImageView.Hidden = true; }; ViewModel.OnPictureCancelledEventHandler += (object sender, EventArgs e) => { }; // Dismiss view controller after user added //ViewModel.AddUserSuccessEventHandler += (object sender, EventArgs e) => NavigationController.PopViewControllerAnimated (true); // CancelButtonItem.Clicked += (object sender, EventArgs e) => NavigationController.PopViewControllerAnimated (true); FullNameTextField.ShouldReturn += (textField) => { textField.ResignFirstResponder(); UsernameTextField.BecomeFirstResponder(); return(true); }; UsernameTextField.ShouldReturn += (textField) => { textField.ResignFirstResponder(); PasswordTextField.BecomeFirstResponder(); return(true); }; PasswordTextField.ShouldReturn += (textField) => { textField.ResignFirstResponder(); ConfirmPasswordTextField.BecomeFirstResponder(); return(true); }; // Done button pressed ConfirmPasswordTextField.ShouldReturn += (textField) => { textField.ResignFirstResponder(); return(true); }; SetEditing(true, false); }