public ToolWindowGroupService(ITabGroupService tabGroupService) {
			this.tabGroupService = tabGroupService;
			tabSelectionChanged = new WeakEventList<ToolWindowSelectedEventArgs>();
			tabGroupSelectionChanged = new WeakEventList<ToolWindowGroupSelectedEventArgs>();
			toolWindowGroupCollectionChanged = new WeakEventList<ToolWindowGroupCollectionChangedEventArgs>();

			this.tabGroupService.TabSelectionChanged += TabGroupService_TabSelectionChanged;
			this.tabGroupService.TabGroupSelectionChanged += TabGroupService_TabGroupSelectionChanged;
			this.tabGroupService.TabGroupCollectionChanged += TabGroupService_TabGroupCollectionChanged;
		}
Example #2
0
        public ToolWindowGroupService(ITabGroupService tabGroupService)
        {
            this.tabGroupService             = tabGroupService;
            tabSelectionChanged              = new WeakEventList <ToolWindowSelectedEventArgs>();
            tabGroupSelectionChanged         = new WeakEventList <ToolWindowGroupSelectedEventArgs>();
            toolWindowGroupCollectionChanged = new WeakEventList <ToolWindowGroupCollectionChangedEventArgs>();

            this.tabGroupService.TabSelectionChanged       += TabGroupService_TabSelectionChanged;
            this.tabGroupService.TabGroupSelectionChanged  += TabGroupService_TabGroupSelectionChanged;
            this.tabGroupService.TabGroupCollectionChanged += TabGroupService_TabGroupCollectionChanged;
        }
Example #3
0
		DecompilerService(DecompilerServiceSettingsImpl decompilerServiceSettings, [ImportMany] IDecompiler[] languages, [ImportMany] IDecompilerCreator[] creators) {
			this.decompilerServiceSettings = decompilerServiceSettings;
			var langs = new List<IDecompiler>(languages);
			foreach (var creator in creators)
				langs.AddRange(creator.Create());
			if (langs.Count == 0)
				langs.Add(new DummyDecompiler());
			decompilers = langs.OrderBy(a => a.OrderUI).ToArray();
			decompiler = FindOrDefault(decompilerServiceSettings.LanguageGuid);
			decompilerChanged = new WeakEventList<EventArgs>();
		}
        public ToolWindowGroupManager(ITabGroupManager tabGroupManager)
        {
            this.tabGroupManager                  = tabGroupManager;
            this.tabSelectionChanged              = new WeakEventList <ToolWindowSelectedEventArgs>();
            this.tabGroupSelectionChanged         = new WeakEventList <ToolWindowGroupSelectedEventArgs>();
            this.toolWindowGroupCollectionChanged = new WeakEventList <ToolWindowGroupCollectionChangedEventArgs>();

            this.tabGroupManager.TabSelectionChanged       += TabGroupManager_TabSelectionChanged;
            this.tabGroupManager.TabGroupSelectionChanged  += TabGroupManager_TabGroupSelectionChanged;
            this.tabGroupManager.TabGroupCollectionChanged += TabGroupManager_TabGroupCollectionChanged;
        }
        public ToolWindowGroupManager(ITabGroupManager tabGroupManager)
        {
            this.tabGroupManager = tabGroupManager;
            this.tabSelectionChanged = new WeakEventList<ToolWindowSelectedEventArgs>();
            this.tabGroupSelectionChanged = new WeakEventList<ToolWindowGroupSelectedEventArgs>();
            this.toolWindowGroupCollectionChanged = new WeakEventList<ToolWindowGroupCollectionChangedEventArgs>();

            this.tabGroupManager.TabSelectionChanged += TabGroupManager_TabSelectionChanged;
            this.tabGroupManager.TabGroupSelectionChanged += TabGroupManager_TabGroupSelectionChanged;
            this.tabGroupManager.TabGroupCollectionChanged += TabGroupManager_TabGroupCollectionChanged;
        }
Example #6
0
 public TabGroupManager(TabManager tabManager, IMenuManager menuManager, IWpfFocusManager wpfFocusManager, TabGroupManagerOptions options)
 {
     this.options = (options ?? new TabGroupManagerOptions()).Clone();
     this.stackedContent = new StackedContent<TabGroup>();
     this.tabSelectionChanged = new WeakEventList<TabSelectedEventArgs>();
     this.tabGroupSelectionChanged = new WeakEventList<TabGroupSelectedEventArgs>();
     this.tabGroupCollectionChanged = new WeakEventList<TabGroupCollectionChangedEventArgs>();
     this.tabManager = tabManager;
     this.menuManager = menuManager;
     this.wpfFocusManager = wpfFocusManager;
     this._activeIndex = -1;
 }
