From 443d33870a11e958d865ff54580a3eed5550eed1 Mon Sep 17 00:00:00 2001 From: solalem Date: Thu, 30 Jan 2020 20:02:32 +0300 Subject: [PATCH] Theme support added --- DarkUI/Config/Colors.cs | 147 +++------- DarkUI/Config/Consts.cs | 2 +- DarkUI/Config/DarkTheme.cs | 47 ++++ DarkUI/Config/ITheme.cs | 11 + DarkUI/Config/LightTheme.cs | 47 ++++ DarkUI/Config/Sizes.cs | 18 ++ DarkUI/Config/ThemeProvider.cs | 21 ++ DarkUI/Controls/DarkButton.cs | 26 +- DarkUI/Controls/DarkCheckBox.cs | 28 +- DarkUI/Controls/DarkComboBox.cs | 18 +- DarkUI/Controls/DarkDropdownList.cs | 20 +- DarkUI/Controls/DarkGroupBox.cs | 10 +- DarkUI/Controls/DarkLabel.cs | 2 +- DarkUI/Controls/DarkListItem.cs | 4 +- DarkUI/Controls/DarkListView.cs | 8 +- DarkUI/Controls/DarkNumericUpDown.cs | 8 +- DarkUI/Controls/DarkRadioButton.cs | 28 +- DarkUI/Controls/DarkScrollBar.cs | 32 +-- DarkUI/Controls/DarkScrollBase.cs | 4 +- DarkUI/Controls/DarkScrollView.cs | 7 +- DarkUI/Controls/DarkSectionPanel.cs | 12 +- DarkUI/Controls/DarkSeparator.cs | 4 +- DarkUI/Controls/DarkStatusStrip.cs | 10 +- DarkUI/Controls/DarkTextBox.cs | 4 +- DarkUI/Controls/DarkTitle.cs | 9 +- DarkUI/Controls/DarkTreeView.cs | 26 +- DarkUI/DarkUI.csproj | 5 + DarkUI/Docking/DarkDockContent.cs | 4 +- DarkUI/Docking/DarkDockGroup.cs | 38 +-- DarkUI/Docking/DarkDockPanel.cs | 2 +- DarkUI/Docking/DarkDockRegion.cs | 4 +- DarkUI/Docking/DarkDocument.cs | 2 +- DarkUI/Docking/DarkToolWindow.cs | 26 +- DarkUI/Forms/DarkForm.cs | 4 +- DarkUI/Renderers/DarkMenuRenderer.cs | 26 +- DarkUI/Renderers/DarkToolStripRenderer.cs | 30 +-- DarkUI/Win32/DockContentDragFilter.cs | 2 +- Example/Forms/Docking/DockDocument.cs | 1 + Example/Forms/Docking/DockProject.Designer.cs | 1 + Example/Forms/Docking/DockProject.cs | 2 + .../Forms/Docking/DockProperties.Designer.cs | 87 +++--- Example/Forms/Docking/DockProperties.cs | 5 +- Example/Forms/MainForm.Designer.cs | 63 ++++- Example/Forms/MainForm.cs | 17 +- Example/Forms/MainForm.resx | 253 +----------------- 45 files changed, 521 insertions(+), 604 deletions(-) create mode 100644 DarkUI/Config/DarkTheme.cs create mode 100644 DarkUI/Config/ITheme.cs create mode 100644 DarkUI/Config/LightTheme.cs create mode 100644 DarkUI/Config/Sizes.cs create mode 100644 DarkUI/Config/ThemeProvider.cs diff --git a/DarkUI/Config/Colors.cs b/DarkUI/Config/Colors.cs index 6ebda15..aec4a54 100644 --- a/DarkUI/Config/Colors.cs +++ b/DarkUI/Config/Colors.cs @@ -2,111 +2,48 @@ namespace DarkUI.Config { - public sealed class Colors + public class Colors { - public static Color GreyBackground - { - get { return Color.FromArgb(60, 63, 65); } - } - - public static Color HeaderBackground - { - get { return Color.FromArgb(57, 60, 62); } - } - - public static Color BlueBackground - { - get { return Color.FromArgb(66, 77, 95); } - } - - public static Color DarkBlueBackground - { - get { return Color.FromArgb(52, 57, 66); } - } - - public static Color DarkBackground - { - get { return Color.FromArgb(43, 43, 43); } - } - - public static Color MediumBackground - { - get { return Color.FromArgb(49, 51, 53); } - } - - public static Color LightBackground - { - get { return Color.FromArgb(69, 73, 74); } - } - - public static Color LighterBackground - { - get { return Color.FromArgb(95, 101, 102); } - } - - public static Color LightestBackground - { - get { return Color.FromArgb(178, 178, 178); } - } - - public static Color LightBorder - { - get { return Color.FromArgb(81, 81, 81); } - } - - public static Color DarkBorder - { - get { return Color.FromArgb(51, 51, 51); } - } - - public static Color LightText - { - get { return Color.FromArgb(220, 220, 220); } - } - - public static Color DisabledText - { - get { return Color.FromArgb(153, 153, 153); } - } - - public static Color BlueHighlight - { - get { return Color.FromArgb(104, 151, 187); } - } - - public static Color BlueSelection - { - get { return Color.FromArgb(75, 110, 175); } - } - - public static Color GreyHighlight - { - get { return Color.FromArgb(122, 128, 132); } - } - - public static Color GreySelection - { - get { return Color.FromArgb(92, 92, 92); } - } - - public static Color DarkGreySelection - { - get { return Color.FromArgb(82, 82, 82); } - } - - public static Color DarkBlueBorder - { - get { return Color.FromArgb(51, 61, 78); } - } - - public static Color LightBlueBorder - { - get { return Color.FromArgb(86, 97, 114); } - } - - public static Color ActiveControl - { - get { return Color.FromArgb(159, 178, 196); } - } + public Color GreyBackground { get; set; } + + public Color HeaderBackground { get; set; } + + public Color BlueBackground { get; set; } + + public Color DarkBlueBackground { get; set; } + + public Color DarkBackground { get; set; } + + public Color MediumBackground { get; set; } + + public Color LightBackground { get; set; } + + public Color LighterBackground { get; set; } + + public Color LightestBackground { get; set; } + + public Color LightBorder { get; set; } + + public Color DarkBorder { get; set; } + + public Color LightText { get; set; } + + public Color DisabledText { get; set; } + + public Color BlueHighlight { get; set; } + + public Color BlueSelection { get; set; } + + public Color GreyHighlight { get; set; } + + public Color GreySelection { get; set; } + + public Color DarkGreySelection { get; set; } + + public Color DarkBlueBorder { get; set; } + + public Color LightBlueBorder { get; set; } + + public Color ActiveControl { get; set; } } } diff --git a/DarkUI/Config/Consts.cs b/DarkUI/Config/Consts.cs index 26a0152..be2f193 100644 --- a/DarkUI/Config/Consts.cs +++ b/DarkUI/Config/Consts.cs @@ -1,6 +1,6 @@ namespace DarkUI.Config { - public sealed class Consts + public sealed class Consts2 { public static int Padding = 10; diff --git a/DarkUI/Config/DarkTheme.cs b/DarkUI/Config/DarkTheme.cs new file mode 100644 index 0000000..3884de8 --- /dev/null +++ b/DarkUI/Config/DarkTheme.cs @@ -0,0 +1,47 @@ +using System.Drawing; + +namespace DarkUI.Config +{ + public class DarkTheme : ITheme + { + public Sizes Sizes { get; } = new Sizes(); + + public Colors Colors { get; } = new Colors(); + + public DarkTheme() + { + Colors.GreyBackground = Color.FromArgb(60, 63, 65); + Colors.HeaderBackground = Color.FromArgb(57, 60, 62); + Colors.BlueBackground = Color.FromArgb(66, 77, 95); + Colors.DarkBlueBackground = Color.FromArgb(52, 57, 66); + Colors.DarkBackground = Color.FromArgb(43, 43, 43); + Colors.MediumBackground = Color.FromArgb(49, 51, 53); + Colors.LightBackground = Color.FromArgb(69, 73, 74); + Colors.LighterBackground = Color.FromArgb(95, 101, 102); + Colors.LightestBackground = Color.FromArgb(178, 178, 178); + Colors.LightBorder = Color.FromArgb(81, 81, 81); + Colors.DarkBorder = Color.FromArgb(51, 51, 51); + Colors.LightText = Color.FromArgb(220, 220, 220); + Colors.DisabledText = Color.FromArgb(153, 153, 153); + Colors.BlueHighlight = Color.FromArgb(104, 151, 187); + Colors.BlueSelection = Color.FromArgb(75, 110, 175); + Colors.GreyHighlight = Color.FromArgb(122, 128, 132); + Colors.GreySelection = Color.FromArgb(92, 92, 92); + Colors.DarkGreySelection = Color.FromArgb(82, 82, 82); + Colors.DarkBlueBorder = Color.FromArgb(51, 61, 78); + Colors.LightBlueBorder = Color.FromArgb(86, 97, 114); + Colors.ActiveControl = Color.FromArgb(159, 178, 196); + + Sizes.Padding = 10; + Sizes.ScrollBarSize = 15; + Sizes.ArrowButtonSize = 15; + Sizes.MinimumThumbSize = 11; + Sizes.CheckBoxSize = 12; + Sizes.RadioButtonSize = 12; + Sizes.ToolWindowHeaderSize = 25; + Sizes.DocumentTabAreaSize = 24; + Sizes.ToolWindowTabAreaSize = 21; + + } + } +} diff --git a/DarkUI/Config/ITheme.cs b/DarkUI/Config/ITheme.cs new file mode 100644 index 0000000..9633a41 --- /dev/null +++ b/DarkUI/Config/ITheme.cs @@ -0,0 +1,11 @@ +using System.Drawing; + +namespace DarkUI.Config +{ + public interface ITheme + { + Sizes Sizes { get; } + + Colors Colors { get; } + } +} diff --git a/DarkUI/Config/LightTheme.cs b/DarkUI/Config/LightTheme.cs new file mode 100644 index 0000000..e40ddb4 --- /dev/null +++ b/DarkUI/Config/LightTheme.cs @@ -0,0 +1,47 @@ +using System.Drawing; + +namespace DarkUI.Config +{ + public class LightTheme : ITheme + { + public Sizes Sizes { get; } = new Sizes(); + + public Colors Colors { get; } = new Colors(); + + public LightTheme() + { + Colors.GreyBackground = Color.FromArgb(180, 183, 185); + Colors.HeaderBackground = Color.FromArgb(177, 180, 182); + Colors.BlueBackground = Color.FromArgb(186, 197, 215); + Colors.DarkBlueBackground = Color.FromArgb(172, 177, 186); + Colors.DarkBackground = Color.FromArgb(160, 160, 160); + Colors.MediumBackground = Color.FromArgb(169, 171, 173); + Colors.LightBackground = Color.FromArgb(189, 193, 194); + Colors.LighterBackground = Color.FromArgb(100, 101, 102); + Colors.LightestBackground = Color.FromArgb(178, 178, 178); + Colors.LightBorder = Color.FromArgb(201, 201, 201); + Colors.DarkBorder = Color.FromArgb(171, 171, 171); + Colors.LightText = Color.FromArgb(20, 20, 20); + Colors.DisabledText = Color.FromArgb(103, 103, 103); + Colors.BlueHighlight = Color.FromArgb(104, 151, 187); + Colors.BlueSelection = Color.FromArgb(75, 110, 175); + Colors.GreyHighlight = Color.FromArgb(182, 188, 182); + Colors.GreySelection = Color.FromArgb(160, 160, 160); + Colors.DarkGreySelection = Color.FromArgb(202, 202, 202); + Colors.DarkBlueBorder = Color.FromArgb(171, 181, 198); + Colors.LightBlueBorder = Color.FromArgb(206, 217, 114); + Colors.ActiveControl = Color.FromArgb(159, 178, 196); + + Sizes.Padding = 10; + Sizes.ScrollBarSize = 15; + Sizes.ArrowButtonSize = 15; + Sizes.MinimumThumbSize = 11; + Sizes.CheckBoxSize = 12; + Sizes.RadioButtonSize = 12; + Sizes.ToolWindowHeaderSize = 25; + Sizes.DocumentTabAreaSize = 24; + Sizes.ToolWindowTabAreaSize = 21; + + } + } +} diff --git a/DarkUI/Config/Sizes.cs b/DarkUI/Config/Sizes.cs new file mode 100644 index 0000000..48e675a --- /dev/null +++ b/DarkUI/Config/Sizes.cs @@ -0,0 +1,18 @@ +namespace DarkUI.Config +{ + public class Sizes + { + public int Padding { get; set; } = 10; + + public int ScrollBarSize { get; set; } = 15; + public int ArrowButtonSize { get; set; } = 15; + public int MinimumThumbSize { get; set; } = 11; + + public int CheckBoxSize { get; set; } = 12; + public int RadioButtonSize { get; set; } = 12; + + public int ToolWindowHeaderSize { get; set; } = 25; + public int DocumentTabAreaSize { get; set; } = 24; + public int ToolWindowTabAreaSize { get; set; } = 21; + } +} diff --git a/DarkUI/Config/ThemeProvider.cs b/DarkUI/Config/ThemeProvider.cs new file mode 100644 index 0000000..ba19bd6 --- /dev/null +++ b/DarkUI/Config/ThemeProvider.cs @@ -0,0 +1,21 @@ +namespace DarkUI.Config +{ + public class ThemeProvider + { + private static ITheme theme; + public static ITheme Theme + { + get + { + if (theme == null) + theme = new DarkTheme(); + + return theme; + } + set + { + theme = value; + } + } + } +} diff --git a/DarkUI/Controls/DarkButton.cs b/DarkUI/Controls/DarkButton.cs index 6f84d45..10cd07f 100644 --- a/DarkUI/Controls/DarkButton.cs +++ b/DarkUI/Controls/DarkButton.cs @@ -18,8 +18,8 @@ public class DarkButton : Button private bool _isDefault; private bool _spacePressed; - private int _padding = Consts.Padding / 2; - private int _imagePadding = 5; // Consts.Padding / 2 + private int _padding = ThemeProvider.Theme.Sizes.Padding / 2; + private int _imagePadding = 5; // ThemeProvider.Theme.Sizes.Padding / 2 #endregion @@ -309,24 +309,24 @@ protected override void OnPaint(PaintEventArgs e) var g = e.Graphics; var rect = new Rectangle(0, 0, ClientSize.Width, ClientSize.Height); - var textColor = Colors.LightText; - var borderColor = Colors.GreySelection; - var fillColor = _isDefault ? Colors.DarkBlueBackground : Colors.LightBackground; + var textColor = ThemeProvider.Theme.Colors.LightText; + var borderColor = ThemeProvider.Theme.Colors.GreySelection; + var fillColor = _isDefault ? ThemeProvider.Theme.Colors.DarkBlueBackground : ThemeProvider.Theme.Colors.LightBackground; if (Enabled) { if (ButtonStyle == DarkButtonStyle.Normal) { if (Focused && TabStop) - borderColor = Colors.BlueHighlight; + borderColor = ThemeProvider.Theme.Colors.BlueHighlight; switch (ButtonState) { case DarkControlState.Hover: - fillColor = _isDefault ? Colors.BlueBackground : Colors.LighterBackground; + fillColor = _isDefault ? ThemeProvider.Theme.Colors.BlueBackground : ThemeProvider.Theme.Colors.LighterBackground; break; case DarkControlState.Pressed: - fillColor = _isDefault ? Colors.DarkBackground : Colors.DarkBackground; + fillColor = _isDefault ? ThemeProvider.Theme.Colors.DarkBackground : ThemeProvider.Theme.Colors.DarkBackground; break; } } @@ -335,21 +335,21 @@ protected override void OnPaint(PaintEventArgs e) switch (ButtonState) { case DarkControlState.Normal: - fillColor = Colors.GreyBackground; + fillColor = ThemeProvider.Theme.Colors.GreyBackground; break; case DarkControlState.Hover: - fillColor = Colors.MediumBackground; + fillColor = ThemeProvider.Theme.Colors.MediumBackground; break; case DarkControlState.Pressed: - fillColor = Colors.DarkBackground; + fillColor = ThemeProvider.Theme.Colors.DarkBackground; break; } } } else { - textColor = Colors.DisabledText; - fillColor = Colors.DarkGreySelection; + textColor = ThemeProvider.Theme.Colors.DisabledText; + fillColor = ThemeProvider.Theme.Colors.DarkGreySelection; } using (var b = new SolidBrush(fillColor)) diff --git a/DarkUI/Controls/DarkCheckBox.cs b/DarkUI/Controls/DarkCheckBox.cs index 8b47f96..e13ec43 100644 --- a/DarkUI/Controls/DarkCheckBox.cs +++ b/DarkUI/Controls/DarkCheckBox.cs @@ -280,39 +280,39 @@ protected override void OnPaint(PaintEventArgs e) var g = e.Graphics; var rect = new Rectangle(0, 0, ClientSize.Width, ClientSize.Height); - var size = Consts.CheckBoxSize; + var size = ThemeProvider.Theme.Sizes.CheckBoxSize; - var textColor = Colors.LightText; - var borderColor = Colors.LightText; - var fillColor = Colors.LightestBackground; + var textColor = ThemeProvider.Theme.Colors.LightText; + var borderColor = ThemeProvider.Theme.Colors.LightText; + var fillColor = Checked ? ThemeProvider.Theme.Colors.DarkBackground : ThemeProvider.Theme.Colors.LightestBackground; if (Enabled) { if (Focused) { - borderColor = Colors.BlueHighlight; - fillColor = Colors.BlueSelection; + borderColor = ThemeProvider.Theme.Colors.BlueHighlight; + fillColor = ThemeProvider.Theme.Colors.BlueSelection; } if (_controlState == DarkControlState.Hover) { - borderColor = Colors.BlueHighlight; - fillColor = Colors.BlueSelection; + borderColor = ThemeProvider.Theme.Colors.BlueHighlight; + fillColor = ThemeProvider.Theme.Colors.BlueSelection; } else if (_controlState == DarkControlState.Pressed) { - borderColor = Colors.GreyHighlight; - fillColor = Colors.GreySelection; + borderColor = ThemeProvider.Theme.Colors.GreyHighlight; + fillColor = ThemeProvider.Theme.Colors.GreySelection; } } else { - textColor = Colors.DisabledText; - borderColor = Colors.GreyHighlight; - fillColor = Colors.GreySelection; + textColor = ThemeProvider.Theme.Colors.DisabledText; + borderColor = ThemeProvider.Theme.Colors.GreyHighlight; + fillColor = ThemeProvider.Theme.Colors.GreySelection; } - using (var b = new SolidBrush(Colors.GreyBackground)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.GreyBackground)) { g.FillRectangle(b, rect); } diff --git a/DarkUI/Controls/DarkComboBox.cs b/DarkUI/Controls/DarkComboBox.cs index 88b9b51..254dc0f 100644 --- a/DarkUI/Controls/DarkComboBox.cs +++ b/DarkUI/Controls/DarkComboBox.cs @@ -104,12 +104,12 @@ private void PaintCombobox() { var rect = new Rectangle(0, 0, ClientSize.Width, ClientSize.Height); - var textColor = Colors.LightText; - var borderColor = Colors.GreySelection; - var fillColor = Colors.LightBackground; + var textColor = ThemeProvider.Theme.Colors.LightText; + var borderColor = ThemeProvider.Theme.Colors.GreySelection; + var fillColor = ThemeProvider.Theme.Colors.LightBackground; if (Focused && TabStop) - borderColor = Colors.BlueHighlight; + borderColor = ThemeProvider.Theme.Colors.BlueHighlight; using (var b = new SolidBrush(fillColor)) { @@ -124,7 +124,7 @@ private void PaintCombobox() var icon = ScrollIcons.scrollbar_arrow_hot; g.DrawImageUnscaled(icon, - rect.Right - icon.Width - (Consts.Padding / 2), + rect.Right - icon.Width - (ThemeProvider.Theme.Sizes.Padding / 2), (rect.Height / 2) - (icon.Height / 2)); var text = SelectedItem != null ? SelectedItem.ToString() : Text; @@ -135,7 +135,7 @@ private void PaintCombobox() var modRect = new Rectangle(rect.Left + padding, rect.Top + padding, - rect.Width - icon.Width - (Consts.Padding / 2) - (padding * 2), + rect.Width - icon.Width - (ThemeProvider.Theme.Sizes.Padding / 2) - (padding * 2), rect.Height - (padding * 2)); var stringFormat = new StringFormat @@ -165,13 +165,13 @@ protected override void OnDrawItem(DrawItemEventArgs e) var g = e.Graphics; var rect = e.Bounds; - var textColor = Colors.LightText; - var fillColor = Colors.LightBackground; + var textColor = ThemeProvider.Theme.Colors.LightText; + var fillColor = ThemeProvider.Theme.Colors.LightBackground; if ((e.State & DrawItemState.Selected) == DrawItemState.Selected || (e.State & DrawItemState.Focus) == DrawItemState.Focus || (e.State & DrawItemState.NoFocusRect) != DrawItemState.NoFocusRect) - fillColor = Colors.BlueSelection; + fillColor = ThemeProvider.Theme.Colors.BlueSelection; using (var b = new SolidBrush(fillColor)) { diff --git a/DarkUI/Controls/DarkDropdownList.cs b/DarkUI/Controls/DarkDropdownList.cs index ad43722..487937c 100644 --- a/DarkUI/Controls/DarkDropdownList.cs +++ b/DarkUI/Controls/DarkDropdownList.cs @@ -277,12 +277,12 @@ private void DarkDropdownList_SelectedItemChanged(object sender, EventArgs e) { if ((DarkDropdownItem)item.Tag == SelectedItem) { - item.BackColor = Colors.DarkBlueBackground; + item.BackColor = ThemeProvider.Theme.Colors.DarkBlueBackground; item.Font = new Font(Font, FontStyle.Bold); } else { - item.BackColor = Colors.GreyBackground; + item.BackColor = ThemeProvider.Theme.Colors.GreyBackground; item.Font = new Font(Font, FontStyle.Regular); } } @@ -391,7 +391,7 @@ protected override void OnPaint(PaintEventArgs e) var g = e.Graphics; // Draw background - using (var b = new SolidBrush(Colors.MediumBackground)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.MediumBackground)) { g.FillRectangle(b, ClientRectangle); } @@ -401,7 +401,7 @@ protected override void OnPaint(PaintEventArgs e) { if (ShowBorder) { - using (var p = new Pen(Colors.LightBorder, 1)) + using (var p = new Pen(ThemeProvider.Theme.Colors.LightBorder, 1)) { var modRect = new Rectangle(ClientRectangle.Left, ClientRectangle.Top, ClientRectangle.Width - 1, ClientRectangle.Height - 1); g.DrawRectangle(p, modRect); @@ -412,18 +412,18 @@ protected override void OnPaint(PaintEventArgs e) // Draw hover state if (ControlState == DarkControlState.Hover) { - using (var b = new SolidBrush(Colors.DarkBorder)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.DarkBorder)) { g.FillRectangle(b, ClientRectangle); } - using (var b = new SolidBrush(Colors.DarkBackground)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.DarkBackground)) { var arrowRect = new Rectangle(ClientRectangle.Right - DropdownIcons.small_arrow.Width - 8, ClientRectangle.Top, DropdownIcons.small_arrow.Width + 8, ClientRectangle.Height); g.FillRectangle(b, arrowRect); } - using (var p = new Pen(Colors.BlueSelection, 1)) + using (var p = new Pen(ThemeProvider.Theme.Colors.BlueSelection, 1)) { var modRect = new Rectangle(ClientRectangle.Left, ClientRectangle.Top, ClientRectangle.Width - 1 - DropdownIcons.small_arrow.Width - 8, ClientRectangle.Height - 1); g.DrawRectangle(p, modRect); @@ -433,12 +433,12 @@ protected override void OnPaint(PaintEventArgs e) // Draw pressed state if (ControlState == DarkControlState.Pressed) { - using (var b = new SolidBrush(Colors.DarkBorder)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.DarkBorder)) { g.FillRectangle(b, ClientRectangle); } - using (var b = new SolidBrush(Colors.BlueSelection)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.BlueSelection)) { var arrowRect = new Rectangle(ClientRectangle.Right - DropdownIcons.small_arrow.Width - 8, ClientRectangle.Top, DropdownIcons.small_arrow.Width + 8, ClientRectangle.Height); g.FillRectangle(b, arrowRect); @@ -463,7 +463,7 @@ protected override void OnPaint(PaintEventArgs e) } // Draw Text - using (var b = new SolidBrush(Colors.LightText)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.LightText)) { var stringFormat = new StringFormat { diff --git a/DarkUI/Controls/DarkGroupBox.cs b/DarkUI/Controls/DarkGroupBox.cs index c3984e7..8712402 100644 --- a/DarkUI/Controls/DarkGroupBox.cs +++ b/DarkUI/Controls/DarkGroupBox.cs @@ -8,7 +8,7 @@ namespace DarkUI.Controls { public class DarkGroupBox : GroupBox { - private Color _borderColor = Colors.DarkBorder; + private Color _borderColor = ThemeProvider.Theme.Colors.DarkBorder; [Category("Appearance")] [Description("Determines the color of the border.")] @@ -38,8 +38,8 @@ protected override void OnPaint(PaintEventArgs e) var rect = new Rectangle(0, 0, ClientSize.Width, ClientSize.Height); var stringSize = g.MeasureString(Text, Font); - var textColor = Colors.LightText; - var fillColor = Colors.GreyBackground; + var textColor = ThemeProvider.Theme.Colors.LightText; + var fillColor = ThemeProvider.Theme.Colors.GreyBackground; using (var b = new SolidBrush(fillColor)) { @@ -52,9 +52,9 @@ protected override void OnPaint(PaintEventArgs e) g.DrawRectangle(p, borderRect); } - var textRect = new Rectangle(rect.Left + Consts.Padding, + var textRect = new Rectangle(rect.Left + ThemeProvider.Theme.Sizes.Padding, rect.Top, - rect.Width - (Consts.Padding * 2), + rect.Width - (ThemeProvider.Theme.Sizes.Padding * 2), (int)stringSize.Height); using (var b2 = new SolidBrush(fillColor)) diff --git a/DarkUI/Controls/DarkLabel.cs b/DarkUI/Controls/DarkLabel.cs index 2ec280b..88094f5 100644 --- a/DarkUI/Controls/DarkLabel.cs +++ b/DarkUI/Controls/DarkLabel.cs @@ -53,7 +53,7 @@ public bool AutoUpdateHeight public DarkLabel() { - ForeColor = Colors.LightText; + ForeColor = ThemeProvider.Theme.Colors.LightText; } #endregion diff --git a/DarkUI/Controls/DarkListItem.cs b/DarkUI/Controls/DarkListItem.cs index b8abcbe..067927a 100644 --- a/DarkUI/Controls/DarkListItem.cs +++ b/DarkUI/Controls/DarkListItem.cs @@ -34,7 +34,7 @@ public string Text public Rectangle Area { get; set; } - public Color TextColor { get; set; } + //public Color TextColor { get; set; } public FontStyle FontStyle { get; set; } @@ -48,7 +48,7 @@ public string Text public DarkListItem() { - TextColor = Colors.LightText; + //TextColor = ThemeProvider.Theme.Colors.LightText; FontStyle = FontStyle.Regular; } diff --git a/DarkUI/Controls/DarkListView.cs b/DarkUI/Controls/DarkListView.cs index 76955a2..bda2448 100644 --- a/DarkUI/Controls/DarkListView.cs +++ b/DarkUI/Controls/DarkListView.cs @@ -517,10 +517,10 @@ protected override void PaintContent(Graphics g) // Background var odd = i % 2 != 0; - var bgColor = !odd ? Colors.HeaderBackground : Colors.GreyBackground; + var bgColor = !odd ? ThemeProvider.Theme.Colors.HeaderBackground : ThemeProvider.Theme.Colors.GreyBackground; if (SelectedIndices.Count > 0 && SelectedIndices.Contains(i)) - bgColor = Focused ? Colors.BlueSelection : Colors.GreySelection; + bgColor = Focused ? ThemeProvider.Theme.Colors.BlueSelection : ThemeProvider.Theme.Colors.GreySelection; using (var b = new SolidBrush(bgColor)) { @@ -528,7 +528,7 @@ protected override void PaintContent(Graphics g) } // DEBUG: Border - /*using (var p = new Pen(Colors.DarkBorder)) + /*using (var p = new Pen(ThemeProvider.Theme.Colors.DarkBorder)) { g.DrawLine(p, new Point(rect.Left, rect.Bottom - 1), new Point(rect.Right, rect.Bottom - 1)); }*/ @@ -540,7 +540,7 @@ protected override void PaintContent(Graphics g) } // Text - using (var b = new SolidBrush(Items[i].TextColor)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.LightText)) { var stringFormat = new StringFormat { diff --git a/DarkUI/Controls/DarkNumericUpDown.cs b/DarkUI/Controls/DarkNumericUpDown.cs index d1d7873..13c8aec 100644 --- a/DarkUI/Controls/DarkNumericUpDown.cs +++ b/DarkUI/Controls/DarkNumericUpDown.cs @@ -27,7 +27,7 @@ public DarkNumericUpDown() ControlStyles.UserPaint, true); base.ForeColor = Color.Gainsboro; - base.BackColor = Colors.LightBackground; + base.BackColor = ThemeProvider.Theme.Colors.LightBackground; Controls[0].Paint += DarkNumericUpDown_Paint; @@ -102,7 +102,7 @@ private void DarkNumericUpDown_Paint(object sender, PaintEventArgs e) var g = e.Graphics; var rect = e.ClipRectangle; - var fillColor = Colors.HeaderBackground; + var fillColor = ThemeProvider.Theme.Colors.HeaderBackground; using (var b = new SolidBrush(fillColor)) { @@ -138,10 +138,10 @@ protected override void OnPaint(PaintEventArgs e) var g = e.Graphics; var rect = new Rectangle(0, 0, ClientSize.Width, ClientSize.Height); - var borderColor = Colors.GreySelection; + var borderColor = ThemeProvider.Theme.Colors.GreySelection; if (Focused && TabStop) - borderColor = Colors.BlueHighlight; + borderColor = ThemeProvider.Theme.Colors.BlueHighlight; using (var p = new Pen(borderColor, 1)) { diff --git a/DarkUI/Controls/DarkRadioButton.cs b/DarkUI/Controls/DarkRadioButton.cs index bc1b33a..b4ec7b8 100644 --- a/DarkUI/Controls/DarkRadioButton.cs +++ b/DarkUI/Controls/DarkRadioButton.cs @@ -246,39 +246,39 @@ protected override void OnPaint(PaintEventArgs e) var g = e.Graphics; var rect = new Rectangle(0, 0, ClientSize.Width, ClientSize.Height); - var size = Consts.RadioButtonSize; + var size = ThemeProvider.Theme.Sizes.RadioButtonSize; - var textColor = Colors.LightText; - var borderColor = Colors.LightText; - var fillColor = Colors.LightestBackground; + var textColor = ThemeProvider.Theme.Colors.LightText; + var borderColor = ThemeProvider.Theme.Colors.LightText; + var fillColor = ThemeProvider.Theme.Colors.LightestBackground; if (Enabled) { if (Focused) { - borderColor = Colors.BlueHighlight; - fillColor = Colors.BlueSelection; + borderColor = ThemeProvider.Theme.Colors.BlueHighlight; + fillColor = ThemeProvider.Theme.Colors.BlueSelection; } if (_controlState == DarkControlState.Hover) { - borderColor = Colors.BlueHighlight; - fillColor = Colors.BlueSelection; + borderColor = ThemeProvider.Theme.Colors.BlueHighlight; + fillColor = ThemeProvider.Theme.Colors.BlueSelection; } else if (_controlState == DarkControlState.Pressed) { - borderColor = Colors.GreyHighlight; - fillColor = Colors.GreySelection; + borderColor = ThemeProvider.Theme.Colors.GreyHighlight; + fillColor = ThemeProvider.Theme.Colors.GreySelection; } } else { - textColor = Colors.DisabledText; - borderColor = Colors.GreyHighlight; - fillColor = Colors.GreySelection; + textColor = ThemeProvider.Theme.Colors.DisabledText; + borderColor = ThemeProvider.Theme.Colors.GreyHighlight; + fillColor = ThemeProvider.Theme.Colors.GreySelection; } - using (var b = new SolidBrush(Colors.GreyBackground)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.GreyBackground)) { g.FillRectangle(b, rect); } diff --git a/DarkUI/Controls/DarkScrollBar.cs b/DarkUI/Controls/DarkScrollBar.cs index 55d5a80..09087f0 100644 --- a/DarkUI/Controls/DarkScrollBar.cs +++ b/DarkUI/Controls/DarkScrollBar.cs @@ -393,23 +393,23 @@ public void UpdateScrollBar() // Arrow buttons if (_scrollOrientation == DarkScrollOrientation.Vertical) { - _upArrowArea = new Rectangle(area.Left, area.Top, Consts.ArrowButtonSize, Consts.ArrowButtonSize); - _downArrowArea = new Rectangle(area.Left, area.Bottom - Consts.ArrowButtonSize, Consts.ArrowButtonSize, Consts.ArrowButtonSize); + _upArrowArea = new Rectangle(area.Left, area.Top, ThemeProvider.Theme.Sizes.ArrowButtonSize, ThemeProvider.Theme.Sizes.ArrowButtonSize); + _downArrowArea = new Rectangle(area.Left, area.Bottom - ThemeProvider.Theme.Sizes.ArrowButtonSize, ThemeProvider.Theme.Sizes.ArrowButtonSize, ThemeProvider.Theme.Sizes.ArrowButtonSize); } else if (_scrollOrientation == DarkScrollOrientation.Horizontal) { - _upArrowArea = new Rectangle(area.Left, area.Top, Consts.ArrowButtonSize, Consts.ArrowButtonSize); - _downArrowArea = new Rectangle(area.Right - Consts.ArrowButtonSize, area.Top, Consts.ArrowButtonSize, Consts.ArrowButtonSize); + _upArrowArea = new Rectangle(area.Left, area.Top, ThemeProvider.Theme.Sizes.ArrowButtonSize, ThemeProvider.Theme.Sizes.ArrowButtonSize); + _downArrowArea = new Rectangle(area.Right - ThemeProvider.Theme.Sizes.ArrowButtonSize, area.Top, ThemeProvider.Theme.Sizes.ArrowButtonSize, ThemeProvider.Theme.Sizes.ArrowButtonSize); } // Track if (_scrollOrientation == DarkScrollOrientation.Vertical) { - _trackArea = new Rectangle(area.Left, area.Top + Consts.ArrowButtonSize, area.Width, area.Height - (Consts.ArrowButtonSize * 2)); + _trackArea = new Rectangle(area.Left, area.Top + ThemeProvider.Theme.Sizes.ArrowButtonSize, area.Width, area.Height - (ThemeProvider.Theme.Sizes.ArrowButtonSize * 2)); } else if (_scrollOrientation == DarkScrollOrientation.Horizontal) { - _trackArea = new Rectangle(area.Left + Consts.ArrowButtonSize, area.Top, area.Width - (Consts.ArrowButtonSize * 2), area.Height); + _trackArea = new Rectangle(area.Left + ThemeProvider.Theme.Sizes.ArrowButtonSize, area.Top, area.Width - (ThemeProvider.Theme.Sizes.ArrowButtonSize * 2), area.Height); } // Thumb @@ -438,25 +438,25 @@ private void UpdateThumb(bool forceRefresh = false) { var thumbSize = (int)(_trackArea.Height * _viewContentRatio); - if (thumbSize < Consts.MinimumThumbSize) - thumbSize = Consts.MinimumThumbSize; + if (thumbSize < ThemeProvider.Theme.Sizes.MinimumThumbSize) + thumbSize = ThemeProvider.Theme.Sizes.MinimumThumbSize; var trackAreaSize = _trackArea.Height - thumbSize; var thumbPosition = (int)(trackAreaSize * positionRatio); - _thumbArea = new Rectangle(_trackArea.Left + 3, _trackArea.Top + thumbPosition, Consts.ScrollBarSize - 6, thumbSize); + _thumbArea = new Rectangle(_trackArea.Left + 3, _trackArea.Top + thumbPosition, ThemeProvider.Theme.Sizes.ScrollBarSize - 6, thumbSize); } else if (_scrollOrientation == DarkScrollOrientation.Horizontal) { var thumbSize = (int)(_trackArea.Width * _viewContentRatio); - if (thumbSize < Consts.MinimumThumbSize) - thumbSize = Consts.MinimumThumbSize; + if (thumbSize < ThemeProvider.Theme.Sizes.MinimumThumbSize) + thumbSize = ThemeProvider.Theme.Sizes.MinimumThumbSize; var trackAreaSize = _trackArea.Width - thumbSize; var thumbPosition = (int)(trackAreaSize * positionRatio); - _thumbArea = new Rectangle(_trackArea.Left + thumbPosition, _trackArea.Top + 3, thumbSize, Consts.ScrollBarSize - 6); + _thumbArea = new Rectangle(_trackArea.Left + thumbPosition, _trackArea.Top + 3, thumbSize, ThemeProvider.Theme.Sizes.ScrollBarSize - 6); } if (forceRefresh) @@ -475,10 +475,10 @@ protected override void OnPaint(PaintEventArgs e) var g = e.Graphics; // DEBUG: Scrollbar bg - /*using (var b = new SolidBrush(Colors.MediumBackground)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.GreyBackground)) { g.FillRectangle(b, ClientRectangle); - }*/ + }/**/ // DEBUG: Arrow backgrounds /*using (var b = new SolidBrush(Color.White)) @@ -524,10 +524,10 @@ protected override void OnPaint(PaintEventArgs e) // Draw thumb if (Enabled) { - var scrollColor = _thumbHot ? Colors.GreyHighlight : Colors.GreySelection; + var scrollColor = _thumbHot ? ThemeProvider.Theme.Colors.GreyHighlight : ThemeProvider.Theme.Colors.GreySelection; if (_isScrolling) - scrollColor = Colors.ActiveControl; + scrollColor = ThemeProvider.Theme.Colors.ActiveControl; using (var b = new SolidBrush(scrollColor)) { diff --git a/DarkUI/Controls/DarkScrollBase.cs b/DarkUI/Controls/DarkScrollBase.cs index 46426ae..30c7940 100644 --- a/DarkUI/Controls/DarkScrollBase.cs +++ b/DarkUI/Controls/DarkScrollBase.cs @@ -141,7 +141,7 @@ private void UpdateScrollBars() if (_hScrollBar.Maximum != ContentSize.Width) _hScrollBar.Maximum = ContentSize.Width; - var scrollSize = Consts.ScrollBarSize; + var scrollSize = ThemeProvider.Theme.Sizes.ScrollBarSize; _vScrollBar.Location = new Point(ClientSize.Width - scrollSize, 0); _vScrollBar.Size = new Size(scrollSize, ClientSize.Height); @@ -186,7 +186,7 @@ private void SetScrollBarVisibility() private void SetVisibleSize() { - var scrollSize = Consts.ScrollBarSize; + var scrollSize = ThemeProvider.Theme.Sizes.ScrollBarSize; _visibleSize = new Size(ClientSize.Width, ClientSize.Height); diff --git a/DarkUI/Controls/DarkScrollView.cs b/DarkUI/Controls/DarkScrollView.cs index 00f3832..2fd2ae5 100644 --- a/DarkUI/Controls/DarkScrollView.cs +++ b/DarkUI/Controls/DarkScrollView.cs @@ -1,4 +1,5 @@ -using System.Drawing; +using DarkUI.Config; +using System.Drawing; using System.Windows.Forms; namespace DarkUI.Controls @@ -25,7 +26,7 @@ protected override void OnPaint(PaintEventArgs e) var g = e.Graphics; // Draw background - using (var b = new SolidBrush(BackColor)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.GreyBackground)) { g.FillRectangle(b, ClientRectangle); } @@ -40,7 +41,7 @@ protected override void OnPaint(PaintEventArgs e) // Draw the bit where the scrollbars meet if (_vScrollBar.Visible && _hScrollBar.Visible) { - using (var b = new SolidBrush(BackColor)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.GreyBackground)) { var rect = new Rectangle(_hScrollBar.Right, _vScrollBar.Bottom, _vScrollBar.Width, _hScrollBar.Height); diff --git a/DarkUI/Controls/DarkSectionPanel.cs b/DarkUI/Controls/DarkSectionPanel.cs index e449ec9..f4afb6e 100644 --- a/DarkUI/Controls/DarkSectionPanel.cs +++ b/DarkUI/Controls/DarkSectionPanel.cs @@ -83,15 +83,15 @@ protected override void OnPaint(PaintEventArgs e) var rect = ClientRectangle; // Fill body - using (var b = new SolidBrush(Colors.GreyBackground)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.GreyBackground)) { g.FillRectangle(b, rect); } // Draw header - var bgColor = ContainsFocus ? Colors.BlueBackground : Colors.HeaderBackground; - var darkColor = ContainsFocus ? Colors.DarkBlueBorder : Colors.DarkBorder; - var lightColor = ContainsFocus ? Colors.LightBlueBorder : Colors.LightBorder; + var bgColor = ContainsFocus ? ThemeProvider.Theme.Colors.BlueBackground : ThemeProvider.Theme.Colors.HeaderBackground; + var darkColor = ContainsFocus ? ThemeProvider.Theme.Colors.DarkBlueBorder : ThemeProvider.Theme.Colors.DarkBorder; + var lightColor = ContainsFocus ? ThemeProvider.Theme.Colors.LightBlueBorder : ThemeProvider.Theme.Colors.LightBorder; using (var b = new SolidBrush(bgColor)) { @@ -112,7 +112,7 @@ protected override void OnPaint(PaintEventArgs e) var xOffset = 3; - using (var b = new SolidBrush(Colors.LightText)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.LightText)) { var textRect = new Rectangle(xOffset, 0, rect.Width - 4 - xOffset, 25); @@ -128,7 +128,7 @@ protected override void OnPaint(PaintEventArgs e) } // Draw border - using (var p = new Pen(Colors.DarkBorder, 1)) + using (var p = new Pen(ThemeProvider.Theme.Colors.DarkBorder, 1)) { var modRect = new Rectangle(rect.Left, rect.Top, rect.Width - 1, rect.Height - 1); diff --git a/DarkUI/Controls/DarkSeparator.cs b/DarkUI/Controls/DarkSeparator.cs index adf17ae..01bf6e2 100644 --- a/DarkUI/Controls/DarkSeparator.cs +++ b/DarkUI/Controls/DarkSeparator.cs @@ -24,12 +24,12 @@ protected override void OnPaint(PaintEventArgs e) { var g = e.Graphics; - using (var p = new Pen(Colors.DarkBorder)) + using (var p = new Pen(ThemeProvider.Theme.Colors.DarkBorder)) { g.DrawLine(p, ClientRectangle.Left, 0, ClientRectangle.Right, 0); } - using (var p = new Pen(Colors.LightBorder)) + using (var p = new Pen(ThemeProvider.Theme.Colors.LightBorder)) { g.DrawLine(p, ClientRectangle.Left, 1, ClientRectangle.Right, 1); } diff --git a/DarkUI/Controls/DarkStatusStrip.cs b/DarkUI/Controls/DarkStatusStrip.cs index 4ba17c9..5a285af 100644 --- a/DarkUI/Controls/DarkStatusStrip.cs +++ b/DarkUI/Controls/DarkStatusStrip.cs @@ -11,8 +11,8 @@ public class DarkStatusStrip : StatusStrip public DarkStatusStrip() { AutoSize = false; - BackColor = Colors.GreyBackground; - ForeColor = Colors.LightText; + BackColor = ThemeProvider.Theme.Colors.GreyBackground; + ForeColor = ThemeProvider.Theme.Colors.LightText; Padding = new Padding(0, 5, 0, 3); Size = new Size(Size.Width, 24); SizingGrip = false; @@ -26,17 +26,17 @@ protected override void OnPaintBackground(PaintEventArgs e) { var g = e.Graphics; - using (var b = new SolidBrush(Colors.GreyBackground)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.GreyBackground)) { g.FillRectangle(b, ClientRectangle); } - using (var p = new Pen(Colors.DarkBorder)) + using (var p = new Pen(ThemeProvider.Theme.Colors.DarkBorder)) { g.DrawLine(p, ClientRectangle.Left, 0, ClientRectangle.Right, 0); } - using (var p = new Pen(Colors.LightBorder)) + using (var p = new Pen(ThemeProvider.Theme.Colors.LightBorder)) { g.DrawLine(p, ClientRectangle.Left, 1, ClientRectangle.Right, 1); } diff --git a/DarkUI/Controls/DarkTextBox.cs b/DarkUI/Controls/DarkTextBox.cs index d4b2ede..f0b4d56 100644 --- a/DarkUI/Controls/DarkTextBox.cs +++ b/DarkUI/Controls/DarkTextBox.cs @@ -9,8 +9,8 @@ public class DarkTextBox : TextBox public DarkTextBox() { - BackColor = Colors.LightBackground; - ForeColor = Colors.LightText; + BackColor = ThemeProvider.Theme.Colors.LightBackground; + ForeColor = ThemeProvider.Theme.Colors.LightText; Padding = new Padding(2, 2, 2, 2); BorderStyle = BorderStyle.FixedSingle; } diff --git a/DarkUI/Controls/DarkTitle.cs b/DarkUI/Controls/DarkTitle.cs index bb92680..d3db969 100644 --- a/DarkUI/Controls/DarkTitle.cs +++ b/DarkUI/Controls/DarkTitle.cs @@ -20,14 +20,19 @@ protected override void OnPaint(PaintEventArgs e) var g = e.Graphics; var rect = new Rectangle(0, 0, ClientSize.Width, ClientSize.Height); + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.GreyBackground)) + { + g.FillRectangle(b, rect); + } + var textSize = g.MeasureString(Text, Font); - using (var b = new SolidBrush(Colors.LightText)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.LightText)) { g.DrawString(Text, Font, b, new PointF(-2, 0)); } - using (var p = new Pen(Colors.GreyHighlight)) + using (var p = new Pen(ThemeProvider.Theme.Colors.GreyHighlight)) { var p1 = new PointF(textSize.Width + 5, textSize.Height / 2); var p2 = new PointF(rect.Width, textSize.Height / 2); diff --git a/DarkUI/Controls/DarkTreeView.cs b/DarkUI/Controls/DarkTreeView.cs index 2d748bd..792648f 100644 --- a/DarkUI/Controls/DarkTreeView.cs +++ b/DarkUI/Controls/DarkTreeView.cs @@ -644,12 +644,12 @@ private void LoadIcons() { DisposeIcons(); - _nodeClosed = TreeViewIcons.node_closed_empty.SetColor(Colors.LightText); - _nodeClosedHover = TreeViewIcons.node_closed_empty.SetColor(Colors.BlueHighlight); - _nodeClosedHoverSelected = TreeViewIcons.node_closed_full.SetColor(Colors.LightText); - _nodeOpen = TreeViewIcons.node_open.SetColor(Colors.LightText); - _nodeOpenHover = TreeViewIcons.node_open.SetColor(Colors.BlueHighlight); - _nodeOpenHoverSelected = TreeViewIcons.node_open_empty.SetColor(Colors.LightText); + _nodeClosed = TreeViewIcons.node_closed_empty.SetColor(ThemeProvider.Theme.Colors.LightText); + _nodeClosedHover = TreeViewIcons.node_closed_empty.SetColor(ThemeProvider.Theme.Colors.BlueHighlight); + _nodeClosedHoverSelected = TreeViewIcons.node_closed_full.SetColor(ThemeProvider.Theme.Colors.LightText); + _nodeOpen = TreeViewIcons.node_open.SetColor(ThemeProvider.Theme.Colors.LightText); + _nodeOpenHover = TreeViewIcons.node_open.SetColor(ThemeProvider.Theme.Colors.BlueHighlight); + _nodeOpenHoverSelected = TreeViewIcons.node_open_empty.SetColor(ThemeProvider.Theme.Colors.LightText); } private void DisposeIcons() @@ -1193,6 +1193,12 @@ protected virtual void NodesMoved(List nodesMoved) protected override void PaintContent(Graphics g) { + // Fill body + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.GreyBackground)) + { + g.FillRectangle(b, ClientRectangle); + } + foreach (var node in Nodes) { DrawNode(node, g); @@ -1204,13 +1210,13 @@ private void DrawNode(DarkTreeNode node, Graphics g) var rect = GetNodeFullRowArea(node); // 1. Draw background - var bgColor = node.Odd ? Colors.HeaderBackground : Colors.GreyBackground; + var bgColor = node.Odd ? ThemeProvider.Theme.Colors.HeaderBackground : ThemeProvider.Theme.Colors.GreyBackground; if (SelectedNodes.Count > 0 && SelectedNodes.Contains(node)) - bgColor = Focused ? Colors.BlueSelection : Colors.GreySelection; + bgColor = Focused ? ThemeProvider.Theme.Colors.BlueSelection : ThemeProvider.Theme.Colors.GreySelection; if (IsDragging && _dropNode == node) - bgColor = Focused ? Colors.BlueSelection : Colors.GreySelection; + bgColor = Focused ? ThemeProvider.Theme.Colors.BlueSelection : ThemeProvider.Theme.Colors.GreySelection; using (var b = new SolidBrush(bgColor)) { @@ -1250,7 +1256,7 @@ private void DrawNode(DarkTreeNode node, Graphics g) } // 4. Draw text - using (var b = new SolidBrush(Colors.LightText)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.LightText)) { var stringFormat = new StringFormat { diff --git a/DarkUI/DarkUI.csproj b/DarkUI/DarkUI.csproj index 9b7b7e2..c39828b 100644 --- a/DarkUI/DarkUI.csproj +++ b/DarkUI/DarkUI.csproj @@ -44,7 +44,12 @@ + + + + + diff --git a/DarkUI/Docking/DarkDockContent.cs b/DarkUI/Docking/DarkDockContent.cs index 1ee2a09..917e87b 100644 --- a/DarkUI/Docking/DarkDockContent.cs +++ b/DarkUI/Docking/DarkDockContent.cs @@ -87,7 +87,9 @@ public Image Icon #region Constructor Region public DarkDockContent() - { } + { + BackColor = System.Drawing.Color.Transparent;// ThemeProvider.Theme.Colors.GreyBackground; + } #endregion diff --git a/DarkUI/Docking/DarkDockGroup.cs b/DarkUI/Docking/DarkDockGroup.cs index 1d48689..5112332 100644 --- a/DarkUI/Docking/DarkDockGroup.cs +++ b/DarkUI/Docking/DarkDockGroup.cs @@ -164,18 +164,18 @@ private void UpdateTabArea() switch (DockArea) { case DarkDockArea.Document: - size = _tabArea.Visible ? Consts.DocumentTabAreaSize : 0; + size = _tabArea.Visible ? ThemeProvider.Theme.Sizes.DocumentTabAreaSize : 0; Padding = new Padding(0, size, 0, 0); _tabArea.ClientRectangle = new Rectangle(Padding.Left, 0, ClientRectangle.Width - Padding.Horizontal, size); break; case DarkDockArea.Left: case DarkDockArea.Right: - size = _tabArea.Visible ? Consts.ToolWindowTabAreaSize : 0; + size = _tabArea.Visible ? ThemeProvider.Theme.Sizes.ToolWindowTabAreaSize : 0; Padding = new Padding(0, 0, 0, size); _tabArea.ClientRectangle = new Rectangle(Padding.Left, ClientRectangle.Bottom - size, ClientRectangle.Width - Padding.Horizontal, size); break; case DarkDockArea.Bottom: - size = _tabArea.Visible ? Consts.ToolWindowTabAreaSize : 0; + size = _tabArea.Visible ? ThemeProvider.Theme.Sizes.ToolWindowTabAreaSize : 0; Padding = new Padding(1, 0, 0, size); _tabArea.ClientRectangle = new Rectangle(Padding.Left, ClientRectangle.Bottom - size, ClientRectangle.Width - Padding.Horizontal, size); break; @@ -183,7 +183,7 @@ private void UpdateTabArea() if (DockArea == DarkDockArea.Document) { - var dropdownSize = Consts.DocumentTabAreaSize; + var dropdownSize = ThemeProvider.Theme.Sizes.DocumentTabAreaSize; _tabArea.DropdownRectangle = new Rectangle(_tabArea.ClientRectangle.Right - dropdownSize, 0, dropdownSize, dropdownSize); } @@ -231,8 +231,8 @@ private void BuildTabs() tab.ShowSeparator = true; width += 1; - var y = DockArea == DarkDockArea.Document ? 0 : ClientRectangle.Height - Consts.ToolWindowTabAreaSize; - var height = DockArea == DarkDockArea.Document ? Consts.DocumentTabAreaSize : Consts.ToolWindowTabAreaSize; + var y = DockArea == DarkDockArea.Document ? 0 : ClientRectangle.Height - ThemeProvider.Theme.Sizes.ToolWindowTabAreaSize; + var height = DockArea == DarkDockArea.Document ? ThemeProvider.Theme.Sizes.DocumentTabAreaSize : ThemeProvider.Theme.Sizes.ToolWindowTabAreaSize; var tabRect = new Rectangle(_tabArea.ClientRectangle.Left + totalSize, y, width, height); tab.ClientRectangle = tabRect; @@ -629,7 +629,7 @@ protected override void OnPaint(PaintEventArgs e) { var g = e.Graphics; - using (var b = new SolidBrush(Colors.GreyBackground)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.GreyBackground)) { g.FillRectangle(b, ClientRectangle); } @@ -637,7 +637,7 @@ protected override void OnPaint(PaintEventArgs e) if (!_tabArea.Visible) return; - using (var b = new SolidBrush(Colors.MediumBackground)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.MediumBackground)) { g.FillRectangle(b, _tabArea.ClientRectangle); } @@ -654,7 +654,7 @@ protected override void OnPaint(PaintEventArgs e) { // Color divider var isActiveGroup = DockPanel.ActiveGroup == this; - var divColor = isActiveGroup ? Colors.BlueSelection : Colors.GreySelection; + var divColor = isActiveGroup ? ThemeProvider.Theme.Colors.BlueSelection : ThemeProvider.Theme.Colors.GreySelection; using (var b = new SolidBrush(divColor)) { var divRect = new Rectangle(_tabArea.ClientRectangle.Left, _tabArea.ClientRectangle.Bottom - 2, _tabArea.ClientRectangle.Width, 2); @@ -664,7 +664,7 @@ protected override void OnPaint(PaintEventArgs e) // Content dropdown list var dropdownRect = new Rectangle(_tabArea.DropdownRectangle.Left, _tabArea.DropdownRectangle.Top, _tabArea.DropdownRectangle.Width, _tabArea.DropdownRectangle.Height - 2); - using (var b = new SolidBrush(Colors.MediumBackground)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.MediumBackground)) { g.FillRectangle(b, dropdownRect); } @@ -683,13 +683,13 @@ private void PaintDocumentTab(Graphics g, DarkDockTab tab) var isVisibleTab = VisibleContent == tab.DockContent; var isActiveGroup = DockPanel.ActiveGroup == this; - var bgColor = isVisibleTab ? Colors.BlueSelection : Colors.DarkBackground; + var bgColor = isVisibleTab ? ThemeProvider.Theme.Colors.BlueSelection : ThemeProvider.Theme.Colors.DarkBackground; if (!isActiveGroup) - bgColor = isVisibleTab ? Colors.GreySelection : Colors.DarkBackground; + bgColor = isVisibleTab ? ThemeProvider.Theme.Colors.GreySelection : ThemeProvider.Theme.Colors.DarkBackground; if (tab.Hot && !isVisibleTab) - bgColor = Colors.MediumBackground; + bgColor = ThemeProvider.Theme.Colors.MediumBackground; using (var b = new SolidBrush(bgColor)) { @@ -699,7 +699,7 @@ private void PaintDocumentTab(Graphics g, DarkDockTab tab) // Draw separators if (tab.ShowSeparator) { - using (var p = new Pen(Colors.DarkBorder)) + using (var p = new Pen(ThemeProvider.Theme.Colors.DarkBorder)) { g.DrawLine(p, tabRect.Right - 1, tabRect.Top, tabRect.Right - 1, tabRect.Bottom); } @@ -723,7 +723,7 @@ private void PaintDocumentTab(Graphics g, DarkDockTab tab) }; // Draw text - var textColor = isVisibleTab ? Colors.LightText : Colors.DisabledText; + var textColor = isVisibleTab ? ThemeProvider.Theme.Colors.LightText : ThemeProvider.Theme.Colors.DisabledText; using (var b = new SolidBrush(textColor)) { var textRect = new Rectangle(tabRect.Left + 5 + xOffset, tabRect.Top, tabRect.Width - tab.CloseButtonRectangle.Width - 7 - 5 - xOffset, tabRect.Height); @@ -751,10 +751,10 @@ private void PaintToolWindowTab(Graphics g, DarkDockTab tab) var isVisibleTab = VisibleContent == tab.DockContent; - var bgColor = isVisibleTab ? Colors.GreyBackground : Colors.DarkBackground; + var bgColor = isVisibleTab ? ThemeProvider.Theme.Colors.GreyBackground : ThemeProvider.Theme.Colors.DarkBackground; if (tab.Hot && !isVisibleTab) - bgColor = Colors.MediumBackground; + bgColor = ThemeProvider.Theme.Colors.MediumBackground; using (var b = new SolidBrush(bgColor)) { @@ -764,7 +764,7 @@ private void PaintToolWindowTab(Graphics g, DarkDockTab tab) // Draw separators if (tab.ShowSeparator) { - using (var p = new Pen(Colors.DarkBorder)) + using (var p = new Pen(ThemeProvider.Theme.Colors.DarkBorder)) { g.DrawLine(p, tabRect.Right - 1, tabRect.Top, tabRect.Right - 1, tabRect.Bottom); } @@ -778,7 +778,7 @@ private void PaintToolWindowTab(Graphics g, DarkDockTab tab) Trimming = StringTrimming.EllipsisCharacter }; - var textColor = isVisibleTab ? Colors.BlueHighlight : Colors.DisabledText; + var textColor = isVisibleTab ? ThemeProvider.Theme.Colors.BlueHighlight : ThemeProvider.Theme.Colors.DisabledText; using (var b = new SolidBrush(textColor)) { var textRect = new Rectangle(tabRect.Left + 5, tabRect.Top, tabRect.Width - 5, tabRect.Height); diff --git a/DarkUI/Docking/DarkDockPanel.cs b/DarkUI/Docking/DarkDockPanel.cs index 6afb3dd..1ab3d9e 100644 --- a/DarkUI/Docking/DarkDockPanel.cs +++ b/DarkUI/Docking/DarkDockPanel.cs @@ -122,7 +122,7 @@ public DarkDockPanel() _regions = new Dictionary(); _contents = new List(); - BackColor = Colors.GreyBackground; + BackColor = ThemeProvider.Theme.Colors.GreyBackground; CreateRegions(); } diff --git a/DarkUI/Docking/DarkDockRegion.cs b/DarkUI/Docking/DarkDockRegion.cs index 8875346..aa3e5fd 100644 --- a/DarkUI/Docking/DarkDockRegion.cs +++ b/DarkUI/Docking/DarkDockRegion.cs @@ -375,13 +375,13 @@ protected override void OnPaint(PaintEventArgs e) return; // Fill body - using (var b = new SolidBrush(Colors.GreyBackground)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.GreyBackground)) { g.FillRectangle(b, ClientRectangle); } // Draw border - using (var p = new Pen(Colors.DarkBorder)) + using (var p = new Pen(ThemeProvider.Theme.Colors.DarkBorder)) { // Top border if (DockArea == DarkDockArea.Document) diff --git a/DarkUI/Docking/DarkDocument.cs b/DarkUI/Docking/DarkDocument.cs index 3185c12..9d819b8 100644 --- a/DarkUI/Docking/DarkDocument.cs +++ b/DarkUI/Docking/DarkDocument.cs @@ -21,7 +21,7 @@ public class DarkDocument : DarkDockContent public DarkDocument() { - BackColor = Colors.GreyBackground; + BackColor = ThemeProvider.Theme.Colors.GreyBackground; base.DefaultDockArea = DarkDockArea.Document; } diff --git a/DarkUI/Docking/DarkToolWindow.cs b/DarkUI/Docking/DarkToolWindow.cs index 5d7c783..15a4a7b 100644 --- a/DarkUI/Docking/DarkToolWindow.cs +++ b/DarkUI/Docking/DarkToolWindow.cs @@ -39,8 +39,8 @@ public DarkToolWindow() ControlStyles.ResizeRedraw | ControlStyles.UserPaint, true); - BackColor = Colors.GreyBackground; - base.Padding = new Padding(0, Consts.ToolWindowHeaderSize, 0, 0); + //BackColor = ThemeProvider.Theme.Colors.GreyBackground; + base.Padding = new Padding(0, ThemeProvider.Theme.Sizes.ToolWindowHeaderSize, 0, 0); UpdateCloseButton(); } @@ -64,13 +64,13 @@ private void UpdateCloseButton() X = ClientRectangle.Left, Y = ClientRectangle.Top, Width = ClientRectangle.Width, - Height = Consts.ToolWindowHeaderSize + Height = ThemeProvider.Theme.Sizes.ToolWindowHeaderSize }; _closeButtonRect = new Rectangle { X = ClientRectangle.Right - DockIcons.tw_close.Width - 5 - 3, - Y = ClientRectangle.Top + (Consts.ToolWindowHeaderSize / 2) - (DockIcons.tw_close.Height / 2), + Y = ClientRectangle.Top + (ThemeProvider.Theme.Sizes.ToolWindowHeaderSize / 2) - (DockIcons.tw_close.Height / 2), Width = DockIcons.tw_close.Width, Height = DockIcons.tw_close.Height }; @@ -158,7 +158,7 @@ protected override void OnPaint(PaintEventArgs e) var g = e.Graphics; // Fill body - using (var b = new SolidBrush(Colors.GreyBackground)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.GreyBackground)) { g.FillRectangle(b, ClientRectangle); } @@ -166,20 +166,20 @@ protected override void OnPaint(PaintEventArgs e) var isActive = IsActive(); // Draw header - var bgColor = isActive ? Colors.BlueBackground : Colors.HeaderBackground; - var darkColor = isActive ? Colors.DarkBlueBorder : Colors.DarkBorder; - var lightColor = isActive ? Colors.LightBlueBorder : Colors.LightBorder; + var bgColor = isActive ? ThemeProvider.Theme.Colors.BlueBackground : ThemeProvider.Theme.Colors.HeaderBackground; + var darkColor = isActive ? ThemeProvider.Theme.Colors.DarkBlueBorder : ThemeProvider.Theme.Colors.DarkBorder; + var lightColor = isActive ? ThemeProvider.Theme.Colors.LightBlueBorder : ThemeProvider.Theme.Colors.LightBorder; using (var b = new SolidBrush(bgColor)) { - var bgRect = new Rectangle(0, 0, ClientRectangle.Width, Consts.ToolWindowHeaderSize); + var bgRect = new Rectangle(0, 0, ClientRectangle.Width, ThemeProvider.Theme.Sizes.ToolWindowHeaderSize); g.FillRectangle(b, bgRect); } using (var p = new Pen(darkColor)) { g.DrawLine(p, ClientRectangle.Left, 0, ClientRectangle.Right, 0); - g.DrawLine(p, ClientRectangle.Left, Consts.ToolWindowHeaderSize - 1, ClientRectangle.Right, Consts.ToolWindowHeaderSize - 1); + g.DrawLine(p, ClientRectangle.Left, ThemeProvider.Theme.Sizes.ToolWindowHeaderSize - 1, ClientRectangle.Right, ThemeProvider.Theme.Sizes.ToolWindowHeaderSize - 1); } using (var p = new Pen(lightColor)) @@ -192,14 +192,14 @@ protected override void OnPaint(PaintEventArgs e) // Draw icon if (Icon != null) { - g.DrawImageUnscaled(Icon, ClientRectangle.Left + 5, ClientRectangle.Top + (Consts.ToolWindowHeaderSize / 2) - (Icon.Height / 2) + 1); + g.DrawImageUnscaled(Icon, ClientRectangle.Left + 5, ClientRectangle.Top + (ThemeProvider.Theme.Sizes.ToolWindowHeaderSize / 2) - (Icon.Height / 2) + 1); xOffset = Icon.Width + 8; } // Draw text - using (var b = new SolidBrush(Colors.LightText)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.LightText)) { - var textRect = new Rectangle(xOffset, 0, ClientRectangle.Width - 4 - xOffset, Consts.ToolWindowHeaderSize); + var textRect = new Rectangle(xOffset, 0, ClientRectangle.Width - 4 - xOffset, ThemeProvider.Theme.Sizes.ToolWindowHeaderSize); var format = new StringFormat { diff --git a/DarkUI/Forms/DarkForm.cs b/DarkUI/Forms/DarkForm.cs index f135c8a..55f6593 100644 --- a/DarkUI/Forms/DarkForm.cs +++ b/DarkUI/Forms/DarkForm.cs @@ -34,7 +34,7 @@ public bool FlatBorder public DarkForm() { - BackColor = Colors.GreyBackground; + BackColor = ThemeProvider.Theme.Colors.GreyBackground; } #endregion @@ -50,7 +50,7 @@ protected override void OnPaintBackground(PaintEventArgs e) var g = e.Graphics; - using (var p = new Pen(Colors.DarkBorder)) + using (var p = new Pen(ThemeProvider.Theme.Colors.DarkBorder)) { var modRect = new Rectangle(ClientRectangle.Location, new Size(ClientRectangle.Width - 1, ClientRectangle.Height - 1)); g.DrawRectangle(p, modRect); diff --git a/DarkUI/Renderers/DarkMenuRenderer.cs b/DarkUI/Renderers/DarkMenuRenderer.cs index ef80e2f..5a0c67d 100644 --- a/DarkUI/Renderers/DarkMenuRenderer.cs +++ b/DarkUI/Renderers/DarkMenuRenderer.cs @@ -15,16 +15,16 @@ protected override void Initialize(ToolStrip toolStrip) { base.Initialize(toolStrip); - toolStrip.BackColor = Colors.GreyBackground; - toolStrip.ForeColor = Colors.LightText; + toolStrip.BackColor = ThemeProvider.Theme.Colors.GreyBackground; + toolStrip.ForeColor = ThemeProvider.Theme.Colors.LightText; } protected override void InitializeItem(ToolStripItem item) { base.InitializeItem(item); - item.BackColor = Colors.GreyBackground; - item.ForeColor = Colors.LightText; + item.BackColor = ThemeProvider.Theme.Colors.GreyBackground; + item.ForeColor = ThemeProvider.Theme.Colors.LightText; if (item.GetType() == typeof(ToolStripSeparator)) { @@ -39,7 +39,7 @@ protected override void InitializeItem(ToolStripItem item) protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e) { var g = e.Graphics; - using (var b = new SolidBrush(Colors.GreyBackground)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.GreyBackground)) { g.FillRectangle(b, e.AffectedBounds); } @@ -51,7 +51,7 @@ protected override void OnRenderImageMargin(ToolStripRenderEventArgs e) var rect = new Rectangle(0, 0, e.ToolStrip.Width - 1, e.ToolStrip.Height - 1); - using (var p = new Pen(Colors.LightBorder)) + using (var p = new Pen(ThemeProvider.Theme.Colors.LightBorder)) { g.DrawRectangle(p, rect); } @@ -64,12 +64,12 @@ protected override void OnRenderItemCheck(ToolStripItemImageRenderEventArgs e) var rect = new Rectangle(e.ImageRectangle.Left - 2, e.ImageRectangle.Top - 2, e.ImageRectangle.Width + 4, e.ImageRectangle.Height + 4); - using (var b = new SolidBrush(Colors.LightBorder)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.LightBorder)) { g.FillRectangle(b, rect); } - using (var p = new Pen(Colors.BlueHighlight)) + using (var p = new Pen(ThemeProvider.Theme.Colors.BlueHighlight)) { var modRect = new Rectangle(rect.Left, rect.Top, rect.Width - 1, rect.Height - 1); g.DrawRectangle(p, modRect); @@ -87,7 +87,7 @@ protected override void OnRenderSeparator(ToolStripSeparatorRenderEventArgs e) var rect = new Rectangle(1, 3, e.Item.Width, 1); - using (var b = new SolidBrush(Colors.LightBorder)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.LightBorder)) { g.FillRectangle(b, rect); } @@ -95,7 +95,7 @@ protected override void OnRenderSeparator(ToolStripSeparatorRenderEventArgs e) protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e) { - e.ArrowColor = Colors.LightText; + e.ArrowColor = ThemeProvider.Theme.Colors.LightText; e.ArrowRectangle = new Rectangle(new Point(e.ArrowRectangle.Left, e.ArrowRectangle.Top - 1), e.ArrowRectangle.Size); base.OnRenderArrow(e); @@ -105,12 +105,12 @@ protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs { var g = e.Graphics; - e.Item.ForeColor = e.Item.Enabled ? Colors.LightText : Colors.DisabledText; + e.Item.ForeColor = e.Item.Enabled ? ThemeProvider.Theme.Colors.LightText : ThemeProvider.Theme.Colors.DisabledText; if (e.Item.Enabled) { - var bgColor = e.Item.Selected ? Colors.GreyHighlight : e.Item.BackColor; + var bgColor = e.Item.Selected ? ThemeProvider.Theme.Colors.GreyHighlight : e.Item.BackColor; // Normal item var rect = new Rectangle(2, 0, e.Item.Width - 3, e.Item.Height); @@ -125,7 +125,7 @@ protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs { if (((ToolStripMenuItem)e.Item).DropDown.Visible && e.Item.IsOnDropDown == false) { - using (var b = new SolidBrush(Colors.GreySelection)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.GreySelection)) { g.FillRectangle(b, rect); } diff --git a/DarkUI/Renderers/DarkToolStripRenderer.cs b/DarkUI/Renderers/DarkToolStripRenderer.cs index 334cfe7..78ffc0f 100644 --- a/DarkUI/Renderers/DarkToolStripRenderer.cs +++ b/DarkUI/Renderers/DarkToolStripRenderer.cs @@ -40,7 +40,7 @@ protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e) if (e.ToolStrip.GetType() == typeof(ToolStripOverflow)) { - using (var p = new Pen(Colors.GreyBackground)) + using (var p = new Pen(ThemeProvider.Theme.Colors.GreyBackground)) { var rect = new Rectangle(e.AffectedBounds.Left, e.AffectedBounds.Top, e.AffectedBounds.Width - 1, e.AffectedBounds.Height - 1); g.DrawRectangle(p, rect); @@ -62,7 +62,7 @@ protected override void OnRenderButtonBackground(ToolStripItemRenderEventArgs e) if (e.Item.Selected || e.Item.Pressed) { - using (var b = new SolidBrush(Colors.GreySelection)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.GreySelection)) { g.FillRectangle(b, rect); } @@ -74,7 +74,7 @@ protected override void OnRenderButtonBackground(ToolStripItemRenderEventArgs e) if (castItem.Checked) { - using (var b = new SolidBrush(Colors.GreySelection)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.GreySelection)) { g.FillRectangle(b, rect); } @@ -83,7 +83,7 @@ protected override void OnRenderButtonBackground(ToolStripItemRenderEventArgs e) if (castItem.Checked && castItem.Selected) { var modRect = new Rectangle(rect.Left, rect.Top, rect.Width - 1, rect.Height - 1); - using (var p = new Pen(Colors.GreyHighlight)) + using (var p = new Pen(ThemeProvider.Theme.Colors.GreyHighlight)) { g.DrawRectangle(p, modRect); } @@ -99,7 +99,7 @@ protected override void OnRenderDropDownButtonBackground(ToolStripItemRenderEven if (e.Item.Selected || e.Item.Pressed) { - using (var b = new SolidBrush(Colors.GreySelection)) + using (var b = new SolidBrush(ThemeProvider.Theme.Colors.GreySelection)) { g.FillRectangle(b, rect); } @@ -113,7 +113,7 @@ protected override void OnRenderGrip(ToolStripGripRenderEventArgs e) var g = e.Graphics; - using (var img = MenuIcons.grip.SetColor(Colors.LightBorder)) + using (var img = MenuIcons.grip.SetColor(ThemeProvider.Theme.Colors.LightBorder)) { g.DrawImageUnscaled(img, new Point(e.AffectedBounds.Left, e.AffectedBounds.Top)); } @@ -132,12 +132,12 @@ protected override void OnRenderSeparator(ToolStripSeparatorRenderEventArgs e) var rect = new Rectangle(3, 3, 2, e.Item.Height - 4); - using (var p = new Pen(Colors.DarkBorder)) + using (var p = new Pen(ThemeProvider.Theme.Colors.DarkBorder)) { g.DrawLine(p, rect.Left, rect.Top, rect.Left, rect.Height); } - using (var p = new Pen(Colors.LightBorder)) + using (var p = new Pen(ThemeProvider.Theme.Colors.LightBorder)) { g.DrawLine(p, rect.Left + 1, rect.Top, rect.Left + 1, rect.Height); } @@ -164,22 +164,22 @@ protected override void OnRenderOverflowButtonBackground(ToolStripItemRenderEven var castItem = (ToolStripOverflowButton)e.Item; - var bgColor = BasicColors.White; + var bgColor = BasicThemeProvider.Theme.Colors.White; if (castItem.Selected) - bgColor = StyleColors.Weak(style); + bgColor = StyleThemeProvider.Theme.Colors.Weak(style); if (castItem.Pressed) - bgColor = StyleColors.Medium(style); + bgColor = StyleThemeProvider.Theme.Colors.Medium(style); using (var b = new SolidBrush(bgColor)) { g.FillRectangle(b, rect); } - var fgColor = BasicColors.Grey; + var fgColor = BasicThemeProvider.Theme.Colors.Grey; if (castItem.Selected) - fgColor = StyleColors.Medium(style); + fgColor = StyleThemeProvider.Theme.Colors.Medium(style); if (castItem.Pressed) - fgColor = StyleColors.Strong(style); + fgColor = StyleThemeProvider.Theme.Colors.Strong(style); using (var p = new Pen(fgColor)) { @@ -187,7 +187,7 @@ protected override void OnRenderOverflowButtonBackground(ToolStripItemRenderEven g.DrawRectangle(p, modRect); } - using (var img = MenuIcons.overflow.SetColor(BasicColors.MediumGrey)) + using (var img = MenuIcons.overflow.SetColor(BasicThemeProvider.Theme.Colors.MediumGrey)) { g.DrawImageUnscaled(img, e.Item.Width - 13, e.Item.Height - 9); }*/ diff --git a/DarkUI/Win32/DockContentDragFilter.cs b/DarkUI/Win32/DockContentDragFilter.cs index c600c06..1193bbc 100644 --- a/DarkUI/Win32/DockContentDragFilter.cs +++ b/DarkUI/Win32/DockContentDragFilter.cs @@ -33,7 +33,7 @@ public DockContentDragFilter(DarkDockPanel dockPanel) { _dockPanel = dockPanel; - _highlightForm = new DarkTranslucentForm(Colors.BlueSelection); + _highlightForm = new DarkTranslucentForm(ThemeProvider.Theme.Colors.BlueSelection); } #endregion diff --git a/Example/Forms/Docking/DockDocument.cs b/Example/Forms/Docking/DockDocument.cs index fe8fa72..abd6184 100644 --- a/Example/Forms/Docking/DockDocument.cs +++ b/Example/Forms/Docking/DockDocument.cs @@ -48,5 +48,6 @@ public override void Close() } #endregion + } } diff --git a/Example/Forms/Docking/DockProject.Designer.cs b/Example/Forms/Docking/DockProject.Designer.cs index ca7679b..049185e 100644 --- a/Example/Forms/Docking/DockProject.Designer.cs +++ b/Example/Forms/Docking/DockProject.Designer.cs @@ -52,6 +52,7 @@ private void InitializeComponent() // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Transparent; this.Controls.Add(this.treeProject); this.DefaultDockArea = DarkUI.Docking.DarkDockArea.Left; this.DockText = "Project Explorer"; diff --git a/Example/Forms/Docking/DockProject.cs b/Example/Forms/Docking/DockProject.cs index 9fb539e..647921d 100644 --- a/Example/Forms/Docking/DockProject.cs +++ b/Example/Forms/Docking/DockProject.cs @@ -11,6 +11,8 @@ public DockProject() { InitializeComponent(); + BackColor = System.Drawing.Color.Transparent; + // Build dummy nodes var childCount = 0; for (var i = 0; i < 20; i++) diff --git a/Example/Forms/Docking/DockProperties.Designer.cs b/Example/Forms/Docking/DockProperties.Designer.cs index 1251611..78d46ff 100644 --- a/Example/Forms/Docking/DockProperties.Designer.cs +++ b/Example/Forms/Docking/DockProperties.Designer.cs @@ -31,7 +31,9 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.pnlMain = new System.Windows.Forms.Panel(); + this.panel3 = new System.Windows.Forms.Panel(); + this.cmbList = new DarkUI.Controls.DarkDropdownList(); + this.darkTitle3 = new DarkUI.Controls.DarkTitle(); this.panel1 = new System.Windows.Forms.Panel(); this.darkRadioButton3 = new DarkUI.Controls.DarkRadioButton(); this.darkRadioButton2 = new DarkUI.Controls.DarkRadioButton(); @@ -43,26 +45,40 @@ private void InitializeComponent() this.darkCheckBox1 = new DarkUI.Controls.DarkCheckBox(); this.darkTitle2 = new DarkUI.Controls.DarkTitle(); this.darkScrollBar1 = new DarkUI.Controls.DarkScrollBar(); - this.panel3 = new System.Windows.Forms.Panel(); - this.darkTitle3 = new DarkUI.Controls.DarkTitle(); - this.cmbList = new DarkUI.Controls.DarkDropdownList(); - this.pnlMain.SuspendLayout(); + this.panel3.SuspendLayout(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); - this.panel3.SuspendLayout(); this.SuspendLayout(); // - // pnlMain + // panel3 + // + this.panel3.AutoSize = true; + this.panel3.Controls.Add(this.cmbList); + this.panel3.Controls.Add(this.darkTitle3); + this.panel3.Dock = System.Windows.Forms.DockStyle.Top; + this.panel3.Location = new System.Drawing.Point(10, 196); + this.panel3.Name = "panel3"; + this.panel3.Padding = new System.Windows.Forms.Padding(0, 0, 0, 10); + this.panel3.Size = new System.Drawing.Size(250, 62); + this.panel3.TabIndex = 3; + // + // cmbList // - this.pnlMain.Controls.Add(this.panel3); - this.pnlMain.Controls.Add(this.panel1); - this.pnlMain.Controls.Add(this.panel2); - this.pnlMain.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlMain.Location = new System.Drawing.Point(0, 25); - this.pnlMain.Name = "pnlMain"; - this.pnlMain.Padding = new System.Windows.Forms.Padding(10, 10, 5, 10); - this.pnlMain.Size = new System.Drawing.Size(265, 425); - this.pnlMain.TabIndex = 0; + this.cmbList.Dock = System.Windows.Forms.DockStyle.Top; + this.cmbList.Location = new System.Drawing.Point(0, 26); + this.cmbList.Name = "cmbList"; + this.cmbList.Size = new System.Drawing.Size(250, 26); + this.cmbList.TabIndex = 8; + this.cmbList.Text = "darkDropdownList1"; + // + // darkTitle3 + // + this.darkTitle3.Dock = System.Windows.Forms.DockStyle.Top; + this.darkTitle3.Location = new System.Drawing.Point(0, 0); + this.darkTitle3.Name = "darkTitle3"; + this.darkTitle3.Size = new System.Drawing.Size(250, 26); + this.darkTitle3.TabIndex = 7; + this.darkTitle3.Text = "Lists"; // // panel1 // @@ -190,41 +206,13 @@ private void InitializeComponent() this.darkScrollBar1.TabIndex = 1; this.darkScrollBar1.Text = "darkScrollBar1"; // - // panel3 - // - this.panel3.AutoSize = true; - this.panel3.Controls.Add(this.cmbList); - this.panel3.Controls.Add(this.darkTitle3); - this.panel3.Dock = System.Windows.Forms.DockStyle.Top; - this.panel3.Location = new System.Drawing.Point(10, 196); - this.panel3.Name = "panel3"; - this.panel3.Padding = new System.Windows.Forms.Padding(0, 0, 0, 10); - this.panel3.Size = new System.Drawing.Size(250, 62); - this.panel3.TabIndex = 3; - // - // darkTitle3 - // - this.darkTitle3.Dock = System.Windows.Forms.DockStyle.Top; - this.darkTitle3.Location = new System.Drawing.Point(0, 0); - this.darkTitle3.Name = "darkTitle3"; - this.darkTitle3.Size = new System.Drawing.Size(250, 26); - this.darkTitle3.TabIndex = 7; - this.darkTitle3.Text = "Lists"; - // - // cmbList - // - this.cmbList.Dock = System.Windows.Forms.DockStyle.Top; - this.cmbList.Location = new System.Drawing.Point(0, 26); - this.cmbList.Name = "cmbList"; - this.cmbList.Size = new System.Drawing.Size(250, 26); - this.cmbList.TabIndex = 8; - this.cmbList.Text = "darkDropdownList1"; - // // DockProperties // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.pnlMain); + this.Controls.Add(this.panel3); + this.Controls.Add(this.panel1); + this.Controls.Add(this.panel2); this.Controls.Add(this.darkScrollBar1); this.DefaultDockArea = DarkUI.Docking.DarkDockArea.Right; this.DockText = "Properties"; @@ -233,20 +221,17 @@ private void InitializeComponent() this.Name = "DockProperties"; this.SerializationKey = "DockProperties"; this.Size = new System.Drawing.Size(280, 450); - this.pnlMain.ResumeLayout(false); - this.pnlMain.PerformLayout(); + this.panel3.ResumeLayout(false); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); this.panel2.ResumeLayout(false); this.panel2.PerformLayout(); - this.panel3.ResumeLayout(false); this.ResumeLayout(false); } #endregion - private System.Windows.Forms.Panel pnlMain; private System.Windows.Forms.Panel panel1; private DarkUI.Controls.DarkRadioButton darkRadioButton3; private DarkUI.Controls.DarkRadioButton darkRadioButton2; diff --git a/Example/Forms/Docking/DockProperties.cs b/Example/Forms/Docking/DockProperties.cs index 5fd81c1..98fa4ef 100644 --- a/Example/Forms/Docking/DockProperties.cs +++ b/Example/Forms/Docking/DockProperties.cs @@ -1,4 +1,5 @@ -using DarkUI.Controls; +using DarkUI.Config; +using DarkUI.Controls; using DarkUI.Docking; namespace Example @@ -11,6 +12,8 @@ public DockProperties() { InitializeComponent(); + panel1.BackColor = panel2.BackColor = panel3.BackColor = System.Drawing.Color.Transparent; + // Build dummy dropdown data cmbList.Items.Add(new DarkDropdownItem("Item1")); cmbList.Items.Add(new DarkDropdownItem("Item2")); diff --git a/Example/Forms/MainForm.Designer.cs b/Example/Forms/MainForm.Designer.cs index 839ef61..8b309f8 100644 --- a/Example/Forms/MainForm.Designer.cs +++ b/Example/Forms/MainForm.Designer.cs @@ -39,6 +39,9 @@ private void InitializeComponent() this.mnuClose = new System.Windows.Forms.ToolStripMenuItem(); this.mnuView = new System.Windows.Forms.ToolStripMenuItem(); this.mnuDialog = new System.Windows.Forms.ToolStripMenuItem(); + this.themeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.darkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.lightToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.mnuTools = new System.Windows.Forms.ToolStripMenuItem(); this.checkableToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.checkableWithIconToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -89,6 +92,7 @@ private void InitializeComponent() this.mnuNewFile, this.toolStripSeparator1, this.mnuClose}); + this.mnuFile.BackColor = System.Drawing.Color.Transparent; this.mnuFile.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); this.mnuFile.Name = "mnuFile"; this.mnuFile.Size = new System.Drawing.Size(37, 20); @@ -96,6 +100,7 @@ private void InitializeComponent() // // mnuNewFile // + this.mnuNewFile.BackColor = System.Drawing.Color.Transparent; this.mnuNewFile.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); this.mnuNewFile.Image = global::Example.Icons.NewFile_6276; this.mnuNewFile.Name = "mnuNewFile"; @@ -105,6 +110,7 @@ private void InitializeComponent() // // toolStripSeparator1 // + this.toolStripSeparator1.BackColor = System.Drawing.Color.Transparent; this.toolStripSeparator1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); this.toolStripSeparator1.Margin = new System.Windows.Forms.Padding(0, 0, 0, 1); this.toolStripSeparator1.Name = "toolStripSeparator1"; @@ -112,6 +118,7 @@ private void InitializeComponent() // // mnuClose // + this.mnuClose.BackColor = System.Drawing.Color.Transparent; this.mnuClose.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); this.mnuClose.Image = global::Example.Icons.Close_16xLG; this.mnuClose.Name = "mnuClose"; @@ -121,23 +128,56 @@ private void InitializeComponent() // // mnuView // + this.mnuView.BackColor = System.Drawing.Color.Transparent; this.mnuView.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.mnuDialog}); - this.mnuView.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); + this.mnuDialog, + this.themeToolStripMenuItem}); + this.mnuView.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); this.mnuView.Name = "mnuView"; this.mnuView.Size = new System.Drawing.Size(44, 20); this.mnuView.Text = "&View"; // // mnuDialog // + this.mnuDialog.BackColor = System.Drawing.Color.Transparent; this.mnuDialog.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); this.mnuDialog.Image = global::Example.Icons.properties_16xLG; this.mnuDialog.Name = "mnuDialog"; this.mnuDialog.Size = new System.Drawing.Size(130, 22); this.mnuDialog.Text = "&Dialog test"; // + // themeToolStripMenuItem + // + this.themeToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.themeToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.darkToolStripMenuItem, + this.lightToolStripMenuItem}); + this.themeToolStripMenuItem.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.themeToolStripMenuItem.Name = "themeToolStripMenuItem"; + this.themeToolStripMenuItem.Size = new System.Drawing.Size(130, 22); + this.themeToolStripMenuItem.Text = "Theme"; + // + // darkToolStripMenuItem + // + this.darkToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.darkToolStripMenuItem.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.darkToolStripMenuItem.Name = "darkToolStripMenuItem"; + this.darkToolStripMenuItem.Size = new System.Drawing.Size(101, 22); + this.darkToolStripMenuItem.Text = "Dark"; + this.darkToolStripMenuItem.Click += new System.EventHandler(this.darkToolStripMenuItem_Click); + // + // lightToolStripMenuItem + // + this.lightToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.lightToolStripMenuItem.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lightToolStripMenuItem.Name = "lightToolStripMenuItem"; + this.lightToolStripMenuItem.Size = new System.Drawing.Size(101, 22); + this.lightToolStripMenuItem.Text = "Light"; + this.lightToolStripMenuItem.Click += new System.EventHandler(this.lightToolStripMenuItem_Click); + // // mnuTools // + this.mnuTools.BackColor = System.Drawing.Color.Transparent; this.mnuTools.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.checkableToolStripMenuItem, this.checkableWithIconToolStripMenuItem, @@ -151,6 +191,7 @@ private void InitializeComponent() // // checkableToolStripMenuItem // + this.checkableToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; this.checkableToolStripMenuItem.CheckOnClick = true; this.checkableToolStripMenuItem.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); this.checkableToolStripMenuItem.Name = "checkableToolStripMenuItem"; @@ -159,6 +200,7 @@ private void InitializeComponent() // // checkableWithIconToolStripMenuItem // + this.checkableWithIconToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; this.checkableWithIconToolStripMenuItem.CheckOnClick = true; this.checkableWithIconToolStripMenuItem.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); this.checkableWithIconToolStripMenuItem.Image = global::Example.Icons.properties_16xLG; @@ -168,6 +210,7 @@ private void InitializeComponent() // // toolStripSeparator2 // + this.toolStripSeparator2.BackColor = System.Drawing.Color.Transparent; this.toolStripSeparator2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); this.toolStripSeparator2.Margin = new System.Windows.Forms.Padding(0, 0, 0, 1); this.toolStripSeparator2.Name = "toolStripSeparator2"; @@ -175,6 +218,7 @@ private void InitializeComponent() // // checkedToolStripMenuItem // + this.checkedToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; this.checkedToolStripMenuItem.Checked = true; this.checkedToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; this.checkedToolStripMenuItem.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); @@ -184,6 +228,7 @@ private void InitializeComponent() // // checkedWithIconToolStripMenuItem // + this.checkedWithIconToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; this.checkedWithIconToolStripMenuItem.Checked = true; this.checkedWithIconToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; this.checkedWithIconToolStripMenuItem.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); @@ -194,6 +239,8 @@ private void InitializeComponent() // // mnuWindow // + this.mnuWindow.BackColor = System.Drawing.Color.Transparent; + this.mnuWindow.BackColor = System.Drawing.Color.Transparent; this.mnuWindow.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.mnuProject, this.mnuProperties, @@ -207,6 +254,7 @@ private void InitializeComponent() // // mnuProject // + this.mnuProject.BackColor = System.Drawing.Color.Transparent; this.mnuProject.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); this.mnuProject.Image = global::Example.Icons.application_16x; this.mnuProject.Name = "mnuProject"; @@ -215,6 +263,7 @@ private void InitializeComponent() // // mnuProperties // + this.mnuProperties.BackColor = System.Drawing.Color.Transparent; this.mnuProperties.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); this.mnuProperties.Image = global::Example.Icons.properties_16xLG; this.mnuProperties.Name = "mnuProperties"; @@ -223,6 +272,7 @@ private void InitializeComponent() // // mnuConsole // + this.mnuConsole.BackColor = System.Drawing.Color.Transparent; this.mnuConsole.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); this.mnuConsole.Image = global::Example.Icons.Console; this.mnuConsole.Name = "mnuConsole"; @@ -231,6 +281,7 @@ private void InitializeComponent() // // mnuLayers // + this.mnuLayers.BackColor = System.Drawing.Color.Transparent; this.mnuLayers.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); this.mnuLayers.Image = global::Example.Icons.Collection_16xLG; this.mnuLayers.Name = "mnuLayers"; @@ -239,6 +290,7 @@ private void InitializeComponent() // // mnuHistory // + this.mnuHistory.BackColor = System.Drawing.Color.Transparent; this.mnuHistory.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); this.mnuHistory.Image = ((System.Drawing.Image)(resources.GetObject("mnuHistory.Image"))); this.mnuHistory.Name = "mnuHistory"; @@ -247,6 +299,7 @@ private void InitializeComponent() // // mnuHelp // + this.mnuHelp.BackColor = System.Drawing.Color.Transparent; this.mnuHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.mnuAbout}); this.mnuHelp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); @@ -256,6 +309,7 @@ private void InitializeComponent() // // mnuAbout // + this.mnuAbout.BackColor = System.Drawing.Color.Transparent; this.mnuAbout.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); this.mnuAbout.Image = global::Example.Icons.StatusAnnotations_Information_16xLG_color; this.mnuAbout.Name = "mnuAbout"; @@ -291,7 +345,7 @@ private void InitializeComponent() // stripMain // this.stripMain.AutoSize = false; - this.stripMain.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(63)))), ((int)(((byte)(65))))); + this.stripMain.BackColor = System.Drawing.Color.Transparent; this.stripMain.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); this.stripMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripStatusLabel1, @@ -407,6 +461,9 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; private System.Windows.Forms.ToolStripMenuItem checkedToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem checkedWithIconToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem themeToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem darkToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem lightToolStripMenuItem; } } diff --git a/Example/Forms/MainForm.cs b/Example/Forms/MainForm.cs index 0f9402d..c9448d2 100644 --- a/Example/Forms/MainForm.cs +++ b/Example/Forms/MainForm.cs @@ -1,4 +1,5 @@ -using DarkUI.Docking; +using DarkUI.Config; +using DarkUI.Docking; using DarkUI.Forms; using DarkUI.Win32; using System; @@ -193,6 +194,20 @@ private void About_Click(object sender, EventArgs e) about.ShowDialog(); } + private void darkToolStripMenuItem_Click(object sender, EventArgs e) + { + ThemeProvider.Theme = new DarkTheme(); + BackColor = ThemeProvider.Theme.Colors.GreyBackground; + this.Refresh(); + } + + private void lightToolStripMenuItem_Click(object sender, EventArgs e) + { + ThemeProvider.Theme = new LightTheme(); + BackColor = ThemeProvider.Theme.Colors.GreyBackground; + this.Refresh(); + } + #endregion #region Serialization Region diff --git a/Example/Forms/MainForm.resx b/Example/Forms/MainForm.resx index b727939..34922a2 100644 --- a/Example/Forms/MainForm.resx +++ b/Example/Forms/MainForm.resx @@ -124,256 +124,9 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1 - MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsEAAA7BAbiRa+0AADnsaVRYdFhNTDpjb20uYWRvYmUu - eG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/ - Pgo8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29y - ZSA1LjYtYzAxNCA3OS4xNTY3OTcsIDIwMTQvMDgvMjAtMDk6NTM6MDIgICAgICAgICI+CiAgIDxyZGY6 - UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+ - CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnhtcD0i - aHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgICAgICAgICAgeG1sbnM6eG1wTU09Imh0dHA6 - Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iCiAgICAgICAgICAgIHhtbG5zOnN0RXZ0PSJodHRwOi8v - bnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiCiAgICAgICAgICAgIHhtbG5z - OmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIKICAgICAgICAgICAgeG1sbnM6cGhv - dG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIgogICAgICAgICAgICB4bWxu - czp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZXhp - Zj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iPgogICAgICAgICA8eG1wOkNyZWF0b3JUb29s - PkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE0IChXaW5kb3dzKTwveG1wOkNyZWF0b3JUb29sPgogICAgICAg - ICA8eG1wOkNyZWF0ZURhdGU+MjAxNS0wOS0xOVQxMzoyMTozOCswMTowMDwveG1wOkNyZWF0ZURhdGU+ - CiAgICAgICAgIDx4bXA6TWV0YWRhdGFEYXRlPjIwMTUtMDktMTlUMTM6MjE6MzgrMDE6MDA8L3htcDpN - ZXRhZGF0YURhdGU+CiAgICAgICAgIDx4bXA6TW9kaWZ5RGF0ZT4yMDE1LTA5LTE5VDEzOjIxOjM4KzAx - OjAwPC94bXA6TW9kaWZ5RGF0ZT4KICAgICAgICAgPHhtcE1NOkluc3RhbmNlSUQ+eG1wLmlpZDphYjNi - MTFjYS1kNGVkLTg1NGEtOWIyOS03YjVjYmU3MThlYzI8L3htcE1NOkluc3RhbmNlSUQ+CiAgICAgICAg - IDx4bXBNTTpEb2N1bWVudElEPmFkb2JlOmRvY2lkOnBob3Rvc2hvcDpmNzk1YTE2Ny01ZWM4LTExZTUt - OGQ5ZS1kNDEyNmVjNWZiMTE8L3htcE1NOkRvY3VtZW50SUQ+CiAgICAgICAgIDx4bXBNTTpPcmlnaW5h - bERvY3VtZW50SUQ+eG1wLmRpZDo1MDYxYzliMi0zMGRkLTcyNGEtYjM3ZS05OTdiYmFmYWYzY2M8L3ht - cE1NOk9yaWdpbmFsRG9jdW1lbnRJRD4KICAgICAgICAgPHhtcE1NOkhpc3Rvcnk+CiAgICAgICAgICAg - IDxyZGY6U2VxPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4K - ICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5jcmVhdGVkPC9zdEV2dDphY3Rpb24+CiAgICAg - ICAgICAgICAgICAgIDxzdEV2dDppbnN0YW5jZUlEPnhtcC5paWQ6NTA2MWM5YjItMzBkZC03MjRhLWIz - N2UtOTk3YmJhZmFmM2NjPC9zdEV2dDppbnN0YW5jZUlEPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6 - d2hlbj4yMDE1LTA5LTE5VDEzOjIxOjM4KzAxOjAwPC9zdEV2dDp3aGVuPgogICAgICAgICAgICAgICAg - ICA8c3RFdnQ6c29mdHdhcmVBZ2VudD5BZG9iZSBQaG90b3Nob3AgQ0MgMjAxNCAoV2luZG93cyk8L3N0 - RXZ0OnNvZnR3YXJlQWdlbnQ+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICAgICA8 - cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFj - dGlvbj5zYXZlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJ - RD54bXAuaWlkOmFiM2IxMWNhLWQ0ZWQtODU0YS05YjI5LTdiNWNiZTcxOGVjMjwvc3RFdnQ6aW5zdGFu - Y2VJRD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OndoZW4+MjAxNS0wOS0xOVQxMzoyMTozOCswMTow - MDwvc3RFdnQ6d2hlbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnNvZnR3YXJlQWdlbnQ+QWRvYmUg - UGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpPC9zdEV2dDpzb2Z0d2FyZUFnZW50PgogICAgICAgICAg - ICAgICAgICA8c3RFdnQ6Y2hhbmdlZD4vPC9zdEV2dDpjaGFuZ2VkPgogICAgICAgICAgICAgICA8L3Jk - ZjpsaT4KICAgICAgICAgICAgPC9yZGY6U2VxPgogICAgICAgICA8L3htcE1NOkhpc3Rvcnk+CiAgICAg - ICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgICAgIDxwaG90b3Nob3A6Q29s - b3JNb2RlPjM8L3Bob3Rvc2hvcDpDb2xvck1vZGU+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8 - L3RpZmY6T3JpZW50YXRpb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjk2MDAwMC8xMDAwMDwv - dGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WVJlc29sdXRpb24+OTYwMDAwLzEwMDAwPC90 - aWZmOllSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29s - dXRpb25Vbml0PgogICAgICAgICA8ZXhpZjpDb2xvclNwYWNlPjY1NTM1PC9leGlmOkNvbG9yU3BhY2U+ - CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4xNjwvZXhpZjpQaXhlbFhEaW1lbnNpb24+CiAg - ICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4xNjwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAg - IDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAog - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - IAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAK - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAog - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - IAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAK - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg - ICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIAo8P3hwYWNrZXQgZW5kPSJ3Ij8+iJwASgAA - AFdJREFUOE/tzjEOwCAMQ9GcLfe/S2HJ6oohCKVWCkhsDG8jHwsAMTPsaLc9oKpLPgGPlKf+ogEvs4No - aoEHR2mAPYrSQFyQoYH4S+YuOL1gFl2wqgf2QV5u4jFIagD6hAAAAABJRU5ErkJggg== + MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsEAAA7BAbiRa+0AAABXSURBVDhP7c4xDsAgDEPRnC33 + v0thyeqKIQilVgpIbAxvIx8LADEz7Gi3PaCqSz4Bj5Sn/qIBL7ODaGqBB0dpgD2K0kBckKGB+EvmLji9 + YBZdsKoH9kFebuIxSGoA+oQAAAAASUVORK5CYII=