/// <summary> /// Raises the AfterItemAdded event. /// </summary> /// <param name="e">Event arguments</param> private void OnAfterItemAdded(AfterItemAddedEventArgs e) { try { if (_afterItemAdded != null) _afterItemAdded(this, e); } catch {} }
/// <summary> /// Raises the AfterItemAdded event. /// </summary> /// <param name="e">Event arguments</param> private void OnAfterItemAdded(AfterItemAddedEventArgs e) { try { if (_afterItemAdded != null) { _afterItemAdded(this, e); } } catch {} }
private void _childItems_AfterItemAdded(object sender, AfterItemAddedEventArgs e) { IsDirty = true; }
private void ChildItems_AfterItemAdded(object sender, AfterItemAddedEventArgs e) { QSetFolderItem folderItem = e.Item as QSetFolderItem; if (folderItem != null) { folderItem.ChildItems.AfterItemAdded += new AfterItemAddedEvent(ChildItems_AfterItemAdded); folderItem.ChildItems.BeforeItemRemoved += new BeforeItemRemovedEvent(ChildItems_BeforeItemRemoved); } }
/// <summary> /// Handles event fired when a child is added to the current item. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ChildItems_AfterItemAdded(object sender, AfterItemAddedEventArgs e) { QSetItemTreeNode newNode = new QSetItemTreeNode(e.Item); QSetItemTreeNode newNodeRef = newNode; if (e.Item is QSetFolderItem) CreateChildNodes((QSetFolderItem)e.Item, newNodeRef); base.Nodes.Insert(e.InsertedAt, newNode); base.Expand(); base.TreeView.SelectedNode = newNode; newNode.EnsureVisible(); }