Example #7
0
 public TabGroupService(TabService tabService, IMenuService menuService, IWpfFocusService wpfFocusService, TabGroupServiceOptions options)
 {
     this.options              = (options ?? new TabGroupServiceOptions()).Clone();
     stackedContent            = new StackedContent <TabGroup>();
     tabSelectionChanged       = new WeakEventList <TabSelectedEventArgs>();
     tabGroupSelectionChanged  = new WeakEventList <TabGroupSelectedEventArgs>();
     tabGroupCollectionChanged = new WeakEventList <TabGroupCollectionChangedEventArgs>();
     this.tabService           = tabService;
     this.menuService          = menuService;
     this.wpfFocusService      = wpfFocusService;
     _activeIndex              = -1;
 }
Example #8
0
 public TabGroupManager(TabManager tabManager, IMenuManager menuManager, IWpfFocusManager wpfFocusManager, TabGroupManagerOptions options)
 {
     this.options                   = (options ?? new TabGroupManagerOptions()).Clone();
     this.stackedContent            = new StackedContent <TabGroup>();
     this.tabSelectionChanged       = new WeakEventList <TabSelectedEventArgs>();
     this.tabGroupSelectionChanged  = new WeakEventList <TabGroupSelectedEventArgs>();
     this.tabGroupCollectionChanged = new WeakEventList <TabGroupCollectionChangedEventArgs>();
     this.tabManager                = tabManager;
     this.menuManager               = menuManager;
     this.wpfFocusManager           = wpfFocusManager;
     this._activeIndex              = -1;
 }
Example #9
0
 LanguageManager(LanguageManagerSettingsImpl languageManagerSettings, [ImportMany] ILanguage[] languages, [ImportMany] ILanguageCreator[] creators)
 {
     this.languageManagerSettings = languageManagerSettings;
     var langs = new List<ILanguage>(languages);
     foreach (var creator in creators)
         langs.AddRange(creator.Create());
     if (langs.Count == 0)
         langs.Add(new DummyLanguage());
     this.languages = langs.OrderBy(a => a.OrderUI).ToArray();
     this.selectedLanguage = FindOrDefault(languageManagerSettings.LanguageGuid);
     this.languageChanged = new WeakEventList<EventArgs>();
 }
Example #10
0
 ThemeManager(ThemeSettings themeSettings)
 {
     this.themeSettings     = themeSettings;
     this.themeChanged      = new WeakEventList <ThemeChangedEventArgs>();
     this.earlyThemeChanged = new WeakEventList <ThemeChangedEventArgs>();
     this.themes            = new Dictionary <Guid, Theme>();
     Load();
     Debug.Assert(themes.Count != 0);
     SystemEvents.UserPreferenceChanged += (s, e) => IsHighContrast = SystemParameters.HighContrast;
     IsHighContrast = SystemParameters.HighContrast;
     Initialize(themeSettings.ThemeGuid ?? DefaultThemeGuid);
 }
Example #11
0
 ThemeManager(ThemeSettings themeSettings)
 {
     this.themeSettings = themeSettings;
     this.themeChanged = new WeakEventList<ThemeChangedEventArgs>();
     this.earlyThemeChanged = new WeakEventList<ThemeChangedEventArgs>();
     this.themes = new Dictionary<Guid, Theme>();
     Load();
     Debug.Assert(themes.Count != 0);
     SystemEvents.UserPreferenceChanged += (s, e) => IsHighContrast = SystemParameters.HighContrast;
     IsHighContrast = SystemParameters.HighContrast;
     Initialize(themeSettings.ThemeGuid ?? DefaultThemeGuid);
 }
Example #12
0
 public TabGroup(TabGroupManager tabGroupManager, IMenuManager menuManager, IWpfFocusManager wpfFocusManager, TabGroupManagerOptions options)
 {
     this.options = options;
     this.tabContentAttached = new WeakEventList<TabContentAttachedEventArgs>();
     this.tabGroupManager = tabGroupManager;
     this.wpfFocusManager = wpfFocusManager;
     this.tabControl = new TabControl();
     this.tabControl.DataContext = this;
     tabControl.SetStyle(options.TabControlStyle ?? "FileTabGroupTabControlStyle");
     this.tabControl.SelectionChanged += TabControl_SelectionChanged;
     if (options.InitializeContextMenu != null)
         this.contextMenuCreator = options.InitializeContextMenu(menuManager, this, this.tabControl);
     else if (options.TabGroupGuid != Guid.Empty)
         this.contextMenuCreator = menuManager.InitializeContextMenu(this.tabControl, options.TabGroupGuid, new GuidObjectsCreator(this));
 }
