Boolean OnMindMapDragDrop(object sender, MindMapDragEventArgs e) { var notify = new UIExtension.ParentNotify(m_HwndParent); if (e.copyItem) { return(notify.NotifyCopy(e.dragged.uniqueID, e.targetParent.uniqueID, e.afterSibling.uniqueID)); } // else return(notify.NotifyMove(e.dragged.uniqueID, e.targetParent.uniqueID, e.afterSibling.uniqueID)); }
protected override Boolean DoDrop(MindMapDragEventArgs e) { TreeNode prevParentNode = e.dragged.node.Parent; if (!base.DoDrop(e) || e.copyItem) { return(false); } if (e.targetParent.node != prevParentNode) { // Fixup parent states // Note: our tree nodes haven't been moved yet but // the application will have updated it's data structures // so we have to account for this in the node count passed FixupParentalStatus(e.targetParent.node, 1); FixupParentalStatus(prevParentNode, -1); FixupParentID(e.dragged.node, e.targetParent.node); } return(true); }