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


C# vsCommandStatusTextWanted类代码示例

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


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

示例1: QueryStatus

 public void QueryStatus(vsCommandStatusTextWanted NeededText, ref vsCommandStatus StatusOption, ref object CommandText)
 {
     StatusOption = _client.IsRunning && Connect.IsSolutionOpened
                        ? vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled
                        : vsCommandStatus.vsCommandStatusSupported;
     return;
 }
开发者ID:jeroldhaas,项目名称:ContinuousTests,代码行数:7,代码来源:RealtimeToggler.cs

示例2: QueryStatus

 public override void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText)
 {
     base.QueryStatus(commandName, neededText, ref status, ref commandText);
     if (!m_addInSettings.ShowOpenModelButton)
     {
         status = status | vsCommandStatus.vsCommandStatusInvisible;
     }
 }
开发者ID:siwiwit,项目名称:andromda,代码行数:8,代码来源:OpenModelCommand.cs

示例3: QueryStatus

 public void QueryStatus(vsCommandStatusTextWanted NeededText, ref vsCommandStatus StatusOption, ref object CommandText)
 {
     StatusOption = vsCommandStatus.vsCommandStatusInvisible | vsCommandStatus.vsCommandStatusUnsupported;
     //var config = Path.Combine(Path.Combine(Environment.GetFolderPath(_client.GetAppDataFolder()), "MightyMoose"), "AutoTest.config");
     //StatusOption = File.Exists(config) || Connect.IsSolutionOpened
     //                    ? vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled
     //                    : vsCommandStatus.vsCommandStatusSupported;
 }
开发者ID:jeroldhaas,项目名称:ContinuousTests,代码行数:8,代码来源:AutoTestVSConfigurationGlobal.cs

示例4: QueryStatus

 public override void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText)
 {
     base.QueryStatus(commandName, neededText, ref status, ref commandText);
     if (!m_addInSettings.ShowSchemaExportButton || (!m_solutionManager.IsSchemaExportProjectAvailable && m_addInSettings.HideSchemaExportButtonIfProjectUnavailable))
     {
         status = vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusInvisible;
     }
 }
开发者ID:siwiwit,项目名称:andromda,代码行数:8,代码来源:RunSchemaExportCommand.cs

示例5: ComandState

        public bool ComandState(vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText)
        {
            commandText = Caption;

            if (IDE.ApplicationObject.ActiveDocument != null)
                commandText = Caption + " [" + IDE.ApplicationObject.ActiveDocument.Name + "]";

            return false;
        }
开发者ID:AlexandrM,项目名称:VSExpert,代码行数:9,代码来源:CodeItemsList.cs

示例6: QueryStatus

 public void QueryStatus(vsCommandStatusTextWanted NeededText, ref vsCommandStatus StatusOption, ref object CommandText)
 {
     Logger.Write("client running = " + _client.IsRunning);
     Logger.Write("soution opened = " + Connect.IsSolutionOpened);
     StatusOption = _client.IsRunning && Connect.IsSolutionOpened
                        ? vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled
                        : vsCommandStatus.vsCommandStatusSupported;
     return;
 }
开发者ID:jeroldhaas,项目名称:ContinuousTests,代码行数:9,代码来源:AutoTestVSStop.cs

示例7: QueryStatus

 public void QueryStatus( string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText )
 {
     if ( neededText == vsCommandStatusTextWanted.vsCommandStatusTextWantedNone )
     {
         if ( commandName == "SSMSAddin.Connect.SSMSAddin" )
         {
             status = ( vsCommandStatus )vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled;
         }
     }
 }
开发者ID:adamfeather,项目名称:SSMS-T-SQL-Formatter,代码行数:10,代码来源:Connect.cs

示例8: QueryStatus

		public void QueryStatus(string CmdName, vsCommandStatusTextWanted NeededText, ref vsCommandStatus StatusOption, ref object CommandText)
		{
			vsCommandStatus vsCommandStatu;
            if (CmdName == "dg.Sql.SchemaGeneratorAddIn.Connect.GenerateDalFromSelection")
            {
                if (NeededText == vsCommandStatusTextWanted.vsCommandStatusTextWantedNone)
                {
                    vsCommandStatu = (SchemaGenerator.HasSelection(this._applicationObject) ? vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled : vsCommandStatus.vsCommandStatusSupported);
                    StatusOption = vsCommandStatu;
                }
            }
		}
开发者ID:ycaihua,项目名称:dg.Sql,代码行数:12,代码来源:Connect.cs

示例9: QueryStatus

        public void QueryStatus(string commandName, vsCommandStatusTextWanted neededText,
            ref vsCommandStatus status, ref object commandText)
        {
            if (neededText != vsCommandStatusTextWanted.vsCommandStatusTextWantedNone ||
                !_gitPlugin.CanHandleCommand(commandName))
                return;

            if (_gitPlugin.IsCommandEnabled(commandName))
                status = vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled;
            else
                status = vsCommandStatus.vsCommandStatusSupported;
        }
