• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# QueryStatusResult类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中QueryStatusResult的典型用法代码示例。如果您正苦于以下问题:C# QueryStatusResult类的具体用法?C# QueryStatusResult怎么用?C# QueryStatusResult使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



QueryStatusResult类属于命名空间,在下文中一共展示了QueryStatusResult类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: QueryStatusOnNode

 internal override int QueryStatusOnNode(Guid cmdGroup, uint cmd, IntPtr pCmdText, ref QueryStatusResult result) {
     //Hide Exclude from Project command, show everything else normal Folder node supports
     if (cmdGroup == Microsoft.VisualStudioTools.Project.VsMenus.guidStandardCommandSet2K) {
         switch ((VsCommands2K)cmd) {
             case VsCommands2K.EXCLUDEFROMPROJECT:
                 if (ItemNode.IsExcluded) {
                     result |= QueryStatusResult.NOTSUPPORTED | QueryStatusResult.INVISIBLE;
                     return VSConstants.S_OK;
                 }
                 break;
             case VsCommands2K.INCLUDEINPROJECT:
                 if (ItemNode.IsExcluded) {
                     result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                     return VSConstants.S_OK;
                 }
                 break;
             case CommonConstants.OpenFolderInExplorerCmdId:
                 result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                 return VSConstants.S_OK;
         }
     } else if (cmdGroup == ProjectMgr.SharedCommandGuid) {
         switch ((SharedCommands)cmd) {
             case SharedCommands.AddExistingFolder:
                 result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                 return VSConstants.S_OK;
         }
     }
     return base.QueryStatusOnNode(cmdGroup, cmd, pCmdText, ref result);
 }
开发者ID:vairam-svs,项目名称:poshtools,代码行数:29,代码来源:CommonFolderNode.cs


示例2: QueryStatusOnNode

 internal override int QueryStatusOnNode(Guid cmdGroup, uint cmd, IntPtr pCmdText, ref QueryStatusResult result)
 {
     if (IsEntryPoint)
     {
         if (cmdGroup == Microsoft.VisualStudioTools.Project.VsMenus.guidStandardCommandSet97
             && (VsCommands)cmd == VsCommands.Rename
             || (VsCommands)cmd == VsCommands.Cut)
         {
             result |= QueryStatusResult.NOTSUPPORTED;
             return (int)OleConstants.OLECMDERR_E_NOTSUPPORTED;
         }
         if (cmdGroup == Microsoft.VisualStudioTools.Project.VsMenus.guidStandardCommandSet2K
             && (VsCommands2K)cmd == VsCommands2K.EXCLUDEFROMPROJECT)
         {
             result |= QueryStatusResult.NOTSUPPORTED;
             return (int)OleConstants.OLECMDERR_E_NOTSUPPORTED;
         }
     }
     if (cmdGroup == Microsoft.VisualStudioTools.Project.VsMenus.guidStandardCommandSet2K
         && (VsCommands2K)cmd == VsCommands2K.INCLUDEINPROJECT
         && ItemNode.ItemTypeName == null)
     {
         result |= QueryStatusResult.NOTSUPPORTED;
         return (int)OleConstants.OLECMDERR_E_NOTSUPPORTED;
     }
     return base.QueryStatusOnNode(cmdGroup, cmd, pCmdText, ref result);
 }
开发者ID:whuthj,项目名称:VisualRust,代码行数:27,代码来源:FolderNode.cs


示例3: QueryStatusOnNode

		/// <summary>
		/// Disable certain commands for dependent file nodes 
		/// </summary>
		internal override int QueryStatusOnNode(Guid cmdGroup, uint cmd, IntPtr pCmdText, ref QueryStatusResult result)
		{
			if(cmdGroup == VsMenus.guidStandardCommandSet97)
			{
				switch((VsCommands)cmd)
				{
					case VsCommands.Copy:
					case VsCommands.Paste:
					case VsCommands.Cut:
					case VsCommands.Rename:
						result |= QueryStatusResult.NOTSUPPORTED;
						return VSConstants.S_OK;

					case VsCommands.ViewCode:
					case VsCommands.Open:
					case VsCommands.OpenWith:
						result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
						return VSConstants.S_OK;
				}
			}
			else if(cmdGroup == VsMenus.guidStandardCommandSet2K)
			{
				if((VsCommands2K)cmd == VsCommands2K.EXCLUDEFROMPROJECT)
				{
					result |= QueryStatusResult.NOTSUPPORTED;
					return VSConstants.S_OK;
				}
			}
			else
			{
				return (int)OleConstants.OLECMDERR_E_UNKNOWNGROUP;
			}
			return base.QueryStatusOnNode(cmdGroup, cmd, pCmdText, ref result);
		}
