diff --git a/Bin/SunnyUI.dll b/Bin/SunnyUI.dll index 4766a969..39157c44 100644 Binary files a/Bin/SunnyUI.dll and b/Bin/SunnyUI.dll differ diff --git a/Bin/SunnyUI.pdb b/Bin/SunnyUI.pdb index ea377fd4..70209438 100644 Binary files a/Bin/SunnyUI.pdb and b/Bin/SunnyUI.pdb differ diff --git a/SunnyUI.Demo/Bin/SunnyUI.dll b/SunnyUI.Demo/Bin/SunnyUI.dll index 4766a969..39157c44 100644 Binary files a/SunnyUI.Demo/Bin/SunnyUI.dll and b/SunnyUI.Demo/Bin/SunnyUI.dll differ diff --git a/SunnyUI/Charts/UIChartStyle.cs b/SunnyUI/Charts/UIChartStyle.cs index f1ca2d44..aad63713 100644 --- a/SunnyUI/Charts/UIChartStyle.cs +++ b/SunnyUI/Charts/UIChartStyle.cs @@ -91,4 +91,34 @@ namespace Sunny.UI } } } + + public class UILiveChartStyle:UIChartStyle + { + public override Color BackColor => Color.FromArgb(16, 36, 71); + + public override Color ForeColor => Color.FromArgb(170, 170, 170); + + public override Color ToolTipShadowColor => Color.FromArgb(81, 81, 81); + + public override Color[] SeriesColor + { + get + { + return new[] + { + Color.FromArgb(33, 149, 242), + Color.FromArgb(254, 192, 7), + Color.FromArgb(243, 67, 54), + Color.FromArgb(96, 125, 138), + Color.FromArgb(0,187,211), + Color.FromArgb(232,30,99), + Color.FromArgb(254,87,34), + Color.FromArgb(63,81,180), + Color.FromArgb(204,219,57), + Color.FromArgb(0,149,135), + Color.FromArgb(255,154,59) + }; + } + } + } } \ No newline at end of file diff --git a/SunnyUI/Charts/UIOption.cs b/SunnyUI/Charts/UIOption.cs index 1174d746..c30f9204 100644 --- a/SunnyUI/Charts/UIOption.cs +++ b/SunnyUI/Charts/UIOption.cs @@ -123,7 +123,8 @@ namespace Sunny.UI { Default, Plain, - Dark + Dark, + LiveChart } public static class UIChartStyles @@ -134,10 +135,13 @@ namespace Sunny.UI public static UIChartStyle Dark = new UIDarkChartStyle(); + public static UIChartStyle LiveChart = new UILiveChartStyle(); + public static UIChartStyle GetChartStyle(UIChartStyleType style) { if (style == UIChartStyleType.Default) return Default; if (style == UIChartStyleType.Dark) return Dark; + if (style == UIChartStyleType.LiveChart) return LiveChart; return Plain; } } diff --git a/SunnyUI/Controls/UILedBulb.cs b/SunnyUI/Controls/UILedBulb.cs index 8590c969..99e241d7 100644 --- a/SunnyUI/Controls/UILedBulb.cs +++ b/SunnyUI/Controls/UILedBulb.cs @@ -116,7 +116,7 @@ namespace Sunny.UI Bitmap offScreenBmp = new Bitmap(ClientRectangle.Width, ClientRectangle.Height); using (var g = Graphics.FromImage(offScreenBmp)) { - g.SmoothingMode = SmoothingMode.HighQuality; + g.SetHighQuality(); // Draw the control drawControl(g, On); // Draw the image to the screen @@ -129,7 +129,7 @@ namespace Sunny.UI /// private void drawControl(Graphics g, bool on) { - // Is the bulb on or off + // Is the bulb on or off Color lightColor = (on) ? Color : Color.FromArgb(150, DarkColor); Color darkColor = (on) ? DarkColor : DarkDarkColor; @@ -143,7 +143,7 @@ namespace Sunny.UI // Draw the background ellipse var rectangle = new Rectangle(Padding.Left, Padding.Top, diameter, diameter); - g.FillEllipse(darkColor, rectangle); + g.FillEllipse(darkColor, rectangle,true); // Draw the glow gradient var path = new GraphicsPath(); @@ -151,6 +151,7 @@ namespace Sunny.UI var pathBrush = new PathGradientBrush(path); pathBrush.CenterColor = lightColor; pathBrush.SurroundColors = new[] { Color.FromArgb(0, lightColor) }; + g.SetHighQuality(); g.FillEllipse(pathBrush, rectangle); pathBrush.Dispose(); @@ -163,6 +164,7 @@ namespace Sunny.UI var pathBrush1 = new PathGradientBrush(path); pathBrush1.CenterColor = _reflectionColor; pathBrush1.SurroundColors = _surroundColor; + g.SetHighQuality(); g.FillEllipse(pathBrush1, whiteRect); pathBrush1.Dispose();