diff --git a/Bin/SunnyUI.dll b/Bin/SunnyUI.dll index e747d23c..ffaef7b3 100644 Binary files a/Bin/SunnyUI.dll and b/Bin/SunnyUI.dll differ diff --git a/Bin/SunnyUI.pdb b/Bin/SunnyUI.pdb index 61cfa0e5..0ba83ea6 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 e747d23c..ffaef7b3 100644 Binary files a/SunnyUI.Demo/Bin/SunnyUI.dll and b/SunnyUI.Demo/Bin/SunnyUI.dll differ diff --git a/SunnyUI/Charts/UIBarChart.cs b/SunnyUI/Charts/UIBarChart.cs index ef56a1f0..b278aee2 100644 --- a/SunnyUI/Charts/UIBarChart.cs +++ b/SunnyUI/Charts/UIBarChart.cs @@ -445,7 +445,11 @@ namespace Sunny.UI double ymax = YAxisEnd * YAxisInterval; float pos = (float)((line.Value - ymin) * (Height - BarOption.Grid.Top - BarOption.Grid.Bottom) / (ymax - ymin)); pos = (Height - BarOption.Grid.Bottom - pos); - g.DrawLine(line.Color, DrawOrigin.X, pos, Width - BarOption.Grid.Right, pos); + using (Pen pn = new Pen(line.Color,line.Size)) + { + g.DrawLine(pn, DrawOrigin.X, pos, Width - BarOption.Grid.Right, pos); + } + SizeF sf = g.MeasureString(line.Name, SubFont); if (line.Left == UILeftAlignment.Left) diff --git a/SunnyUI/Charts/UIOption.cs b/SunnyUI/Charts/UIOption.cs index 0a23454a..598fa648 100644 --- a/SunnyUI/Charts/UIOption.cs +++ b/SunnyUI/Charts/UIOption.cs @@ -36,7 +36,9 @@ namespace Sunny.UI public double Value { get; set; } public string Name { get; set; } public Color Color { get; set; } - public UILeftAlignment Left { get; set; } + public UILeftAlignment Left { get; set; } = UILeftAlignment.Left; + + public float Size { get; set; } = 1.0f; } public class UILegend diff --git a/SunnyUI/Controls/UITreeView.cs b/SunnyUI/Controls/UITreeView.cs index d49a711b..e6b81d53 100644 --- a/SunnyUI/Controls/UITreeView.cs +++ b/SunnyUI/Controls/UITreeView.cs @@ -617,6 +617,8 @@ namespace Sunny.UI { base.OnDrawNode(e); + if (e.Node==null) return; + if (BorderStyle == BorderStyle.Fixed3D) BorderStyle = BorderStyle.FixedSingle; if (e.Node == null || e.Node.Bounds.Width <= 0 && e.Node.Bounds.Height <= 0 && e.Node.Bounds.X <= 0 &&