开发者ID:vairam-svs,项目名称:poshtools,代码行数:37,代码来源:DependentFileNode.cs


示例4: QueryStatusOnNode

        internal override int QueryStatusOnNode(Guid cmdGroup, uint cmd, IntPtr pCmdText, ref QueryStatusResult result) {
            if (cmdGroup == Guids.NodejsNpmCmdSet) {
                switch (cmd) {
                    case PkgCmdId.cmdidNpmUpdateModules:
                        if (_parent.IsCurrentStateASuppressCommandsMode()) {
                            result = QueryStatusResult.SUPPORTED;
                        }
                        else {
                            if (AllChildren.Any()) {
                                result = QueryStatusResult.ENABLED | QueryStatusResult.SUPPORTED;
                            }
                            else {
                                result = QueryStatusResult.SUPPORTED;
                            }
                        }
                        return VSConstants.S_OK;

                    case PkgCmdId.cmdidNpmInstallModules:
                    case PkgCmdId.cmdidNpmInstallSingleMissingModule:
                    case PkgCmdId.cmdidNpmUninstallModule:
                    case PkgCmdId.cmdidNpmUpdateSingleModule:
                    case PkgCmdId.cmdidNpmOpenModuleHomepage:
                        result = QueryStatusResult.SUPPORTED | QueryStatusResult.INVISIBLE;
                        return VSConstants.S_OK;
                }
            }

            return base.QueryStatusOnNode(cmdGroup, cmd, pCmdText, ref result);
        }
开发者ID:paladique,项目名称:nodejstools,代码行数:29,代码来源:LocalModulesNode.cs


示例5: QueryStatusOnNode

        protected override int QueryStatusOnNode(Guid guidCmdGroup, uint cmd, IntPtr pCmdText, ref QueryStatusResult result)
        {
            if (guidCmdGroup == Microsoft.VisualStudio.Shell.VsMenus.guidStandardCommandSet97)
            {
                switch ((VsCommands)cmd)
                {
                    case VsCommands.AddNewItem:
                    case VsCommands.AddExistingItem:
                    case VsCommands.ViewCode:
                        result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                        return VSConstants.S_OK;
                    case VsCommands.ViewForm:
                        if (SubType == "Form")
                            result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                        return VSConstants.S_OK;
                }
            }
            else if (guidCmdGroup == RubyMenus.guidRubyProjectCmdSet && cmd == RubyMenus.SetAsMain.ID)
            {
                result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                return VSConstants.S_OK;
            }
 
            return base.QueryStatusOnNode(guidCmdGroup, cmd, pCmdText, ref result);
        }
开发者ID:chunlea,项目名称:rubydotnetcompiler,代码行数:25,代码来源:RubyFileNode.cs


示例6: QueryStatusOnNode

 internal override int QueryStatusOnNode(Guid cmdGroup, uint cmd, IntPtr pCmdText, ref QueryStatusResult result)
 {
     if (cmdGroup == Microsoft.VisualStudioTools.Project.VsMenus.guidStandardCommandSet2K
         && (VsCommands2K)cmd == VsCommands2K.INCLUDEINPROJECT)
     {
         result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
         return (int)VSConstants.S_OK;
     }
     return base.QueryStatusOnNode(cmdGroup, cmd, pCmdText, ref result);
 }
开发者ID:whuthj,项目名称:VisualRust,代码行数:10,代码来源:UntrackedFileNode.cs


示例7: QueryStatusOnNode

        /// <inheritdoc />
        protected override int QueryStatusOnNode(Guid cmdGroup, uint cmd, IntPtr pCmdText,
          ref QueryStatusResult result)
        {
            if(cmdGroup == GuidList.guidSandcastleBuilderPackageCmdSet && cmd == PkgCmdIDList.AddDocSource)
            {
                result |= QueryStatusResult.SUPPORTED | QueryStatusResult.INVISIBLE;
                return VSConstants.S_OK;
            }

            return base.QueryStatusOnNode(cmdGroup, cmd, pCmdText, ref result);
        }
开发者ID:julianhaslinger,项目名称:SHFB,代码行数:12,代码来源:SandcastleBuilderComReferenceNode.cs


