Example #1
0
        private void ApplyColorTheme(string themeid)
        {
            MyColorTheme th = null;

            colorThemeId = themeid;
            switch (themeid)
            {
            case "system":
                th = ColorThemeHelper.ColorTheme_System;
                break;

            case "dark1":
                th = ColorThemeHelper.ColorTheme_Dark1;
                break;

            case "green":
                th = ColorThemeHelper.ColorTheme_Green;
                break;

            case "blackonwhite":
                th = ColorThemeHelper.ColorTheme_BlackOnWhite;
                break;
            }
            this.SetColorTheme(th);
            this.Refresh();
        }
Example #2
0
        public void ApplyColorTheme(MyColorTheme mycolortheme)
        {
            this.ForeColor = mycolortheme.GetColor(this.ForeColor, mycolortheme.ControlTextColor);
            this.BackColor = mycolortheme.GetColor(this.BackColor, mycolortheme.ControlColor);
            Color wc = mycolortheme.WindowColor;
            Color gc = mycolortheme.ControlColorDark;

            gridViewModel.SetColors(this.ForeColor, this.BackColor, wc, gc);
            Refresh();
        }
Example #3
0
        public void ApplyColorTheme(MyColorTheme mycolortheme)
        {
            this.ForeColor = mycolortheme.GetColor(this.ForeColor, mycolortheme.ControlTextColor);
            this.BackColor = mycolortheme.GetColor(this.BackColor, mycolortheme.ControlColor);
            Color wc = mycolortheme.WindowColor;
            Color gc = mycolortheme.ControlColorDark;

            gridViewModel.SetColors(this.ForeColor, this.BackColor, wc, gc);
            foreach (var lc in LinkedControls)
            {
                if (FindForm().Contains(lc.Control))
                {
                    continue;
                }
                ColorThemeHelper.ApplyToControl(lc, mycolortheme);
            }
            Refresh();
        }