public override void SetTheme(GeneralTheme theme = null) { if (theme == null) { theme = new GeneralTheme(); } base.SetTheme(theme); if (ConfigManager.Config.Theme == ThemeManager.ThemeCore.Theme.Dark) { btn_smartCompSettings.BackgroundImage = CachedResourceManager.LoadResource <Bitmap>("gear_1077563_white_with_bigger_border_512x512"); btn_delete.BackgroundImage = CachedResourceManager.LoadResource <Bitmap>("bin_bigger_border_white"); btn_editSynonymsFront.BackgroundImage = CachedResourceManager.LoadResource <Bitmap>("edit_synonyms_bigger_border_white"); btn_editSynonymsBack.BackgroundImage = CachedResourceManager.LoadResource <Bitmap>("edit_synonyms_bigger_border_white"); } else { btn_smartCompSettings.BackgroundImage = CachedResourceManager.LoadResource <Bitmap>("gear_1077563_black_with_bigger_border_512x512"); btn_delete.BackgroundImage = CachedResourceManager.LoadResource <Bitmap>("bin_bigger_border_black"); btn_editSynonymsFront.BackgroundImage = CachedResourceManager.LoadResource <Bitmap>("edit_synonyms_bigger_border_black"); btn_editSynonymsBack.BackgroundImage = CachedResourceManager.LoadResource <Bitmap>("edit_synonyms_bigger_border_black"); } lbl_ansCompRules.ForeColor = theme.GetBackgroundLabelForeColor(); chk_smartComp.ForeColor = theme.GetBackgroundLabelForeColor(); }
public override void SetTheme(GeneralTheme theme) { base.SetTheme(theme); var bc = WelcomeTheme.GetBackColor(); BackColor = Color.FromArgb(bc.A, bc.R - 10, bc.G - 10, bc.B - 10); lbl_name.BackColor = BackColor; ForeColor = WelcomeTheme.GetBackColor(); }
public override void SetTheme(GeneralTheme theme = null) { base.SetTheme(); BackColor = PreferencesTheme.GetPrefCatPanelBackColor(); if (backButton != null) { backButton.BackColor = PreferencesTheme.GetPrefCatPanelBackColor(); } }
public override void SetTheme(GeneralTheme theme = null) { base.SetTheme(theme); if (ConfigManager.Config.Theme == ThemeManager.ThemeCore.Theme.Dark) { lbl_example.ForeColor = Color.Gainsboro; } else { lbl_example.ForeColor = Color.DimGray; } }
public override void SetTheme(GeneralTheme theme = null) { base.SetTheme(theme); if (ConfigManager.Config.Theme == ThemeManager.ThemeCore.Theme.Dark) { lbl_certainty.ForeColor = Color.MediumSpringGreen; } else { lbl_certainty.ForeColor = Color.DarkGreen; } }
public override void SetTheme(GeneralTheme theme = null) { if (theme == null || theme.GetType() != typeof(WelcomeTheme)) { theme = new WelcomeTheme(); } var lbl_learningProgress_bar_color = lbl_learningProgress_bar.ForeColor; base.SetTheme(theme); lbl_learningProgress_bar.ForeColor = lbl_learningProgress_bar_color; RecolorCards(); }
public override void SetTheme(GeneralTheme theme = null) { if (theme == null || theme.GetType() != typeof(WelcomeTheme)) { theme = new WelcomeTheme(); } var lbl_learningProgress_bar_color = lbl_learningProgress_bar.ForeColor; var bc = BackColor; base.SetTheme(theme); // Revert backcolor (it's handled in QuizProgressInfo) BackColor = bc; // Revert learning progress bar color (it should not be changed) lbl_learningProgress_bar.ForeColor = lbl_learningProgress_bar_color; }
public override void SetTheme(GeneralTheme theme) { base.SetTheme(theme); lbl_intelligentLearning.ForeColor = GeneralTheme.GetBackgroundLabelForeColor(); lbl_progress.ForeColor = GeneralTheme.GetBackgroundLabelForeColor(); lbl_learningProgress.ForeColor = GeneralTheme.GetBackgroundLabelForeColor(); lbl_cardQuestionSideType.ForeColor = GeneralTheme.GetBackgroundLabelForeColor(); lbl_cardAnswerSideType.ForeColor = GeneralTheme.GetBackgroundLabelForeColor(); btn_knewAnswerYES.BackColor = Color.Green; btn_knewAnswerNO.BackColor = Color.Maroon; if (ConfigManager.Config.Theme == ThemeManager.ThemeCore.Theme.Dark) { btn_cfg.BackgroundImage = Properties.Resources.gear_1077563_white_with_bigger_border_512x512; llb_overrideIwasRight.LinkColor = Color.Aqua; } else { btn_cfg.BackgroundImage = Properties.Resources.gear_1077563_black_with_bigger_border_512x512; llb_overrideIwasRight.LinkColor = Color.FromArgb(0, 0, 255); } }
public virtual void SetTheme(GeneralTheme theme = null) { AutoTheme.AutoSetTheme(this, theme); }
public override void SetTheme(GeneralTheme theme = null) { base.SetTheme(theme); lbl_wrong.ForeColor = Color.Red; }
public override void SetTheme(GeneralTheme theme) { base.SetTheme(); pnl_prefCategories.BackColor = PreferencesTheme.GetPrefCatPanelBackColor(); }
public static void AutoSetTheme(Control control, GeneralTheme theme = null) { if (theme == null) { theme = new GeneralTheme(); } control.BackColor = theme.GetBackColor(); foreach (var btn in control.GetAllChildrenRecursive(typeof(Button))) { btn.BackColor = theme.GetButtonBackColor(); btn.ForeColor = theme.GetButtonForeColor(); } foreach (var lbl in control.GetAllChildrenRecursive(typeof(Label))) { lbl.ForeColor = theme.GetMainLabelForeColor(); } foreach (LinkLabel llb in control.GetAllChildrenRecursive(typeof(LinkLabel))) { llb.LinkColor = theme.GetMainLinkLabelLinkColor(); } foreach (var chk in control.GetAllChildrenRecursive(typeof(CheckBox))) { chk.ForeColor = theme.GetMainLabelForeColor(); } foreach (var rdo in control.GetAllChildrenRecursive(typeof(RadioButton))) { rdo.ForeColor = theme.GetMainLabelForeColor(); } foreach (var pnl in control.GetAllChildrenRecursive(typeof(Panel))) { pnl.BackColor = theme.GetBackColor(); } foreach (var flp in control.GetAllChildrenRecursive(typeof(FlowLayoutPanel))) { flp.BackColor = theme.GetBackColor(); } foreach (var lst in control.GetAllChildrenRecursive(typeof(ListBox))) { lst.BackColor = theme.GetBackColor(); lst.ForeColor = theme.GetMainLabelForeColor(); } foreach (var txt in control.GetAllChildrenRecursive(typeof(TextBox))) { txt.BackColor = theme.GetTextBoxBackColor(); txt.ForeColor = theme.GetTextBoxForeColor(); } foreach (var nud in control.GetAllChildrenRecursive(typeof(NumericUpDown))) { nud.BackColor = theme.GetTextBoxBackColor(); nud.ForeColor = theme.GetTextBoxForeColor(); } foreach (var rtf in control.GetAllChildrenRecursive(typeof(RichTextBox))) { rtf.BackColor = theme.GetTextBoxBackColor(); rtf.ForeColor = theme.GetTextBoxForeColor(); } foreach (var cmb in control.GetAllChildrenRecursive(typeof(ComboBox))) { cmb.BackColor = theme.GetTextBoxBackColor(); cmb.ForeColor = theme.GetTextBoxForeColor(); } foreach (var mns in control.GetAllChildrenRecursive(typeof(MenuStrip))) { mns.ForeColor = theme.GetMainLabelForeColor(); mns.BackColor = theme.GetBackColor(); foreach (var tsmi in ((MenuStrip)mns).Items) { ((ToolStripMenuItem)tsmi).ForeColor = theme.GetMainLabelForeColor(); } } foreach (var a in control.GetAllChildrenRecursiveDerives(typeof(AutoThemeableUserControl)).Cast <AutoThemeableUserControl>()) { a.SetTheme(); } }