Explorar o código

More minimal UI and some bug fixes (v11.2)

deadmoon %!s(int64=3) %!d(string=hai) anos
pai
achega
2bc335ebd2
Modificáronse 42 ficheiros con 2115 adicións e 2834 borrados
  1. 4 0
      CHANGELOG.md
  2. 2 2
      Optimizer/Controls/AppCard.Designer.cs
  3. 165 0
      Optimizer/Controls/ColorOverrider.cs
  4. 2 2
      Optimizer/Controls/MoonCheck.cs
  5. 3 3
      Optimizer/Controls/MoonCheckList.cs
  6. 46 0
      Optimizer/Controls/MoonList.cs
  7. 2 2
      Optimizer/Controls/MoonMenuRenderer.cs
  8. 2 2
      Optimizer/Controls/MoonProgress.cs
  9. 2 2
      Optimizer/Controls/MoonRadio.cs
  10. 328 0
      Optimizer/Controls/MoonTabs.cs
  11. 78 0
      Optimizer/Controls/MoonToggle.cs
  12. 91 0
      Optimizer/Controls/ToggleCard.Designer.cs
  13. 39 0
      Optimizer/Controls/ToggleCard.cs
  14. 120 0
      Optimizer/Controls/ToggleCard.resx
  15. 0 53
      Optimizer/Controls/ToggleSwitch/ImageHelper.cs
  16. 0 1035
      Optimizer/Controls/ToggleSwitch/ToggleSwitch.cs
  17. 0 343
      Optimizer/Controls/ToggleSwitch/ToggleSwitchRenderer.cs
  18. 0 81
      Optimizer/Controls/ToggleSwitch/ToggleSwitchRendererBase.cs
  19. 2 2
      Optimizer/Forms/CleanPreviewForm.Designer.cs
  20. 20 20
      Optimizer/Forms/FirstRunForm.Designer.cs
  21. 874 880
      Optimizer/Forms/MainForm.Designer.cs
  22. 241 269
      Optimizer/Forms/MainForm.cs
  23. 14 0
      Optimizer/Forms/MainForm.resx
  24. 2 2
      Optimizer/Forms/StartupPreviewForm.Designer.cs
  25. 2 2
      Optimizer/Forms/StartupRestoreForm.Designer.cs
  26. 24 11
      Optimizer/Optimizer.csproj
  27. 46 34
      Optimizer/Options.cs
  28. 1 1
      Optimizer/Program.cs
  29. 0 5
      Optimizer/Resources/CN.json
  30. 0 4
      Optimizer/Resources/DE.json
  31. 0 5
      Optimizer/Resources/EL.json
  32. 0 5
      Optimizer/Resources/EN.json
  33. 0 5
      Optimizer/Resources/ES.json
  34. 0 5
      Optimizer/Resources/FR.json
  35. 0 5
      Optimizer/Resources/IT.json
  36. 0 5
      Optimizer/Resources/PT.json
  37. 0 5
      Optimizer/Resources/RU.json
  38. 0 5
      Optimizer/Resources/TR.json
  39. 0 2
      Optimizer/SilentConfig.cs
  40. 0 32
      Optimizer/SilentOps.cs
  41. 4 4
      README.md
  42. 1 1
      version.txt

+ 4 - 0
CHANGELOG.md

@@ -2,6 +2,10 @@
 
 All notable changes to this project will be documented in this file.
 
+## [11.2] - 2022-01-28
+- New: Interface has been slightly reworked to be easy on eyes
+- Couple of bug fixes
+
 ## [11.1] - 2022-01-23
 - New: Major browsers support in Cleaner (clear cache, cookies, history, session, passwords)
 

+ 2 - 2
Optimizer/Controls/AppCard.Designer.cs

@@ -29,7 +29,7 @@ namespace Optimizer
         /// </summary>
         private void InitializeComponent()
         {
-            this.appTitle = new Optimizer.ColoredCheck();
+            this.appTitle = new Optimizer.MoonCheck();
             this.appImage = new System.Windows.Forms.PictureBox();
             ((System.ComponentModel.ISupportInitialize)(this.appImage)).BeginInit();
             this.SuspendLayout();
@@ -77,7 +77,7 @@ namespace Optimizer
 
         #endregion
 
-        internal ColoredCheck appTitle;
+        internal MoonCheck appTitle;
         internal System.Windows.Forms.PictureBox appImage;
     }
 }

+ 165 - 0
Optimizer/Controls/ColorOverrider.cs

@@ -0,0 +1,165 @@
+using Microsoft.Win32;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Reflection;
+
+
+namespace Optimizer
+{
+    public class ColorOverrider
+    {
+        public static event Action SystemColorsChanging;
+        public static event Action SystemColorsChanged;
+
+        private int[] OriginalColors { get; }
+        private IReadOnlyDictionary<int, int> KnownOriginalColors;
+
+        private int[] _colorTable;
+        private readonly FieldInfo _colorTableField;
+        private readonly PropertyInfo _threadDataProperty;
+
+        public ColorOverrider()
+        {
+            // force init color table
+            byte unused = SystemColors.Window.R;
+
+            var systemDrawingAssembly = typeof(Color).Assembly;
+
+            string colorTableField = "colorTable";
+
+            _colorTableField = systemDrawingAssembly.GetType("System.Drawing.KnownColorTable")
+                .GetField(colorTableField, BindingFlags.Static | BindingFlags.NonPublic);
+
+            _colorTable = readColorTable();
+            SystemEvents.UserPreferenceChanging += userPreferenceChanging;
+
+            OriginalColors = _colorTable.ToArray();
+            KnownOriginalColors = KnownColors.Cast<int>()
+                .ToDictionary(i => i, i => OriginalColors[i]);
+
+            _threadDataProperty = systemDrawingAssembly.GetType("System.Drawing.SafeNativeMethods")
+                .GetNestedType("Gdip", BindingFlags.NonPublic)
+                .GetProperty("ThreadData", BindingFlags.Static | BindingFlags.NonPublic);
+
+            string systemBrushesKeyField = "SystemBrushesKey";
+
+
+            SystemBrushesKey = typeof(SystemBrushes)
+                .GetField(systemBrushesKeyField, BindingFlags.Static | BindingFlags.NonPublic)
+                ?.GetValue(null);
+
+            SystemPensKey = typeof(SystemPens)
+                .GetField("SystemPensKey", BindingFlags.Static | BindingFlags.NonPublic)
+                ?.GetValue(null);
+        }
+
+        private void userPreferenceChanging(object sender, UserPreferenceChangingEventArgs e)
+        {
+            if (e.Category != UserPreferenceCategory.Color)
+                return;
+
+            _colorTable = readColorTable();
+            fireColorsChangedEvents();
+        }
+
+        private static void fireColorsChangedEvents()
+        {
+            SystemColorsChanging?.Invoke();
+            SystemColorsChanged?.Invoke();
+        }
+
+        private int[] readColorTable() =>
+            (int[])_colorTableField.GetValue(null);
+
+        public void SetColor(KnownColor knownColor, int argb)
+        {
+            setColor(knownColor, argb);
+
+            if (SystemBrushesKey != null)
+                ThreadData[SystemBrushesKey] = null;
+
+            if (SystemPensKey != null)
+                ThreadData[SystemPensKey] = null;
+
+            fireColorsChangedEvents();
+        }
+
+        private void setColor(KnownColor knownColor, int argb) =>
+            _colorTable[(int)knownColor] = argb;
+
+        public int GetOriginalColor(KnownColor knownColor) =>
+            OriginalColors[(int)knownColor];
+
+        public int GetColor(KnownColor knownColor)
+        {
+            if (!KnownColors.Contains(knownColor))
+                throw new ArgumentException();
+
+            return _colorTable[(int)knownColor];
+        }
+
+        public IReadOnlyDictionary<int, int> Save() =>
+            KnownColors.Cast<int>()
+                .ToDictionary(i => i, i => _colorTable[i]);
+
+        public void Load(IReadOnlyDictionary<int, int> saved)
+        {
+            foreach (var color in KnownColors)
+            {
+                int v;
+                var value = saved.TryGetValue((int)color, out v);
+                setColor(color, v);
+            }
+
+            if (SystemBrushesKey != null)
+                ThreadData[SystemBrushesKey] = null;
+
+            if (SystemPensKey != null)
+                ThreadData[SystemPensKey] = null;
+
+            fireColorsChangedEvents();
+        }
+
+        public void Reset(KnownColor color) =>
+            SetColor(color, OriginalColors[(int)color]);
+
+        public void ResetAll() =>
+            Load(KnownOriginalColors);
+
+        private IDictionary ThreadData =>
+            (IDictionary)_threadDataProperty.GetValue(null, null);
+
+        private object SystemBrushesKey { get; }
+        private object SystemPensKey { get; }
+
+        public readonly HashSet<KnownColor> KnownColors = new HashSet<KnownColor>(
+            new[]
+            {
+                SystemColors.Control,
+                SystemColors.ControlText,
+
+                SystemColors.ButtonFace, // menu gradient
+				SystemColors.ButtonShadow, // menu border
+
+				SystemColors.Window,
+                SystemColors.WindowText,
+                SystemColors.GrayText,
+
+                SystemColors.HotTrack,
+                SystemColors.Highlight,
+                SystemColors.HighlightText,
+
+                SystemColors.ActiveCaption,
+                SystemColors.GradientActiveCaption,
+
+                SystemColors.InactiveCaption,
+                SystemColors.GradientInactiveCaption,
+
+                SystemColors.ActiveBorder
+            }.Select(_ => _.ToKnownColor())
+        );
+    }
+}

+ 2 - 2
Optimizer/Controls/ColoredCheck.cs → Optimizer/Controls/MoonCheck.cs

