当前位置: 首页>>代码示例>>C#>>正文


C# QueryStatusResult类代码示例

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


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


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