public void Remove(TreeNodeSubItem item) { if (List.Contains(item)) { List.Remove(item); } }
public TreeNodeSubItem Add(object value) { TreeNodeSubItem anItem = new TreeNodeSubItem(_owner); anItem.Value = value; return(this.Add(anItem)); }
public TreeNodeSubItem Add(TreeNodeSubItem item) { item._owner = _owner; int index = List.Add(item); return((TreeNodeSubItem)List[index]); }
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)); } }
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); } }
public bool Contains(TreeNodeSubItem item) { return(List.Contains(item)); }
public void Insert(int index, TreeNodeSubItem item) { item._owner = _owner; List.Insert(index, item); }
public int IndexOf(TreeNodeSubItem item) { return(List.IndexOf(item)); }