@@ -4,9 +4,9 @@ using System.Windows.Forms;
 
 namespace Optimizer
 {
-    public class ColoredCheck : CheckBox
+    public class MoonCheck : CheckBox
     {
-        public ColoredCheck()
+        public MoonCheck()
         {
             DoubleBuffered = true;
         }

+ 3 - 3
Optimizer/Controls/ColoredCheckList.cs → Optimizer/Controls/MoonCheckList.cs

@@ -3,16 +3,16 @@ using System.Windows.Forms;
 
 namespace Optimizer
 {
-    public class ColoredCheckList : CheckedListBox
+    public class MoonCheckList : CheckedListBox
     {
-        public ColoredCheckList()
+        public MoonCheckList()
         {
             DoubleBuffered = true;
         }
 
         protected override void OnDrawItem(DrawItemEventArgs e)
         {
-            Color foreColor = Color.Silver;
+            Color foreColor = Color.White;
             Color accentColor = Color.MediumOrchid;
 
             switch (Options.CurrentOptions.Color)

+ 46 - 0
Optimizer/Controls/MoonList.cs

@@ -0,0 +1,46 @@
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace Optimizer
+{
+    public class MoonList : ListBox
+    {
+        public MoonList()
+        {
+            this.DrawMode = DrawMode.OwnerDrawVariable;
+            this.BorderStyle = BorderStyle.None;
+
+            this.MeasureItem += MoonListBox_MeasureItem;
+            this.DrawItem += MoonListBox_DrawItem;
+        }
+
+        private void MoonListBox_DrawItem(object sender, DrawItemEventArgs e)
+        {
+            if (e.Index < 0) return;
+            if (this.Items.Count <= 0) return;
+
+            e.DrawBackground();
+
+            Brush myBrush = new SolidBrush(Color.White);
+
+            if ((e.State & DrawItemState.Selected) == DrawItemState.Selected)
+            {
+                e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(50,50,50)), e.Bounds);
+            }
+
+            else
+            {
+                e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(20,20,20)), e.Bounds);
+
+            }
+
+            e.Graphics.DrawString(this.Items[e.Index].ToString(), this.Font, myBrush, e.Bounds);
+            e.DrawFocusRectangle();
+        }
+
+        private void MoonListBox_MeasureItem(object sender, MeasureItemEventArgs e)
+        {
+            e.ItemHeight = this.Font.Height;
+        }
+    }
+}

+ 2 - 2
Optimizer/Controls/ToolStripRendererMaterial.cs → Optimizer/Controls/MoonMenuRenderer.cs

@@ -3,9 +3,9 @@ using System.Windows.Forms;
 
 namespace Optimizer
 {
-    internal class ToolStripRendererMaterial : ToolStripProfessionalRenderer
+    internal class MoonMenuRenderer : ToolStripProfessionalRenderer
     {
-        internal ToolStripRendererMaterial() : base(new ColorsMaterial())
+        internal MoonMenuRenderer() : base(new ColorsMaterial())
         {
 
         }

+ 2 - 2
Optimizer/Controls/ColoredProgress.cs → Optimizer/Controls/MoonProgress.cs

@@ -4,9 +4,9 @@ using System.Windows.Forms;
 
 namespace Optimizer
 {
-    internal class ColoredProgress : ProgressBar
+    internal class MoonProgress : ProgressBar
     {
-        public ColoredProgress()
+        public MoonProgress()
         {
             DoubleBuffered = true;
             this.SetStyle(ControlStyles.UserPaint, true);

+ 2 - 2
Optimizer/Controls/ColoredRadio.cs → Optimizer/Controls/MoonRadio.cs

@@ -4,9 +4,9 @@ using System.Windows.Forms;
 
 namespace Optimizer
 {
-    public class ColoredRadio : RadioButton
+    public class MoonnRadio : RadioButton
     {
-        public ColoredRadio()
+        public MoonnRadio()
         {
             DoubleBuffered = true;
         }

+ 328 - 0
Optimizer/Controls/MoonTabs.cs

@@ -0,0 +1,328 @@
+using System;
+using System.ComponentModel;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Runtime.InteropServices;
+using System.Security.Permissions;
+using System.Windows.Forms;
+
+namespace Optimizer
+{
+    [
+        ComVisible(true), ClassInterface(ClassInterfaceType.AutoDispatch),
+        DefaultProperty("TabPages"), DefaultEvent("SelectedIndexChanged")
+    ]
+    public class MoonTabs : TabControl
+    {
+        [Category("Custom"), Description("Indicates whether or not you the components Tabpages Headers have border edges."), DefaultValue(false)]
+        public bool BorderEdges { get; set; } = false;
+
+        private int _BorderSize = 0;
+        [Category("Custom"), Description("The size of the components border."), DefaultValue(0)]
+        public int BorderSize
+        {
+            get => _BorderSize;
+            set => _BorderSize = 0;
+        }
+
+        [Category("Custom"), Description("The size of the components Indicator."), DefaultValue(0)]
+        public int IndicatorSize { get; set; } = 0;
+
+        private int _DividerSize = 0;
+        [Category("Custom"), Description("The size of the components Divider."), DefaultValue(0)]
+        public int DividerSize
+        {
+            get => _DividerSize;
+            set => _DividerSize = value.LimitToRange(0, 0);
+        }
+
+        [Category("Custom"), Description("Indicates whether or not you can rearrange the components Tabpages.  CLICK on the Tabpages HEADER with the LEFT mousebutton and HOLD DOWN the <SHIFT> KEY, to drag it LEFT or RIGHT."), DefaultValue(false)]
+        public bool CanDrag { get; set; }
+
+        StringFormat format = new StringFormat { Alignment = StringAlignment.Center };
+
+        private Bitmap bitDrag = default(Bitmap);
+
+        private bool bDrag, bMouseDown, bShiftKey;
+        private Point ptPreviousLocation, ptMaxDrag;
+        private int DraggedIndex = -1;
+
+        protected override CreateParams CreateParams
+        {
+            [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)]
+            get
+            {
+                CreateParams cp = base.CreateParams;
+                cp.ExStyle |= 0x02000000;
+                return cp;
+            }
+        }
+
+        public MoonTabs()
+        {
+            SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer |
+                     ControlStyles.UserPaint | ControlStyles.ResizeRedraw | ControlStyles.CacheText, true);
+
+            Alignment = TabAlignment.Top;
+
+            Margin = new Padding(0);
+            Padding = new Point(0, 0);
+        }
+
+        private void SetDragState() => bDrag = (CanDrag && bMouseDown && bShiftKey);
+
+        protected override void OnMouseDown(MouseEventArgs e)
+        {
+            bMouseDown = true;
+            SetDragState();
+            Rectangle rectDrag = GetTabRect(SelectedIndex);
+            ptPreviousLocation = new Point(rectDrag.X, rectDrag.Y);
+            rectDrag.Width += 1; rectDrag.Height += 1;
+            Bitmap src = new Bitmap(Width, Height);
+            DrawToBitmap(src, ClientRectangle);
+
+            using (Graphics g = Graphics.FromImage(bitDrag = new Bitmap(rectDrag.Width, rectDrag.Height)))
+            {
+                g.DrawImage(src, new Rectangle(0, 0, bitDrag.Width, bitDrag.Height), rectDrag, GraphicsUnit.Pixel);
+            }
+        }
+
+        protected override void OnMouseMove(MouseEventArgs e)
+        {
+            if (bDrag)
+            {
+                if (Alignment == TabAlignment.Top || Alignment == TabAlignment.Bottom)
+                {
+                    ptPreviousLocation = new Point(((e.X < 0) ? 0 : (e.X > ptMaxDrag.X) ? ptMaxDrag.X : e.X), (Alignment == TabAlignment.Top ? BorderSize : ptMaxDrag.Y));
+                }
+
+                if (Alignment == TabAlignment.Right || Alignment == TabAlignment.Left)
+                {
+                    ptPreviousLocation = new Point(ptMaxDrag.X, ((e.Y < 0) ? 0 : (e.Y > ptMaxDrag.Y) ? ptMaxDrag.Y : e.Y));
+                }
+                for (int i = 0; i < TabCount; i++)
+                {
+                    if (GetTabRect(i).Contains(PointToClient(Cursor.Position))) { DraggedIndex = i; break; }
+                }
+
+                Invalidate();
+            }
+        }
+
+        protected override void OnMouseUp(MouseEventArgs e)
+        {
+            void SwapTabPages(TabPage inDestTab)
+            {
+                int SourceIndex = TabPages.IndexOf(SelectedTab);
+                int DestinationIndex = TabPages.IndexOf(inDestTab);
+
+                TabPages[DestinationIndex] = SelectedTab;
+                TabPages[SourceIndex] = inDestTab;
+
+                if (SelectedIndex == SourceIndex) { SelectedIndex = DestinationIndex; }
+                else if (SelectedIndex == DestinationIndex) { SelectedIndex = SourceIndex; }
+            }
+
+            bDrag = bMouseDown = false;
+
+            if (DraggedIndex > -1)
+            {
+                SwapTabPages(TabPages[DraggedIndex]);
+                DraggedIndex = -1;
+            }
+
+            SetDragState();
+            Invalidate();
+        }
+
+        protected override void OnKeyDown(KeyEventArgs ke) { bShiftKey = ke.Shift; SetDragState(); }
+
+        protected override void OnKeyUp(KeyEventArgs e) { bDrag = bShiftKey = false; SetDragState(); }
+
+        protected override void OnPaint(PaintEventArgs e)
+        {
+            if (DesignMode) return;
+
+            e.Graphics.Clear(Color.FromArgb(40, 40, 40));
+
+            Rectangle container = new Rectangle(0, 0, Width - (BorderSize % 2), Height - (BorderSize % 2));
+            Rectangle containerHead = default(Rectangle);
+
+            if (TabCount > 0)
+            {
+                using (SolidBrush brushBackgroundTab = new SolidBrush(Color.FromArgb(40, 40, 40)))
+                using (SolidBrush brushDivider = new SolidBrush(Options.ForegroundColor))
+                {
+                    {
+                        e.Graphics.FillRectangle(brushBackgroundTab, DisplayRectangle);
+                    }
+
+                    {
+                        Rectangle rectDivider = GetTabRect(SelectedIndex);
+
+                        if (Alignment == TabAlignment.Top || Alignment == TabAlignment.Bottom)
+                        {
+                            e.Graphics.FillRectangle(brushDivider,
+                                                     0,
+                                                     (((Alignment == TabAlignment.Top) ? (TabPages[SelectedIndex].Top - DividerSize - (DividerSize % 2)) :
+                                                     (TabPages[SelectedIndex].Bottom + (DividerSize % 2)))),
+                                                     (Width - BorderSize), DividerSize
+                                                    );
+                        }
+
+                        if (Alignment == TabAlignment.Right || Alignment == TabAlignment.Left)
+                        {
+                            e.Graphics.FillRectangle(brushDivider,
+                                                     ((Alignment == TabAlignment.Right) ? (TabPages[SelectedIndex].Right + (DividerSize % 2)) : TabPages[SelectedIndex].Left - DividerSize - (DividerSize % 2)),
+                                                     BorderSize,
+                                                     DividerSize,
+                                                     (Height - (BorderSize * 2))
+                                                     );
+                        }
+                    }
+                }
+            }
+
+            SolidBrush brushActiveText;
+
+            using (Pen penActive = new Pen(Options.ForegroundColor))
+            using (Pen penBorder = new Pen(Color.FromArgb(40,40,40), 0))
+            using (SolidBrush brushActive = new SolidBrush(Options.ForegroundColor))
+            using (SolidBrush brushInActive = new SolidBrush(Color.FromArgb(40,40,40)))
+            using (SolidBrush brushAlternative = new SolidBrush(Options.ForegroundColor))
+            using (SolidBrush brushActiveIndicator = new SolidBrush(ControlPaint.Light(Options.ForegroundColor)))
+            using (SolidBrush brushInActiveIndicator = new SolidBrush(Options.ForegroundColor))
+            using (brushActiveText = new SolidBrush(Color.White))
+            using (SolidBrush brushInActiveText = new SolidBrush(Color.White))
+            using (SolidBrush brushDrag = new SolidBrush(ControlPaint.Dark(Options.ForegroundColor)))
+            {
+                //if (MoonManager.THEME_PREFERENCE == THEME.LIGHT) brushActiveText = new SolidBrush(Color.White);
+
+                penBorder.Alignment = penActive.Alignment = PenAlignment.Inset;
+                e.Graphics.DrawRectangle(penBorder, container);
+
+                if (TabCount > 0)
+                {
+                    ptMaxDrag = new Point(0, 0);
+
+                    for (int i = 0; i < TabCount; i++)
+                    {
+                        containerHead = GetTabRect(i);
+
+                        e.Graphics.FillRectangle((SelectedIndex == i) ? (bDrag ? brushDrag : brushActive) : brushInActive, containerHead);
+
+                        if (BorderEdges && (i == SelectedIndex))
+                        {
+                            Point ptA = new Point(0, 0); Point ptB = new Point(0, 0);
+                            Point ptC = new Point(0, 0); Point ptD = new Point(0, 0);
+
+                            ptA.X = ptB.X = ptD.X = containerHead.X;
+                            ptA.Y = ptB.Y = ptC.Y = containerHead.Y;
+                            ptA.Y = ptC.Y = ptD.Y = containerHead.Y + containerHead.Height - 1;
+
+                            if (Alignment == TabAlignment.Top || Alignment == TabAlignment.Bottom)
+                            {
+                                ptD.X = ptC.X = containerHead.X + containerHead.Width;
+                                ptC.Y = containerHead.Y;
+
+                                if (Alignment == TabAlignment.Bottom)
+                                {
+                                    MoonTabHelper.Swap(ref ptA, ref ptB); MoonTabHelper.Swap(ref ptC, ref ptD);
+                                }
+                            }
+
+                            if (Alignment == TabAlignment.Right || Alignment == TabAlignment.Left)
+                            {
+                                ptA.Y = containerHead.Y;
+                                ptB.X = ptC.X = containerHead.X + containerHead.Width - 1;
+
+                                if (Alignment == TabAlignment.Left)
+                                {
+                                    MoonTabHelper.Swap(ref ptA, ref ptC); MoonTabHelper.Swap(ref ptB, ref ptD);
+                                }
+                            }
+
+                            e.Graphics.DrawLine(new Pen(ControlPaint.Light(brushActive.Color)), ptA, ptB);
+                            e.Graphics.DrawLine(new Pen(ControlPaint.Light(brushActive.Color)), ptB, ptC);
+                            e.Graphics.DrawLine(new Pen(ControlPaint.Dark(brushActive.Color)), ptC, ptD);
+                        }
+
+                        {
+                            Rectangle rectDivider = default(Rectangle);
+
+                            if (Alignment == TabAlignment.Top || Alignment == TabAlignment.Bottom)
+                            {
+                                rectDivider = new Rectangle(containerHead.X, containerHead.Y + ((Alignment == TabAlignment.Top) ? containerHead.Height : -DividerSize), containerHead.Width, DividerSize);
+                            }
+                            if (Alignment == TabAlignment.Right || Alignment == TabAlignment.Left)
+                            {
+                                rectDivider = new Rectangle(containerHead.X - ((Alignment == TabAlignment.Right) ? DividerSize : -containerHead.Width), containerHead.Y, DividerSize, containerHead.Height);
+                            }
+
+                            e.Graphics.FillRectangle(((MoonTabHelper.TagToInt(TabPages[i]) == 1) ? brushAlternative : ((i == SelectedIndex) ? brushActiveIndicator : brushInActiveIndicator)), rectDivider);
+                        }
+
+                        if (!(bDrag && i == SelectedIndex))
+                        {
+                            int angle = 0;
+                            {
+                                if (Alignment == TabAlignment.Right) angle = 90;
+                                if (Alignment == TabAlignment.Left) angle = 270;
+                            }
+
+                            float w, h;
+
+                            w = h = 0f;
+
+                            if (Alignment == TabAlignment.Top || Alignment == TabAlignment.Bottom) { w = containerHead.X + (containerHead.Width / 2); }
+                            if (Alignment == TabAlignment.Right || Alignment == TabAlignment.Left) { w = containerHead.X; h = containerHead.Y + (containerHead.Height / 2); }
+
+                            if (Alignment == TabAlignment.Top || Alignment == TabAlignment.Bottom) { h = containerHead.Y + ((Alignment == TabAlignment.Top) ? IndicatorSize : 0) + ((containerHead.Height - IndicatorSize) / 2); }
+                            if (Alignment == TabAlignment.Right || Alignment == TabAlignment.Left) { w += (((Alignment == TabAlignment.Right) ? 0 : IndicatorSize) + ((containerHead.Width - IndicatorSize) / 2)); }
+
+                            e.Graphics.TranslateTransform(w, h);
+                            {
+                                Size textSize = e.Graphics.MeasureString(TabPages[i].Text, Font).ToSize();
+
+                                e.Graphics.RotateTransform(angle);
+                                e.Graphics.DrawString(TabPages[i].Text, Font, ((SelectedIndex == i) ? brushActiveText : brushInActiveText), new PointF((-textSize.Width / 2f), (-textSize.Height / 2f)));
+                            }
+                            e.Graphics.ResetTransform();
+                        }
+
+                        if (bMouseDown)
+                        {
+                            if (Alignment == TabAlignment.Top || Alignment == TabAlignment.Bottom) { if (i > 0) { ptMaxDrag.X += GetTabRect(i).Width; } }
+                            if (Alignment == TabAlignment.Top) { ptMaxDrag.Y = BorderSize; }
+                            if (Alignment == TabAlignment.Bottom) { ptMaxDrag.Y = containerHead.Y; };
+
+                            if (Alignment == TabAlignment.Right || Alignment == TabAlignment.Left) { ptMaxDrag.X = containerHead.X; if (i > 0) { ptMaxDrag.Y += containerHead.Height; } }
+                        }
+
+                        if (bDrag && (bitDrag != null)) { e.Graphics.DrawImage(bitDrag, new Point(ptPreviousLocation.X, ptPreviousLocation.Y)); }
+                    }
+                }
+            }
+        }
+
+
+    }
+
+    public static class MoonTabHelper
+    {
+        public static int LimitToRange(this int value, int inclusiveMinimum, int inclusiveMaximum)
+        {
+            if (value < inclusiveMinimum) { return inclusiveMinimum; }
+            if (value > inclusiveMaximum) { return inclusiveMaximum; }
+            return value;
+        }
+
+        public static void Swap<T>(ref T a, ref T b)
+        {
+            T temp = a;
+            a = b; b = temp;
+        }
+
+        public static int TagToInt(object inObject) => Convert.ToInt32((inObject as Control).Tag);
+    }
+}

+ 78 - 0
Optimizer/Controls/MoonToggle.cs

@@ -0,0 +1,78 @@
+using System.ComponentModel;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Windows.Forms;
+
+namespace Optimizer
+{
+    public class MoonToggle : CheckBox
+    {
+        bool solidStyle = true;
+
+        [Browsable(true)]
+        public override string Text
+        {
+            get { return base.Text; }
+            set { }
+        }
+
+        [DefaultValue(true)]
+        public bool SolidStyle
+        {
+            get { return solidStyle; }
+            set
+            {
+                solidStyle = value;
+                this.Invalidate();
+            }
+        }
+
+        public MoonToggle()
+        {
+            this.DoubleBuffered = true;
+            this.MinimumSize = new Size(46, 22);
+            this.ForeColor = Color.White;
+        }
+
+        private GraphicsPath GetFigurePath()
+        {
+            int arcSize = this.Height - 1;
+            Rectangle leftArc = new Rectangle(0, 0, arcSize, arcSize);
+            Rectangle rightArc = new Rectangle(this.Width - arcSize - 2, 0, arcSize, arcSize);
+
+            GraphicsPath path = new GraphicsPath();
+            path.StartFigure();
+            path.AddArc(leftArc, 90, 180);
+            path.AddArc(rightArc, 270, 180);
+            path.CloseFigure();
+
+            return path;
+        }
+
+        protected override void OnPaint(PaintEventArgs pevent)
+        {
+            int toggleSize = this.Height - 5;
+            pevent.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
+            pevent.Graphics.Clear(this.Parent.BackColor);
+
+            if (this.Checked) //ON
+            {
+                if (solidStyle)
+                    pevent.Graphics.FillPath(new SolidBrush(Options.ForegroundColor), GetFigurePath());
+                else pevent.Graphics.DrawPath(new Pen(Options.ForegroundColor, 2), GetFigurePath());
+                //Draw the toggle
+                pevent.Graphics.FillEllipse(new SolidBrush(Color.White),
+                  new Rectangle(this.Width - this.Height + 1, 2, toggleSize, toggleSize));
+            }
+            else //OFF
+            {
+                if (solidStyle)
+                    pevent.Graphics.FillPath(new SolidBrush(Options.BackAccentColor), GetFigurePath());
+                else pevent.Graphics.DrawPath(new Pen(Options.BackAccentColor, 2), GetFigurePath());
+                //Draw the toggle
+                pevent.Graphics.FillEllipse(new SolidBrush(Color.White),
+                  new Rectangle(2, 2, toggleSize, toggleSize));
+            }
+        }
+    }
+}

+ 91 - 0
Optimizer/Controls/ToggleCard.Designer.cs

@@ -0,0 +1,91 @@
+
+namespace Optimizer
+{
+    partial class ToggleCard
+    {
+        /// <summary> 
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Component Designer generated code
+
+        /// <summary> 
+        /// Required method for Designer support - do not modify 
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.Label = new System.Windows.Forms.Label();
+            this.Panel = new System.Windows.Forms.Panel();
+            this.Toggle = new Optimizer.MoonToggle();
+            this.Panel.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // Label
+            // 
+            this.Label.AutoSize = true;
+            this.Label.Location = new System.Drawing.Point(52, 2);
+            this.Label.Name = "Label";
+            this.Label.Size = new System.Drawing.Size(45, 19);
+            this.Label.TabIndex = 1;
+            this.Label.Text = "label1";
+            // 
+            // Panel
+            // 
+            this.Panel.Controls.Add(this.Label);
+            this.Panel.Controls.Add(this.Toggle);
+            this.Panel.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.Panel.Location = new System.Drawing.Point(0, 0);
+            this.Panel.Name = "Panel";
+            this.Panel.Size = new System.Drawing.Size(334, 25);
+            this.Panel.TabIndex = 2;
+            // 
+            // Toggle
+            // 
+            this.Toggle.AutoSize = true;
+            this.Toggle.ForeColor = System.Drawing.Color.White;
+            this.Toggle.Location = new System.Drawing.Point(0, 1);
+            this.Toggle.MinimumSize = new System.Drawing.Size(46, 22);
+            this.Toggle.Name = "Toggle";
+            this.Toggle.Size = new System.Drawing.Size(46, 22);
+            this.Toggle.TabIndex = 0;
+            this.Toggle.UseVisualStyleBackColor = true;
+            this.Toggle.CheckedChanged += new System.EventHandler(this.Toggle_CheckedChanged);
+            // 
+            // ToggleCard
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
+            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
+            this.Controls.Add(this.Panel);
+            this.DoubleBuffered = true;
+            this.Font = new System.Drawing.Font("Segoe UI Semibold", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.ForeColor = System.Drawing.Color.White;
+            this.Name = "ToggleCard";
+            this.Size = new System.Drawing.Size(334, 25);
+            this.Panel.ResumeLayout(false);
+            this.Panel.PerformLayout();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+        private System.Windows.Forms.Panel Panel;
+        protected internal System.Windows.Forms.Label Label;
+        protected internal MoonToggle Toggle;
+    }
+}

+ 39 - 0
Optimizer/Controls/ToggleCard.cs

@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace Optimizer
+{
+    public partial class ToggleCard : UserControl
+    {
+        public event EventHandler ToggleClicked;
+
+        public ToggleCard()
+        {
+            InitializeComponent();
+        }
+
+        public string LabelText
+        {
+            get { return Label.Text; }
+            set { Label.Text = value; }
+        }
+
+        public bool ToggleChecked
+        {
+            get { return Toggle.Checked; }
+            set { Toggle.Checked = value; }
+        }
+
+        private void Toggle_CheckedChanged(object sender, EventArgs e)
+        {
+            if (ToggleClicked != null) ToggleClicked(sender, e);
+        }
+    }
+}

+ 120 - 0
Optimizer/Controls/ToggleCard.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 0 - 53
Optimizer/Controls/ToggleSwitch/ImageHelper.cs

@@ -1,53 +0,0 @@
-using System;
-using System.Drawing;
-using System.Drawing.Imaging;
-
-namespace Optimizer
-{
-    public static class ImageHelper
-    {
-        private static float[][] _colorMatrixElements =
-        {
-            new float[] {(float)0.299, (float)0.299, (float)0.299, 0, 0},
-            new float[] {(float)0.587, (float)0.587, (float)0.587, 0, 0},
-            new float[] {(float)0.114, (float)0.114, (float)0.114, 0, 0},
-            new float[] {0,  0,  0,  1, 0},
-            new float[] {0, 0, 0, 0, 1}
-        };
-
-        private static ColorMatrix _grayscaleColorMatrix = new ColorMatrix(_colorMatrixElements);
-
-        public static ImageAttributes GetGrayscaleAttributes()
-        {
-            ImageAttributes attr = new ImageAttributes();
-            attr.SetColorMatrix(_grayscaleColorMatrix, ColorMatrixFlag.Default, ColorAdjustType.Bitmap);
-            return attr;
-        }
-
-        public static Size RescaleImageToFit(Size imageSize, Size canvasSize)
-        {
-            // Code "borrowed" from http://stackoverflow.com/questions/1940581/c-sharp-image-resizing-to-different-size-while-preserving-aspect-ratio
-            // and the Math.Min improvement from http://stackoverflow.com/questions/6501797/resize-image-proportionally-with-maxheight-and-maxwidth-constraints
-
-            // Figure out the ratio
-            double ratioX = (double)canvasSize.Width / (double)imageSize.Width;
-            double ratioY = (double)canvasSize.Height / (double)imageSize.Height;
-
-            // use whichever multiplier is smaller
-            double ratio = Math.Min(ratioX, ratioY);
-
-            // now we can get the new height and width
-            int newHeight = Convert.ToInt32(imageSize.Height * ratio);
-            int newWidth = Convert.ToInt32(imageSize.Width * ratio);
-
-            Size resizedSize = new Size(newWidth, newHeight);
-
-            if (resizedSize.Width > canvasSize.Width || resizedSize.Height > canvasSize.Height)
-            {
-                throw new Exception("ImageHelper.RescaleImageToFit - Resize failed!");
-            }
-
-            return resizedSize;
-        }
-    }
-}

+ 0 - 1035
Optimizer/Controls/ToggleSwitch/ToggleSwitch.cs

@@ -1,1035 +0,0 @@
-using System;
-using System.ComponentModel;
-using System.Drawing;
-using System.Windows.Forms;
-
-namespace Optimizer
-{
-    [DefaultValue("Checked"), DefaultEvent("CheckedChanged"), ToolboxBitmap(typeof(CheckBox))]
-    internal class ToggleSwitch : Control
-    {
-        public delegate void CheckedChangedDelegate(Object sender, EventArgs e);
-        [Description("Raised when the ToggleSwitch has changed state")]
-        public event CheckedChangedDelegate CheckedChanged;
-
-        private readonly Timer _animationTimer = new Timer();
-        private ToggleSwitchRendererBase _renderer;
-
-        private bool _checked = false;
-        private bool _moving = false;
-        private bool _animating = false;
-        private bool _animationResult = false;
-        private int _animationTarget = 0;
-        private bool _useAnimation = true;
-        private int _animationInterval = 1;
-        private int _animationStep = 15;
-        private bool _allowUserChange = true;
-
-        private bool _isLeftFieldHovered = false;
-        private bool _isButtonHovered = false;
-        private bool _isRightFieldHovered = false;
-        private bool _isLeftFieldPressed = false;
-        private bool _isButtonPressed = false;
-        private bool _isRightFieldPressed = false;
-
-        private int _buttonValue = 0;
-        private int _savedButtonValue = 0;
-        private int _xOffset = 0;
-        private int _xValue = 0;
-        private int _thresholdPercentage = 50;
-        private bool _grayWhenDisabled = true;
-        private bool _toggleOnButtonClick = true;
-        private bool _toggleOnSideClick = true;
-
-        private MouseEventArgs _lastMouseEventArgs = null;
-
-        private bool _buttonScaleImage;
-        private ToggleSwitchButtonAlignment _buttonAlignment = ToggleSwitchButtonAlignment.Center;
-        private Image _buttonImage = null;
-
-        private Color _offForeColor = Color.Black;
-        private Font _offFont;
-        private Image _offSideImage = null;
-        private bool _offSideScaleImage;
-        private ToggleSwitchAlignment _offSideAlignment = ToggleSwitchAlignment.Center;
-        private Image _offButtonImage = null;
-        private bool _offButtonScaleImage;
-        private ToggleSwitchButtonAlignment _offButtonAlignment = ToggleSwitchButtonAlignment.Center;
-
-        private string _onText = "";
-        private Color _onForeColor = Color.Black;
-        private Font _onFont;
-        private Image _onSideImage = null;
-        private bool _onSideScaleImage;
-        private ToggleSwitchAlignment _onSideAlignment = ToggleSwitchAlignment.Center;
-        private Image _onButtonImage = null;
-        private bool _onButtonScaleImage;
-        private ToggleSwitchButtonAlignment _onButtonAlignment = ToggleSwitchButtonAlignment.Center;
-
-        public ToggleSwitch()
-        {
-            DoubleBuffered = true;
-
-            SetStyle(ControlStyles.ResizeRedraw |
-                        ControlStyles.SupportsTransparentBackColor |
-                        ControlStyles.AllPaintingInWmPaint |
-                        ControlStyles.UserPaint |
-                        ControlStyles.OptimizedDoubleBuffer |
-                        ControlStyles.DoubleBuffer, true);
-
-            OnFont = base.Font;
-            OffFont = base.Font;
-
-            SetRenderer(new ToggleSwitchRenderer());
-
-            _animationTimer.Enabled = false;
-            _animationTimer.Interval = _animationInterval;
-            _animationTimer.Tick += AnimationTimer_Tick;
-        }
-
-        public void SetRenderer(ToggleSwitchRendererBase renderer)
-        {
-            renderer.SetToggleSwitch(this);
-            _renderer = renderer;
-
-            if (_renderer != null) Refresh();
-        }
-
-        [Bindable(true)]
-        [DefaultValue(false)]
-        [Category("Data")]
-        [Description("Gets or sets the Checked value of the ToggleSwitch")]
-        public bool Checked
-        {
-            get { return _checked; }
-            set
-            {
-                if (value != _checked)
-                {
-                    while (_animating)
-                    {
-                        Application.DoEvents();
-                    }
-
-                    if (value == true)
-                    {
-                        int buttonWidth = _renderer.GetButtonWidth();
-                        _animationTarget = Width - buttonWidth;
-                        BeginAnimation(true);
-                    }
-                    else
-                    {
-                        _animationTarget = 0;
-                        BeginAnimation(false);
-                    }
-                }
-            }
-        }
-
-        [Bindable(true)]
-        [DefaultValue(true)]
-        [Category("Behavior")]
-        [Description("Gets or sets whether the user can change the value of the button or not")]
-        public bool AllowUserChange
-        {
-            get { return _allowUserChange; }
-            set { _allowUserChange = value; }
-        }
-
-        [Browsable(false)]
-        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-        public string CheckedString
-        {
-            get
-            {
-                return Checked ? (string.IsNullOrEmpty(OnText) ? "ON" : OnText) : (string.IsNullOrEmpty(OnText) ? "OFF" : OnText);
-            }
-        }
-
-        [Browsable(false)]
-        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-        public Rectangle ButtonRectangle
-        {
-            get
-            {
-                return _renderer.GetButtonRectangle();
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(true)]
-        [Category("Appearance")]
-        [Description("Gets or sets if the ToggleSwitch should be grayed out when disabled")]
-        public bool GrayWhenDisabled
-        {
-            get { return _grayWhenDisabled; }
-            set
-            {
-                if (value != _grayWhenDisabled)
-                {
-                    _grayWhenDisabled = value;
-
-                    if (!Enabled)
-                        Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(true)]
-        [Category("Behavior")]
-        [Description("Gets or sets if the ToggleSwitch should toggle when the button is clicked")]
-        public bool ToggleOnButtonClick
-        {
-            get { return _toggleOnButtonClick; }
-            set { _toggleOnButtonClick = value; }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(true)]
-        [Category("Behavior")]
-        [Description("Gets or sets if the ToggleSwitch should toggle when the track besides the button is clicked")]
-        public bool ToggleOnSideClick
-        {
-            get { return _toggleOnSideClick; }
-            set { _toggleOnSideClick = value; }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(50)]
-        [Category("Behavior")]
-        [Description("Gets or sets how much the button need to be on the other side (in peercept) before it snaps")]
-        public int ThresholdPercentage
-        {
-            get { return _thresholdPercentage; }
-            set { _thresholdPercentage = value; }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(typeof(Color), "Black")]
-        [Category("Appearance")]
-        [Description("Gets or sets the forecolor of the text when Checked=false")]
-        public Color OffForeColor
-        {
-            get { return _offForeColor; }
-            set
-            {
-                if (value != _offForeColor)
-                {
-                    _offForeColor = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(typeof(Font), "Microsoft Sans Serif, 8.25pt")]
-        [Category("Appearance")]
-        [Description("Gets or sets the font of the text when Checked=false")]
-        public Font OffFont
-        {
-            get { return _offFont; }
-            set
-            {
-                if (!value.Equals(_offFont))
-                {
-                    _offFont = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(null)]
-        [Category("Appearance")]
-        [Description("Gets or sets the side image when Checked=false - Note: Settings the OffSideImage overrules the OffText property. Only the image will be shown")]
-        public Image OffSideImage
-        {
-            get { return _offSideImage; }
-            set
-            {
-                if (value != _offSideImage)
-                {
-                    _offSideImage = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(false)]
-        [Category("Behavior")]
-        [Description("Gets or sets whether the side image visible when Checked=false should be scaled to fit")]
-        public bool OffSideScaleImageToFit
-        {
-            get { return _offSideScaleImage; }
-            set
-            {
-                if (value != _offSideScaleImage)
-                {
-                    _offSideScaleImage = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(typeof(ToggleSwitchAlignment), "Center")]
-        [Category("Appearance")]
-        [Description("Gets or sets how the text or side image visible when Checked=false should be aligned")]
-        public ToggleSwitchAlignment OffSideAlignment
-        {
-            get { return _offSideAlignment; }
-            set
-            {
-                if (value != _offSideAlignment)
-                {
-                    _offSideAlignment = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(null)]
-        [Category("Appearance")]
-        [Description("Gets or sets the button image when Checked=false and ButtonImage is not set")]
-        public Image OffButtonImage
-        {
-            get { return _offButtonImage; }
-            set
-            {
-                if (value != _offButtonImage)
-                {
-                    _offButtonImage = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(false)]
-        [Category("Behavior")]
-        [Description("Gets or sets whether the button image visible when Checked=false should be scaled to fit")]
-        public bool OffButtonScaleImageToFit
-        {
-            get { return _offButtonScaleImage; }
-            set
-            {
-                if (value != _offButtonScaleImage)
-                {
-                    _offButtonScaleImage = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(typeof(ToggleSwitchButtonAlignment), "Center")]
-        [Category("Appearance")]
-        [Description("Gets or sets how the button image visible when Checked=false should be aligned")]
-        public ToggleSwitchButtonAlignment OffButtonAlignment
-        {
-            get { return _offButtonAlignment; }
-            set
-            {
-                if (value != _offButtonAlignment)
-                {
-                    _offButtonAlignment = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(typeof(Color), "Black")]
-        [Category("Appearance")]
-        [Description("Gets or sets the forecolor of the text when Checked=true")]
-        public Color OnForeColor
-        {
-            get { return _onForeColor; }
-            set
-            {
-                if (value != _onForeColor)
-                {
-                    _onForeColor = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(typeof(Font), "Microsoft Sans Serif, 8,25pt")]
-        [Category("Appearance")]
-        [Description("Gets or sets the font of the text when Checked=true")]
-        public Font OnFont
-        {
-            get { return _onFont; }
-            set
-            {
-                if (!value.Equals(_onFont))
-                {
-                    _onFont = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue("")]
-        [Category("Appearance")]
-        [Description("On-button text")]
-        public string OnText
-        {
-            get { return _onText; }
-            set
-            {
-                if (value != _onText)
-                {
-                    _onText = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(null)]
-        [Category("Appearance")]
-        [Description("Gets or sets the side image visible when Checked=true - Note: Settings the OnSideImage overrules the OnText property. Only the image will be shown.")]
-        public Image OnSideImage
-        {
-            get { return _onSideImage; }
-            set
-            {
-                if (value != _onSideImage)
-                {
-                    _onSideImage = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(false)]
-        [Category("Behavior")]
-        [Description("Gets or sets whether the side image visible when Checked=true should be scaled to fit")]
-        public bool OnSideScaleImageToFit
-        {
-            get { return _onSideScaleImage; }
-            set
-            {
-                if (value != _onSideScaleImage)
-                {
-                    _onSideScaleImage = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(null)]
-        [Category("Appearance")]
-        [Description("Gets or sets the button image")]
-        public Image ButtonImage
-        {
-            get { return _buttonImage; }
-            set
-            {
-                if (value != _buttonImage)
-                {
-                    _buttonImage = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(false)]
-        [Category("Behavior")]
-        [Description("Gets or sets whether the button image should be scaled to fit")]
-        public bool ButtonScaleImageToFit
-        {
-            get { return _buttonScaleImage; }
-            set
-            {
-                if (value != _buttonScaleImage)
-                {
-                    _buttonScaleImage = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(typeof(ToggleSwitchButtonAlignment), "Center")]
-        [Category("Appearance")]
-        [Description("Gets or sets how the button image should be aligned")]
-        public ToggleSwitchButtonAlignment ButtonAlignment
-        {
-            get { return _buttonAlignment; }
-            set
-            {
-                if (value != _buttonAlignment)
-                {
-                    _buttonAlignment = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(typeof(ToggleSwitchAlignment), "Center")]
-        [Category("Appearance")]
-        [Description("Gets or sets how the text or side image visible when Checked=true should be aligned")]
-        public ToggleSwitchAlignment OnSideAlignment
-        {
-            get { return _onSideAlignment; }
-            set
-            {
-                if (value != _onSideAlignment)
-                {
-                    _onSideAlignment = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(null)]
-        [Category("Appearance")]
-        [Description("Gets or sets the button image visible when Checked=true and ButtonImage is not set")]
-        public Image OnButtonImage
-        {
-            get { return _onButtonImage; }
-            set
-            {
-                if (value != _onButtonImage)
-                {
-                    _onButtonImage = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(false)]
-        [Category("Behavior")]
-        [Description("Gets or sets whether the button image visible when Checked=true should be scaled to fit")]
-        public bool OnButtonScaleImageToFit
-        {
-            get { return _onButtonScaleImage; }
-            set
-            {
-                if (value != _onButtonScaleImage)
-                {
-                    _onButtonScaleImage = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(typeof(ToggleSwitchButtonAlignment), "Center")]
-        [Category("Appearance")]
-        [Description("Gets or sets how the button image visible when Checked=true should be aligned")]
-        public ToggleSwitchButtonAlignment OnButtonAlignment
-        {
-            get { return _onButtonAlignment; }
-            set
-            {
-                if (value != _onButtonAlignment)
-                {
-                    _onButtonAlignment = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(true)]
-        [Category("Behavior")]
-        [Description("Gets or sets whether the toggle change should be animated or not")]
-        public bool UseAnimation
-        {
-            get { return _useAnimation; }
-            set { _useAnimation = value; }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(1)]
-        [Category("Behavior")]
-        [Description("Gets or sets the interval in ms between animation frames")]
-        public int AnimationInterval
-        {
-            get { return _animationInterval; }
-            set
-            {
-                if (value <= 0)
-                {
-                    throw new ArgumentOutOfRangeException("AnimationInterval must larger than zero!");
-                }
-
-                _animationInterval = value;
-            }
-        }
-
-        [Bindable(false)]
-        [DefaultValue(10)]
-        [Category("Behavior")]
-        [Description("Gets or sets the step in pixes the button shouldbe moved between each animation interval")]
-        public int AnimationStep
-        {
-            get { return _animationStep; }
-            set
-            {
-                if (value <= 0)
-                {
-                    throw new ArgumentOutOfRangeException("AnimationStep must larger than zero!");
-                }
-
-                _animationStep = value;
-            }
-        }
-
-        [Browsable(false)]
-        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-        public new string Text
-        {
-            get { return ""; }
-            set { base.Text = ""; }
-        }
-
-        [Browsable(false)]
-        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-        public new Color ForeColor
-        {
-            get { return Color.Black; }
-            set { base.ForeColor = Color.Black; }
-        }
-
-        [Browsable(false)]
-        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-        public new Font Font
-        {
-            get { return base.Font; }
-            set { base.Font = new Font(base.Font, FontStyle.Regular); }
-        }
-
-        [Browsable(false)]
-        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-        internal bool IsButtonHovered
-        {
-            get { return _isButtonHovered && !_isButtonPressed; }
-        }
-
-        [Browsable(false)]
-        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-        internal bool IsButtonPressed
-        {
-            get { return _isButtonPressed; }
-        }
-
-        [Browsable(false)]
-        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-        internal bool IsLeftSideHovered
-        {
-            get { return _isLeftFieldHovered && !_isLeftFieldPressed; }
-        }
-
-        [Browsable(false)]
-        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-        internal bool IsLeftSidePressed
-        {
-            get { return _isLeftFieldPressed; }
-        }
-
-        [Browsable(false)]
-        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-        internal bool IsRightSideHovered
-        {
-            get { return _isRightFieldHovered && !_isRightFieldPressed; }
-        }
-
-        [Browsable(false)]
-        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-        internal bool IsRightSidePressed
-        {
-            get { return _isRightFieldPressed; }
-        }
-
-        [Browsable(false)]
-        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-        internal int ButtonValue
-        {
-            get
-            {
-                if (_animating || _moving)
-                    return _buttonValue;
-                else if (_checked)
-                    return Width - _renderer.GetButtonWidth();
-                else
-                    return 0;
-            }
-            set
-            {
-                if (value != _buttonValue)
-                {
-                    _buttonValue = value;
-                    Refresh();
-                }
-            }
-        }
-
-        [Browsable(false)]
-        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-        internal bool IsButtonOnLeftSide
-        {
-            get { return (ButtonValue <= 0); }
-        }
-
-        [Browsable(false)]
-        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-        internal bool IsButtonOnRightSide
-        {
-            get { return (ButtonValue >= (Width - _renderer.GetButtonWidth())); }
-        }
-
-        [Browsable(false)]
-        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-        internal bool IsButtonMovingLeft
-        {
-            get { return (_animating && !IsButtonOnLeftSide && _animationResult == false); }
-        }
-
-        [Browsable(false)]
-        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-        internal bool IsButtonMovingRight
-        {
-            get { return (_animating && !IsButtonOnRightSide && _animationResult == true); }
-        }
-
-        [Browsable(false)]
-        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-        internal bool AnimationResult
-        {
-            get { return _animationResult; }
-        }
-
-        protected override Size DefaultSize
-        {
-            get { return new Size(50, 19); }
-        }
-
-        protected override void OnPaintBackground(PaintEventArgs pevent)
-        {
-            pevent.Graphics.ResetClip();
-
-            base.OnPaintBackground(pevent);
-
-            if (_renderer != null)
-                _renderer.RenderBackground(pevent);
-        }
-        protected override void OnPaint(PaintEventArgs e)
-        {
-            e.Graphics.ResetClip();
-
-            base.OnPaint(e);
-
-            if (_renderer != null)
-                _renderer.RenderControl(e);
-        }
-
-        protected override void OnMouseMove(MouseEventArgs e)
-        {
-            _lastMouseEventArgs = e;
-
-            int buttonWidth = _renderer.GetButtonWidth();
-            Rectangle buttonRectangle = _renderer.GetButtonRectangle(buttonWidth);
-
-            if (_moving)
-            {
-                int val = _xValue + (e.Location.X - _xOffset);
-
-                if (val < 0)
-                    val = 0;
-
-                if (val > Width - buttonWidth)
-                    val = Width - buttonWidth;
-
-                ButtonValue = val;
-                Refresh();
-                return;
-            }
-
-            if (buttonRectangle.Contains(e.Location))
-            {
-                _isButtonHovered = true;
-                _isLeftFieldHovered = false;
-                _isRightFieldHovered = false;
-            }
-            else
-            {
-                if (e.Location.X > buttonRectangle.X + buttonRectangle.Width)
-                {
-                    _isButtonHovered = false;
-                    _isLeftFieldHovered = false;
-                    _isRightFieldHovered = true;
-                }
-                else if (e.Location.X < buttonRectangle.X)
-                {
-                    _isButtonHovered = false;
-                    _isLeftFieldHovered = true;
-                    _isRightFieldHovered = false;
-                }
-            }
-
-            Refresh();
-        }
-
-        protected override void OnMouseDown(MouseEventArgs e)
-        {
-            if (_animating || !AllowUserChange)
-                return;
-
-            int buttonWidth = _renderer.GetButtonWidth();
-            Rectangle buttonRectangle = _renderer.GetButtonRectangle(buttonWidth);
-
-            _savedButtonValue = ButtonValue;
-
-            if (buttonRectangle.Contains(e.Location))
-            {
-                _isButtonPressed = true;
-                _isLeftFieldPressed = false;
-                _isRightFieldPressed = false;
-
-                _moving = true;
-                _xOffset = e.Location.X;
-                _buttonValue = buttonRectangle.X;
-                _xValue = ButtonValue;
-            }
-            else
-            {
-                if (e.Location.X > buttonRectangle.X + buttonRectangle.Width)
-                {
-                    _isButtonPressed = false;
-                    _isLeftFieldPressed = false;
-                    _isRightFieldPressed = true;
-                }
-                else if (e.Location.X < buttonRectangle.X)
-                {
-                    _isButtonPressed = false;
-                    _isLeftFieldPressed = true;
-                    _isRightFieldPressed = false;
-                }
-            }
-
-            Refresh();
-        }
-
-        protected override void OnMouseUp(MouseEventArgs e)
-        {
-            if (_animating || !AllowUserChange)
-                return;
-
-            int buttonWidth = _renderer.GetButtonWidth();
-
-            bool wasLeftSidePressed = IsLeftSidePressed;
-            bool wasRightSidePressed = IsRightSidePressed;
-
-            _isButtonPressed = false;
-            _isLeftFieldPressed = false;
-            _isRightFieldPressed = false;
-
-            if (_moving)
-            {
-                int percentage = (int)((100 * (double)ButtonValue) / ((double)Width - (double)buttonWidth));
-
-                if (_checked)
-                {
-                    if (percentage <= (100 - _thresholdPercentage))
-                    {
-                        _animationTarget = 0;
-                        BeginAnimation(false);
-                    }
-                    else if (ToggleOnButtonClick && _savedButtonValue == ButtonValue)
-                    {
-                        _animationTarget = 0;
-                        BeginAnimation(false);
-                    }
-                    else
-                    {
-                        _animationTarget = Width - buttonWidth;
-                        BeginAnimation(true);
-                    }
-                }
-                else
-                {
-                    if (percentage >= _thresholdPercentage)
-                    {
-                        _animationTarget = Width - buttonWidth;
-                        BeginAnimation(true);
-                    }
-                    else if (ToggleOnButtonClick && _savedButtonValue == ButtonValue)
-                    {
-                        _animationTarget = Width - buttonWidth;
-                        BeginAnimation(true);
-                    }
-                    else
-                    {
-                        _animationTarget = 0;
-                        BeginAnimation(false);
-                    }
-                }
-
-                _moving = false;
-                return;
-            }
-
-            if (IsButtonOnRightSide)
-            {
-                _buttonValue = Width - buttonWidth;
-                _animationTarget = 0;
-            }
-            else
-            {
-                _buttonValue = 0;
-                _animationTarget = Width - buttonWidth;
-            }
-
-            if (wasLeftSidePressed && ToggleOnSideClick)
-            {
-                SetValueInternal(false);
-            }
-            else if (wasRightSidePressed && ToggleOnSideClick)
-            {
-                SetValueInternal(true);
-            }
-
-            Refresh();
-        }
-
-        protected override void OnMouseLeave(EventArgs e)
-        {
-            _isButtonHovered = false;
-            _isLeftFieldHovered = false;
-            _isRightFieldHovered = false;
-            _isButtonPressed = false;
-            _isLeftFieldPressed = false;
-            _isRightFieldPressed = false;
-
-            Refresh();
-        }
-
-        protected override void OnEnabledChanged(EventArgs e)
-        {
-            base.OnEnabledChanged(e);
-            Refresh();
-        }
-
-        protected override void OnRegionChanged(EventArgs e)
-        {
-            base.OnRegionChanged(e);
-            Refresh();
-        }
-
-        protected override void OnSizeChanged(EventArgs e)
-        {
-            if (_animationTarget > 0)
-            {
-                int buttonWidth = _renderer.GetButtonWidth();
-                _animationTarget = Width - buttonWidth;
-            }
-
-            base.OnSizeChanged(e);
-        }
-
-        private void SetValueInternal(bool checkedValue)
-        {
-            if (checkedValue == _checked)
-                return;
-
-            while (_animating)
-            {
-                Application.DoEvents();
-            }
-
-            BeginAnimation(checkedValue);
-        }
-
-        private void BeginAnimation(bool checkedValue)
-        {
-            _animating = true;
-            _animationResult = checkedValue;
-
-            if (_animationTimer != null && _useAnimation)
-            {
-                _animationTimer.Interval = _animationInterval;
-                _animationTimer.Enabled = true;
-            }
-            else
-            {
-                AnimationComplete();
-            }
-        }
-
-        private void AnimationTimer_Tick(object sender, EventArgs e)
-        {
-            _animationTimer.Enabled = false;
-
-            bool animationDone = false;
-            int newButtonValue;
-
-            if (IsButtonMovingRight)
-            {
-                newButtonValue = ButtonValue + _animationStep;
-
-                if (newButtonValue > _animationTarget)
-                    newButtonValue = _animationTarget;
-
-                ButtonValue = newButtonValue;
-
-                animationDone = ButtonValue >= _animationTarget;
-            }
-            else
-            {
-                newButtonValue = ButtonValue - _animationStep;
-
-                if (newButtonValue < _animationTarget)
-                    newButtonValue = _animationTarget;
-
-                ButtonValue = newButtonValue;
-
-                animationDone = ButtonValue <= _animationTarget;
-            }
-
-            if (animationDone)
-                AnimationComplete();
-            else
-                _animationTimer.Enabled = true;
-        }
-
-        private void AnimationComplete()
-        {
-            _animating = false;
-            _moving = false;
-            _checked = _animationResult;
-
-            _isButtonHovered = false;
-            _isButtonPressed = false;
-            _isLeftFieldHovered = false;
-            _isLeftFieldPressed = false;
-            _isRightFieldHovered = false;
-            _isRightFieldPressed = false;
-
-            Refresh();
-
-            if (CheckedChanged != null)
-                CheckedChanged(this, new EventArgs());
-
-            if (_lastMouseEventArgs != null)
-                OnMouseMove(_lastMouseEventArgs);
-
-            _lastMouseEventArgs = null;
-        }
-    }
-}

+ 0 - 343
Optimizer/Controls/ToggleSwitch/ToggleSwitchRenderer.cs

@@ -1,343 +0,0 @@
-using System.Drawing;
-
-namespace Optimizer
-{
-    internal class ToggleSwitchRenderer : ToggleSwitchRendererBase
-    {
-        public Color BackColor { get; set; }
-        public Color LeftSideColor { get; set; }
-        public Color LeftSideColorHovered { get; set; }
-        public Color LeftSideColorPressed { get; set; }
-        public Color RightSideColor { get; set; }
-        public Color RightSideColorHovered { get; set; }
-        public Color RightSideColorPressed { get; set; }
-        public Color BorderColor { get; set; }
-        public Color ButtonColor { get; set; }
-        public Color ButtonColorHovered { get; set; }
-        public Color ButtonColorPressed { get; set; }
-
-        public ToggleSwitchRenderer()
-        {
-            switch (Options.CurrentOptions.Color)
-            {
-                case Theme.Caramel:
-                    LeftSideColor = Color.DarkOrange;
-                    LeftSideColorHovered = Color.DarkOrange;
-                    LeftSideColorPressed = Color.DarkOrange;
-                    break;
-                case Theme.Ocean:
-                    LeftSideColor = Color.DodgerBlue;
-                    LeftSideColorHovered = Color.DodgerBlue;
-                    LeftSideColorPressed = Color.DodgerBlue;
-                    break;
-                case Theme.Lime:
-                    LeftSideColor = Color.LimeGreen;
-                    LeftSideColorHovered = Color.LimeGreen;
-                    LeftSideColorPressed = Color.LimeGreen;
-                    break;
-                case Theme.Magma:
-                    LeftSideColor = Color.Tomato;
-                    LeftSideColorHovered = Color.Tomato;
-                    LeftSideColorPressed = Color.Tomato;
-                    break;
-                case Theme.Minimal:
-                    LeftSideColor = Color.Gray;
-                    LeftSideColorHovered = Color.Gray;
-                    LeftSideColorPressed = Color.Gray;
-                    break;
-                case Theme.Zerg:
-                    LeftSideColor = Color.MediumOrchid;
-                    LeftSideColorHovered = Color.MediumOrchid;
-                    LeftSideColorPressed = Color.MediumOrchid;
-                    break;
-                default:
-                    LeftSideColor = Color.MediumOrchid;
-                    LeftSideColorHovered = Color.MediumOrchid;
-                    LeftSideColorPressed = Color.MediumOrchid;
-                    break;
-            }
-
-            BorderColor = Color.FromArgb(20, 20, 20);
-            BackColor = Color.White;
-            RightSideColor = Color.FromArgb(40, 40, 40);
-            RightSideColorHovered = Color.FromArgb(40, 40, 40);
-            RightSideColorPressed = Color.FromArgb(40, 40, 40);
-            ButtonColor = Color.White;
-            ButtonColorHovered = Color.WhiteSmoke;
-            ButtonColorPressed = Color.WhiteSmoke;
-        }
-
-        public override void RenderBorder(Graphics g, Rectangle borderRectangle)
-        {
-            Color borderColor = !ToggleSwitch.Enabled && ToggleSwitch.GrayWhenDisabled ? BorderColor.ToGrayScale() : BorderColor;
-
-            g.SetClip(borderRectangle);
-
-            using (Pen borderPen = new Pen(borderColor))
-            {
-                g.DrawRectangle(borderPen, borderRectangle.X, borderRectangle.Y, borderRectangle.Width - 1, borderRectangle.Height - 1);
-            }
-
-            g.ResetClip();
-        }
-
-        public override void RenderLeftToggleField(Graphics g, Rectangle leftRectangle, int totalToggleFieldWidth)
-        {
-            Rectangle adjustedLeftRect = new Rectangle(leftRectangle.X + 2, 2, leftRectangle.Width - 2, leftRectangle.Height - 4);
-
-            if (adjustedLeftRect.Width > 0)
-            {
-                Color leftColor = LeftSideColor;
-
-                if (ToggleSwitch.IsLeftSidePressed)
-                    leftColor = LeftSideColorPressed;
-                else if (ToggleSwitch.IsLeftSideHovered)
-                    leftColor = LeftSideColorHovered;
-
-                if (!ToggleSwitch.Enabled && ToggleSwitch.GrayWhenDisabled)
-                    leftColor = leftColor.ToGrayScale();
-
-                g.SetClip(adjustedLeftRect);
-
-                using (Brush leftBrush = new SolidBrush(leftColor))
-                {
-                    g.FillRectangle(leftBrush, adjustedLeftRect);
-                }
-
-                if (ToggleSwitch.OnSideImage != null || !string.IsNullOrEmpty(ToggleSwitch.OnText))
-                {
-                    RectangleF fullRectangle = new RectangleF(leftRectangle.X + 2 - (totalToggleFieldWidth - leftRectangle.Width), 2, totalToggleFieldWidth - 2, ToggleSwitch.Height - 4);
-
-                    g.IntersectClip(fullRectangle);
-
-                    if (ToggleSwitch.OnSideImage != null)
-                    {
-                        Size imageSize = ToggleSwitch.OnSideImage.Size;
-                        Rectangle imageRectangle;
-
-                        int imageXPos = (int)fullRectangle.X;
-
-                        if (ToggleSwitch.OnSideScaleImageToFit)
-                        {
-                            Size canvasSize = new Size((int)fullRectangle.Width, (int)fullRectangle.Height);
-                            Size resizedImageSize = ImageHelper.RescaleImageToFit(imageSize, canvasSize);
-
-                            if (ToggleSwitch.OnSideAlignment == ToggleSwitchAlignment.Center)
-                            {
-                                imageXPos = (int)((float)fullRectangle.X + (((float)fullRectangle.Width - (float)resizedImageSize.Width) / 2));
-                            }
-                            else if (ToggleSwitch.OnSideAlignment == ToggleSwitchAlignment.Near)
-                            {
-                                imageXPos = (int)((float)fullRectangle.X + (float)fullRectangle.Width - (float)resizedImageSize.Width);
-                            }
-
-                            imageRectangle = new Rectangle(imageXPos, (int)((float)fullRectangle.Y + (((float)fullRectangle.Height - (float)resizedImageSize.Height) / 2)), resizedImageSize.Width, resizedImageSize.Height);
-
-                            if (!ToggleSwitch.Enabled && ToggleSwitch.GrayWhenDisabled)
-                                g.DrawImage(ToggleSwitch.OnSideImage, imageRectangle, 0, 0, ToggleSwitch.OnSideImage.Width, ToggleSwitch.OnSideImage.Height, GraphicsUnit.Pixel, ImageHelper.GetGrayscaleAttributes());
-                            else
-                                g.DrawImage(ToggleSwitch.OnSideImage, imageRectangle);
-                        }
-                        else
-                        {
-                            if (ToggleSwitch.OnSideAlignment == ToggleSwitchAlignment.Center)
-                            {
-                                imageXPos = (int)((float)fullRectangle.X + (((float)fullRectangle.Width - (float)imageSize.Width) / 2));
-                            }
-                            else if (ToggleSwitch.OnSideAlignment == ToggleSwitchAlignment.Near)
-                            {
-                                imageXPos = (int)((float)fullRectangle.X + (float)fullRectangle.Width - (float)imageSize.Width);
-                            }
-
-                            imageRectangle = new Rectangle(imageXPos, (int)((float)fullRectangle.Y + (((float)fullRectangle.Height - (float)imageSize.Height) / 2)), imageSize.Width, imageSize.Height);
-
-                            if (!ToggleSwitch.Enabled && ToggleSwitch.GrayWhenDisabled)
-                                g.DrawImage(ToggleSwitch.OnSideImage, imageRectangle, 0, 0, ToggleSwitch.OnSideImage.Width, ToggleSwitch.OnSideImage.Height, GraphicsUnit.Pixel, ImageHelper.GetGrayscaleAttributes());
-                            else
-                                g.DrawImageUnscaled(ToggleSwitch.OnSideImage, imageRectangle);
-                        }
-                    }
-                    else if (!string.IsNullOrEmpty(ToggleSwitch.OnText))
-                    {
-                        SizeF textSize = g.MeasureString(ToggleSwitch.OnText, ToggleSwitch.OnFont);
-
-                        float textXPos = fullRectangle.X;
-
-                        if (ToggleSwitch.OnSideAlignment == ToggleSwitchAlignment.Center)
-                        {
-                            textXPos = (float)fullRectangle.X + (((float)fullRectangle.Width - (float)textSize.Width) / 2);
-                        }
-                        else if (ToggleSwitch.OnSideAlignment == ToggleSwitchAlignment.Near)
-                        {
-                            textXPos = (float)fullRectangle.X + (float)fullRectangle.Width - (float)textSize.Width;
-                        }
-
-                        RectangleF textRectangle = new RectangleF(textXPos, (float)fullRectangle.Y + (((float)fullRectangle.Height - (float)textSize.Height) / 2), textSize.Width, textSize.Height);
-
-                        Color textForeColor = ToggleSwitch.OnForeColor;
-
-                        if (!ToggleSwitch.Enabled && ToggleSwitch.GrayWhenDisabled)
-                            textForeColor = textForeColor.ToGrayScale();
-
-                        using (Brush textBrush = new SolidBrush(textForeColor))
-                        {
-                            g.DrawString(ToggleSwitch.OnText, ToggleSwitch.OnFont, textBrush, textRectangle);
-                        }
-                    }
-                }
-
-                g.ResetClip();
-            }
-        }
-
-        public override void RenderRightToggleField(Graphics g, Rectangle rightRectangle, int totalToggleFieldWidth)
-        {
-            Rectangle adjustedRightRect = new Rectangle(rightRectangle.X, 2, rightRectangle.Width - 2, rightRectangle.Height - 4);
-
-            if (adjustedRightRect.Width > 0)
-            {
-                Color rightColor = RightSideColor;
-
-                if (ToggleSwitch.IsRightSidePressed)
-                    rightColor = RightSideColorPressed;
-                else if (ToggleSwitch.IsRightSideHovered)
-                    rightColor = RightSideColorHovered;
-
-                if (!ToggleSwitch.Enabled && ToggleSwitch.GrayWhenDisabled)
-                    rightColor = rightColor.ToGrayScale();
-
-                g.SetClip(adjustedRightRect);
-
-                using (Brush rightBrush = new SolidBrush(rightColor))
-                {
-                    g.FillRectangle(rightBrush, adjustedRightRect);
-                }
-
-                if (ToggleSwitch.OffSideImage != null || !string.IsNullOrEmpty(ToggleSwitch.OnText))
-                {
-                    RectangleF fullRectangle = new RectangleF(rightRectangle.X, 2, totalToggleFieldWidth - 2, ToggleSwitch.Height - 4);
-
-                    g.IntersectClip(fullRectangle);
-
-                    if (ToggleSwitch.OffSideImage != null)
-                    {
-                        Size imageSize = ToggleSwitch.OffSideImage.Size;
-                        Rectangle imageRectangle;
-
-                        int imageXPos = (int)fullRectangle.X;
-
-                        if (ToggleSwitch.OffSideScaleImageToFit)
-                        {
-                            Size canvasSize = new Size((int)fullRectangle.Width, (int)fullRectangle.Height);
-                            Size resizedImageSize = ImageHelper.RescaleImageToFit(imageSize, canvasSize);
-
-                            if (ToggleSwitch.OffSideAlignment == ToggleSwitchAlignment.Center)
-                            {
-                                imageXPos = (int)((float)fullRectangle.X + (((float)fullRectangle.Width - (float)resizedImageSize.Width) / 2));
-                            }
-                            else if (ToggleSwitch.OffSideAlignment == ToggleSwitchAlignment.Far)
-                            {
-                                imageXPos = (int)((float)fullRectangle.X + (float)fullRectangle.Width - (float)resizedImageSize.Width);
-                            }
-
-                            imageRectangle = new Rectangle(imageXPos, (int)((float)fullRectangle.Y + (((float)fullRectangle.Height - (float)resizedImageSize.Height) / 2)), resizedImageSize.Width, resizedImageSize.Height);
-
-                            if (!ToggleSwitch.Enabled && ToggleSwitch.GrayWhenDisabled)
-                                g.DrawImage(ToggleSwitch.OnSideImage, imageRectangle, 0, 0, ToggleSwitch.OnSideImage.Width, ToggleSwitch.OnSideImage.Height, GraphicsUnit.Pixel, ImageHelper.GetGrayscaleAttributes());
-                            else
-                                g.DrawImage(ToggleSwitch.OnSideImage, imageRectangle);
-                        }
-                        else
-                        {
-                            if (ToggleSwitch.OffSideAlignment == ToggleSwitchAlignment.Center)
-                            {
-                                imageXPos = (int)((float)fullRectangle.X + (((float)fullRectangle.Width - (float)imageSize.Width) / 2));
-                            }
-                            else if (ToggleSwitch.OffSideAlignment == ToggleSwitchAlignment.Far)
-                            {
-                                imageXPos = (int)((float)fullRectangle.X + (float)fullRectangle.Width - (float)imageSize.Width);
-                            }
-
-                            imageRectangle = new Rectangle(imageXPos, (int)((float)fullRectangle.Y + (((float)fullRectangle.Height - (float)imageSize.Height) / 2)), imageSize.Width, imageSize.Height);
-
-                            if (!ToggleSwitch.Enabled && ToggleSwitch.GrayWhenDisabled)
-                                g.DrawImage(ToggleSwitch.OnSideImage, imageRectangle, 0, 0, ToggleSwitch.OnSideImage.Width, ToggleSwitch.OnSideImage.Height, GraphicsUnit.Pixel, ImageHelper.GetGrayscaleAttributes());
-                            else
-                                g.DrawImageUnscaled(ToggleSwitch.OffSideImage, imageRectangle);
-                        }
-                    }
-                    else if (!string.IsNullOrEmpty(ToggleSwitch.OnText))
-                    {
-                        SizeF textSize = g.MeasureString(ToggleSwitch.OnText, ToggleSwitch.OffFont);
-
-                        float textXPos = fullRectangle.X;
-
-                        if (ToggleSwitch.OffSideAlignment == ToggleSwitchAlignment.Center)
-                        {
-                            textXPos = (float)fullRectangle.X + (((float)fullRectangle.Width - (float)textSize.Width) / 2);
-                        }
-                        else if (ToggleSwitch.OffSideAlignment == ToggleSwitchAlignment.Far)
-                        {
-                            textXPos = (float)fullRectangle.X + (float)fullRectangle.Width - (float)textSize.Width;
-                        }
-
-                        RectangleF textRectangle = new RectangleF(textXPos, (float)fullRectangle.Y + (((float)fullRectangle.Height - (float)textSize.Height) / 2), textSize.Width, textSize.Height);
-
-                        Color textForeColor = ToggleSwitch.OffForeColor;
-
-                        if (!ToggleSwitch.Enabled && ToggleSwitch.GrayWhenDisabled)
-                            textForeColor = textForeColor.ToGrayScale();
-
-                        using (Brush textBrush = new SolidBrush(textForeColor))
-                        {
-                            g.DrawString(ToggleSwitch.OnText, ToggleSwitch.OffFont, textBrush, textRectangle);
-                        }
-                    }
-                }
-            }
-        }
-
-        public override void RenderButton(Graphics g, Rectangle buttonRectangle)
-        {
-            Color buttonColor = ButtonColor;
-
-            if (ToggleSwitch.IsButtonPressed)
-            {
-                buttonColor = ButtonColorPressed;
-            }
-            else if (ToggleSwitch.IsButtonHovered)
-            {
-                buttonColor = ButtonColorHovered;
-            }
-
-            if (!ToggleSwitch.Enabled && ToggleSwitch.GrayWhenDisabled)
-                buttonColor = buttonColor.ToGrayScale();
-
-            g.SetClip(buttonRectangle);
-
-            using (Brush backBrush = new SolidBrush(buttonColor))
-            {
-                g.FillRectangle(backBrush, buttonRectangle);
-            }
-
-            g.ResetClip();
-        }
-
-        public override int GetButtonWidth()
-        {
-            return (int)((double)ToggleSwitch.Height / 3 * 2);
-        }
-
-        public override Rectangle GetButtonRectangle()
-        {
-            int buttonWidth = GetButtonWidth();
-            return GetButtonRectangle(buttonWidth);
-        }
-
-        public override Rectangle GetButtonRectangle(int buttonWidth)
-        {
-            Rectangle buttonRect = new Rectangle(ToggleSwitch.ButtonValue, 0, buttonWidth, ToggleSwitch.Height);
-            return buttonRect;
-        }
-    }
-}

+ 0 - 81
Optimizer/Controls/ToggleSwitch/ToggleSwitchRendererBase.cs

@@ -1,81 +0,0 @@
-using System.Drawing;
-using System.Windows.Forms;
-
-namespace Optimizer
-{
-    public abstract class ToggleSwitchRendererBase
-    {
-        private ToggleSwitch _toggleSwitch;
-
-        protected ToggleSwitchRendererBase() { }
-
-        internal void SetToggleSwitch(ToggleSwitch toggleSwitch)
-        {
-            _toggleSwitch = toggleSwitch;
-        }
-
-        internal ToggleSwitch ToggleSwitch
-        {
-            get { return _toggleSwitch; }
-        }
-
-        public void RenderBackground(PaintEventArgs e)
-        {
-            if (_toggleSwitch == null) return;
-
-            e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
-
-            Rectangle controlRectangle = new Rectangle(0, 0, _toggleSwitch.Width, _toggleSwitch.Height);
-
-            FillBackground(e.Graphics, controlRectangle);
-            RenderBorder(e.Graphics, controlRectangle);
-        }
-
-        public void RenderControl(PaintEventArgs e)
-        {
-            if (_toggleSwitch == null) return;
-
-            e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
-
-            Rectangle buttonRectangle = GetButtonRectangle();
-            int totalToggleFieldWidth = ToggleSwitch.Width - buttonRectangle.Width;
-
-            if (buttonRectangle.X > 0)
-            {
-                Rectangle leftRectangle = new Rectangle(0, 0, buttonRectangle.X, ToggleSwitch.Height);
-
-                if (leftRectangle.Width > 0)
-                    RenderLeftToggleField(e.Graphics, leftRectangle, totalToggleFieldWidth);
-            }
-
-            if (buttonRectangle.X + buttonRectangle.Width < e.ClipRectangle.Width)
-            {
-                Rectangle rightRectangle = new Rectangle(buttonRectangle.X + buttonRectangle.Width, 0, ToggleSwitch.Width - buttonRectangle.X - buttonRectangle.Width, ToggleSwitch.Height);
-
-                if (rightRectangle.Width > 0)
-                    RenderRightToggleField(e.Graphics, rightRectangle, totalToggleFieldWidth);
-            }
-
-            RenderButton(e.Graphics, buttonRectangle);
-        }
-
-        public void FillBackground(Graphics g, Rectangle controlRectangle)
-        {
-            Color backColor = (!ToggleSwitch.Enabled && ToggleSwitch.GrayWhenDisabled) ? ToggleSwitch.BackColor.ToGrayScale() : ToggleSwitch.BackColor;
-
-            using (Brush backBrush = new SolidBrush(backColor))
-            {
-                g.FillRectangle(backBrush, controlRectangle);
-            }
-        }
-
-        public abstract void RenderBorder(Graphics g, Rectangle borderRectangle);
-        public abstract void RenderLeftToggleField(Graphics g, Rectangle leftRectangle, int totalToggleFieldWidth);
-        public abstract void RenderRightToggleField(Graphics g, Rectangle rightRectangle, int totalToggleFieldWidth);
-        public abstract void RenderButton(Graphics g, Rectangle buttonRectangle);
-
-        public abstract int GetButtonWidth();
-        public abstract Rectangle GetButtonRectangle();
-        public abstract Rectangle GetButtonRectangle(int buttonWidth);
-    }
-}

+ 2 - 2
Optimizer/Forms/CleanPreviewForm.Designer.cs

@@ -33,7 +33,7 @@ namespace Optimizer
             this.cancelBackup = new System.Windows.Forms.Button();
             this.cleanDriveB = new System.Windows.Forms.Button();
             this.panel1 = new System.Windows.Forms.Panel();
-            this.listPreview = new Optimizer.ColoredCheckList();
+            this.listPreview = new Optimizer.MoonCheckList();
             this.checkSelectAll = new System.Windows.Forms.LinkLabel();
             this.panel2.SuspendLayout();
             this.panel1.SuspendLayout();
@@ -160,7 +160,7 @@ namespace Optimizer
         private System.Windows.Forms.Panel panel1;
         private System.Windows.Forms.Button cancelBackup;
         private System.Windows.Forms.Button cleanDriveB;
-        private ColoredCheckList listPreview;
+        private MoonCheckList listPreview;
         private System.Windows.Forms.LinkLabel checkSelectAll;
     }
 }

+ 20 - 20
Optimizer/Forms/FirstRunForm.Designer.cs

@@ -39,17 +39,17 @@ namespace Optimizer
             this.pictureBox3 = new System.Windows.Forms.PictureBox();
             this.pictureBox4 = new System.Windows.Forms.PictureBox();
             this.pictureBox5 = new System.Windows.Forms.PictureBox();
-            this.radioFrench = new Optimizer.ColoredRadio();
-            this.radioPortuguese = new Optimizer.ColoredRadio();
-            this.radioSpanish = new Optimizer.ColoredRadio();
-            this.radioGerman = new Optimizer.ColoredRadio();
-            this.radioTurkish = new Optimizer.ColoredRadio();
-            this.radioHellenic = new Optimizer.ColoredRadio();
-            this.radioEnglish = new Optimizer.ColoredRadio();
-            this.radioRussian = new Optimizer.ColoredRadio();
-            this.radioItalian = new Optimizer.ColoredRadio();
+            this.radioFrench = new Optimizer.MoonnRadio();
+            this.radioPortuguese = new Optimizer.MoonnRadio();
+            this.radioSpanish = new Optimizer.MoonnRadio();
+            this.radioGerman = new Optimizer.MoonnRadio();
+            this.radioTurkish = new Optimizer.MoonnRadio();
+            this.radioHellenic = new Optimizer.MoonnRadio();
+            this.radioEnglish = new Optimizer.MoonnRadio();
+            this.radioRussian = new Optimizer.MoonnRadio();
+            this.radioItalian = new Optimizer.MoonnRadio();
             this.pictureBox6 = new System.Windows.Forms.PictureBox();
-            this.radioChinese = new Optimizer.ColoredRadio();
+            this.radioChinese = new Optimizer.MoonnRadio();
             this.pictureBox7 = new System.Windows.Forms.PictureBox();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox88)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox87)).BeginInit();
@@ -406,25 +406,25 @@ namespace Optimizer
         #endregion
 
         private System.Windows.Forms.PictureBox pictureBox88;
-        private ColoredRadio radioHellenic;
+        private MoonnRadio radioHellenic;
         private System.Windows.Forms.PictureBox pictureBox87;
-        private ColoredRadio radioEnglish;
-        private ColoredRadio radioRussian;
+        private MoonnRadio radioEnglish;
+        private MoonnRadio radioRussian;
         private System.Windows.Forms.PictureBox pictureBox86;
         private System.Windows.Forms.Button btnStart;
         private System.Windows.Forms.PictureBox pictureBox1;
-        private ColoredRadio radioTurkish;
-        private ColoredRadio radioGerman;
+        private MoonnRadio radioTurkish;
+        private MoonnRadio radioGerman;
         private System.Windows.Forms.PictureBox pictureBox2;
-        private ColoredRadio radioSpanish;
+        private MoonnRadio radioSpanish;
         private System.Windows.Forms.PictureBox pictureBox3;
-        private ColoredRadio radioPortuguese;
+        private MoonnRadio radioPortuguese;
         private System.Windows.Forms.PictureBox pictureBox4;
-        private ColoredRadio radioFrench;
+        private MoonnRadio radioFrench;
         private System.Windows.Forms.PictureBox pictureBox5;
-        private ColoredRadio radioItalian;
+        private MoonnRadio radioItalian;
         private System.Windows.Forms.PictureBox pictureBox6;
-        private ColoredRadio radioChinese;
+        private MoonnRadio radioChinese;
         private System.Windows.Forms.PictureBox pictureBox7;
     }
 }

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 874 - 880
Optimizer/Forms/MainForm.Designer.cs


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 241 - 269
Optimizer/Forms/MainForm.cs


+ 14 - 0
Optimizer/Forms/MainForm.resx

@@ -118,6 +118,20 @@
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="picUpdate.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
+        EgAACxIB0t1+/AAAAedJREFUeF7tkFFOwzAQBXv/m/YUoIcmqJihbp1CnMUjzU/ferOvl8VisVgcwPV6
+        fbuVn/8HbflN4vpY+UhcHysfietj5SNxfax8JK6PlY/E9bHykbg+Vj4S18fKR+L6WPlIXB8rH4nrY+Uj
+        cX2sfCSuj5WPxPWx8pG4PlY+EtfHykfi+lj5SHwuRorYm0j8IyNvfh07KhIrNh+JFZuPxMdhR20y8g2b
+        jcTfsNlNRo7DjrqVsS/YXCT+gs3dythx2FGtjH5iM5H4E5tpZfRY7LBWRj+wPBJ/YHkro3NgB7Yy2v0D
+        LGtldC7s0NZ7c8/smBY7+JXymbmxw18h68+BFdgja8+FFRmRdefECj0ja/6eVx7S7npUng+xa1f7eJN4
+        CNt3T54NYfsicR97HImHsZ0m48PYzkjcxx5H4l3Y3lsZ24XtjcR97HEk3o3tjsS7sd2RuI89jsQv4S93
+        bxL3sceReHrs9kjcxx5H4umx2yNxH3sciafHbo/EfexxJJ4euz0S97HHkXh67PZI3MceR+LpsdsjcR97
+        HImnx26PxH3scSSeHrs9Evexx5F4euz2SNzHHm8yMi128yYjfexxBan3GLbgzFLrcWzJmaXWc9iiM0qd
+        MWzhmaTGfmz5zHL2YrFYLH7mcnkHBniDBBEQJcMAAAAASUVORK5CYII=
+</value>
+  </data>
   <data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL

+ 2 - 2
Optimizer/Forms/StartupPreviewForm.Designer.cs

@@ -29,7 +29,7 @@
         private void InitializeComponent()
         {
             this.panel1 = new System.Windows.Forms.Panel();
-            this.listPreview = new System.Windows.Forms.ListBox();
+            this.listPreview = new MoonList();
             this.panel1.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -85,6 +85,6 @@
         #endregion
 
         private System.Windows.Forms.Panel panel1;
-        private System.Windows.Forms.ListBox listPreview;
+        private MoonList listPreview;
     }
 }

+ 2 - 2
Optimizer/Forms/StartupRestoreForm.Designer.cs

@@ -29,7 +29,7 @@
         private void InitializeComponent()
         {
             this.backupL = new System.Windows.Forms.Label();
-            this.listRestoreItems = new System.Windows.Forms.ListBox();
+            this.listRestoreItems = new MoonList();
             this.panel1 = new System.Windows.Forms.Panel();
             this.txtNoBackups = new System.Windows.Forms.Label();
             this.previewBackupB = new System.Windows.Forms.Button();
@@ -177,7 +177,7 @@
         #endregion
 
         private System.Windows.Forms.Label backupL;
-        private System.Windows.Forms.ListBox listRestoreItems;
+        private MoonList listRestoreItems;
         private System.Windows.Forms.Panel panel1;
         private System.Windows.Forms.Button previewBackupB;
         private System.Windows.Forms.Button restoreBackupB;

+ 24 - 11
Optimizer/Optimizer.csproj

@@ -85,6 +85,22 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Controls\MoonList.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Controls\MoonTabs.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Controls\ColorOverrider.cs" />
+    <Compile Include="Controls\MoonToggle.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Controls\ToggleCard.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Controls\ToggleCard.Designer.cs">
+      <DependentUpon>ToggleCard.cs</DependentUpon>
+    </Compile>
     <Compile Include="Forms\AboutForm.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -97,23 +113,23 @@
     <Compile Include="Controls\AppCard.Designer.cs">
       <DependentUpon>AppCard.cs</DependentUpon>
     </Compile>
-    <Compile Include="Controls\ColoredCheckList.cs">
+    <Compile Include="Controls\MoonCheckList.cs">
       <SubType>Component</SubType>
     </Compile>
-    <Compile Include="Controls\ColoredProgress.cs">
+    <Compile Include="Controls\MoonProgress.cs">
       <SubType>Component</SubType>
     </Compile>
-    <Compile Include="Controls\ToolStripRendererMaterial.cs" />
+    <Compile Include="Controls\MoonMenuRenderer.cs" />
     <Compile Include="ErrorLogger.cs" />
     <Compile Include="FeedApp.cs" />
     <Compile Include="ByteSize\BinaryByteSize.cs" />
     <Compile Include="ByteSize\ByteSize.cs" />
     <Compile Include="ByteSize\DecimalByteSize.cs" />
     <Compile Include="CleanHelper.cs" />
-    <Compile Include="Controls\ColoredCheck.cs">
+    <Compile Include="Controls\MoonCheck.cs">
       <SubType>Component</SubType>
     </Compile>
-    <Compile Include="Controls\ColoredRadio.cs">
+    <Compile Include="Controls\MoonRadio.cs">
       <SubType>Component</SubType>
     </Compile>
     <Compile Include="EmbeddedAssembly.cs" />
@@ -188,13 +204,10 @@
     </Compile>
     <Compile Include="StartupBackupItem.cs" />
     <Compile Include="StartupItem.cs" />
-    <Compile Include="Controls\ToggleSwitch\ImageHelper.cs" />
-    <Compile Include="Controls\ToggleSwitch\ToggleSwitch.cs">
-      <SubType>Component</SubType>
-    </Compile>
-    <Compile Include="Controls\ToggleSwitch\ToggleSwitchRenderer.cs" />
-    <Compile Include="Controls\ToggleSwitch\ToggleSwitchRendererBase.cs" />
     <Compile Include="Utilities.cs" />
+    <EmbeddedResource Include="Controls\ToggleCard.resx">
+      <DependentUpon>ToggleCard.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Forms\AboutForm.resx">
       <DependentUpon>AboutForm.cs</DependentUpon>
       <SubType>Designer</SubType>

+ 46 - 34
Optimizer/Options.cs

@@ -38,10 +38,8 @@ namespace Optimizer
 
         // windows 10
         public bool EnableLegacyVolumeSlider { get; set; }
-        public bool EnableTaskbarColor { get; set; }
         public bool DisableQuickAccessHistory { get; set; }
         public bool DisableStartMenuAds { get; set; }
-        public bool EnableDarkTheme { get; set; }
         public bool UninstallOneDrive { get; set; }
         public bool DisableMyPeople { get; set; }
         public bool DisableAutomaticUpdates { get; set; }
@@ -127,48 +125,64 @@ namespace Optimizer
 
         private static void SetTheme(Form f, Color c1, Color c2)
         {
-            Utilities.GetSelfAndChildrenRecursive(f).OfType<Button>().ToList().ForEach(b => b.BackColor = c1);
-            Utilities.GetSelfAndChildrenRecursive(f).OfType<Button>().ToList().ForEach(b => b.FlatAppearance.BorderColor = c1);
-            Utilities.GetSelfAndChildrenRecursive(f).OfType<Button>().ToList().ForEach(b => b.FlatAppearance.MouseDownBackColor = c2);
-            Utilities.GetSelfAndChildrenRecursive(f).OfType<Button>().ToList().ForEach(b => b.FlatAppearance.MouseOverBackColor = c2);
+            dynamic c;
 
-            foreach (ToggleSwitch tmp in Utilities.GetSelfAndChildrenRecursive(f).OfType<ToggleSwitch>().ToList())
+            Utilities.GetSelfAndChildrenRecursive(f).ToList().ForEach(x =>
             {
-                if ((string)tmp.Tag == _themeFlag)
+                c = x;
+
+                if (x is Button)
                 {
-                    tmp.SetRenderer(new ToggleSwitchRenderer());
+                    c.BackColor = c1;
+                    c.FlatAppearance.BorderColor = c1;
+                    c.FlatAppearance.MouseDownBackColor = c2;
+                    c.FlatAppearance.MouseOverBackColor = c2;
                 }
-            }
-            foreach (Label tmp in Utilities.GetSelfAndChildrenRecursive(f).OfType<Label>().ToList())
-            {
-                if ((string)tmp.Tag == _themeFlag)
+
+                if (x is ToggleCard)
                 {
-                    tmp.ForeColor = c1;
+                    c.Toggle.Invalidate();
                 }
-            }
-            foreach (LinkLabel tmp in Utilities.GetSelfAndChildrenRecursive(f).OfType<LinkLabel>().ToList())
-            {
-                if ((string)tmp.Tag == _themeFlag)
+
+                if (x is Label)
                 {
-                    tmp.LinkColor = c1;
-                    tmp.VisitedLinkColor = c1;
-                    tmp.ActiveLinkColor = c2;
+                    if ((string)c.Tag == _themeFlag)
+                    {
+                        c.ForeColor = c1;
+                    }
                 }
-            }
-            foreach (CheckBox tmp in Utilities.GetSelfAndChildrenRecursive(f).OfType<CheckBox>().ToList())
-            {
-                if ((string)tmp.Tag == _themeFlag)
+
+                if (x is LinkLabel)
                 {
-                    tmp.ForeColor = c1;
+                    if ((string)c.Tag == _themeFlag)
+                    {
+                        c.LinkColor = c1;
+                        c.VisitedLinkColor = c1;
+                        c.ActiveLinkColor = c2;
+                    }
                 }
-            }
-            foreach (RadioButton tmp in Utilities.GetSelfAndChildrenRecursive(f).OfType<RadioButton>().ToList())
-            {
-                if ((string)tmp.Tag == _themeFlag)
+
+                if (x is CheckBox)
                 {
-                    tmp.ForeColor = c1;
+                    if ((string)c.Tag == _themeFlag)
+                    {
+                        c.ForeColor = c1;
+                    }
                 }
-            }
+
+                if (x is RadioButton)
+                {
+                    if ((string)c.Tag == _themeFlag)
+                    {
+                        c.ForeColor = c1;
+                    }
+                }
+
+                if (x is MoonTabs)
+                {
+                    c.Invalidate();
+                }
+            });
         }
 
         internal static void LegacyCheck()
@@ -236,10 +250,8 @@ namespace Optimizer
                 CurrentOptions.DisableStickyKeys = false;
 
                 CurrentOptions.EnableLegacyVolumeSlider = false;
-                CurrentOptions.EnableTaskbarColor = false;
                 CurrentOptions.DisableQuickAccessHistory = false;
                 CurrentOptions.DisableStartMenuAds = false;
-                CurrentOptions.EnableDarkTheme = false;
                 CurrentOptions.UninstallOneDrive = false;
                 CurrentOptions.DisableMyPeople = false;
                 CurrentOptions.DisableAutomaticUpdates = false;

+ 1 - 1
Optimizer/Program.cs

@@ -12,7 +12,7 @@ namespace Optimizer
         /* DO NOT LEAVE THEM EMPTY */
 
         internal readonly static float Major = 11;
-        internal readonly static float Minor = 1;
+        internal readonly static float Minor = 2;
 
         internal readonly static bool EXPERIMENTAL_BUILD = false;
 

+ 0 - 5
Optimizer/Resources/CN.json

@@ -34,10 +34,8 @@
 	"CleanPreviewForm": "清除预览",
 	"optionsTab": "偏好选项",
 	"oldMixerSw": "启用经典音量混合器",
-	"colorBarSw": "启用任务栏颜色",
 	"oldExplorerSw": "恢复经典文件资源管理器",
 	"adsSw": "禁用开始菜单广告",
-	"darkSw": "启用暗黑主题",
 	"uODSw": "卸载 OneDrive",
 	"peopleSw": "禁用 My People",
 	"longPathsSw": "启用长路径支持",
@@ -319,15 +317,12 @@
 	"compatTip": "兼容性助手服务检测旧程序中的已知兼容性问题.",
 	"disableOneDriveTip": "禁用OneDrive云存储集成.",
 	"oldMixerTip": "恢复经典的音量混合器控制面板.",
-	"colorBarTip": "- 使用您的个性化颜色着色任务栏.
-    - 禁用透明效果",
 	"oldExplorerTip": "- 禁用快速访问历史记录
 	-将文件资源管理器默认视图设置为“此PC”
 	-禁用最近文件
 	-从任务栏移除搜索,任务和天气
 	-禁用“文件历史记录”功能",
 	"adsTip": "阻止广告显示在开始菜单.",
-	"darkTip": "启用 Windows 黑暗主题.",
 	"uODTip": "完全移除 OneDrive 云存储集成.",
 	"peopleTip": "My pepole是一个在任务栏显示最近联系人的新功能.",
 	"longPathsTip": "删除256个字符的最大路径长度限制.",

+ 0 - 4
Optimizer/Resources/DE.json

@@ -33,10 +33,8 @@
 	"integratorTab": "Integrator",
 	"optionsTab": "Optionen",
 	"oldMixerSw": "Klassischen Lautstärkemixer aktivieren",
-	"colorBarSw": "Taskleistenfarbe aktivieren",
 	"oldExplorerSw": " Schnellzugriffsverlauf deaktivieren",
 	"adsSw": "Startmenü-Werbung deaktivieren",
-	"darkSw": "Dunkles Design aktivieren",
 	"uODSw": "OneDrive deinstallieren",
 	"peopleSw": "My People deaktivieren",
 	"longPathsSw": "Lange Pfadangaben aktivieren",
@@ -307,10 +305,8 @@ Windows Defender ist der integrierte Virenschutz in Windows-Systemen.",
 	"compatTip": "Der Kompatibilitätsassistent-Dienst erkennt bekannte Kompatibilitätsprobleme in älteren Programmen.",
 	"disableOneDriveTip": "Deaktiviert die OneDrive-Cloud-Speicher-Integration.",
 	"oldMixerTip": "Stellt das klassische Lautstärkemixer-Bedienfeld wieder her.",
-	"colorBarTip": "- Färbt die Taskleiste mit Ihrer personalisierten Farbe ein. - Deaktiviert Transparenzeffekte",
 	"oldExplorerTip": "Deaktiviert den Schnellzugriff und entfernt das häufig genutze Dateien-Feld im Windows Explorer.",
 	"adsTip": "Verhindert, dass Werbung im Startmenü angezeigt wird",
-	"darkTip": "Aktiviert das dunkle Windows-Design.",
 	"uODTip": "Entfernt die OneDrive-Cloudspeicher-Integration vollständig.",
 	"peopleTip": "My people ist eine neue Funktion, die aktuelle Kontakte in der Taskleiste anzeigt.",
 	"longPathsTip": "Entfernt die Begrenzung der maximalen Pfadlänge auf 256 Zeichen.",

+ 0 - 5
Optimizer/Resources/EL.json

@@ -33,10 +33,8 @@
 	"integratorTab": "Integrator",
 	"optionsTab": "Επιλογές",
 	"oldMixerSw": "Επαναφορά Κλασσικού Μείκτη Ήχου",
-	"colorBarSw": "Χρωματισμός Γραμμής Εργασιών",
 	"oldExplorerSw": "Απενεργοποίηση Γρήγορης Πρόσβασης",
 	"adsSw": "Απενεργοποίηση Διαφημίσεων στην Έναρξη",
-	"darkSw": "Ενεργοποίηση Σκούρου Θέματος",
 	"uODSw": "Απεγκατάσταση OneDrive",
 	"peopleSw": "Απενεργοποίηση My People",
 	"longPathsSw": "Ενεργοποίηση Long Paths",
@@ -317,11 +315,8 @@
 	"compatTip": "Η Λειτουργία Compatibility Assistant εντοπίζει γνωστά προβλήματα συμβατότητας σε παλαιότερα προγράμματα.",
 	"disableOneDriveTip": "Απενεργοποίηση της ενοποίησης αποθήκευσης cloud του OneDrive.",
 	"oldMixerTip": "Επαναφορά του κλασικού πίνακα ελέγχου μείκτη έντασης.",
-	"colorBarTip": "- Χρωματισμός της γραμμής εργασιών με το εξατομικευμένο χρώμα σας. 
-- Απενεργοποίηση τα εφέ διαφάνειας",
 	"oldExplorerTip": "Απενεργοποίηση της γρήγορης πρόσβασης και αφαίρεση των συχνών αρχείων στην Εξερεύνηση των Windows.",
 	"adsTip": "Αποτροπή της εμφάνισης διαφημίσεων στο μενού Έναρξη.",
-	"darkTip": "Ενεργοποίηση του σκοτεινού θέματος των Windows.",
 	"uODTip": "Πλήρης κατάργηση της αποθήκευσης cloud του OneDrive.",
 	"peopleTip": "Το My People είναι μια νέα δυνατότητα που δείχνει τις πρόσφατες επαφές στη γραμμή εργασιών.",
 	"longPathsTip": "Κατάργηση του μέγιστου περιορισμού μήκους διαδρομής 256 χαρακτήρων.",

+ 0 - 5
Optimizer/Resources/EN.json

@@ -34,10 +34,8 @@
 	"CleanPreviewForm": "Clean Preview",
 	"optionsTab": "Options",
 	"oldMixerSw": "Enable Classic Volume Mixer",
-	"colorBarSw": "Enable Taskbar Color",
 	"oldExplorerSw": "Restore Classic File Explorer",
 	"adsSw": "Disable Start Menu Ads",
-	"darkSw": "Enable Dark Theme",
 	"uODSw": "Uninstall OneDrive",
 	"peopleSw": "Disable My People",
 	"longPathsSw": "Enable Long Paths",
@@ -318,15 +316,12 @@ especially on HDDs.",
 	"compatTip": "Compatibility Assistant service detects known compatibility issues in older programs.",
 	"disableOneDriveTip": "Disables OneDrive cloud-storage integration.",
 	"oldMixerTip": "Restores the classic volume mixer control panel.",
-	"colorBarTip": "- Colorizes taskbar with your personalized color.
-- Disables transparency effects",
 	"oldExplorerTip": "- Disables Quick Access history
 - Sets File Explorer default view to This PC
 - Disables recents files
 - Removes Search, Task and Weather from taskbar
 - Disables File History",
 	"adsTip": "Prevents advertisements from showing up in Start Menu.",
-	"darkTip": "Enables Windows dark theme.",
 	"uODTip": "Completely removes OneDrive cloud-storage integration.",
 	"peopleTip": "My People is a new feature showing recent contacts in taskbar.",
 	"longPathsTip": "Removes maximum path length limitation of 256 characters.",

+ 0 - 5
Optimizer/Resources/ES.json

@@ -34,10 +34,8 @@
 	"integratorTab": "Integrador",
 	"optionsTab": "Opciones",
 	"oldMixerSw": "Habilitar el mezclador de volumen clásico",
-	"colorBarSw": "Habilitar el color de la barra de tareas",
 	"oldExplorerSw": "Desactivar el historial de acceso rápido",
 	"adsSw": "Deshabilitar los anuncios del menú de inicio",
-	"darkSw": "Habilitar tema oscuro",
 	"uODSw": "Desinstalar OneDrive",
 	"peopleSw": "Desactivar My People",
 	"longPathsSw": "Habilitar rutas largas",
@@ -318,11 +316,8 @@ especialmente en discos duros.",
 	"compatTip": "El servicio Asistente de compatibilidad detecta problemas de compatibilidad conocidos en programas más antiguos.",
 	"disableOneDriveTip": "Deshabilita la integración de almacenamiento en la nube de OneDrive.",
 	"oldMixerTip": "Restaura el clásico panel de control del mezclador de volumen.",
-	"colorBarTip": "- Colorea la barra de tareas con su color personalizado.
-- Desactiva los efectos de transparencia.",
 	"oldExplorerTip": "Deshabilite el acceso rápido y elimine los archivos frecuentes en el Explorador de Windows.",
 	"adsTip": "Evita que aparezcan anuncios en el menú Inicio.",
-	"darkTip": "Habilita el tema oscuro de Windows.",
 	"uODTip": "Elimina por completo la integración de almacenamiento en la nube de OneDrive.",
 	"peopleTip": "Mi gente es una nueva función que muestra los contactos recientes en la barra de tareas.",
 	"longPathsTip": "Elimina la limitación de la longitud máxima de la ruta de 256 caracteres.",

+ 0 - 5
Optimizer/Resources/FR.json

@@ -34,10 +34,8 @@
 	"integratorTab": "Integrateur",
 	"optionsTab": "Options",
 	"oldMixerSw": "Activer le melangeur de volume classique",
-	"colorBarSw": "Activer les couleur pour la barre des taches",
 	"oldExplorerSw": "Desactiver l'historique d'acces rapide",
 	"adsSw": "Desactiver les publicites du menu Demarrer",
-	"darkSw": "Activer le theme sombre",
 	"uODSw": "Desinstaller OneDrive",
 	"peopleSw": "Desactiver My People",
 	"longPathsSw": "Activer Long Paths",
@@ -318,11 +316,8 @@ ce qui entraine une utilisation elevee du disque, surtout sur les disques durs."
 	"compatTip": "Le service Compatibility Assistant detecte les problemes de compatibilite connus dans les anciens programmes.",
 	"disableOneDriveTip": "Desactive l'integration de OneDrive sur le stockage dans le Cloud.",
 	"oldMixerTip": "Restaure le panneau de controle classique du melangeur de volume.",
-	"colorBarTip": "- Colore la barre des taches avec votre couleur personnalisee.
-- Desactive les effets de transparence",
 	"oldExplorerTip": "Desactive l'acces rapide et supprime les fichiers frequents dans l'Explorer Windows.",
 	"adsTip": "Empeche les publicites de s'afficher dans le menu Demarrer.",
-	"darkTip": "Active le theme sombre de Windows.",
 	"uODTip": "Supprime completement l'integration de OneDrive sur le stockage dans le Cloud.",
 	"peopleTip": "My People est une nouvelle fonctionnalite qui affiche les contacts recents dans la barre des taches.",
 	"longPathsTip": "Supprime la limitation de la longueur maximale des chaines de caracteres a 256 caracteres.",

+ 0 - 5
Optimizer/Resources/IT.json

@@ -33,10 +33,8 @@
 	"integratorTab": "Integrazione",
 	"optionsTab": "Opzioni",
 	"oldMixerSw": "Abilita mixer volume classico",
-	"colorBarSw": "Abilita colore taskbar",
 	"oldExplorerSw": "Disabilita strico accesso rapido",
 	"adsSw": "Disabilita annunci menu Start",
-	"darkSw": "Abilita tema scuro",
 	"uODSw": "Disinstalla OneDrive",
 	"peopleSw": "Disabilita persone",
 	"longPathsSw": "Abilita percorsi file lunghi",
@@ -306,11 +304,8 @@ soprattutto su hard disk.",
 	"compatTip": "Il servizio Assistente Compatibilità rileva i problemi di compatibilità noti in programmi più vecchi.",
 	"disableOneDriveTip": "Disabilita l'integrazione cloud-storage OneDrive.",
 	"oldMixerTip": "Restores the classic volume mixer control panel.",
-	"colorBarTip": "- Colora la barra delle applicazioni con un colore personalizzato.
-- Disabilita effetti di trasparenza.",
 	"oldExplorerTip": "Disabilita Accesso rapido e i file recenti in Windows Explorer.",
 	"adsTip": "Rimuove pubblicità dal menu Start.",
-	"darkTip": "Abilita il tema scuro di Windows.",
 	"uODTip": "Rimuove completamente l'integrazione cloud-storage di OneDrive.",
 	"peopleTip": "Persone è una nuova funzionalità che mostra i contatti recenti nella barra delle applicazioni.",
 	"longPathsTip": "Rimuove la limitazione di lunghezza per i percorsi dei file di 256 caratteri.",

+ 0 - 5
Optimizer/Resources/PT.json

@@ -34,10 +34,8 @@
 	"integratorTab": "Integrador",
 	"optionsTab": "Opções",
 	"oldMixerSw": "Habilitar Mixer de Volume Clássico",
-	"colorBarSw": "Habilitar Cor da Barra de Tarefas",
 	"oldExplorerSw": "Desativar Histórico de Acesso Rápido",
 	"adsSw": "Desativar anúncios do menu Iniciar",
-	"darkSw": "Habilitar Tema Escuro",
 	"uODSw": "Desinstalar OneDrive",
 	"peopleSw": "Desabilitar 'My People'",
 	"longPathsSw": "Habilitar Caminhos Longos",
@@ -316,11 +314,8 @@ especificamente em HDs.",
 	"compatTip": "O serviço Compatibility Assistant detecta problemas de compatibilidade conhecidos em programas mais antigos.",
 	"disableOneDriveTip": "Desativa a integração de armazenamento em nuvem OneDrive.",
 	"oldMixerTip": "Restaura o painel de controle clássico do mixer de volume.",
-	"colorBarTip": "- Personalizar a cor da barra de tarefas.
-- Desativar efeitos de transparência",
 	"oldExplorerTip": "Desative o Acesso rápido e remova arquivos frequentes no Windows Explorer.",
 	"adsTip": "Impede que anúncios apareçam no Menu Iniciar.",
-	"darkTip": "Ativa o tema escuro do Windows.",
 	"uODTip": "Remove completamente a integração de armazenamento em nuvem OneDrive.",
 	"peopleTip": "My People é um novo recurso que mostra os contatos recentes na barra de tarefas.",
 	"longPathsTip": "Remove a limitação do comprimento máximo do caminho de 256 caracteres.",

+ 0 - 5
Optimizer/Resources/RU.json

@@ -34,10 +34,8 @@
 	"integratorTab": "Интегратор",
 	"optionsTab": "Опции",
 	"oldMixerSw": "Включить Классический микшер громкости",
-	"colorBarSw": "Включить Цвет панели задач",
 	"oldExplorerSw": "Отключить История быстрого доступа",
 	"adsSw": "Отключить Реклама в меню Пуск",
-	"darkSw": "Включить Темная тема",
 	"uODSw": "Удалить OneDrive",
 	"peopleSw": "Отключить My People",
 	"longPathsSw": "Включить Длинные пути",
@@ -318,11 +316,8 @@
 	"compatTip": "Служба Compatibility Assistant обнаруживает известные проблемы совместимости в старых программах.",
 	"disableOneDriveTip": "Отключает интеграцию облачного хранилища OneDrive.",
 	"oldMixerTip": "Восстанавливает классическую панель управления микшером громкости.",
-	"colorBarTip": "- Раскрашивает панель задач вашим индивидуальным цветом.
-- Отключает эффекты прозрачности",
 	"oldExplorerTip": "Отключить быстрый доступ и удалить часто используемые файлы в проводнике Windows.",
 	"adsTip": "Предотвращает показ рекламы в меню «Пуск».",
-	"darkTip": "Включает темную тему Windows.",
 	"uODTip": "Полностью удаляет интеграцию облачного хранилища OneDrive.",
 	"peopleTip": "My People это новая функция, отображающая недавние контакты на панели задач.",
 	"longPathsTip": "Снимает ограничение на максимальную длину пути в 256 символов.",

+ 0 - 5
Optimizer/Resources/TR.json

@@ -34,10 +34,8 @@
 	"integratorTab": "Entegratör",
 	"optionsTab": "Seçenekler",
 	"oldMixerSw": "Klasik Hacim Karıştırıcısını Etkinleştir",
-	"colorBarSw": "Görev Çubuğu Rengini Etkinleştir",
 	"oldExplorerSw": "Hızlı Erişim Geçmişini Devre Dışı Bırak",
 	"adsSw": "Başlat Menüsü Reklamlarını Devre Dışı Bırak",
-	"darkSw": "Koyu Temayı Etkinleştir",
 	"uODSw": "OneDrive'ı Kaldır",
 	"peopleSw": "Kişilerimi Devre Dışı Bırak",
 	"longPathsSw": "Uzun Yolları(Long Path) Etkinleştir",
@@ -318,11 +316,8 @@ yüksek disk kullanımına neden olur.",
 	"compatTip": "Uyumluluk Yardımcısı hizmeti, eski programlarda bilinen uyumluluk sorunlarını algılar.",
 	"disableOneDriveTip": "OneDrive bulut depolama entegrasyonunu devre dışı bırakır.",
 	"oldMixerTip": "Klasik ses mikseri kontrol panelini geri yükler.",
-	"colorBarTip": "- Kişiselleştirilmiş renginizle görev çubuğunu renklendirir.
-- Şeffaflık efektlerini devre dışı bırak",
 	"oldExplorerTip": "Windows Gezgini'nde Hızlı Erişim'i devre dışı bırakın ve sık dosyaları kaldırın.",
 	"adsTip": "Başlat Menüsünde reklamların görünmesini engeller.",
-	"darkTip": "Windows karanlık temasını etkinleştirir.",
 	"uODTip": "OneDrive bulut depolama entegrasyonunu tamamen kaldırır.",
 	"peopleTip": "Kişilerim, görev çubuğunda en son kişileri gösteren yeni bir özelliktir.",
 	"longPathsTip": "256 karakterlik maksimum yol uzunluğu sınırlamasını kaldırır.",

+ 0 - 2
Optimizer/SilentConfig.cs

@@ -25,10 +25,8 @@ namespace Optimizer
         public bool? DisableStickyKeys { get; set; }
 
         public bool? EnableLegacyVolumeSlider { get; set; }
-        public bool? EnableTaskbarColor { get; set; }
         public bool? DisableQuickAccessHistory { get; set; }
         public bool? DisableStartMenuAds { get; set; }
-        public bool? EnableDarkTheme { get; set; }
         public bool? UninstallOneDrive { get; set; }
         public bool? DisableMyPeople { get; set; }
         public bool? DisableAutomaticUpdates { get; set; }

+ 0 - 32
Optimizer/SilentOps.cs

@@ -240,18 +240,6 @@ namespace Optimizer
                 }
             }
 
-            if (CurrentSilentConfig.EnableTaskbarColor.HasValue)
-            {
-                if (CurrentSilentConfig.EnableTaskbarColor.Value)
-                {
-                    Optimize.EnableTaskbarColor();
-                }
-                else
-                {
-                    Optimize.DisableTaskbarColor();
-                }
-            }
-
             if (CurrentSilentConfig.DisableQuickAccessHistory.HasValue)
             {
                 if (CurrentSilentConfig.DisableQuickAccessHistory.Value)
@@ -276,18 +264,6 @@ namespace Optimizer
                 }
             }
 
-            if (CurrentSilentConfig.EnableDarkTheme.HasValue)
-            {
-                if (CurrentSilentConfig.EnableDarkTheme.Value)
-                {
-                    Optimize.EnableDarkTheme();
-                }
-                else
-                {
-                    Optimize.EnableLightTheme();
-                }
-            }
-
             if (CurrentSilentConfig.UninstallOneDrive.HasValue)
             {
                 if (CurrentSilentConfig.UninstallOneDrive.Value)
@@ -722,10 +698,6 @@ namespace Optimizer
             {
                 Options.CurrentOptions.EnableLegacyVolumeSlider = CurrentSilentConfig.EnableLegacyVolumeSlider.Value;
             }
-            if (CurrentSilentConfig.EnableTaskbarColor.HasValue)
-            {
-                Options.CurrentOptions.EnableTaskbarColor = CurrentSilentConfig.EnableTaskbarColor.Value;
-            }
             if (CurrentSilentConfig.DisableQuickAccessHistory.HasValue)
             {
                 Options.CurrentOptions.DisableQuickAccessHistory = CurrentSilentConfig.DisableQuickAccessHistory.Value;
@@ -734,10 +706,6 @@ namespace Optimizer
             {
                 Options.CurrentOptions.DisableStartMenuAds = CurrentSilentConfig.DisableStartMenuAds.Value;
             }
-            if (CurrentSilentConfig.EnableDarkTheme.HasValue)
-            {
-                Options.CurrentOptions.EnableDarkTheme = CurrentSilentConfig.EnableDarkTheme.Value;
-            }
             if (CurrentSilentConfig.UninstallOneDrive.HasValue)
             {
                 Options.CurrentOptions.UninstallOneDrive = CurrentSilentConfig.UninstallOneDrive.Value;

+ 4 - 4
README.md

@@ -10,7 +10,7 @@ Optimizer is recommended after a fresh, clean installation of Windows to achieve
 
 Depending on your version of Windows, Optimizer will also allow you to perform some specific tweaks.
 <p align="center">
-	<a href="https://github.com/hellzerg/optimizer/releases/download/11.1/Optimizer-11.1.exe" target="_blank">
+	<a href="https://github.com/hellzerg/optimizer/releases/download/11.2/Optimizer-11.2.exe" target="_blank">
 		<img src="download-button.png">
 		<br>
 		<img src="flags.png">
@@ -82,6 +82,6 @@ https://github.com/hellzerg/optimizer/blob/master/FEED.md
 
 ## Details: ##
 
-* Latest version: 11.1
-* Released: January 23, 2022
-* SHA256: 4725C7F4A6CEC3C9FD7A3EEDDFBC6FB8BD04A1CDD4C438D8E5B9DF7E3194D961
+* Latest version: 11.2
+* Released: January 28, 2022
+* SHA256: 02ECDFF97EC9265A1BE9719469F4BE87B197ABAA17019DF991AD4466C1577439

+ 1 - 1
version.txt

@@ -1 +1 @@
-11.1
+11.2

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio