public virtual CalendarViewCollection AddRange( CalendarViewCollection viewsCollection) { int count = this.children.Count; this.children.AddRange((IEnumerable <CalendarView>)viewsCollection); for (int index = count; index < this.children.Count; ++index) { this.UpdateOwnerShip(this.children[index]); } return(viewsCollection); }
/// <summary> /// Adds an collection of previously created CalendarView objects to the collection. /// </summary> /// <param name="viewsCollection">An array of CalendarView objects representing the views to add to the collection.</param> public virtual CalendarViewCollection AddRange(CalendarViewCollection viewsCollection) { int updateIndex = this.children.Count; this.children.AddRange(viewsCollection); for (int i = updateIndex; i < this.children.Count; i++) { this.UpdateOwnerShip(this.children[i]); } //this.UpdateVisuals(); return(viewsCollection); }
private ArrayList FindInternal(string key, bool searchAllChildren, CalendarViewCollection viewsCollectionToLookIn) { ArrayList foundViews = new ArrayList(); if ((viewsCollectionToLookIn == null) || (foundViews == null)) { return(null); } for (int i = 0; i < viewsCollectionToLookIn.Count; i++) { if ((viewsCollectionToLookIn[i] != null) && WindowsFormsUtils.SafeCompareStrings(viewsCollectionToLookIn[i].Name, key, true)) { foundViews.Add(viewsCollectionToLookIn[i]); if (searchAllChildren && viewsCollectionToLookIn[i].Children.Count > 0) { foundViews.AddRange(this.FindInternal(key, searchAllChildren, viewsCollectionToLookIn[i].Children)); } } } return(foundViews); }
private ArrayList FindInternal( string key, bool searchAllChildren, CalendarViewCollection viewsCollectionToLookIn) { ArrayList arrayList = new ArrayList(); if (viewsCollectionToLookIn == null || arrayList == null) { return((ArrayList)null); } for (int index = 0; index < viewsCollectionToLookIn.Count; ++index) { if (viewsCollectionToLookIn[index] != null && WindowsFormsUtils.SafeCompareStrings(viewsCollectionToLookIn[index].Name, key, true)) { arrayList.Add((object)viewsCollectionToLookIn[index]); if (searchAllChildren && viewsCollectionToLookIn[index].Children.Count > 0) { arrayList.AddRange((ICollection)this.FindInternal(key, searchAllChildren, viewsCollectionToLookIn[index].Children)); } } } return(arrayList); }