public void LinearLayouterInitialize() { tlog.Debug(tag, $"LinearLayouterInitialize START"); var view = new CollectionView(new List <string>() { "123", "456", "789" }) { Header = new RecyclerViewItem(), Footer = new RecyclerViewItem(), IsGrouped = true, }; Assert.IsNotNull(view, "Should not be null"); view.GroupFooterTemplate = new DataTemplate(typeof(RecyclerViewItem)); view.GroupHeaderTemplate = new DataTemplate(typeof(RecyclerViewItem)); view.ItemTemplate = new DataTemplate(typeof(RecyclerViewItem)); var linearLayouter = new LinearLayouter(); Assert.IsNotNull(linearLayouter, "Should not be null"); linearLayouter.Initialize(view); linearLayouter.Padding = new Extents(0, 0, 0, 0); view.Dispose(); linearLayouter.Dispose(); tlog.Debug(tag, $"LinearLayouterInitialize END (OK)"); }
void ReleaseDesignerOutlets() { if (CollectionView != null) { CollectionView.Dispose(); CollectionView = null; } if (CurrentColorView != null) { CurrentColorView.Dispose(); CurrentColorView = null; } if (NewColorView != null) { NewColorView.Dispose(); NewColorView = null; } if (NewCurrentSuperview != null) { NewCurrentSuperview.Dispose(); NewCurrentSuperview = null; } }
protected override void Dispose(bool disposing) { if (_disposed) { return; } _disposed = true; if (disposing) { ItemsSource?.Dispose(); CollectionView.Delegate = null; Delegator?.Dispose(); _emptyUIView?.Dispose(); _emptyUIView = null; _emptyViewFormsElement = null; ItemsViewLayout?.Dispose(); CollectionView?.Dispose(); } base.Dispose(disposing); }
void ReleaseDesignerOutlets() { if (ButtonAdd != null) { ButtonAdd.Dispose(); ButtonAdd = null; } if (ButtonLeft != null) { ButtonLeft.Dispose(); ButtonLeft = null; } if (ButtonRight != null) { ButtonRight.Dispose(); ButtonRight = null; } if (CollectionView != null) { CollectionView.Dispose(); CollectionView = null; } if (UILabelHeader != null) { UILabelHeader.Dispose(); UILabelHeader = null; } }
void ReleaseDesignerOutlets() { if (CollectionView != null) { CollectionView.Dispose(); CollectionView = null; } if (CommentTextField != null) { CommentTextField.Dispose(); CommentTextField = null; } if (CreateButton != null) { CreateButton.Dispose(); CreateButton = null; } if (ScrollView != null) { ScrollView.Dispose(); ScrollView = null; } }
void ReleaseDesignerOutlets() { if (CollectionView != null) { CollectionView.Dispose(); CollectionView = null; } if (CollectionViewHeightConstraint != null) { CollectionViewHeightConstraint.Dispose(); CollectionViewHeightConstraint = null; } if (IceCreamView != null) { IceCreamView.Dispose(); IceCreamView = null; } if (IceCreamViewHeightConstraint != null) { IceCreamViewHeightConstraint.Dispose(); IceCreamViewHeightConstraint = null; } if (PromtLabel != null) { PromtLabel.Dispose(); PromtLabel = null; } }
void ReleaseDesignerOutlets() { if (CollectionView != null) { CollectionView.Dispose(); CollectionView = null; } if (DoneButtonLabel != null) { DoneButtonLabel.Dispose(); DoneButtonLabel = null; } if (SubTitleLabel != null) { SubTitleLabel.Dispose(); SubTitleLabel = null; } if (TitleLabel != null) { TitleLabel.Dispose(); TitleLabel = null; } }
protected void UpdateDataView() { DDL_Cultures.Visible = false; // retrieve all cultures for given user HyperCatalog.Business.CultureList cultures = SessionState.User.Cultures; if (cultures != null) { if (cultures.Count == 1) { // cultures contains only one culture DDL_Cultures.Visible = false; } else { CollectionView cv = new CollectionView(cultures); cv.Sort("Name"); DDL_Cultures.DataSource = cv; DDL_Cultures.DataBind(); DDL_Cultures.SelectedValue = SessionState.Culture.Code; DDL_Cultures.Visible = true; cv.Dispose(); } } }
void ReleaseDesignerOutlets() { if (AvatarImg != null) { AvatarImg.Dispose(); AvatarImg = null; } if (BlendNavBarView != null) { BlendNavBarView.Dispose(); BlendNavBarView = null; } if (CollectionView != null) { CollectionView.Dispose(); CollectionView = null; } if (Spinner != null) { Spinner.Dispose(); Spinner = null; } }
public void GridLayouterRequestLayout() { tlog.Debug(tag, $"GridLayouterRequestLayout START"); var view = new CollectionView(new List <string>() { "123", "456", "789" }) { Header = new RecyclerViewItem(), Footer = new RecyclerViewItem(), IsGrouped = true, }; Assert.IsNotNull(view, "Should not be null"); view.GroupFooterTemplate = new DataTemplate(typeof(RecyclerViewItem)); view.GroupHeaderTemplate = new DataTemplate(typeof(RecyclerViewItem)); view.ItemTemplate = new DataTemplate(typeof(RecyclerViewItem)); var gridLayouter = new GridLayouter(); Assert.IsNotNull(gridLayouter, "Should not be null"); gridLayouter.Initialize(view); gridLayouter.RequestLayout(5.0f); gridLayouter.RequestLayout(150.0f, true); view.Dispose(); gridLayouter.Dispose(); tlog.Debug(tag, $"GridLayouterRequestLayout END (OK)"); }
public void Deactivate() { if (colView != null) { colView.Dispose(); } }
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; } }
public async Task CollectionViewOnRelayout() { tlog.Debug(tag, $"CollectionViewOnRelayout START"); var testingTarget = new CollectionView() { Size = new Size(100, 200), Focusable = true, }; Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <CollectionView>(testingTarget, "should be an instance of testing target class!"); using (Vector2 vec = new Vector2(200, 600)) { try { testingTarget.OnRelayout(vec, null); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } } testingTarget.Dispose(); tlog.Debug(tag, $"CollectionViewOnRelayout END (OK)"); }
public async Task CollectionViewGetNextFocusableView() { tlog.Debug(tag, $"CollectionViewGetNextFocusableView START"); TaskCompletionSource <bool> tcs = new TaskCompletionSource <bool>(false); EventHandler onAddedToWindow = (s, e) => { tcs.TrySetResult(true); }; var model = new TestModel(); var testingTarget = new CollectionView(model, new LinearLayouter(), testDataTemplate); testingTarget.AddedToWindow += onAddedToWindow; testingTarget.Size = new Size(100, 100); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <CollectionView>(testingTarget, "should be an instance of testing target class!"); Window.Instance.Add(testingTarget); var result = await tcs.Task; Assert.IsTrue(result, "Relayout event should be invoked"); testingTarget.GetNextFocusableView(null, View.FocusDirection.Down, false); tlog.Debug(tag, "SelectedItems : " + testingTarget.SelectedItems); if (testingTarget != null) { Window.Instance.Remove(testingTarget); testingTarget.Dispose(); testingTarget = null; } tlog.Debug(tag, $"CollectionViewGetNextFocusableView END (OK)"); }
public void GridLayouterNotifyItemInserted() { tlog.Debug(tag, $"GridLayouterNotifyItemInserted"); var view = new CollectionView(new List <string>() { "123", "456" }) { Header = new RecyclerViewItem(), Footer = new RecyclerViewItem(), IsGrouped = true, }; Assert.IsNotNull(view, "Should not be null"); view.GroupFooterTemplate = new DataTemplate(typeof(RecyclerViewItem)); view.GroupHeaderTemplate = new DataTemplate(typeof(RecyclerViewItem)); view.ItemTemplate = new DataTemplate(typeof(RecyclerViewItem)); var gridLayouter = new GridLayouter(); Assert.IsNotNull(gridLayouter, "Should not be null"); gridLayouter.Initialize(view); gridLayouter.RequestLayout(100.0f); var source = new CustomGroupItemSource(view) { Position = 1, }; gridLayouter.NotifyItemInserted(source, 0); source.Position = 4; gridLayouter.NotifyItemInserted(source, 0); gridLayouter.NotifyItemInserted(source, 1); var emptySource = new CustomEmptySource(); gridLayouter.NotifyItemInserted(emptySource, 1); var item = new RecyclerViewItem() { Size = new Size(200, 100), }; gridLayouter.NotifyItemSizeChanged(item); item.Dispose(); view.Dispose(); gridLayouter.Dispose(); source.Dispose(); emptySource.Dispose(); tlog.Debug(tag, $"GridLayouterNotifyItemInserted END (OK)"); }
public void ItemsLayouterRequestNextFocusableView() { tlog.Debug(tag, $"ItemsLayouterRequestNextFocusableView"); var view = new CollectionView(new List <string>() { "123", "456" }) { Header = new RecyclerViewItem(), Footer = new RecyclerViewItem(), IsGrouped = true, }; Assert.IsNotNull(view, "Should not be null"); #pragma warning disable Reflection // The code contains reflection view.GroupFooterTemplate = new DataTemplate(typeof(RecyclerViewItem)); #pragma warning restore Reflection // The code contains reflection #pragma warning disable Reflection // The code contains reflection view.GroupHeaderTemplate = new DataTemplate(typeof(RecyclerViewItem)); #pragma warning restore Reflection // The code contains reflection #pragma warning disable Reflection // The code contains reflection view.ItemTemplate = new DataTemplate(typeof(RecyclerViewItem)); #pragma warning restore Reflection // The code contains reflection var itemsLayouter = new ItemsLayouterImpl(); Assert.IsNotNull(itemsLayouter, "Should not be null"); itemsLayouter.Initialize(view); itemsLayouter.RequestLayout(100.0f); var source = new CustomGroupItemSource(view) { Position = 1, }; var orientationSize = itemsLayouter.CalculateLayoutOrientationSize(); tlog.Debug(tag, "orientationSize : " + orientationSize); var scrollPosition = itemsLayouter.CalculateCandidateScrollPosition(0.0f); tlog.Debug(tag, "scrollPosition : " + scrollPosition); itemsLayouter.NotifyItemRangeInserted(source, 0, 10); itemsLayouter.RequestNextFocusableView(view, View.FocusDirection.Up, true); itemsLayouter.RequestNextFocusableView(view, View.FocusDirection.Down, true); itemsLayouter.RequestNextFocusableView(view, View.FocusDirection.PageUp, true); itemsLayouter.RequestNextFocusableView(view, View.FocusDirection.PageDown, true); itemsLayouter.RequestNextFocusableView(view, View.FocusDirection.Left, true); itemsLayouter.RequestNextFocusableView(view, View.FocusDirection.Right, true); view.Dispose(); itemsLayouter.Dispose(); source.Dispose(); tlog.Debug(tag, $"ItemsLayouterRequestNextFocusableView END (OK)"); }
void ReleaseDesignerOutlets() { if (CollectionView != null) { CollectionView.Dispose(); CollectionView = null; } if (CollectionViewSubTag != null) { CollectionViewSubTag.Dispose(); CollectionViewSubTag = null; } if (imgSort != null) { imgSort.Dispose(); imgSort = null; } if (lblMonth != null) { lblMonth.Dispose(); lblMonth = null; } if (TableView != null) { TableView.Dispose(); TableView = null; } if (viewContentBackround != null) { viewContentBackround.Dispose(); viewContentBackround = null; } if (lblMonthOrDay != null) { lblMonthOrDay.Dispose(); lblMonthOrDay = null; } if (imgLeft != null) { imgLeft.Dispose(); imgLeft = null; } if (imgRight != null) { imgRight.Dispose(); imgRight = null; } }
public void GridLayouterRequestNextFocusableView() { tlog.Debug(tag, $"GridLayouterRequestNextFocusableView"); var view = new CollectionView(new List <string>() { "123", "456" }) { Header = new RecyclerViewItem(), Footer = new RecyclerViewItem(), IsGrouped = true, }; Assert.IsNotNull(view, "Should not be null"); view.GroupFooterTemplate = new DataTemplate(typeof(RecyclerViewItem)); view.GroupHeaderTemplate = new DataTemplate(typeof(RecyclerViewItem)); view.ItemTemplate = new DataTemplate(typeof(RecyclerViewItem)); var gridLayouter = new GridLayouter(); Assert.IsNotNull(gridLayouter, "Should not be null"); gridLayouter.Initialize(view); gridLayouter.RequestLayout(100.0f); var source = new CustomGroupItemSource(view) { Position = 1, }; var orientationSize = gridLayouter.CalculateLayoutOrientationSize(); Assert.AreEqual(orientationSize, 6); var scrollPosition = gridLayouter.CalculateCandidateScrollPosition(0.0f); Assert.AreEqual(scrollPosition, 0.0f); gridLayouter.NotifyItemRangeInserted(source, 0, 10); gridLayouter.RequestNextFocusableView(view, View.FocusDirection.Up, true); gridLayouter.RequestNextFocusableView(view, View.FocusDirection.Down, true); gridLayouter.RequestNextFocusableView(view, View.FocusDirection.PageUp, true); gridLayouter.RequestNextFocusableView(view, View.FocusDirection.PageDown, true); gridLayouter.RequestNextFocusableView(view, View.FocusDirection.Left, true); gridLayouter.RequestNextFocusableView(view, View.FocusDirection.Right, true); view.Dispose(); gridLayouter.Dispose(); source.Dispose(); tlog.Debug(tag, $"GridLayouterRequestNextFocusableView END (OK)"); }
protected void UpdateDataView() { DDL_Cultures.Visible = false; // retrieve all cultures for given user HyperCatalog.Business.CultureList cultureList = SessionState.User.ItemCulturesRelevant; // remove other culture type HyperCatalog.Business.CultureList cultures = new HyperCatalog.Business.CultureList(); bool masterOrRegion = (cultureType == CultureType.Master || cultureType == CultureType.Regionale); foreach (HyperCatalog.Business.Culture c in cultureList) { if (masterOrRegion) { if (c.Type == CultureType.Master || c.Type == CultureType.Regionale) { cultures.Add(c); } } else { if (c.Type == CultureType.Locale) { cultures.Add(c); } } } if (cultures != null) { if (cultures.Count == 1) { // cultures contains only one culture DDL_Cultures.Visible = false; } else { if (SessionState.Culture.Type != cultureType) { SessionState.Culture = cultures[0]; } CollectionView cv = new CollectionView(cultures); cv.Sort("Name"); DDL_Cultures.DataSource = cv; DDL_Cultures.DataBind(); DDL_Cultures.SelectedValue = SessionState.Culture.Code; DDL_Cultures.Visible = true; cv.Dispose(); } } }
public void CollectionViewConstructor() { tlog.Debug(tag, $"CollectionViewConstructor START"); var testingTarget = new CollectionView(); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <CollectionView>(testingTarget, "should be an instance of testing target class!"); testingTarget.Dispose(); tlog.Debug(tag, $"CollectionViewConstructor END (OK)"); }
public void CollectionViewConstructorWithItemsSourceLayouterTemplate() { tlog.Debug(tag, $"CollectionViewConstructorWithItemsSourceLayouterTemplate START"); var model = new TestModel(); var testingTarget = new CollectionView(model, new LinearLayouter(), testDataTemplate); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <CollectionView>(testingTarget, "should be an instance of testing target class!"); testingTarget.Dispose(); tlog.Debug(tag, $"CollectionViewConstructorWithItemsSourceLayouterTemplate END (OK)"); }
public void SetItemsSource(IEnumerable source) { if (innerView != null) { if (innerView.SourceCollection == source) { return; } innerView.Dispose(); innerView = null; } if (source is ICollectionView) { SetDelegateView((ICollectionView)source); } else { innerView = new CollectionView(source); SetDelegateView(innerView); } }
void ReleaseDesignerOutlets() { if (AreaCollection != null) { AreaCollection.Dispose(); AreaCollection = null; } if (AreaCollectionHeight != null) { AreaCollectionHeight.Dispose(); AreaCollectionHeight = null; } if (cnCollectionViewHeight != null) { cnCollectionViewHeight.Dispose(); cnCollectionViewHeight = null; } if (cnsAreaCollectionTop != null) { cnsAreaCollectionTop.Dispose(); cnsAreaCollectionTop = null; } if (CollectionView != null) { CollectionView.Dispose(); CollectionView = null; } if (EmptyCollectionView != null) { EmptyCollectionView.Dispose(); EmptyCollectionView = null; } if (TableView != null) { TableView.Dispose(); TableView = null; } if (ViewForImage != null) { ViewForImage.Dispose(); ViewForImage = null; } }
void ReleaseDesignerOutlets() { if (PlaceholderView != null) { PlaceholderView.Dispose(); PlaceholderView = null; } if (BackgroundView != null) { BackgroundView.Dispose(); BackgroundView = null; } if (CloseButton != null) { CloseButton.Dispose(); CloseButton = null; } if (CollectionBottomConstraint != null) { CollectionBottomConstraint.Dispose(); CollectionBottomConstraint = null; } if (CollectionTopConstraint != null) { CollectionTopConstraint.Dispose(); CollectionTopConstraint = null; } if (CollectionView != null) { CollectionView.Dispose(); CollectionView = null; } if (PlaceholderBottomConstraint != null) { PlaceholderBottomConstraint.Dispose(); PlaceholderBottomConstraint = null; } if (PlaceholderTopConstraint != null) { PlaceholderTopConstraint.Dispose(); PlaceholderTopConstraint = null; } }
void ReleaseDesignerOutlets() { if (CollectionView != null) { CollectionView.Dispose(); CollectionView = null; } if (Spinner != null) { Spinner.Dispose(); Spinner = null; } }
void ReleaseDesignerOutlets() { if (CollectionView != null) { CollectionView.Dispose(); CollectionView = null; } if (SearchField != null) { SearchField.Dispose(); SearchField = null; } }
void ReleaseDesignerOutlets() { if (CollectionView != null) { CollectionView.Dispose(); CollectionView = null; } if (btnCamera != null) { btnCamera.Dispose(); btnCamera = null; } if (btnClock != null) { btnClock.Dispose(); btnClock = null; } if (btnMicrophone != null) { btnMicrophone.Dispose(); btnMicrophone = null; } if (btnNote != null) { btnNote.Dispose(); btnNote = null; } if (btnPencil != null) { btnPencil.Dispose(); btnPencil = null; } if (btnTag != null) { btnTag.Dispose(); btnTag = null; } if (map != null) { map.Dispose(); map = null; } }
void ReleaseDesignerOutlets() { if (CollectionView != null) { CollectionView.Dispose(); CollectionView = null; } if (TableView != null) { TableView.Dispose(); TableView = null; } }
public void LinearLayouterNotifyItemRangeMoved() { tlog.Debug(tag, $"LinearLayouterNotifyItemRangeMoved"); var view = new CollectionView(new List <string>() { "123", "456" }) { Header = new RecyclerViewItem(), Footer = new RecyclerViewItem(), IsGrouped = true, }; Assert.IsNotNull(view, "Should not be null"); view.GroupFooterTemplate = new DataTemplate(typeof(RecyclerViewItem)); view.GroupHeaderTemplate = new DataTemplate(typeof(RecyclerViewItem)); view.ItemTemplate = new DataTemplate(typeof(RecyclerViewItem)); var linearLayouter = new LinearLayouter(); Assert.IsNotNull(linearLayouter, "Should not be null"); linearLayouter.Initialize(view); linearLayouter.RequestLayout(100.0f); var source = new CustomGroupItemSource(view) { Position = 1, }; var orientationSize = linearLayouter.CalculateLayoutOrientationSize(); Assert.AreEqual(orientationSize, 6); var scrollPosition = linearLayouter.CalculateCandidateScrollPosition(0.0f); Assert.AreEqual(scrollPosition, 0.0f); linearLayouter.NotifyItemRangeInserted(source, 0, 10); linearLayouter.NotifyItemRangeMoved(source, 11, 16, 5); view.Dispose(); linearLayouter.Dispose(); source.Dispose(); tlog.Debug(tag, $"LinearLayouterNotifyItemRangeMoved END (OK)"); }
public void CollectionViewSelectedItems() { tlog.Debug(tag, $"CollectionViewSelectedItems START"); var model = new TestModel(); var testingTarget = new CollectionView(model); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <CollectionView>(testingTarget, "should be an instance of testing target class!"); tlog.Debug(tag, "SelectedItems : " + testingTarget.SelectedItems); testingTarget.Dispose(); tlog.Debug(tag, $"CollectionViewSelectedItems END (OK)"); }