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; }
void BroadsMessagesEvents_AfterMessageBroadcast(object sender, BroadcastMessagesEventsHandler.MessageBroadcastEventArgs e) { SafeExecute(() => { if (e.Msg == WM.THEMECHANGED || e.Msg == WM.SYSCOLORCHANGE) { if (AfterVisualStudioThemeChanged != null) AfterVisualStudioThemeChanged(this, EventArgs.Empty); } }); }