* UILineChart: 修改两个点时可以不显示连接线
This commit is contained in:
parent
1a9bb4f0da
commit
bc54effff3
@ -32,6 +32,7 @@
|
|||||||
* 2022-01-09: V3.1.0 双坐标轴支持选区域缩放
|
* 2022-01-09: V3.1.0 双坐标轴支持选区域缩放
|
||||||
* 2022-02-09: V3.1.0 增加图线隐藏
|
* 2022-02-09: V3.1.0 增加图线隐藏
|
||||||
* 2022-04-19: V3.1.5 关闭Smooth绘制,数值差距大或者持续缩放会出错
|
* 2022-04-19: V3.1.5 关闭Smooth绘制,数值差距大或者持续缩放会出错
|
||||||
|
* 2022-07-11: V3.2.1 修改两个点时可以不显示连接线
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
@ -455,15 +456,15 @@ namespace Sunny.UI
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (series.Points.Count == 2)
|
//if (series.Points.Count == 2)
|
||||||
{
|
//{
|
||||||
using (Pen pen = new Pen(color, series.Width))
|
// using (Pen pen = new Pen(color, series.Width))
|
||||||
{
|
// {
|
||||||
g.DrawTwoPoints(pen, series.Points[0], series.Points[1], DrawRect);
|
// g.DrawTwoPoints(pen, series.Points[0], series.Points[1], DrawRect);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
return;
|
// return;
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (series.ShowLine || series.Symbol == UILinePointSymbol.None)
|
if (series.ShowLine || series.Symbol == UILinePointSymbol.None)
|
||||||
{
|
{
|
||||||
|
@ -318,20 +318,20 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 从系统资源中保存字体文件
|
/// 从系统资源中保存文件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="file">字体文件名</param>
|
/// <param name="file">文件名</param>
|
||||||
/// <param name="resource">资源名称</param>
|
/// <param name="resource">资源名称</param>
|
||||||
private static void CreateResourceToFile(string file, string resource)
|
private static void CreateResourceToFile(string file, string resource)
|
||||||
{
|
{
|
||||||
if (!File.Exists(file))
|
if (!File.Exists(file))
|
||||||
{
|
{
|
||||||
Stream fontStream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(resource);
|
Stream stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(resource);
|
||||||
if (fontStream != null)
|
if (stream != null)
|
||||||
{
|
{
|
||||||
byte[] buffer = new byte[fontStream.Length];
|
byte[] buffer = new byte[stream.Length];
|
||||||
fontStream.Read(buffer, 0, (int)fontStream.Length);
|
stream.Read(buffer, 0, (int)stream.Length);
|
||||||
fontStream.Close();
|
stream.Close();
|
||||||
|
|
||||||
File.WriteAllBytes(file, buffer);
|
File.WriteAllBytes(file, buffer);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user