Пример #1
0
        protected override int ExecCommandOnNode(Guid cmdGroup, uint cmd, uint cmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
        {
            if (cmdGroup == VsMenus.guidStandardCommandSet2K)
            {
                switch ((VsCommands2K)cmd)
                {
                case (VsCommands2K)WixVsConstants.CommandExploreFolderInWindows:
                    WixHelperMethods.ExploreFolderInWindows(this.ProjectFolder);
                    return(VSConstants.S_OK);

                case VsCommands2K.SLNREFRESH:
                    WixHelperMethods.RefreshProject(this);
                    return(VSConstants.S_OK);
                }
            }

            if (cmdGroup == VsMenus.guidStandardCommandSet97)
            {
                switch ((VsCommands)cmd)
                {
                case VsCommands.Refresh:
                    WixHelperMethods.RefreshProject(this);
                    return(VSConstants.S_OK);

                case VsCommands.F1Help:
                    // Prevent VS from showing keyword help
                    return(VSConstants.S_OK);
                }
            }

            return(base.ExecCommandOnNode(cmdGroup, cmd, cmdexecopt, pvaIn, pvaOut));
        }
Пример #2
0
        protected override int ExecCommandOnNode(Guid cmdGroup, uint cmd, uint cmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
        {
            if (cmdGroup == VsMenus.guidStandardCommandSet2K)
            {
                switch ((VsCommands2K)cmd)
                {
                case VsCommands2K.INCLUDEINPROJECT:
                    return(((IProjectSourceNode)this).IncludeInProject());

                case VsCommands2K.EXCLUDEFROMPROJECT:
                    return(((IProjectSourceNode)this).ExcludeFromProject());

                case (VsCommands2K)WixVsConstants.CommandExploreFolderInWindows:
                    WixHelperMethods.ExploreFolderInWindows(this.GetMkDocument());
                    return(VSConstants.S_OK);

                case VsCommands2K.SLNREFRESH:
                    WixHelperMethods.RefreshProject(this);
                    return(VSConstants.S_OK);
                }
            }

            if (cmdGroup == VsMenus.guidStandardCommandSet97)
            {
                switch ((VsCommands)cmd)
                {
                case VsCommands.Refresh:
                    WixHelperMethods.RefreshProject(this);
                    return(VSConstants.S_OK);
                }
            }

            return(base.ExecCommandOnNode(cmdGroup, cmd, cmdexecopt, pvaIn, pvaOut));
        }