Example #13
0
 AppWindow(ISettingsService settingsService, IDocumentTabService documentTabService, AppToolBar appToolBar, MainWindowControl mainWindowControl, IWpfCommandService wpfCommandService)
 {
     assemblyInformationalVersion = CalculateAssemblyInformationalVersion(GetType().Assembly);
     uiSettings = new UISettings(settingsService);
     uiSettings.Read();
     stackedContent          = new StackedContent <IStackedContentChild>(margin: new Thickness(6));
     this.documentTabService = documentTabService;
     statusBar              = new AppStatusBar();
     this.appToolBar        = appToolBar;
     this.mainWindowControl = mainWindowControl;
     this.wpfCommandService = wpfCommandService;
     mainWindowCommands     = wpfCommandService.GetCommands(ControlConstants.GUID_MAINWINDOW);
     mainWindowClosing      = new WeakEventList <CancelEventArgs>();
     mainWindowClosed       = new WeakEventList <EventArgs>();
 }
Example #14
0
        DecompilerService(DecompilerServiceSettingsImpl decompilerServiceSettings, [ImportMany] IDecompiler[] languages, [ImportMany] IDecompilerCreator[] creators)
        {
            this.decompilerServiceSettings = decompilerServiceSettings;
            var langs = new List <IDecompiler>(languages);

            foreach (var creator in creators)
            {
                langs.AddRange(creator.Create());
            }
            if (langs.Count == 0)
            {
                langs.Add(new DummyDecompiler());
            }
            decompilers       = langs.OrderBy(a => a.OrderUI).ToArray();
            decompiler        = FindOrDefault(decompilerServiceSettings.LanguageGuid);
            decompilerChanged = new WeakEventList <EventArgs>();
        }
Example #15
0
 public TabGroup(TabGroupManager tabGroupManager, IMenuManager menuManager, IWpfFocusManager wpfFocusManager, TabGroupManagerOptions options)
 {
     this.options                = options;
     this.tabContentAttached     = new WeakEventList <TabContentAttachedEventArgs>();
     this.tabGroupManager        = tabGroupManager;
     this.wpfFocusManager        = wpfFocusManager;
     this.tabControl             = new TabControl();
     this.tabControl.DataContext = this;
     tabControl.SetStyle(options.TabControlStyle ?? "FileTabGroupTabControlStyle");
     this.tabControl.SelectionChanged += TabControl_SelectionChanged;
     if (options.InitializeContextMenu != null)
     {
         this.contextMenuCreator = options.InitializeContextMenu(menuManager, this, this.tabControl);
     }
     else if (options.TabGroupGuid != Guid.Empty)
     {
         this.contextMenuCreator = menuManager.InitializeContextMenu(this.tabControl, options.TabGroupGuid, new GuidObjectsCreator(this));
     }
 }
Example #16
0
 public TabGroup(TabGroupService tabGroupService, IMenuService menuService, IWpfFocusService wpfFocusService, TabGroupServiceOptions options)
 {
     this.options                = options;
     this.tabContentAttached     = new WeakEventList <TabContentAttachedEventArgs>();
     this.tabGroupService        = tabGroupService;
     this.wpfFocusService        = wpfFocusService;
     this.tabControl             = new TabControl();
     this.tabControl.DataContext = this;
     this.tabControl.SetStyle(options.TabControlStyle ?? "FileTabGroupTabControlStyle");
     this.tabControl.SelectionChanged += TabControl_SelectionChanged;
     this.tabControl.PreviewKeyDown   += TabControl_PreviewKeyDown;
     if (options.InitializeContextMenu != null)
     {
         this.contextMenuProvider = options.InitializeContextMenu(menuService, this, this.tabControl);
     }
     else if (options.TabGroupGuid != Guid.Empty)
     {
         this.contextMenuProvider = menuService.InitializeContextMenu(this.tabControl, options.TabGroupGuid, new GuidObjectsProvider(this));
     }
 }
