Example #1
0
        public void ResetTheme()
        {
            // Don't allow the theme to reset if it is managed
            if (_ManagedTheme == null)
            {
                return;
            }

            Theme = null;
        }
Example #2
0
 public void SetTheme(ControlTheme theme)
 {
     if (theme != this.Theme)
     {
         this.Theme = theme as LabelTheme;
     }
     else
     if (this.Theme != null)
     {
         ApplyThemeColors(this.Theme);
     }
     else
     {
         RestoreDefaultColors();
     }
 }
Example #3
0
 private void InitializeComponent()
 {
     this.buttonTheme1        = new WillowTree.CustomControls.ButtonTheme();
     this.Button              = new WillowTree.CustomControls.ButtonTheme();
     this.checkBoxTheme1      = new WillowTree.CustomControls.CheckBoxTheme();
     this.checkBoxTheme2      = new WillowTree.CustomControls.CheckBoxTheme();
     this.comboBoxTheme1      = new WillowTree.CustomControls.ComboBoxTheme();
     this.comboBoxTheme2      = new WillowTree.CustomControls.ComboBoxTheme();
     this.groupBoxTheme1      = new WillowTree.CustomControls.GroupBoxTheme();
     this.groupBoxTheme2      = new WillowTree.CustomControls.GroupBoxTheme();
     this.labelTheme1         = new WillowTree.CustomControls.LabelTheme();
     this.labelTheme2         = new WillowTree.CustomControls.LabelTheme();
     this.listBoxTheme1       = new WillowTree.CustomControls.ListBoxTheme();
     this.listBoxTheme2       = new WillowTree.CustomControls.ListBoxTheme();
     this.menuStripTheme1     = new WillowTree.CustomControls.MenuStripTheme();
     this.menuStripTheme2     = new WillowTree.CustomControls.MenuStripTheme();
     this.numericUpDownTheme1 = new WillowTree.CustomControls.NumericUpDownTheme();
     this.numericUpDownTheme2 = new WillowTree.CustomControls.NumericUpDownTheme();
     this.slideSelectorTheme1 = new WillowTree.CustomControls.SlideSelectorTheme();
     this.slideSelectorTheme2 = new WillowTree.CustomControls.SlideSelectorTheme();
     this.tabTheme1           = new WillowTree.CustomControls.TabControlTheme();
     this.tabTheme2           = new WillowTree.CustomControls.TabControlTheme();
     this.textBoxTheme1       = new WillowTree.CustomControls.TextBoxTheme();
     this.textBoxTheme2       = new WillowTree.CustomControls.TextBoxTheme();
     this.treeViewTheme1      = new WillowTree.CustomControls.TreeViewTheme();
     this.treeViewTheme2      = new WillowTree.CustomControls.TreeViewTheme();
     //
     // checkBoxTheme1
     //
     this.checkBoxTheme1.BackColor = System.Drawing.Color.Empty;
     this.checkBoxTheme1.ForeColor = System.Drawing.Color.Empty;
     //
     // checkBoxTheme2
     //
     this.checkBoxTheme2.BackColor = System.Drawing.Color.Transparent;
     //
     // comboBoxTheme1
     //
     this.comboBoxTheme1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
     this.comboBoxTheme1.ForeColor = System.Drawing.Color.White;
     //
     // comboBoxTheme2
     //
     this.comboBoxTheme2.BackColor = System.Drawing.Color.Empty;
     this.comboBoxTheme2.ForeColor = System.Drawing.Color.Empty;
     //
     // groupBoxTheme1
     //
     this.groupBoxTheme1.ForeColor     = System.Drawing.Color.White;
     this.groupBoxTheme1.GradientColor = System.Drawing.Color.AliceBlue;
     this.groupBoxTheme1.LineColor     = System.Drawing.Color.Black;
     this.groupBoxTheme1.PanelColor    = System.Drawing.Color.SlateGray;
     //
     // labelTheme1
     //
     this.labelTheme1.ForeColor = System.Drawing.Color.White;
     //
     // labelTheme2
     //
     this.labelTheme2.ForeColor = System.Drawing.Color.Empty;
     //
     // listBoxTheme1
     //
     this.listBoxTheme1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
     this.listBoxTheme1.ForeColor = System.Drawing.Color.White;
     //
     // listBoxTheme2
     //
     this.listBoxTheme2.BackColor = System.Drawing.Color.Empty;
     this.listBoxTheme2.ForeColor = System.Drawing.Color.Empty;
     //
     // menuStripTheme1
     //
     this.menuStripTheme1.BackColor = System.Drawing.Color.Transparent;
     //
     // numericUpDownTheme1
     //
     this.numericUpDownTheme1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
     this.numericUpDownTheme1.ForeColor = System.Drawing.Color.White;
     //
     // slideSelectorTheme1
     //
     this.slideSelectorTheme1.TextBoxBackColor = System.Drawing.Color.Empty;
     //
     // slideSelectorTheme2
     //
     this.slideSelectorTheme2.BackColor        = System.Drawing.Color.Empty;
     this.slideSelectorTheme2.ForeColor        = System.Drawing.Color.Empty;
     this.slideSelectorTheme2.TextBoxBackColor = System.Drawing.Color.Empty;
     //
     // tabTheme1
     //
     this.tabTheme1.ForeColor             = System.Drawing.Color.White;
     this.tabTheme1.SelectedGradientColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
     this.tabTheme1.SelectedTextColor     = System.Drawing.SystemColors.ControlText;
     //
     // tabTheme2
     //
     this.tabTheme2.BackColor             = System.Drawing.Color.Empty;
     this.tabTheme2.DisabledTextColor     = System.Drawing.Color.Empty;
     this.tabTheme2.ForeColor             = System.Drawing.Color.Empty;
     this.tabTheme2.LineColor             = System.Drawing.Color.Empty;
     this.tabTheme2.PanelColor            = System.Drawing.Color.Empty;
     this.tabTheme2.PanelGradientColor    = System.Drawing.Color.Empty;
     this.tabTheme2.PanelTextColor        = System.Drawing.Color.Empty;
     this.tabTheme2.SelectedColor         = System.Drawing.Color.Empty;
     this.tabTheme2.SelectedGradientColor = System.Drawing.Color.Empty;
     this.tabTheme2.SelectedTextColor     = System.Drawing.Color.Empty;
     //
     // textBoxTheme1
     //
     this.textBoxTheme1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
     this.textBoxTheme1.ForeColor = System.Drawing.Color.White;
     //
     // treeViewTheme1
     //
     this.treeViewTheme1.BackColor          = System.Drawing.Color.Black;
     this.treeViewTheme1.DisabledForeColor  = System.Drawing.Color.White;
     this.treeViewTheme1.ForeColor          = System.Drawing.Color.White;
     this.treeViewTheme1.HighlightBackColor = System.Drawing.Color.PaleGoldenrod;
     this.treeViewTheme1.HighlightForeColor = System.Drawing.Color.Black;
     this.treeViewTheme1.InactiveBackColor  = System.Drawing.Color.Gray;
     this.treeViewTheme1.InactiveForeColor  = System.Drawing.Color.LightGray;
     //
     // treeViewTheme2
     //
     this.treeViewTheme2.DisabledForeColor = System.Drawing.SystemColors.ControlText;
 }
