void ReleaseDesignerOutlets() { if (CollectionView != null) { CollectionView.Dispose(); CollectionView = null; } if (HeaderImageButton != null) { HeaderImageButton.Dispose(); HeaderImageButton = null; } if (NoOutletsButton != null) { NoOutletsButton.Dispose(); NoOutletsButton = null; } if (TitleTextField != null) { TitleTextField.Dispose(); TitleTextField = null; } if (UserDisplayNameTextField != null) { UserDisplayNameTextField.Dispose(); UserDisplayNameTextField = null; } }
void ReleaseDesignerOutlets() { if (btnCancel != null) { btnCancel.Dispose(); btnCancel = null; } if (btnOk != null) { btnOk.Dispose(); btnOk = null; } if (TitleTextField != null) { TitleTextField.Dispose(); TitleTextField = null; } if (UrlTextField != null) { UrlTextField.Dispose(); UrlTextField = null; } }
public override void ViewDidLoad() { base.ViewDidLoad(); TitleTextField.SetBinding(v => v.Text, ViewModel.Title, v => Observable.FromEventPattern(v, nameof(v.EditingChanged)).ToUnit()); DescriptionTextField.SetBinding(v => v.Text, ViewModel.Description, v => Observable.FromEventPattern(v, nameof(v.EditingChanged)).ToUnit()); Observable.FromEventPattern(SaveButton, nameof(SaveButton.TouchUpInside)) .SetCommand(ViewModel.CommitChange); }
void ReleaseDesignerOutlets() { if (cancelButton != null) { cancelButton.Dispose(); cancelButton = null; } if (ClearFilterButton != null) { ClearFilterButton.Dispose(); ClearFilterButton = null; } if (FromDateTextField != null) { FromDateTextField.Dispose(); FromDateTextField = null; } if (NumberEventTextField != null) { NumberEventTextField.Dispose(); NumberEventTextField = null; } if (SaveChangesButton != null) { SaveChangesButton.Dispose(); SaveChangesButton = null; } if (SectionFeatureTextField != null) { SectionFeatureTextField.Dispose(); SectionFeatureTextField = null; } if (TitleTextField != null) { TitleTextField.Dispose(); TitleTextField = null; } if (ToDateTextField != null) { ToDateTextField.Dispose(); ToDateTextField = null; } }
void ReleaseDesignerOutlets() { if (cancelButton != null) { cancelButton.Dispose(); cancelButton = null; } if (ClearFilterButton != null) { ClearFilterButton.Dispose(); ClearFilterButton = null; } if (FromDateTextField != null) { FromDateTextField.Dispose(); FromDateTextField = null; } if (NumberEventTextField != null) { NumberEventTextField.Dispose(); NumberEventTextField = null; } if (saveChangesButton != null) { saveChangesButton.Dispose(); saveChangesButton = null; } if (StatusSegmentedControl != null) { StatusSegmentedControl.Dispose(); StatusSegmentedControl = null; } if (TitleTextField != null) { TitleTextField.Dispose(); TitleTextField = null; } if (ToDateTextField != null) { ToDateTextField.Dispose(); ToDateTextField = null; } }
void ReleaseDesignerOutlets() { if (TitleTextField != null) { TitleTextField.Dispose(); TitleTextField = null; } if (UserNameTextField != null) { UserNameTextField.Dispose(); UserNameTextField = null; } if (PasswordSecureTextField != null) { PasswordSecureTextField.Dispose(); PasswordSecureTextField = null; } if (PasswordClearTextField != null) { PasswordClearTextField.Dispose(); PasswordClearTextField = null; } if (UrlTextField != null) { UrlTextField.Dispose(); UrlTextField = null; } if (NotesTextField != null) { NotesTextField.Dispose(); NotesTextField = null; } if (ExpireCheckBox != null) { ExpireCheckBox.Dispose(); ExpireCheckBox = null; } if (ExpireTimeDatePicker != null) { ExpireTimeDatePicker.Dispose(); ExpireTimeDatePicker = null; } }
void ReleaseDesignerOutlets() { if (DarkModeButton != null) { DarkModeButton.Dispose(); DarkModeButton = null; } if (MainToolbar != null) { MainToolbar.Dispose(); MainToolbar = null; } if (PagePopUpButton != null) { PagePopUpButton.Dispose(); PagePopUpButton = null; } if (RefreshButton != null) { RefreshButton.Dispose(); RefreshButton = null; } if (ToolbarSpinner != null) { ToolbarSpinner.Dispose(); ToolbarSpinner = null; } if (Spinner != null) { Spinner.Dispose(); Spinner = null; } if (TitleTextField != null) { TitleTextField.Dispose(); TitleTextField = null; } }
public void BindDataToView(Card card, bool editable, NSIndexPath indexPath, bool reloadImages) { if (card == null) { return; } BackgroundColor = ColorUtils.FromHexString(card.BorderColor, UIColor.White); UserDisplayNameTextField.Text = card.UserDisplayName; UserDisplayNameTextField.Placeholder = (editable) ? Strings.Basic.your_name : String.Empty; UserDisplayNameTextField.Enabled = editable; UserDisplayNameTextField.RemoveTarget(null, null, UIControlEvent.EditingChanged); UserDisplayNameTextField.EditingChanged += (sender, e) => { card.UpdateStringProperty(() => card.UserDisplayName, UserDisplayNameTextField.Text.Trim()); DealWithTextFieldborder(UserDisplayNameTextField, card, editable); NSNotificationCenter.DefaultCenter.PostNotificationName(Strings.InternalNotifications.notification_card_editing_changed, null); }; UserDisplayNameTextField.RemoveTarget(null, null, UIControlEvent.EditingDidEndOnExit); UserDisplayNameTextField.EditingDidEndOnExit += (sender, e) => { UserDisplayNameTextField.ResignFirstResponder(); }; DealWithTextFieldborder(UserDisplayNameTextField, card, editable); TitleTextField.Text = card.Title; TitleTextField.Enabled = editable; TitleTextField.Placeholder = (editable) ? Strings.Basic.title : String.Empty; TitleTextField.RemoveTarget(null, null, UIControlEvent.EditingChanged); TitleTextField.EditingChanged += (sender, e) => { card.UpdateStringProperty(() => card.Title, TitleTextField.Text.Trim()); DealWithTextFieldborder(TitleTextField, card, editable); NSNotificationCenter.DefaultCenter.PostNotificationName(Strings.InternalNotifications.notification_card_editing_changed, null); }; TitleTextField.RemoveTarget(null, null, UIControlEvent.EditingDidEndOnExit); TitleTextField.EditingDidEndOnExit += (sender, e) => { TitleTextField.ResignFirstResponder(); }; DealWithTextFieldborder(TitleTextField, card, editable); if (reloadImages) { HeaderImageButton.SetImageWithCustomCache(card.GetRemoteHeaderUrlCached(), "NoProfile", "NoProfile", card.RemoteHeaderURL); } HeaderImageButton.Layer.MasksToBounds = true; HeaderImageButton.Layer.CornerRadius = HeaderImageButton.Frame.Size.Width / 2; HeaderImageButton.ClipsToBounds = false; HeaderImageButton.UserInteractionEnabled = editable; CollectionView.RegisterNibForCell(UINib.FromName("MyCardsCollectionViewCell", NSBundle.MainBundle), MyCardsCollectionViewCell.Key); CollectionView.ContentInset = new UIEdgeInsets(0, 8, 0, 8); CollectionView.WeakDataSource = new MyCardsTableViewCellCollectionViewDataSource(card); CollectionView.WeakDelegate = new MyCardsTableViewCellCollectionViewDelegateFlowLayout(); if (CollectionViewTapGesture == null) { CollectionViewTapGesture = new UITapGestureRecognizer((obj) => { NSNotificationCenter.DefaultCenter.PostNotificationName(Strings.InternalNotifications.notification_collection_view_tapped, indexPath); }); } CollectionView.RemoveGestureRecognizer(CollectionViewTapGesture); CollectionView.AddGestureRecognizer(CollectionViewTapGesture); NoOutletsButton.Hidden = !(card.Outlets == null || card.Outlets.Count == 0); }