示例8: QueryStatusOnNode

 protected override int QueryStatusOnNode(Guid cmdGroup, uint cmd, IntPtr pCmdText, ref QueryStatusResult result)
 {
     //Hide Exclude from Project command, show everything else normal Folder node supports
     if (cmdGroup == Microsoft.VisualStudio.Project.VsMenus.guidStandardCommandSet2K) {
         if (cmd == CommonConstants.OpenFolderInExplorerCmdId) {
             result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
             return VSConstants.S_OK;
         }
         else if ((VsCommands2K)cmd == VsCommands2K.EXCLUDEFROMPROJECT) {
             result |= QueryStatusResult.NOTSUPPORTED | QueryStatusResult.INVISIBLE;
             return VSConstants.S_OK;
         }
     }
     return base.QueryStatusOnNode(cmdGroup, cmd, pCmdText, ref result);
 }
开发者ID:TerabyteX,项目名称:main,代码行数:15,代码来源:CommonFolderNode.cs


示例9: QueryStatusOnNode

 internal override int QueryStatusOnNode(Guid cmdGroup, uint cmd, IntPtr pCmdText, ref QueryStatusResult result)
 {
     if (cmdGroup == VsMenus.guidStandardCommandSet2K && (VsCommands2K)cmd == VsCommands2K.ADDCOMPONENTS
         || cmdGroup == VSConstants.CMDSETID.StandardCommandSet12_guid && (VSConstants.VSStd12CmdID)cmd == VSConstants.VSStd12CmdID.AddReferenceProjectOnly)
     {
         result |= QueryStatusResult.SUPPORTED | QueryStatusResult.INVISIBLE;
         return (int)VSConstants.S_OK;
     }
     return base.QueryStatusOnNode(cmdGroup, cmd, pCmdText, ref result);
 }
开发者ID:Boddlnagg,项目名称:VisualRust,代码行数:10,代码来源:RustProjectNode.cs


示例10: QueryStatusOnNode

 internal override int QueryStatusOnNode(Guid cmdGroup, uint cmd, IntPtr pCmdText, ref QueryStatusResult result)
 {
     if (cmdGroup == VsMenus.guidStandardCommandSet2K)
     {
         if ((VsCommands2K)cmd == VsCommands2K.QUICKOBJECTSEARCH)
         {
             result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
             return VSConstants.S_OK;
         }
     }
     else if (cmdGroup == VSProjectConstants.FSharpSendThisReferenceToInteractiveCmd.Guid && cmd == VSProjectConstants.FSharpSendThisReferenceToInteractiveCmd.ID)
     {
         if (CanBeReferencedFromFSI())
         {
             result |= QueryStatusResult.SUPPORTED; 
             if (GetReferenceForFSI() != null)
             {
                 result |= QueryStatusResult.ENABLED;
             }
         }
         
         return VSConstants.S_OK;
     }
     else
     {
         return (int)OleConstants.OLECMDERR_E_UNKNOWNGROUP;
     }
     return base.QueryStatusOnNode(cmdGroup, cmd, pCmdText, ref result);
 }
开发者ID:CaptainHayashi,项目名称:visualfsharp,代码行数:29,代码来源:ReferenceNode.cs


示例11: QueryStatusOnNode

        protected override int QueryStatusOnNode(Guid cmdGroup, uint cmd, IntPtr pCmdText, ref QueryStatusResult result)
        {
            WixProjectNode projectNode = this.ProjectMgr as WixProjectNode;
            if (projectNode != null && projectNode.QueryStatusOnProjectNode(cmdGroup, cmd, ref result))
            {
                return VSConstants.S_OK;
            }
            else if (cmdGroup == VsMenus.guidStandardCommandSet2K)
            {
                if ((VsCommands2K)cmd == VsCommands2K.QUICKOBJECTSEARCH)
                {
                    Guid browseGuid = this.GetBrowseGuid();
                    if (browseGuid != Guid.Empty)
                    {
                        result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                    }
                    else
                    {
                        result |= QueryStatusResult.NOTSUPPORTED;
                    }

                    return VSConstants.S_OK;
                }
            }

            return base.QueryStatusOnNode(cmdGroup, cmd, pCmdText, ref result);
        }
开发者ID:Jeremiahf,项目名称:wix3,代码行数:27,代码来源:WixProjectReferenceNode.cs


