Connect.cs
/// <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' />
Implements the QueryStatus method of the IDTCommandTarget interface. This is called when the
command's availability is updated
The name of the command to determine state for.
Text that is needed for the command.
The state of the command in the user interface.
Text requested by the neededText parameter.
Implements the QueryStatus method of the IDTCommandTarget interface . This is called when the command ' s availability is updated The name of the command to determine state for . Text that is needed for the command . The state of the command in the user interface . Text requested by the neededText parameter .
public void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText)
        {
            if (neededText == vsCommandStatusTextWanted.vsCommandStatusTextWantedNone)
            {
                if (commandName == "SSMSQueryHistory.Connect.SSMSQueryHistory")
                {
                    status = (vsCommandStatus)vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled;
                    return;
                }
            }
        }
public void QueryStatus ( string commandName , vsCommandStatusTextWanted neededText , ref vsCommandStatus status , ref object commandText ) { if ( neededText == vsCommandStatusTextWanted . vsCommandStatusTextWantedNone ) { if ( commandName == " " ) { status = ( vsCommandStatus ) vsCommandStatus . vsCommandStatusSupported | vsCommandStatus . vsCommandStatusEnabled ; return ; } } }
<summary>Implements the QueryStatus method of the IDTCommandTarget interface.
<summary > Implements the QueryStatus method of the IDTCommandTarget interface .
commandName
string
neededText
vsCommandStatusTextWanted
vsCommandStatus
ref
object
ref