Visual Studio 2008 可擴充套件性開發(六):操作Solution Explorer
阿新 • • 發佈:2019-01-29
OnConnection()
{
// Get "Solution Explorer" command bar CommandBar slnCommandBar = GetCommandBarByName("Solution");
// Add a new command AddNamedCommand2(slnCommandBar, COLLAPSE_ALL_PROJECTS_COMMAND_NAME,
"Collapse All Projects", "Collapse All Projects", false, 0, slnCommandBar.Controls.Count
}
QueryStatus()
{
elseif (commandName == GetCommandFullName(COLLAPSE_ALL_PROJECTS_COMMAND_NAME))
{
status = (vsCommandStatus)vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled;
return;
}
}
Exec()
{
elseif (commandName == GetCommandFullName(COLLAPSE_ALL_PROJECTS_COMMAND_NAME))
{
CollapseAllProjects();
handled
return;
}
}