Example #17
0
 AppWindow(IThemeManager themeManager, IImageManager imageManager, IAppSettings appSettings, ISettingsManager settingsManager, IFileTabManager fileTabManager, AppToolBar appToolBar, MainWindowControl mainWindowControl, IWpfCommandManager wpfCommandManager, ILanguageManager languageManager)
 {
     this.assemblyInformationalVersion = CalculateAssemblyInformationalVersion(GetType().Assembly);
     this.uiSettings = new UISettings(settingsManager);
     this.uiSettings.Read();
     this.appSettings = appSettings;
     this.stackedContent = new StackedContent<IStackedContentChild>(margin: new Thickness(6));
     this.themeManager = themeManager;
     themeManager.ThemeChanged += ThemeManager_ThemeChanged;
     this.imageManager = imageManager;
     this.fileTabManager = fileTabManager;
     this.statusBar = new AppStatusBar();
     this.appToolBar = appToolBar;
     this.mainWindowControl = mainWindowControl;
     this.wpfCommandManager = wpfCommandManager;
     this.languageManager = languageManager;
     this.mainWindowCommands = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW);
     this.mainWindowClosing = new WeakEventList<CancelEventArgs>();
     this.mainWindowClosed = new WeakEventList<EventArgs>();
     this.appSettings.PropertyChanged += AppSettings_PropertyChanged;
     InitializeTextFormatterProvider();
 }
Example #18
0
		public TabGroupService(TabService tabService, IMenuService menuService, IWpfFocusService wpfFocusService, TabGroupServiceOptions options) {
			this.options = (options ?? new TabGroupServiceOptions()).Clone();
			stackedContent = new StackedContent<TabGroup>();
			tabSelectionChanged = new WeakEventList<TabSelectedEventArgs>();
			tabGroupSelectionChanged = new WeakEventList<TabGroupSelectedEventArgs>();
			tabGroupCollectionChanged = new WeakEventList<TabGroupCollectionChangedEventArgs>();
			this.tabService = tabService;
			this.menuService = menuService;
			this.wpfFocusService = wpfFocusService;
			_activeIndex = -1;
		}
Example #19
0
		public TabGroup(TabGroupService tabGroupService, IMenuService menuService, IWpfFocusService wpfFocusService, TabGroupServiceOptions options) {
			this.options = options;
			tabContentAttached = new WeakEventList<TabContentAttachedEventArgs>();
			this.tabGroupService = tabGroupService;
			this.wpfFocusService = wpfFocusService;
			tabControl = new TabControl();
			tabControl.DataContext = this;
			tabControl.SetStyle(options.TabControlStyle ?? "FileTabGroupTabControlStyle");
			tabControl.SelectionChanged += TabControl_SelectionChanged;
			tabControl.PreviewKeyDown += TabControl_PreviewKeyDown;
			if (options.InitializeContextMenu != null)
				contextMenuProvider = options.InitializeContextMenu(menuService, this, tabControl);
			else if (options.TabGroupGuid != Guid.Empty)
				contextMenuProvider = menuService.InitializeContextMenu(tabControl, options.TabGroupGuid, new GuidObjectsProvider(this));
		}
Example #20
0
		AppWindow(ISettingsService settingsService, IDocumentTabService documentTabService, AppToolBar appToolBar, MainWindowControl mainWindowControl, IWpfCommandService wpfCommandService) {
			assemblyInformationalVersion = CalculateAssemblyInformationalVersion(GetType().Assembly);
			uiSettings = new UISettings(settingsService);
			uiSettings.Read();
			stackedContent = new StackedContent<IStackedContentChild>(margin: new Thickness(6));
			this.documentTabService = documentTabService;
			statusBar = new AppStatusBar();
			this.appToolBar = appToolBar;
			this.mainWindowControl = mainWindowControl;
			this.wpfCommandService = wpfCommandService;
			mainWindowCommands = wpfCommandService.GetCommands(ControlConstants.GUID_MAINWINDOW);
			mainWindowClosing = new WeakEventList<CancelEventArgs>();
			mainWindowClosed = new WeakEventList<EventArgs>();
		}
Example #21
0
 public TextEditorUIContext(IWpfCommandManager wpfCommandManager, ITextEditorUIContextManagerImpl textEditorUIContextManagerImpl)
 {
     this.wpfCommandManager = wpfCommandManager;
     this.textEditorUIContextManagerImpl = textEditorUIContextManagerImpl;
     this.newTextContentEvent = new WeakEventList<EventArgs>();
 }