Example #4
0
 public void ApplyThemeColors(LabelTheme theme)
 {
     this.Font      = theme.Font;
     this.ForeColor = theme.ForeColor;
     this.BackColor = theme.BackColor;
 }
 private void InitializeComponent()
 {
     this.buttonTheme1        = new CustomControls.ButtonTheme();
     this.checkBoxTheme1      = new CustomControls.CheckBoxTheme();
     this.comboBoxTheme1      = new CustomControls.ComboBoxTheme();
     this.groupBoxTheme1      = new CustomControls.GroupBoxTheme();
     this.labelTheme1         = new CustomControls.LabelTheme();
     this.listBoxTheme1       = new CustomControls.ListBoxTheme();
     this.numericUpDownTheme1 = new CustomControls.NumericUpDownTheme();
     this.slideSelectorTheme1 = new CustomControls.SlideSelectorTheme();
     this.tabTheme1           = new CustomControls.TabControlTheme();
     this.textBoxTheme1       = new CustomControls.TextBoxTheme();
     this.treeViewTheme1      = new CustomControls.TreeViewTheme();
     //
     // buttonTheme1
     //
     this.buttonTheme1.BackColor = System.Drawing.Color.Empty;
     this.buttonTheme1.Font      = null;
     this.buttonTheme1.ForeColor = System.Drawing.Color.Empty;
     //
     // checkBoxTheme1
     //
     this.checkBoxTheme1.BackColor = System.Drawing.Color.Empty;
     this.checkBoxTheme1.Font      = null;
     this.checkBoxTheme1.ForeColor = System.Drawing.Color.Empty;
     //
     // comboBoxTheme1
     //
     this.comboBoxTheme1.BackColor = System.Drawing.Color.Empty;
     this.comboBoxTheme1.Font      = null;
     this.comboBoxTheme1.ForeColor = System.Drawing.Color.Empty;
     //
     // groupBoxTheme1
     //
     this.groupBoxTheme1.BackColor     = System.Drawing.Color.Empty;
     this.groupBoxTheme1.LineColor     = System.Drawing.Color.Empty;
     this.groupBoxTheme1.Font          = null;
     this.groupBoxTheme1.ForeColor     = System.Drawing.Color.Empty;
     this.groupBoxTheme1.GradientColor = System.Drawing.Color.Empty;
     this.groupBoxTheme1.PanelColor    = System.Drawing.Color.Empty;
     //
     // labelTheme1
     //
     this.labelTheme1.BackColor = System.Drawing.Color.Empty;
     this.labelTheme1.Font      = null;
     this.labelTheme1.ForeColor = System.Drawing.Color.Empty;
     //
     // listBoxTheme1
     //
     this.listBoxTheme1.BackColor = System.Drawing.Color.Empty;
     this.listBoxTheme1.Font      = null;
     this.listBoxTheme1.ForeColor = System.Drawing.Color.Empty;
     //
     // numericUpDownTheme1
     //
     this.numericUpDownTheme1.BackColor = System.Drawing.Color.Empty;
     this.numericUpDownTheme1.Font      = null;
     this.numericUpDownTheme1.ForeColor = System.Drawing.Color.Empty;
     //
     // slideSelectorTheme1
     //
     this.slideSelectorTheme1.BackColor = System.Drawing.Color.Empty;
     this.slideSelectorTheme1.Font      = null;
     this.slideSelectorTheme1.ForeColor = System.Drawing.Color.Empty;
     //
     // tabTheme1
     //
     this.tabTheme1.BackColor         = System.Drawing.Color.Empty;
     this.tabTheme1.DisabledTextColor = System.Drawing.Color.Empty;
     this.tabTheme1.Font                  = null;
     this.tabTheme1.ForeColor             = System.Drawing.Color.Empty;
     this.tabTheme1.PanelGradientColor    = System.Drawing.Color.Empty;
     this.tabTheme1.LineColor             = System.Drawing.Color.Empty;
     this.tabTheme1.SelectedGradientColor = System.Drawing.Color.Empty;
     this.tabTheme1.PanelTextColor        = System.Drawing.Color.Empty;
     this.tabTheme1.PanelColor            = System.Drawing.Color.Empty;
     this.tabTheme1.SelectedColor         = System.Drawing.Color.Empty;
     this.tabTheme1.SelectedTextColor     = System.Drawing.Color.Empty;
     //
     // textBoxTheme1
     //
     this.textBoxTheme1.BackColor = System.Drawing.Color.Empty;
     this.textBoxTheme1.Font      = null;
     this.textBoxTheme1.ForeColor = System.Drawing.Color.Empty;
     //
     // treeViewTheme1
     //
     this.treeViewTheme1.BackColor         = System.Drawing.Color.Black;
     this.treeViewTheme1.DisabledForeColor = System.Drawing.SystemColors.ControlText;
     this.treeViewTheme1.Font      = null;
     this.treeViewTheme1.ForeColor = System.Drawing.Color.White;
 }