protected override void OnDragDrop(DragEventArgs e) { base.OnDragDrop(e); Point clientcoordinate = PointToClient(new Point(e.X, e.Y)); ExtTreeNode node = GetNodeAt(clientcoordinate) as ExtTreeNode; if (node != null) { // when dragging very fast from one node to another, it's possible that // OnDragDrop raises without OnDragOver for the node. // So we have to call HandleDragOver to ensure that we don't call DoDragDrop for // invalid operations. try { HandleDragOver(e, node); if (e.Effect != DragDropEffects.None) { node.DoDragDrop(e.Data, e.Effect); SortParentNodes(node); } } catch (Exception ex) { // WinForms silently discards exceptions in the drag'n'drop events; so we need to catch+report any errors SD.MessageService.ShowException(ex); } } }
protected override void OnDragDrop(DragEventArgs e) { base.OnDragDrop(e); Point clientcoordinate = PointToClient(new Point(e.X, e.Y)); ExtTreeNode node = GetNodeAt(clientcoordinate) as ExtTreeNode; if (node != null) { node.DoDragDrop(e.Data, e.Effect); SortParentNodes(node); } }
protected override void OnDragDrop(DragEventArgs e) { base.OnDragDrop(e); Point clientcoordinate = PointToClient(new Point(e.X, e.Y)); ExtTreeNode node = GetNodeAt(clientcoordinate) as ExtTreeNode; if (node != null) { // when dragging very fast from one node to another, it's possible that // OnDragDrop raises without OnDragOver for the node. // So we have to call HandleDragOver to ensure that we don't call DoDragDrop for // invalid operations. HandleDragOver(e, node); if (e.Effect != DragDropEffects.None) { node.DoDragDrop(e.Data, e.Effect); SortParentNodes(node); } } }