示例#1
0
        FileTabManager(IFileTabUIContextLocatorCreator fileTabUIContextLocatorCreator, FileTreeView fileTreeView, ITabManagerCreator tabManagerCreator, IFileTabContentFactoryManager fileTabContentFactoryManager, IFileTabManagerSettings fileTabManagerSettings, IWpfFocusManager wpfFocusManager, IDecompilationCache decompilationCache, [ImportMany] IEnumerable <Lazy <IReferenceFileTabContentCreator, IReferenceFileTabContentCreatorMetadata> > mefRefFactories)
        {
            this.fileTabManagerSettings         = fileTabManagerSettings;
            this.fileTabUIContextLocatorCreator = fileTabUIContextLocatorCreator;
            this.fileTabContentFactoryManager   = fileTabContentFactoryManager;
            this.wpfFocusManager    = wpfFocusManager;
            this.decompilationCache = decompilationCache;
            this.refFactories       = mefRefFactories.OrderBy(a => a.Metadata.Order).ToArray();
            var tvElem = fileTreeView.TreeView.UIObject as UIElement;

            Debug.Assert(tvElem != null);
            if (tvElem != null)
            {
                tvElem.IsVisibleChanged += TreeView_IsVisibleChanged;
                isTreeViewVisible        = tvElem.IsVisible;
            }
            this.fileTreeView = fileTreeView;
            this.fileTreeView.FileManager.CollectionChanged += FileManager_CollectionChanged;
            this.fileTreeView.SelectionChanged     += FileTreeView_SelectionChanged;
            this.fileTreeView.NodesTextChanged     += FileTreeView_NodesTextChanged;
            this.fileTreeView.NodeActivated        += FileTreeView_NodeActivated;
            this.fileTreeView.TreeView.NodeRemoved += TreeView_NodeRemoved;
            this.tabManager      = tabManagerCreator.Create();
            this.tabGroupManager = this.tabManager.Create(new TabGroupManagerOptions(MenuConstants.GUIDOBJ_FILES_TABCONTROL_GUID));
            this.tabGroupManager.TabSelectionChanged      += TabGroupManager_TabSelectionChanged;
            this.tabGroupManager.TabGroupSelectionChanged += TabGroupManager_TabGroupSelectionChanged;
        }
 public IToolWindowManager Create()
 {
     return(new ToolWindowManager(tabManagerCreator.Create()));
 }