public void Exec(string commandName, vsCommandExecOption executeOption, ref object varIn, ref object varOut, ref bool handled) { if (m_connected && IsAvailable && executeOption == vsCommandExecOption.vsCommandExecOptionDoDefault) { AddInCommandBase cmd = GetCommand(commandName); if (cmd != null) { cmd.Exec(executeOption, ref varIn, ref varOut); handled = true; } } }
public void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status, ref object commandText) { if (m_connected && neededText == vsCommandStatusTextWanted.vsCommandStatusTextWantedNone) { AddInCommandBase cmd = GetCommand(commandName); if (cmd != null) { m_logoCommand.Visible = !AreAnyToolbarButtonsVisible(); cmd.QueryStatus(commandName, neededText, ref status, ref commandText); if (!IsAvailable) { if ((status & vsCommandStatus.vsCommandStatusEnabled) > 0) { status -= vsCommandStatus.vsCommandStatusEnabled; } } } else { status = vsCommandStatus.vsCommandStatusUnsupported | vsCommandStatus.vsCommandStatusInvisible; } } }