示例12: QueryStatusOnNode

 internal override int QueryStatusOnNode(Guid cmdGroup, uint cmd, IntPtr pCmdText, ref QueryStatusResult result)
 {
     if (cmdGroup == VsMenus.guidStandardCommandSet97)
     {
         switch ((VsCommands)cmd)
         {
             case VsCommands.AddNewItem:
             case VsCommands.AddExistingItem:
                 result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                 return VSConstants.S_OK;
         }
     }
     else if (cmdGroup == VsMenus.guidStandardCommandSet2K)
     {
         if ((VsCommands2K)cmd == VsCommands2K.ADDREFERENCE)
         {
             result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
             return VSConstants.S_OK;
         }
     }
     else if(cmdGroup == VSProjectConstants.FSharpSendReferencesToInteractiveCmd.Guid)
     {
         if (cmd == VSProjectConstants.FSharpSendReferencesToInteractiveCmd.ID)
         {
             foreach(var reference in EnumReferences())
             {
                 if (!reference.CanBeReferencedFromFSI())
                 {
                     continue;
                 }
                 result |= QueryStatusResult.SUPPORTED;
                 if (reference.GetReferenceForFSI() != null)
                 {
                     result |= QueryStatusResult.ENABLED;
                     break;
                 }
             }
             return VSConstants.S_OK;
         }
     }
     else
     {
         return (int)OleConstants.OLECMDERR_E_UNKNOWNGROUP;
     }
     return base.QueryStatusOnNode(cmdGroup, cmd, pCmdText, ref result);
 }
开发者ID:CaptainHayashi,项目名称:visualfsharp,代码行数:46,代码来源:ReferenceContainerNode.cs


示例13: QueryStatusOnNode

        protected override int QueryStatusOnNode(Guid guidCmdGroup, uint cmd, IntPtr pCmdText, ref QueryStatusResult result)
        {
            if (guidCmdGroup == Microsoft.VisualStudio.Project.VsMenus.guidStandardCommandSet2K)
              {
              switch ((VsCommands2K)cmd)
              {
                  case VsCommands2K.ADDREFERENCE:
                      result |= QueryStatusResult.NOTSUPPORTED | QueryStatusResult.INVISIBLE;
                      return VSConstants.S_OK;
              }
              }
              else if (guidCmdGroup == Microsoft.VisualStudio.Project.VsMenus.guidStandardCommandSet97)
              {
              switch ((VsCommands)cmd)
              {
                  case VsCommands.SetStartupProject:
                  case VsCommands.Start:
                  case VsCommands.StartNoDebug:
                      result |= QueryStatusResult.NOTSUPPORTED | QueryStatusResult.INVISIBLE;
                      return VSConstants.S_OK;
              }
              }

              return base.QueryStatusOnNode(guidCmdGroup, cmd, pCmdText, ref result);
        }
开发者ID:ldematte,项目名称:BlenXVSP,代码行数:25,代码来源:BlenXProjectNode.cs


示例14: QueryStatusOnNode

        protected override int QueryStatusOnNode(Guid cmdGroup, uint cmd, IntPtr pCmdText, ref QueryStatusResult result)
        {
            if ((VSConstants.VSStd2KCmdID)cmd == VSConstants.VSStd2KCmdID.ADDREFERENCE)
            {
                result |= QueryStatusResult.NOTSUPPORTED | QueryStatusResult.INVISIBLE;
                return VSConstants.S_OK;
            }

            return base.QueryStatusOnNode(cmdGroup, cmd, pCmdText, ref result);
        }
开发者ID:JakubLinhart,项目名称:Mac65,代码行数:10,代码来源:Mac65ProjectNode.cs


示例15: QueryStatusOnNode

        internal override int QueryStatusOnNode(Guid cmdGroup, uint cmd, IntPtr pCmdText, ref QueryStatusResult result) {
            if (cmdGroup == VsMenus.guidStandardCommandSet97) {
                switch ((VsCommands)cmd) {
                    case VsCommands.Copy:
                    case VsCommands.Cut:
                        result |= QueryStatusResult.SUPPORTED | QueryStatusResult.INVISIBLE;
                        return VSConstants.S_OK;
                }
            } else if (cmdGroup == GuidList.guidPythonToolsCmdSet) {
                switch (cmd) {
                    case PythonConstants.AddEnvironment:
                    case PythonConstants.AddVirtualEnv:
                    case PythonConstants.AddExistingVirtualEnv:
                    case PythonConstants.ViewAllEnvironments:
                        result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                        return VSConstants.S_OK;
                }
            }

            return base.QueryStatusOnNode(cmdGroup, cmd, pCmdText, ref result);
        }
