12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using System;
- using System.Drawing;
- using System.Windows.Forms;
- namespace Optimizer
- {
- public class ColoredCheckBox : CheckBox
- {
- protected override void OnCheckedChanged(EventArgs e)
- {
- base.OnCheckedChanged(e);
- this.Tag = "themeable";
- // custom theming
- if (this.Checked)
- {
- this.Font = new Font(this.Font, FontStyle.Underline);
- switch (Options.CurrentOptions.Color)
- {
- case Theme.Caramel:
- this.ForeColor = Color.DarkOrange;
- break;
- case Theme.Lime:
- this.ForeColor = Color.LimeGreen;
- break;
- case Theme.Magma:
- this.ForeColor = Color.Tomato;
- break;
- case Theme.Minimal:
- this.ForeColor = Color.Gray;
- break;
- case Theme.Ocean:
- this.ForeColor = Color.DodgerBlue;
- break;
- case Theme.Zerg:
- this.ForeColor = Color.MediumOrchid;
- break;
- }
- }
- else
- {
- this.Tag = string.Empty;
- this.ForeColor = Color.White;
- this.Font = new Font(this.Font, FontStyle.Regular);
- }
- }
- }
- }
|