Example #1
0
 void IDropTarget.DragLeave()
 {
     if (_mDragTarget != null)
     {
         _mDragTarget.Dispose();
         _mDragTarget = null;
     }
     _mTreeView.HideSelection = false;
 }
Example #2
0
        void IDropTarget.DragOver(int grfKeyState, Point pt,
                                  ref int pdwEffect)
        {
            var clientLocation = _mTreeView.PointToClient(pt);
            var node           = _mTreeView.HitTest(clientLocation).Node;

            CheckDragScroll(clientLocation);

            if (node != null)
            {
                if ((_mDragTarget == null) ||
                    (node != _mDragTarget.Node))
                {
                    _mDragTarget?.Dispose();

                    _mDragTarget = new DragTarget(node, grfKeyState,
                                                  pt, ref pdwEffect);
                }
                else
                {
                    _mDragTarget.DragOver(grfKeyState, pt, ref pdwEffect);
                }
            }
            else
            {
                pdwEffect = 0;
            }
        }