/// <summary> /// Constructs the object a QSetItemBase object. /// </summary> /// <param name="queueSetItem">QSetItemBase object on which the tree node is based.</param> public QSetItemTreeNode(QSetItemBase queueSetItem) : base() { this.ImageIndex = (int)queueSetItem.Icon; this.SelectedImageIndex = (int)queueSetItem.Icon; this.Text = queueSetItem.Name; _queueSetItem = queueSetItem; QSetFolderItem folderItem = _queueSetItem as QSetFolderItem; if (folderItem != null) { _afterItemAddedEventDelegate = new AfterItemAddedEvent(ChildItems_AfterItemAdded); _beforeItemRemovedEventDelegate = new BeforeItemRemovedEvent(ChildItems_BeforeItemRemoved); _itemRepositionedEventDelegate = new ItemRepositionedEvent(ChildItems_ItemRepositioned); folderItem.ChildItems.AfterItemAdded += _afterItemAddedEventDelegate; folderItem.ChildItems.BeforeItemRemoved += _beforeItemRemovedEventDelegate; folderItem.ChildItems.ItemRepositioned += _itemRepositionedEventDelegate; } _queueSetItem.ItemRenamed += new ItemRenamedEvent(_queueSetItem_ItemRenamed); }