mnuGroups_ItemsLoading
(
object sender,
RibbonControlEventArgs e
)
{
AssertValid();
GroupCommands eGroupCommandsToEnable =
GroupManager.GetGroupCommandsToEnable(
this.ThisWorkbook.InnerObject);
btnCollapseSelectedGroups.Enabled =
GroupManager.GroupCommandsIncludeGroupCommand(
eGroupCommandsToEnable, GroupCommands.CollapseSelectedGroups);
btnExpandSelectedGroups.Enabled =
GroupManager.GroupCommandsIncludeGroupCommand(
eGroupCommandsToEnable, GroupCommands.ExpandSelectedGroups);
btnCollapseAllGroups.Enabled =
GroupManager.GroupCommandsIncludeGroupCommand(
eGroupCommandsToEnable, GroupCommands.CollapseAllGroups);
btnExpandAllGroups.Enabled =
GroupManager.GroupCommandsIncludeGroupCommand(
eGroupCommandsToEnable, GroupCommands.ExpandAllGroups);
btnSelectGroupsWithSelectedVertices.Enabled =
GroupManager.GroupCommandsIncludeGroupCommand(
eGroupCommandsToEnable,
GroupCommands.SelectGroupsWithSelectedVertices);
btnSelectAllGroups.Enabled =
GroupManager.GroupCommandsIncludeGroupCommand(
eGroupCommandsToEnable, GroupCommands.SelectAllGroups);
btnAddSelectedVerticesToGroup.Enabled =
GroupManager.GroupCommandsIncludeGroupCommand(
eGroupCommandsToEnable,
GroupCommands.AddSelectedVerticesToGroup);
btnRemoveSelectedVerticesFromGroups.Enabled =
GroupManager.GroupCommandsIncludeGroupCommand(
eGroupCommandsToEnable,
GroupCommands.RemoveSelectedVerticesFromGroups);
btnRemoveSelectedGroups.Enabled =
GroupManager.GroupCommandsIncludeGroupCommand(
eGroupCommandsToEnable, GroupCommands.RemoveSelectedGroups);
btnRemoveAllGroups.Enabled =
GroupManager.GroupCommandsIncludeGroupCommand(
eGroupCommandsToEnable, GroupCommands.RemoveAllGroups);
// This is required to force the ItemsLoading event to fire the next
// time the mnuGroups menu is opened.
this.RibbonUI.InvalidateControl(this.mnuGroups.Name);
}