VsTeXProject.VisualStudio.Project.ProjectNode.DragOver C# (CSharp) Method

DragOver() public method

Called when one or more items are dragged over the target hierarchy or hierarchy window.
public DragOver ( uint grfKeyState, uint itemid, uint &pdwEffect ) : int
grfKeyState uint /// Current state of the keyboard keys and the mouse modifier buttons. See /// ///
itemid uint Item identifier of the drop data target over which the item is being dragged
pdwEffect uint /// On entry, reference to the value of the pdwEffect parameter of the IVsHierarchy object, identifying all effects /// that the hierarchy supports. /// On return, the pdwEffect parameter must contain one of the effect flags that indicate the result of the drop /// operation. For a list of pwdEffects values, see ///
return int
        public override int DragOver(uint grfKeyState, uint itemid, ref uint pdwEffect)
        {
            pdwEffect = (uint) DropEffect.None;

            // Dragging items to a project that is being debugged is not supported
            // (see VSWhidbey 144785)            
            var dbgMode = VsShellUtilities.GetDebugMode(Site) & ~DBGMODE.DBGMODE_EncMask;
            if (dbgMode == DBGMODE.DBGMODE_Run || dbgMode == DBGMODE.DBGMODE_Break)
            {
                return VSConstants.S_OK;
            }

            if (IsClosed || site == null)
            {
                return VSConstants.E_UNEXPECTED;
            }

            // We should also analyze if the node being dragged over can accept the drop.
            if (!CanTargetNodeAcceptDrop(itemid))
            {
                return VSConstants.E_NOTIMPL;
            }

            if (dropDataType != DropDataType.None)
            {
                pdwEffect = (uint) QueryDropEffect(dropDataType, grfKeyState);
            }

            return VSConstants.S_OK;
        }
ProjectNode