internal void AddRangeInternal(TreeListViewItemCollection collection)
 {
     foreach (TreeListViewItem item in collection)
     {
         Add(item);
     }
 }
Exemple #2
0
 internal void GetCheckedItems(ref TreeListViewItemCollection items)
 {
     if (Checked)
     {
         items.Add(this);
     }
     foreach (TreeListViewItem item in Items)
     {
         item.GetCheckedItems(ref items);
     }
 }
Exemple #3
0
        private TreeListViewItemCollection GetParentsInHierarch()
        {
            TreeListViewItemCollection temp = Parent != null?
                                              Parent.GetParentsInHierarch() : new TreeListViewItemCollection();

            if (Parent != null)
            {
                temp.Add(Parent);
            }
            return(temp);
        }
 /// <summary>
 /// Adds a collection to this collection
 /// </summary>
 /// <param name="collection"></param>
 public void AddRange(TreeListViewItemCollection collection)
 {
     if (TreeListView != null)
     {
         TreeListView.BeginUpdate();
     }
     AddRangeInternal(collection);
     if (TreeListView != null)
     {
         TreeListView.BeginUpdate();
     }
 }
Exemple #5
0
        /// <summary>
        /// Remove this item from its associated collection
        /// </summary>
        public new void Remove()
        {
            if (ListView != null)
            {
                if (ListView.InvokeRequired)
                {
                    throw(new Exception("Invoke required"));
                }
            }
            TreeListViewItemCollection collection = this.Container;

            if (collection != null)
            {
                collection.Remove(this);
            }
        }
Exemple #6
0
 /// <summary>
 /// Create a new instance of a TreeListViewItem
 /// </summary>
 public TreeListViewItem()
 {
     _items = new TreeListViewItemCollection(this);
 }