private void onMouseDown(object sender, MouseEventArgs e) { this.DoWithinExceptionHandler(() => { var hitInfo = _treeView.CalcHitInfo(e.Location); if (hitInfo == null) { return; } if (hitInfo.Node == null) { return; } var treeNode = _treeView.NodeFrom(hitInfo.Node); if (treeNode.IsAnImplementationOf <HierarchicalStructureNode>() && e.Button.Equals(MouseButtons.Left)) { HierarchicalStructureNode node = (HierarchicalStructureNode)treeNode; var dragItem = _presenter.GetReferenceObjectFrom(node.Tag); if (dragItem != null) { DoDragDrop(dragItem, DragDropEffects.Copy); } } }); }
private ITreeNode nodeFrom(TreeListNode treeListNode) { return(_treeView.NodeFrom(treeListNode)); }