private void DeleteNode() { try { // Prompt. if (PromptForDelete()) { using (new LongRunningMonitor(Snapin)) { // Let the derived class respond. Delete(); // Remove from parent and remove from the display. m_parentNode.RemoveChild(this); Snapin.Unregister(this); DeleteItem(); } } } catch (Exception e) { new ExceptionDialog(e, "Cannot delete '" + m_displayName + "'.").ShowDialog(Snapin); } }
protected void DeleteChildNode(SnapinNode node) { // Delete the item and unregister the node. node.DeleteItem(); Snapin.Unregister(node); RemoveChild(node); }
private void DeleteChildNodes() { foreach (SnapinNode node in m_childNodes) { // Delete the item and unregister the node. node.DeleteItem(); Snapin.Unregister(node); } m_childNodes.Clear(); }