开发者ID:wenh123,项目名称:PTVS,代码行数:21,代码来源:InterpretersContainerNode.cs


示例16: QueryStatusOnNode

        internal override int QueryStatusOnNode(Guid cmdGroup, uint cmd, IntPtr pCmdText, ref QueryStatusResult result) {
            if (cmdGroup == VsMenus.guidStandardCommandSet97) {
                switch ((VsCommands)cmd) {
                    case VsCommands.Copy:
                    case VsCommands.Paste:
                    case VsCommands.Cut:
                    case VsCommands.Rename:
                        result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                        return VSConstants.S_OK;

                    case VsCommands.NewFolder:
                        if (!IsNonMemberItem) {
                            result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                            return VSConstants.S_OK;
                        }
                        break;
                }
            } else if (cmdGroup == VsMenus.guidStandardCommandSet2K) {
                if ((VsCommands2K)cmd == VsCommands2K.EXCLUDEFROMPROJECT) {
                    result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                    return VSConstants.S_OK;
                }
            } else if (cmdGroup != ProjectMgr.SharedCommandGuid) {
                return (int)OleConstants.OLECMDERR_E_UNKNOWNGROUP;
            }
            return base.QueryStatusOnNode(cmdGroup, cmd, pCmdText, ref result);
        }
开发者ID:jsschultz,项目名称:PTVS,代码行数:27,代码来源:FolderNode.cs


示例17: QueryStatusOnNode

 internal override int QueryStatusOnNode(Guid cmdGroup, uint cmd, IntPtr pCmdText, ref QueryStatusResult result) {
     if (cmdGroup == VsMenus.guidStandardCommandSet97) {
         switch ((VsCommands)cmd) {
             case VsCommands.AddNewItem:
             case VsCommands.AddExistingItem:
                 result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                 return VSConstants.S_OK;
         }
     } else if (cmdGroup == VsMenus.guidStandardCommandSet2K) {
         if ((VsCommands2K)cmd == VsCommands2K.ADDREFERENCE) {
             result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
             return VSConstants.S_OK;
         }
     } else {
         return (int)OleConstants.OLECMDERR_E_UNKNOWNGROUP;
     }
     return base.QueryStatusOnNode(cmdGroup, cmd, pCmdText, ref result);
 }
开发者ID:CforED,项目名称:Node.js-Tools-for-Visual-Studio,代码行数:18,代码来源:ReferenceContainerNode.cs


示例18: QueryStatusOnNode

        /// <summary>
        /// Handles command status on the project node. If a command cannot be handled then the base should be called.
        /// </summary>
        /// <param name="cmdGroup">A unique identifier of the command group. The pguidCmdGroup parameter can be NULL to specify the standard group.</param>
        /// <param name="cmd">The command to query status for.</param>
        /// <param name="pCmdText">Pointer to an OLECMDTEXT structure in which to return the name and/or status information of a single command. Can be NULL to indicate that the caller does not require this information.</param>
        /// <param name="result">An out parameter specifying the QueryStatusResult of the command.</param>
        /// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code.</returns>
        protected override int QueryStatusOnNode(Guid cmdGroup, uint cmd, IntPtr pCmdText, ref QueryStatusResult result)
        {
            if (cmdGroup == VsMenus.guidStandardCommandSet97)
            {
                switch ((VsCommands)cmd)
                {
                    case VsCommands.Copy:
                    case VsCommands.Paste:
                    case VsCommands.Cut:
                    case VsCommands.Rename:
                    case VsCommands.Exit:
                    case VsCommands.ProjectSettings:
                    case VsCommands.BuildSln:
                    case VsCommands.UnloadProject:
                        result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                        return VSConstants.S_OK;

                    case VsCommands.ViewForm:
                        if (this.HasDesigner)
                        {
                            result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                            return VSConstants.S_OK;
                        }
                        break;

                    case VsCommands.CancelBuild:
                        result |= QueryStatusResult.SUPPORTED;
                        if (this.buildInProcess)
                            result |= QueryStatusResult.ENABLED;
                        else
                            result |= QueryStatusResult.INVISIBLE;
                        return VSConstants.S_OK;

                    case VsCommands.NewFolder:
                    case VsCommands.AddNewItem:
                    case VsCommands.AddExistingItem:
                        result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                        return VSConstants.S_OK;

                    case VsCommands.SetStartupProject:
                        result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                        return VSConstants.S_OK;
                }
            }
            else if (cmdGroup == VsMenus.guidStandardCommandSet2K)
            {

                switch ((VsCommands2K)cmd)
                {
                    case VsCommands2K.ADDREFERENCE:
                        result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                        return VSConstants.S_OK;

                    case VsCommands2K.EXCLUDEFROMPROJECT:
                        result |= QueryStatusResult.SUPPORTED | QueryStatusResult.INVISIBLE;
                        return VSConstants.S_OK;

                    case ExploreFolderInWindowsCommand:
                        result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                        return VSConstants.S_OK;
                }
            }
            else
            {
                return (int)OleConstants.OLECMDERR_E_UNKNOWNGROUP;
            }

            return base.QueryStatusOnNode(cmdGroup, cmd, pCmdText, ref result);
        }
