本文整理汇总了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;
}
示例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;
}
}
示例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;
}
示例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;
}
}
示例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;
}
示例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;
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
示例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;
}
}
}
示例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;
}
}
示例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);
}
}
示例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());
}
}
}
示例14: ComandState
public bool ComandState(vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText)
{
return false;
}
示例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;
}
}
}