Exemple #1
0
 public void StartListening()
 {
     _observable = _eventAggregator.GetEvent <ConnectionChangedEvent>().Subscribe(ConnectionChanged);
     _themeObs   = Observable
                   .FromEvent <ThemeChangedEventHandler, ThemeChangedEventArgs>(handler => VSColorTheme.ThemeChanged += handler, handler => VSColorTheme.ThemeChanged -= handler)
                   .Subscribe(args =>
     {
         CurrentTheme = ConvertToTheme(VSHelpers.DetectTheme());
         _eventAggregator.Publish(new ThemeChangedEvent(CurrentTheme));
     });
 }
        private void SetIsDark()
        {
            var theme = VSHelpers.DetectTheme();

            isDark = theme == "Dark";
        }