public void Configure(string hint, string submit, EventHandler <string> eventHandler, EventHandler <bool> scrollToRow) { _onSubmitButton = eventHandler; _scrollToRow = scrollToRow; UITextFieldExtensions.SetupTextFieldAppearance(_textField, Colors.White, 22f, hint, Colors.White70, Colors.White, Colors.SelectBlue); UIButtonExtensions.SetupButtonAppearance(_submitButton, Colors.White, 18f, submit); CustomUIExtensions.SelectButton(_buttonView, Colors.White); _textField.AutocorrectionType = UITextAutocorrectionType.No; _textField.TextContentType = new NSString(""); _textField.ReturnKeyType = UIReturnKeyType.Join; _submitButton.TouchUpInside -= OnSubmitButton_TouchUpInside; _submitButton.TouchUpInside += OnSubmitButton_TouchUpInside; _textField.EditingDidBegin -= OnTextField_EditingDidBegin; _textField.EditingDidBegin += OnTextField_EditingDidBegin; _textField.EditingDidEnd -= OnTextField_EditingDidEnd; _textField.EditingDidEnd += OnTextField_EditingDidEnd; _textField.ShouldReturn -= OnTextField_ShouldReturn; _textField.ShouldReturn += OnTextField_ShouldReturn; }
private void SetupView() { _backgroundView.BackgroundColor = Colors.SelectBlue; UILabelExtensions.SetupLabelAppearance(_titleLabel, ViewModel.TitleLabel, Colors.White, 24f); CustomUIExtensions.LabelShadow(_titleLabel); UILabelExtensions.SetupLabelAppearance(_pickerLabel, ViewModel.SelectPositionLabel, Colors.GrayIndicator, 16f, italic: true); UIButtonExtensions.SetupButtonAppearance(_submitButton, Colors.White, 18f, ViewModel.SelectButton); _pickerImage.Image = UIImage.FromBundle("dropdown_black"); CustomUIExtensions.RoundShadow(_buttonPickerView); CustomUIExtensions.RoundShadow(_picker); CustomUIExtensions.RoundShadow(_pickerImage); CustomUIExtensions.SelectButton(_buttonView, Colors.White); }
private void SetupView(bool canContinue) { _descriptionLabel.Hidden = false; if (canContinue) { UIButtonExtensions.SetupButtonAppearance(_continueButton, Colors.Black, 18f, ViewModel.SubmitButton, UIFontWeight.Light); CustomUIExtensions.SelectButton(_continueView, Colors.Black); _continueButton.TouchUpInside -= OnContinueButton_TouchUpInside; _continueButton.TouchUpInside += OnContinueButton_TouchUpInside; ShouldContinue(true); } else { UIButtonExtensions.SetupButtonUnderlineAppearance(_leaveDivisionButton, Colors.Black, 14f, ViewModel.LeaveButton, UIFontWeight.Light); UIButtonExtensions.SetupButtonUnderlineAppearance(_logoutButton, Colors.Black, 14f, ViewModel.LogoutButton, UIFontWeight.Light); UILabelExtensions.SetupLabelAppearance(_helpLabel, ViewModel.HelpLabel, Colors.Black, 14f, UIFontWeight.Light); UIButtonExtensions.SetupButtonUnderlineAppearance(_helpButton, Colors.SelectBlue, 14f, ViewModel.Division.Email); ShouldContinue(false); _reloadButton.TouchUpInside -= OnReloadButton_TouchUpInside; _reloadButton.TouchUpInside += OnReloadButton_TouchUpInside; _leaveDivisionButton.TouchUpInside -= OnLeaveDivisionButton_TouchUpInside; _leaveDivisionButton.TouchUpInside += OnLeaveDivisionButton_TouchUpInside; _logoutButton.TouchUpInside -= OnLogoutButton_TouchUpInside; _logoutButton.TouchUpInside += OnLogoutButton_TouchUpInside; _helpButton.TouchUpInside -= OnHelpButton_TouchUpInside; _helpButton.TouchUpInside += OnHelpButton_TouchUpInside; } }