private vsCommandStatus DoQueryStatus(string commandName, vsCommandStatusTextWanted neededText)
{
if (neededText == vsCommandStatusTextWanted.vsCommandStatusTextWantedNone)
{
if (commandName == _addIn.ProgID + "." + CmdLogin)
{
return _controller.Connected
? vsCommandStatus.vsCommandStatusSupported
: vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled;
}
if (commandName == _addIn.ProgID + "." + CmdLogout)
{
return _controller.Connected
? vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled
: vsCommandStatus.vsCommandStatusSupported;
}
return vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled;
}
return vsCommandStatus.vsCommandStatusSupported;
}