public VisualStudioEventsService(IVscUIService uiService, IServiceProvider serviceProvider)
        {
            this.UIService = uiService;
            this.ServiceProvider = serviceProvider;

            VsShellPropertyEvents = new VsShellPropertyEventsHandler(serviceProvider);
            VsShellPropertyEvents.AfterShellPropertyChanged += VsShellPropertyEvents_AfterShellPropertyChanged;

            BroadsMessagesEvents = new BroadcastMessagesEventsHandler(serviceProvider);
            BroadsMessagesEvents.AfterMessageBroadcast += BroadsMessagesEvents_AfterMessageBroadcast;
        }
        public VisualStudioEventsService(
            IVscUIService uiService,
            IServiceProvider serviceProvider,
            IClassificationFormatMapService classificationFormatMapService)
        {
            this.UIService       = uiService;
            this.ServiceProvider = serviceProvider;
            this.ClassificationFormatMapService = classificationFormatMapService;

            TextClassificationFormatMap = ClassificationFormatMapService.GetClassificationFormatMap("text");
            TextClassificationFormatMap.ClassificationFormatMappingChanged += (s, e) => RaiseAfterTextColorSettingsChanged();

            VsShellPropertyEvents = new VsShellPropertyEventsHandler(serviceProvider);
            VsShellPropertyEvents.AfterShellPropertyChanged += VsShellPropertyEvents_AfterShellPropertyChanged;

            BroadsMessagesEvents = new BroadcastMessagesEventsHandler(serviceProvider);
            BroadsMessagesEvents.AfterMessageBroadcast += BroadsMessagesEvents_AfterMessageBroadcast;
        }
        public VisualStudioEventsService(
            IVscUIService uiService, 
            IServiceProvider serviceProvider, 
            IClassificationFormatMapService classificationFormatMapService)
        {
            this.UIService = uiService;
            this.ServiceProvider = serviceProvider;
            this.ClassificationFormatMapService = classificationFormatMapService;

            TextClassificationFormatMap = ClassificationFormatMapService.GetClassificationFormatMap("text");
            TextClassificationFormatMap.ClassificationFormatMappingChanged += (s, e) => RaiseAfterTextColorSettingsChanged();

            VsShellPropertyEvents = new VsShellPropertyEventsHandler(serviceProvider);
            VsShellPropertyEvents.AfterShellPropertyChanged += VsShellPropertyEvents_AfterShellPropertyChanged;

            BroadsMessagesEvents = new BroadcastMessagesEventsHandler(serviceProvider);
            BroadsMessagesEvents.AfterMessageBroadcast += BroadsMessagesEvents_AfterMessageBroadcast;
        }
示例#4
0
        void InitializeUserInterface(IUnityContainer container, IVscUIService uiService)
        {
            var resources = new SquaredInfinity.Foundation.Presentation.XamlResources();

            resources.LoadAndMergeResources();

            //# Initialize UI using MEF

            var applicationCatalog   = new DirectoryCatalog(StaticSettings.VSCommandsAssembliesDirectory.FullName, "SquaredInfinity.VSCommands.*.dll");
            var compositionContainer = new CompositionContainer(applicationCatalog);

            compositionContainer.Compose(new CompositionBatch());

            //# Import Xaml Resources
            ResourcesManager.ImportAndLoadAllResources(compositionContainer);

            uiService.ShowDialog(new AttachToView());
        }
        public SolutionBadgesService(
            IVscUIService uiService,
            IVscSettingsService settingsService, 
            IVisualStudioEventsService visualStudioEventsService,
            IServiceProvider serviceProvider)
        {
            this.UIService = uiService;
            this.SettingsService = settingsService;
            this.VisualStudioEventsService = visualStudioEventsService;
            this.ServiceProvider = serviceProvider;

            VisualStudioEventsService.AfterSolutionOpened += (s, e) => RequestRefresh();
            VisualStudioEventsService.AfterSolutionClosed += (s, e) => RequestRefresh();
            VisualStudioEventsService.AfterActiveDocumentChanged += (s, e) => RequestRefresh();
            VisualStudioEventsService.AfterActiveSolutionConfigChanged += (s, e) => RequestRefresh();
            VisualStudioEventsService.AfterDebuggerEnterRunMode += (s, e) => RequestRefresh();
            VisualStudioEventsService.AfterDebuggerEnterDesignMode += (s, e) => RequestRefresh();
            VisualStudioEventsService.AfterDebuggerEnterBreakMode += (s, e) => RequestRefresh();

            VisualStudioEventsService.RegisterVisualStudioUILoadedAction(InitializeWin32Hooks);
            VisualStudioEventsService.RegisterVisualStudioUILoadedAction(CollectThemeInfo);

            visualStudioEventsService.AfterVisualStudioThemeChanged += VisualStudioEventsService_AfterVisualStudioThemeChanged;
        }
        public SolutionBadgesService(
            IVscUIService uiService,
            IVscSettingsService settingsService,
            IVisualStudioEventsService visualStudioEventsService,
            IServiceProvider serviceProvider)
        {
            this.UIService                 = uiService;
            this.SettingsService           = settingsService;
            this.VisualStudioEventsService = visualStudioEventsService;
            this.ServiceProvider           = serviceProvider;

            VisualStudioEventsService.AfterSolutionOpened              += (s, e) => RequestRefresh();
            VisualStudioEventsService.AfterSolutionClosed              += (s, e) => RequestRefresh();
            VisualStudioEventsService.AfterActiveDocumentChanged       += (s, e) => RequestRefresh();
            VisualStudioEventsService.AfterActiveSolutionConfigChanged += (s, e) => RequestRefresh();
            VisualStudioEventsService.AfterDebuggerEnterRunMode        += (s, e) => RequestRefresh();
            VisualStudioEventsService.AfterDebuggerEnterDesignMode     += (s, e) => RequestRefresh();
            VisualStudioEventsService.AfterDebuggerEnterBreakMode      += (s, e) => RequestRefresh();

            VisualStudioEventsService.RegisterVisualStudioUILoadedAction(InitializeWin32Hooks);
            VisualStudioEventsService.RegisterVisualStudioUILoadedAction(CollectThemeInfo);

            visualStudioEventsService.AfterVisualStudioThemeChanged += VisualStudioEventsService_AfterVisualStudioThemeChanged;
        }
示例#7
0
        void InitializeUserInterface(IUnityContainer container, IVscUIService uiService)
        {
            var resources = new SquaredInfinity.Foundation.Presentation.XamlResources();
            resources.LoadAndMergeResources();

            //# Initialize UI using MEF

            var applicationCatalog = new DirectoryCatalog(StaticSettings.VSCommandsAssembliesDirectory.FullName, "SquaredInfinity.VSCommands.*.dll");
            var compositionContainer = new CompositionContainer(applicationCatalog);
            compositionContainer.Compose(new CompositionBatch());

            //# Import Xaml Resources
            ResourcesManager.ImportAndLoadAllResources(compositionContainer);

            uiService.ShowDialog(new AttachToView());
        }