Ejemplo n.º 1
0
 TabGroupServiceOptions Convert(ToolWindowGroupServiceOptions options)
 {
     if (options == null)
     {
         options = new ToolWindowGroupServiceOptions();
     }
     return(new TabGroupServiceOptions {
         TabControlStyle = options.TabControlStyle ?? "ToolWindowGroupTabControlStyle",
         TabItemStyle = options.TabItemStyle ?? "ToolWindowGroupTabItemStyle",
         TabGroupGuid = options.ToolWindowGroupGuid,
     });
 }
Ejemplo n.º 2
0
        public IToolWindowGroupService Create(ToolWindowGroupServiceOptions options)
        {
            var newOptions    = Convert(options);
            var ctxMenuHelper = new InitializeContextMenuHelper(newOptions.TabGroupGuid);

            if (newOptions.TabGroupGuid != Guid.Empty)
            {
                newOptions.InitializeContextMenu = ctxMenuHelper.InitializeContextMenu;
            }
            var mgr = new ToolWindowGroupService(tabService.Create(newOptions));

            ctxMenuHelper.ToolWindowGroupService = mgr;
            return(mgr);
        }