From bc54effff399c6f6d6725b68bf86cfa38d9f719b Mon Sep 17 00:00:00 2001 From: Sunny Date: Mon, 11 Jul 2022 17:38:18 +0800 Subject: [PATCH] =?UTF-8?q?*=20UILineChart:=20=E4=BF=AE=E6=94=B9=E4=B8=A4?= =?UTF-8?q?=E4=B8=AA=E7=82=B9=E6=97=B6=E5=8F=AF=E4=BB=A5=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E8=BF=9E=E6=8E=A5=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SunnyUI/Charts/UILineChart.cs | 19 ++++++++++--------- SunnyUI/Common/UFastLZ.cs | 14 +++++++------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/SunnyUI/Charts/UILineChart.cs b/SunnyUI/Charts/UILineChart.cs index 5d8ab021..e68d27f3 100644 --- a/SunnyUI/Charts/UILineChart.cs +++ b/SunnyUI/Charts/UILineChart.cs @@ -32,6 +32,7 @@ * 2022-01-09: V3.1.0 双坐标轴支持选区域缩放 * 2022-02-09: V3.1.0 增加图线隐藏 * 2022-04-19: V3.1.5 关闭Smooth绘制,数值差距大或者持续缩放会出错 + * 2022-07-11: V3.2.1 修改两个点时可以不显示连接线 ******************************************************************************/ using System; @@ -455,15 +456,15 @@ namespace Sunny.UI return; } - if (series.Points.Count == 2) - { - using (Pen pen = new Pen(color, series.Width)) - { - g.DrawTwoPoints(pen, series.Points[0], series.Points[1], DrawRect); - } - - return; - } + //if (series.Points.Count == 2) + //{ + // using (Pen pen = new Pen(color, series.Width)) + // { + // g.DrawTwoPoints(pen, series.Points[0], series.Points[1], DrawRect); + // } + // + // return; + //} if (series.ShowLine || series.Symbol == UILinePointSymbol.None) { diff --git a/SunnyUI/Common/UFastLZ.cs b/SunnyUI/Common/UFastLZ.cs index 38b66fad..84ada65f 100644 --- a/SunnyUI/Common/UFastLZ.cs +++ b/SunnyUI/Common/UFastLZ.cs @@ -318,20 +318,20 @@ namespace Sunny.UI } /// - /// 从系统资源中保存字体文件 + /// 从系统资源中保存文件 /// - /// 字体文件名 + /// 文件名 /// 资源名称 private static void CreateResourceToFile(string file, string resource) { if (!File.Exists(file)) { - Stream fontStream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(resource); - if (fontStream != null) + Stream stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(resource); + if (stream != null) { - byte[] buffer = new byte[fontStream.Length]; - fontStream.Read(buffer, 0, (int)fontStream.Length); - fontStream.Close(); + byte[] buffer = new byte[stream.Length]; + stream.Read(buffer, 0, (int)stream.Length); + stream.Close(); File.WriteAllBytes(file, buffer); }