Beispiel #1
0
 public void Remove(TreeNodeSubItem item)
 {
     if (List.Contains(item))
     {
         List.Remove(item);
     }
 }
Beispiel #2
0
            public TreeNodeSubItem Add(object value)
            {
                TreeNodeSubItem anItem = new TreeNodeSubItem(_owner);

                anItem.Value = value;
                return(this.Add(anItem));
            }
Beispiel #3
0
            public TreeNodeSubItem Add(TreeNodeSubItem item)
            {
                item._owner = _owner;
                int index = List.Add(item);

                return((TreeNodeSubItem)List[index]);
            }
Beispiel #4
0
 protected override void OnInsert(int index, object value)
 {
     if (_owner._owner.IsDesignMode)
     {
         TreeNodeSubItem aSubItem = (TreeNodeSubItem)value;
         aSubItem.Font = _owner._owner.Font;
     }
     if (Inserting != null)
     {
         Inserting(this, new CollectionEventArgs(CollectionEventArgs.EventType.OnInsert, index, value));
     }
 }
Beispiel #5
0
 public TreeNodeSubItem this[int index] {
     get {
         if (index == 0)
         {
             TreeNodeSubItem aSubItem = new TreeNodeSubItem();
             aSubItem.Value     = _owner._text;
             aSubItem.Font      = _owner.NodeFont;
             aSubItem.Color     = _owner.Color;
             aSubItem.BackColor = _owner.BackColor;
             return(aSubItem);
         }
         else if (index >= 1 && index <= List.Count)
         {
             return((TreeNodeSubItem)List[index - 1]);
         }
         return(null);
     }
 }
Beispiel #6
0
 public bool Contains(TreeNodeSubItem item)
 {
     return(List.Contains(item));
 }
Beispiel #7
0
 public void Insert(int index, TreeNodeSubItem item)
 {
     item._owner = _owner;
     List.Insert(index, item);
 }
Beispiel #8
0
 public int IndexOf(TreeNodeSubItem item)
 {
     return(List.IndexOf(item));
 }