public MesCommandKeyGestureService(
     [ImportMany] MesCommandKeyboardShortcut[] keyboardShortcuts,
     [ImportMany] MesExcludeCommandKeyboardShortcut[] excludeKeyboardShortcuts,
     IMesCommandService commandService)
 {
     _keyboardShortcuts = keyboardShortcuts
                          .Except(excludeKeyboardShortcuts.Select(x => x.KeyboardShortcut))
                          .OrderBy(x => x.SortOrder)
                          .ToArray();
     _commandService = commandService;
 }
 public MesMenuBuilder(
     IMesCommandService commandService,
     [ImportMany] MesMenuBarDefinition[] menuBars,
     [ImportMany] MesMenuDefinition[] menus,
     [ImportMany] MesMenuItemGroupDefinition[] menuItemGroups,
     [ImportMany] MesMenuItemDefinition[] menuItems,
     [ImportMany] MesExcludeMenuDefinition[] excludeMenus,
     [ImportMany] MesExcludeMenuItemGroupDefinition[] excludeMenuItemGroups,
     [ImportMany] MesExcludeMenuItemDefinition[] excludeMenuItems)
 {
     _commandService        = commandService;
     MenuBars               = menuBars;
     _menus                 = menus;
     _menuItemGroups        = menuItemGroups;
     _menuItems             = menuItems;
     _excludeMenus          = excludeMenus.Select(x => x.MenuDefinitionToExclude).ToArray();
     _excludeMenuItemGroups = excludeMenuItemGroups.Select(x => x.MenuItemGroupDefinitionToExclude).ToArray();
     _excludeMenuItems      = excludeMenuItems.Select(x => x.MenuItemDefinitionToExclude).ToArray();
 }
Beispiel #3
0
 public MesToolBarBuilder(
     IMesCommandService commandService,
     [ImportMany] MesToolBarDefinition[] toolBars,
     [ImportMany] MesToolBarItemGroupDefinition[] toolBarItemGroups,
     [ImportMany] MesToolBarItemDefinition[] toolBarItems,
     [ImportMany] MesExcludeToolBarDefinition[] excludeToolBars,
     [ImportMany] MesExcludeToolBarItemGroupDefinition[] excludeToolBarItemGroups,
     [ImportMany] MesExcludeToolBarItemDefinition[] excludeToolBarItems)
 {
     _commandService = commandService;
     _toolBars       = toolBars
                       .Where(x => !excludeToolBars.Select(y => y.ToolBarDefinitionToExclude).Contains(x))
                       .ToArray();
     _toolBarItemGroups = toolBarItemGroups
                          .Where(x => !excludeToolBarItemGroups.Select(y => y.ToolBarItemGroupDefinitionToExclude).Contains(x))
                          .ToArray();
     _toolBarItems = toolBarItems
                     .Where(x => !excludeToolBarItems.Select(y => y.ToolBarItemDefinitionToExclude).Contains(x))
                     .ToArray();
 }