public void ApplyTheme() { ThemeUtils.ApplyColors(ThemeUtils.ActiveBackColor, ThemeUtils.ActiveForeColor, this); // Applay colors to controls ThemeUtils.ApplyColors(ThemeUtils.SpecialBackColor, ThemeUtils.SpecialForeColor, panelButton, labelColor, labelCalibrationButton, labelStart, this.contextLabelColor, this.contextLabelStop, this.labelCalibration, this.labelCalibrationButton, panelTemperatute, labelMin, labelMax, labelAverage, m_labelMin, m_labelMax, m_labelAverage); pbxArrowWhitePB.Visible = (ThemeUtils.CurrentTheme.Equals("Dark")) ? true : false; pbxArrowWhitePT.Visible = (ThemeUtils.CurrentTheme.Equals("Dark")) ? true : false; pbxArrowBlackPB.Visible = (ThemeUtils.CurrentTheme.Equals("Dark")) ? false : true; pbxArrowBlackPT.Visible = (ThemeUtils.CurrentTheme.Equals("Dark")) ? false : true; }
public void ApplyTheme() { ThemeUtils.ApplyColors(ThemeUtils.ActiveBackColor, ThemeUtils.ActiveForeColor, this); foreach (Control control in this.Controls) { if (control is CItemsUpDown) { ((CItemsUpDown)control).BackColor = ThemeUtils.ActiveBackColor; ((CItemsUpDown)control).ForeColor = ThemeUtils.ActiveForeColor; } if (control is Label || control is Button) { control.BackColor = ThemeUtils.ActiveBackColor; control.ForeColor = ThemeUtils.ActiveForeColor; } if (control is CNumericUpDown) { ((CNumericUpDown)control).BackColor = ThemeUtils.ActiveBackColor; ((CNumericUpDown)control).ForeColor = ThemeUtils.ActiveForeColor; } } ThemeUtils.ApplyColors(ThemeUtils.SpecialBackColor, ThemeUtils.SpecialForeColor); }
public void ApplyTheme() { ThemeUtils.ApplyColors(ThemeUtils.ActiveBackColor, ThemeUtils.ActiveForeColor); ThemeUtils.ApplyColors(ThemeUtils.ActiveBackColor, ThemeUtils.ActiveForeColor); m_txtHelp.BackColor = Color.White; }