Exemplo n.º 1
0
        private void SetColors()
        {
            var backViewColor = _colorThemeManager.CreateLiveColor(_lifetime, ThemeColor.ToolWindowBackground);

            backViewColor.ForEachValue(_lifetime, (lt, color) => _viewControl.BackColor = color.GDIColor);

            var foreViewColor = _colorThemeManager.CreateLiveColor(_lifetime, ThemeColor.ToolWindowForeground);

            foreViewColor.ForEachValue(_lifetime, (lt, color) => _viewControl.ForeColor = color.GDIColor);

            var backControlColor = _colorThemeManager.CreateLiveColor(_lifetime, ThemeColor.ToolWindowBackground);

            backControlColor.ForEachValue(_lifetime, (lt, color) => _containerControl.BackColor = color.GDIColor);

            var foreControlColor = _colorThemeManager.CreateLiveColor(_lifetime, ThemeColor.ToolWindowForeground);

            foreControlColor.ForEachValue(_lifetime, (lt, color) => _containerControl.ForeColor = color.GDIColor);

            var buttonBackColor = _colorThemeManager.CreateLiveColor(_lifetime, ThemeColor.TabStripButtonBackground);

            buttonBackColor.ForEachValue(_lifetime, (lt, color) => _buttonNext.BackColor = color.GDIColor);

            var buttonForeColor = _colorThemeManager.CreateLiveColor(_lifetime, ThemeColor.TabStripButtonForeground);

            buttonForeColor.ForEachValue(_lifetime, (lt, color) => _buttonNext.ForeColor = color.GDIColor);
        }
Exemplo n.º 2
0
        public UiThemeViewModel(Lifetime lifetime, IColorThemeManager colorThemeManager)
        {
            BackgroundColor = new Property <SolidColorBrush>(lifetime, "UiThemeViewModel.BackgroundColor")
            {
                Value = new SolidColorBrush()
            };
            TextColor = new Property <SolidColorBrush>(lifetime, "UiThemeViewModel.TextColor")
            {
                Value = new SolidColorBrush()
            };

            var bgColor = colorThemeManager.CreateLiveColor(lifetime, ThemeColor.ToolWindowBackground);

            bgColor.ForEachValue(lifetime, (lt, color) => { BackgroundColor.Value.Color = color.WpfColor; });

            var txtColor = colorThemeManager.CreateLiveColor(lifetime, ThemeColor.ToolWindowForeground);

            txtColor.ForEachValue(lifetime, (lt, color) => { TextColor.Value.Color = color.WpfColor; });
        }
Exemplo n.º 3
0
        private void SetColors()
        {
            var backViewColor = _colorThemeManager.CreateLiveColor(_tutorialLifetime, ThemeColor.ToolWindowBackground);

            backViewColor.ForEachValue(_tutorialLifetime, (lt, color) => _viewControl.BackColor = color.GDIColor);

            var foreViewColor = _colorThemeManager.CreateLiveColor(_tutorialLifetime, ThemeColor.ToolWindowForeground);

            foreViewColor.ForEachValue(_tutorialLifetime, (lt, color) => _viewControl.ForeColor = color.GDIColor);

            var backControlColor =
                _colorThemeManager.CreateLiveColor(_tutorialLifetime, ThemeColor.ToolWindowBackground);

            backControlColor.ForEachValue(_tutorialLifetime,
                                          (lt, color) => _containerControl.BackColor = color.GDIColor);

            var foreControlColor =
                _colorThemeManager.CreateLiveColor(_tutorialLifetime, ThemeColor.ToolWindowForeground);

            foreControlColor.ForEachValue(_tutorialLifetime,
                                          (lt, color) => _containerControl.ForeColor = color.GDIColor);
        }