开发者ID:HuChundong,项目名称:gitextensions,代码行数:12,代码来源:Connect.cs

示例10: QueryStatus

		/// <summary>Implements the QueryStatus method of the IDTCommandTarget interface. This is called when the command's availability is updated</summary>
		/// <param term='commandName'>The name of the command to determine state for.</param>
		/// <param term='neededText'>Text that is needed for the command.</param>
		/// <param term='status'>The state of the command in the user interface.</param>
		/// <param term='commandText'>Text requested by the neededText parameter.</param>
		/// <seealso class='Exec' />
		public void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText)
		{			
			if (VS_AddIn.notNull())
				if(neededText == vsCommandStatusTextWanted.vsCommandStatusTextWantedNone)
				{				
					if (VS_AddIn.showCommand(commandName))
					{
						status = (vsCommandStatus)vsCommandStatus.vsCommandStatusSupported|vsCommandStatus.vsCommandStatusEnabled;
						return;
					}					
				}
		}
开发者ID:paul-green,项目名称:O2.Platform.Scripts,代码行数:18,代码来源:VisualStudio_Connect.cs

示例11: QueryStatus

 public virtual void QueryStatus(string cmdName
     , vsCommandStatusTextWanted neededText
     , ref vsCommandStatus statusOption
     , ref object commandText
 )
 {
     switch (neededText) {
     case vsCommandStatusTextWanted.vsCommandStatusTextWantedNone: {
         if (null != _application.Debugger && _application.Debugger.DebuggedProcesses.Count > 0) {
             statusOption = vsCommandStatus.vsCommandStatusSupported
                 | vsCommandStatus.vsCommandStatusEnabled;
         }
     } break;
     }
 }
开发者ID:okigan,项目名称:VsDebugHelper,代码行数:15,代码来源:WriteMem.cs

示例12: QueryStatus

        public override void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText)
        {
            if (m_solutionManager.IsEnabled && m_addInSettings.ShowPropertyMapper && m_application.ActiveDocument != null &&
                (m_application.ActiveDocument.Name.Contains("DaoImpl") || !m_addInSettings.OnlyEnableCodeGenInDaoImpl)

                )
            {
                status = (vsCommandStatus)vsCommandStatus.vsCommandStatusSupported;
                if (IsCommandAvailable(false))
                {
                    status = status | vsCommandStatus.vsCommandStatusEnabled;
                }
            }
            else
            {
                status = (vsCommandStatus)(vsCommandStatus.vsCommandStatusInvisible | vsCommandStatus.vsCommandStatusUnsupported);
            }
        }
开发者ID:siwiwit,项目名称:andromda,代码行数:18,代码来源:PropertyMapperCommand.cs

示例13: catch

    void IDTCommandTarget.QueryStatus(string cmdName
        , vsCommandStatusTextWanted neededText
        , ref vsCommandStatus statusOption
        , ref object commandText
    )
    {
        statusOption = vsCommandStatus.vsCommandStatusUnsupported;

        ICommand command = null;
        _vsCommandTextToCommandMap.TryGetValue(cmdName, out command);

        if (null != command) {
            try {
                command.QueryStatus(cmdName, neededText, ref statusOption, ref commandText);
            } catch (Exception e) {
                var commandWindow = _application.Windows.Item(EnvDTE.Constants.vsWindowKindCommandWindow).Object as CommandWindow;

                commandWindow.OutputString("QueryStatus on " + cmdName + " failed with exception: " + e.ToString());
            }
        }
    }
开发者ID:okigan,项目名称:VsDebugHelper,代码行数:21,代码来源:Connect.cs

示例14: ComandState

 public bool ComandState(vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText)
 {
     return false;
 }
开发者ID:AlexandrM,项目名称:VSExpert,代码行数:4,代码来源:SolutionList.cs

示例15: QueryStatus

 /// <summary>Implements the QueryStatus method of the IDTCommandTarget interface. This is called when the command's availability is updated</summary>
 /// <param term='commandName'>The name of the command to determine state for.</param>
 /// <param term='neededText'>Text that is needed for the command.</param>
 /// <param term='status'>The state of the command in the user interface.</param>
 /// <param term='commandText'>Text requested by the neededText parameter.</param>
 /// <seealso class='Exec' />
 public void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText)
 {
     if (neededText == vsCommandStatusTextWanted.vsCommandStatusTextWantedNone)
     {
         if (commandName.StartsWith(_addInInstance.ProgID + "."))
         {
             status = (vsCommandStatus)(vsCommandStatus.vsCommandStatusEnabled |
                vsCommandStatus.vsCommandStatusSupported);
         }
         else
         {
             status = vsCommandStatus.vsCommandStatusUnsupported;
         }
     }
 }
开发者ID:xiaolin-zhang,项目名称:openengsb-visualstudio-plugin,代码行数:21,代码来源:Connect.cs


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