DocumentTabService(IDocumentTabUIContextLocatorProvider documentTabUIContextLocatorProvider, DocumentTreeView documentTreeView, ITabServiceProvider tabServiceProvider, IDocumentTabContentFactoryService documentTabContentFactoryService, IDocumentTabServiceSettings documentTabServiceSettings, IWpfFocusService wpfFocusService, IDecompilationCache decompilationCache, [ImportMany] IEnumerable <Lazy <IReferenceDocumentTabContentProvider, IReferenceDocumentTabContentProviderMetadata> > referenceDocumentTabContentProviders, [ImportMany] IEnumerable <Lazy <IDefaultDocumentTabContentProvider, IDefaultDocumentTabContentProviderMetadata> > defaultDocumentTabContentProviders, [ImportMany] IEnumerable <Lazy <IReferenceHandler, IReferenceHandlerMetadata> > referenceHandlers) { Settings = documentTabServiceSettings; this.documentTabUIContextLocatorProvider = documentTabUIContextLocatorProvider; this.documentTabContentFactoryService = documentTabContentFactoryService; this.wpfFocusService = wpfFocusService; this.decompilationCache = decompilationCache; this.referenceDocumentTabContentProviders = referenceDocumentTabContentProviders.OrderBy(a => a.Metadata.Order).ToArray(); this.defaultDocumentTabContentProviders = defaultDocumentTabContentProviders.OrderBy(a => a.Metadata.Order).ToArray(); this.referenceHandlers = referenceHandlers.OrderBy(a => a.Metadata.Order).ToArray(); var tvElem = documentTreeView.TreeView.UIObject; tvElem.IsVisibleChanged += TreeView_IsVisibleChanged; isTreeViewVisible = tvElem.IsVisible; DocumentTreeView = documentTreeView; DocumentTreeView.DocumentService.CollectionChanged += DocumentService_CollectionChanged; DocumentTreeView.SelectionChanged += DocumentTreeView_SelectionChanged; DocumentTreeView.NodesTextChanged += DocumentTreeView_NodesTextChanged; DocumentTreeView.NodeActivated += DocumentTreeView_NodeActivated; DocumentTreeView.TreeView.NodeRemoved += TreeView_NodeRemoved; tabService = tabServiceProvider.Create(); TabGroupService = tabService.Create(new TabGroupServiceOptions(MenuConstants.GUIDOBJ_DOCUMENTS_TABCONTROL_GUID)); TabGroupService.TabSelectionChanged += TabGroupService_TabSelectionChanged; TabGroupService.TabGroupSelectionChanged += TabGroupService_TabGroupSelectionChanged; }
public GeneralAppSettingsPage(IThemeServiceImpl themeService, IWindowsExplorerIntegrationService windowsExplorerIntegrationService, IDocumentTabServiceSettings documentTabServiceSettings, DocumentTreeViewSettingsImpl documentTreeViewSettings, IDsDocumentServiceSettings documentServiceSettings, AppSettingsImpl appSettings, MessageBoxService messageBoxService) { if (appSettings == null) { throw new ArgumentNullException(nameof(appSettings)); } this.themeService = themeService ?? throw new ArgumentNullException(nameof(themeService)); this.windowsExplorerIntegrationService = windowsExplorerIntegrationService ?? throw new ArgumentNullException(nameof(windowsExplorerIntegrationService)); this.documentTabServiceSettings = documentTabServiceSettings ?? throw new ArgumentNullException(nameof(documentTabServiceSettings)); this.documentTreeViewSettings = documentTreeViewSettings ?? throw new ArgumentNullException(nameof(documentTreeViewSettings)); this.documentServiceSettings = documentServiceSettings ?? throw new ArgumentNullException(nameof(documentServiceSettings)); this.messageBoxService = messageBoxService ?? throw new ArgumentNullException(nameof(messageBoxService)); ThemesVM = new ObservableCollection <ThemeVM>(themeService.VisibleThemes.Select(a => new ThemeVM(a))); if (!ThemesVM.Any(a => a.Theme == themeService.Theme)) { ThemesVM.Add(new ThemeVM(themeService.Theme)); } SelectedThemeVM = ThemesVM.FirstOrDefault(a => a.Theme == themeService.Theme); Debug.Assert(SelectedThemeVM != null); WindowsExplorerIntegration = windowsExplorerIntegrationService.WindowsExplorerIntegration; DecompileFullType = documentTabServiceSettings.DecompileFullType; RestoreTabs = documentTabServiceSettings.RestoreTabs; DeserializeResources = documentTreeViewSettings.DeserializeResources; UseMemoryMappedIO = documentServiceSettings.UseMemoryMappedIO; UseNewRendererVM = new UseNewRendererVM(appSettings); }
GeneralAppSettingsPageProvider(IThemeServiceImpl themeService, IWindowsExplorerIntegrationService windowsExplorerIntegrationService, IDocumentTabServiceSettings documentTabServiceSettings, DocumentTreeViewSettingsImpl documentTreeViewSettings, IDsDocumentServiceSettings documentServiceSettings, AppSettingsImpl appSettings, MessageBoxService messageBoxService) { this.themeService = themeService; this.windowsExplorerIntegrationService = windowsExplorerIntegrationService; this.documentTabServiceSettings = documentTabServiceSettings; this.documentTreeViewSettings = documentTreeViewSettings; this.documentServiceSettings = documentServiceSettings; this.appSettings = appSettings; this.messageBoxService = messageBoxService; }
GeneralAppSettingsPageProvider(IThemeServiceImpl themeService, IWindowsExplorerIntegrationService windowsExplorerIntegrationService, IDocumentTabServiceSettings documentTabServiceSettings, DocumentTreeViewSettingsImpl documentTreeViewSettings, IDsDocumentServiceSettings documentServiceSettings, AppSettingsImpl appSettings, MessageBoxService messageBoxService) { this.themeService = themeService; this.windowsExplorerIntegrationService = windowsExplorerIntegrationService; this.documentTabServiceSettings = documentTabServiceSettings; this.documentTreeViewSettings = documentTreeViewSettings; this.documentServiceSettings = documentServiceSettings; this.appSettings = appSettings; this.messageBoxService = messageBoxService; }
TreeNodeReferenceDocumentTabContentProvider(DecompileDocumentTabContentFactory decompileDocumentTabContentFactory, IDocumentTabServiceSettings documentTabServiceSettings) { this.decompileDocumentTabContentFactory = decompileDocumentTabContentFactory; this.documentTabServiceSettings = documentTabServiceSettings; }
TreeNodeReferenceDocumentTabContentProvider(DecompileDocumentTabContentFactory decompileDocumentTabContentFactory, IDocumentTabServiceSettings documentTabServiceSettings) { this.decompileDocumentTabContentFactory = decompileDocumentTabContentFactory; this.documentTabServiceSettings = documentTabServiceSettings; }
public GeneralAppSettingsPage(IThemeServiceImpl themeService, IWindowsExplorerIntegrationService windowsExplorerIntegrationService, IDocumentTabServiceSettings documentTabServiceSettings, DocumentTreeViewSettingsImpl documentTreeViewSettings, IDsDocumentServiceSettings documentServiceSettings, AppSettingsImpl appSettings, MessageBoxService messageBoxService) { if (themeService == null) throw new ArgumentNullException(nameof(themeService)); if (windowsExplorerIntegrationService == null) throw new ArgumentNullException(nameof(windowsExplorerIntegrationService)); if (documentTabServiceSettings == null) throw new ArgumentNullException(nameof(documentTabServiceSettings)); if (documentTreeViewSettings == null) throw new ArgumentNullException(nameof(documentTreeViewSettings)); if (documentServiceSettings == null) throw new ArgumentNullException(nameof(documentServiceSettings)); if (appSettings == null) throw new ArgumentNullException(nameof(appSettings)); if (messageBoxService == null) throw new ArgumentNullException(nameof(messageBoxService)); this.themeService = themeService; this.windowsExplorerIntegrationService = windowsExplorerIntegrationService; this.documentTabServiceSettings = documentTabServiceSettings; this.documentTreeViewSettings = documentTreeViewSettings; this.documentServiceSettings = documentServiceSettings; this.messageBoxService = messageBoxService; ThemesVM = new ObservableCollection<ThemeVM>(themeService.VisibleThemes.Select(a => new ThemeVM(a))); if (!ThemesVM.Any(a => a.Theme == themeService.Theme)) ThemesVM.Add(new ThemeVM(themeService.Theme)); SelectedThemeVM = ThemesVM.FirstOrDefault(a => a.Theme == themeService.Theme); Debug.Assert(SelectedThemeVM != null); WindowsExplorerIntegration = windowsExplorerIntegrationService.WindowsExplorerIntegration; DecompileFullType = documentTabServiceSettings.DecompileFullType; RestoreTabs = documentTabServiceSettings.RestoreTabs; DeserializeResources = documentTreeViewSettings.DeserializeResources; UseMemoryMappedIO = documentServiceSettings.UseMemoryMappedIO; UseNewRendererVM = new UseNewRendererVM(appSettings); }