* UILineChart: 修改两个点时可以不显示连接线
This commit is contained in:
parent
1a9bb4f0da
commit
bc54effff3
@ -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)
|
||||
{
|
||||
|
@ -318,20 +318,20 @@ namespace Sunny.UI
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从系统资源中保存字体文件
|
||||
/// 从系统资源中保存文件
|
||||
/// </summary>
|
||||
/// <param name="file">字体文件名</param>
|
||||
/// <param name="file">文件名</param>
|
||||
/// <param name="resource">资源名称</param>
|
||||
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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user