开发者ID:IntelliTect,项目名称:PowerStudio,代码行数:77,代码来源:ProjectNode.cs


示例19: QueryStatusOnNode

        protected override int QueryStatusOnNode(Guid guidCmdGroup, uint cmd, IntPtr pCmdText, ref QueryStatusResult result)
        {
            if (VsPkgMenus.guidStandardCommandSet97 == guidCmdGroup && this.IsNonMemberItem)
            {
                switch ((VsCommands)cmd)
                {
                    case VsCommands.ViewCode:
                        result = QueryStatusResult.NOTSUPPORTED;
                        return (int)OleConstants.MSOCMDERR_E_NOTSUPPORTED;
                }
            }

            int returnCode;
            if (WixHelperMethods.QueryStatusOnProjectSourceNode(this, guidCmdGroup, cmd, ref result, out returnCode))
            {
                return returnCode;
            }

            return base.QueryStatusOnNode(guidCmdGroup, cmd, pCmdText, ref result);
        }
开发者ID:Jeremiahf,项目名称:wix3,代码行数:20,代码来源:WixFileNode.cs


示例20: QueryStatusOnNode

        internal override int QueryStatusOnNode(Guid cmdGroup, uint cmd, IntPtr pCmdText, ref QueryStatusResult result) {
            if (cmdGroup == CommonConstants.Std97CmdGroupGuid) {
                switch ((VSConstants.VSStd97CmdID)cmd) {
                    case VSConstants.VSStd97CmdID.BuildCtx:
                    case VSConstants.VSStd97CmdID.RebuildCtx:
                    case VSConstants.VSStd97CmdID.CleanCtx:
                        result = QueryStatusResult.SUPPORTED | QueryStatusResult.INVISIBLE;
                        return VSConstants.S_OK;
                }
            } else if (cmdGroup == Microsoft.VisualStudioTools.Project.VsMenus.guidStandardCommandSet2K) {
                switch ((VsCommands2K)cmd) {
                    case VsCommands2K.ECMD_PUBLISHSELECTION:
                        if (pCmdText != IntPtr.Zero && NativeMethods.OLECMDTEXT.GetFlags(pCmdText) == NativeMethods.OLECMDTEXT.OLECMDTEXTF.OLECMDTEXTF_NAME) {
                            NativeMethods.OLECMDTEXT.SetText(pCmdText, "Publish " + this.Caption);
                        }

                        if (IsPublishingEnabled) {
                            result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                        } else {
                            result |= QueryStatusResult.SUPPORTED;
                        }
                        return VSConstants.S_OK;

                    case VsCommands2K.ECMD_PUBLISHSLNCTX:
                        if (IsPublishingEnabled) {
                            result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                        } else {
                            result |= QueryStatusResult.SUPPORTED;
                        }
                        return VSConstants.S_OK;
                    case CommonConstants.OpenFolderInExplorerCmdId:
                        result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                        return VSConstants.S_OK;
                }
            } else if (cmdGroup == SharedCommandGuid) {
                switch ((SharedCommands)cmd) {
                    case SharedCommands.AddExistingFolder:
                        result |= QueryStatusResult.SUPPORTED | QueryStatusResult.ENABLED;
                        return VSConstants.S_OK;
            }
            }

            return base.QueryStatusOnNode(cmdGroup, cmd, pCmdText, ref result);
        }
开发者ID:vairam-svs,项目名称:poshtools,代码行数:44,代码来源:CommonProjectNode.cs



注:本文中的QueryStatusResult类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# QueryString类代码示例发布时间:2022-05-24
下一篇:
C# QueryResult类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap