/// <summary> /// Initializes a new instance of the <see cref="CodeToolsMainView"/> class. /// </summary> public CodeToolsMainView() : base(null) { this.Caption = "Coddee tools"; // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable, // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on // the object returned by the Content property. UISynchronizationContext.SetContext(SynchronizationContext.Current); _container = new CoddeeUnityContainer(); _container.RegisterInstance <ILogger, LogAggregator>(); BuilderHelper.RegisterLoggers(new LoggerOptions(LoggerTypes.ApplicationConsole, LogRecordTypes.Debug), _container); var modules = _container.Resolve <ApplicationModulesManager>(); _logger = (LogAggregator)_container.Resolve <ILogger>(); _vsHelper = _container.RegisterInstance <VsHelper, VsHelper>(); _container.RegisterInstance <ISolutionEventsHelper>(_vsHelper); _container.RegisterInstance <ISolutionHelper>(_vsHelper); modules.RegisterModule(CoreModuleDefinitions.Modules); modules.RegisterModule(WindowsModuleDefinitions.Modules); modules.RegisterModule(WPFModuleDefinitions.Modules); modules.InitializeAutoModules().Wait(); Application.Current.Resources.Add("ApplicationAccentColorLighter", new SolidColorBrush((Color)ColorConverter.ConvertFromString("#444F5A"))); Application.Current.Resources.Add("ApplicationAccentColor", new SolidColorBrush((Color)ColorConverter.ConvertFromString("#283645"))); Application.Current.Resources.Add("ApplicationAccentColorDarker", new SolidColorBrush((Color)ColorConverter.ConvertFromString("#151824"))); }
/// <inheritdoc /> public override void Start() { _systemApplication.Dispatcher.Invoke(() => { UISynchronizationContext.SetContext(SynchronizationContext.Current); }); base.Start(); }