|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.ComponentModel;
|
|
|
using System.Diagnostics;
|
|
|
using System.Drawing;
|
|
|
using System.Drawing.Drawing2D;
|
|
|
using System.Drawing.Text;
|
|
|
using System.Globalization;
|
|
|
using System.Net;
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
namespace Mesnac.Controls.ChemicalWeighing.HslCurve
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 一个高级的历史曲线的控件信息,适合用来显示不变的历史曲线,支持一些高级的操作功能
|
|
|
/// </summary>
|
|
|
// Token: 0x02000023 RID: 35
|
|
|
[Description("历史曲线控件,支持光标移动,显示x,y轴数据信息,支持多条曲线,支持左右两个坐标轴")]
|
|
|
[ToolboxBitmap(typeof(HslCurveHistory), "Resources.HslCurveHistory.bmp")]
|
|
|
public class HslCurveHistory : UserControl
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 实例化一个默认的历史曲线控件
|
|
|
/// </summary>
|
|
|
// Token: 0x060002DE RID: 734 RVA: 0x00022200 File Offset: 0x00020400
|
|
|
public HslCurveHistory()
|
|
|
{
|
|
|
this.auxiliary_lines = new List<AuxiliaryLine>();
|
|
|
this.data_dicts = new Dictionary<string, HslCurveItem>();
|
|
|
this.data_lists = new List<HslCurveItem>();
|
|
|
this.markBackSections = new List<HslMarkBackSection>();
|
|
|
this.markForeSections = new List<HslMarkForeSection>();
|
|
|
this.markForeSectionsTmp = new List<HslMarkForeSection>();
|
|
|
this.markForeActiveSections = new List<HslMarkForeSection>();
|
|
|
this.hslMarkTexts = new List<HslMarkText>();
|
|
|
this.hslMarkImages = new List<HslMarkImage>();
|
|
|
this.hslMarkLines = new List<HslMarkLine>();
|
|
|
this.auxiliary_Labels = new List<AuxiliaryLable>();
|
|
|
this.data_times = new List<DateTime>(0);
|
|
|
this.data_customer = new List<string>();
|
|
|
this.coordinateDashPen = new Pen(Color.FromArgb(72, 72, 72));
|
|
|
this.coordinateDashPen.DashPattern = new float[]
|
|
|
{
|
|
|
5f,
|
|
|
5f
|
|
|
};
|
|
|
this.coordinateDashPen.DashStyle = DashStyle.Custom;
|
|
|
this.random = new Random();
|
|
|
this.referenceAxes = new ReferenceAxisCollection(this);
|
|
|
this.referenceAxisLeft = new ReferenceAxis(this);
|
|
|
this.referenceAxisRight = new ReferenceAxis(this);
|
|
|
this.InitializeComponent();
|
|
|
base.SetStyle(ControlStyles.UserPaint | ControlStyles.SupportsTransparentBackColor, true);
|
|
|
base.SetStyle(ControlStyles.ResizeRedraw, true);
|
|
|
base.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
|
|
base.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
|
|
base.BackColor = Color.FromArgb(46, 46, 46);
|
|
|
base.ForeColor = Color.Yellow;
|
|
|
}
|
|
|
|
|
|
// Token: 0x060002DF RID: 735 RVA: 0x0002267D File Offset: 0x0002087D
|
|
|
private void HslInvalidate()
|
|
|
{
|
|
|
base.Invalidate();
|
|
|
}
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
// Token: 0x060002E0 RID: 736 RVA: 0x00022688 File Offset: 0x00020888
|
|
|
protected override void OnLoad(EventArgs e)
|
|
|
{
|
|
|
base.OnLoad(e);
|
|
|
base.MouseMove += this.PictureBox3_MouseMove;
|
|
|
base.MouseLeave += this.PictureBox3_MouseLeave;
|
|
|
base.MouseEnter += this.PictureBox3_MouseEnter;
|
|
|
base.MouseDown += this.PictureBox3_MouseDown;
|
|
|
base.MouseUp += this.PictureBox3_MouseUp;
|
|
|
base.Paint += this.PictureBox3_Paint;
|
|
|
base.MouseDoubleClick += this.PictureBox3_MouseDoubleClick;
|
|
|
}
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
// Token: 0x060002E1 RID: 737 RVA: 0x00022724 File Offset: 0x00020924
|
|
|
protected override void OnKeyDown(KeyEventArgs e)
|
|
|
{
|
|
|
bool flag = this.syncHslCurveHistory != null;
|
|
|
if (flag)
|
|
|
{
|
|
|
this.syncHslCurveHistory.OnKeyDown(e);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag2 = e.KeyCode == Keys.Left;
|
|
|
if (flag2)
|
|
|
{
|
|
|
this.scrollX -= 5;
|
|
|
bool flag3 = this.scrollX < 0;
|
|
|
if (flag3)
|
|
|
{
|
|
|
this.scrollX = 0;
|
|
|
}
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag4 = e.KeyCode == Keys.Right;
|
|
|
if (flag4)
|
|
|
{
|
|
|
this.scrollX += 5;
|
|
|
bool flag5 = this.scrollX > this.scrollMaxX;
|
|
|
if (flag5)
|
|
|
{
|
|
|
this.scrollX = this.scrollMaxX;
|
|
|
}
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
}
|
|
|
base.OnKeyDown(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
// Token: 0x060002E2 RID: 738 RVA: 0x000227DC File Offset: 0x000209DC
|
|
|
protected override void OnMouseWheel(MouseEventArgs e)
|
|
|
{
|
|
|
bool flag = this.syncHslCurveHistory != null;
|
|
|
if (flag)
|
|
|
{
|
|
|
this.syncHslCurveHistory.OnMouseWheel(e);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag2 = this.ScaleMode > ScaleMode.None;
|
|
|
if (flag2)
|
|
|
{
|
|
|
bool flag3 = this.mouse_location.X < 0;
|
|
|
if (flag3)
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
int actualLeftWidth = this.GetActualLeftWidth();
|
|
|
int num = this.mouse_location.X + this.offsetPaintScrollX;
|
|
|
int num2 = this.mouse_location.Y - 20 + this.offsetPaintScrollY;
|
|
|
bool flag4 = this.scale_x_index >= this.scale_x_options.Length;
|
|
|
if (flag4)
|
|
|
{
|
|
|
this.scale_x_index = this.scale_x_options.Length - 1;
|
|
|
}
|
|
|
bool flag5 = this.scale_y_index >= this.scale_y_options.Length;
|
|
|
if (flag5)
|
|
|
{
|
|
|
this.scale_y_index = this.scale_y_options.Length - 1;
|
|
|
}
|
|
|
bool flag6 = e.Delta == 120;
|
|
|
if (flag6)
|
|
|
{
|
|
|
bool flag7 = this.scale_x_index < this.scale_x_options.Length - 1;
|
|
|
if (flag7)
|
|
|
{
|
|
|
this.scale_x_index++;
|
|
|
this.data_ScaleX_Render = this.scale_x_options[this.scale_x_index];
|
|
|
bool flag8 = this.ScaleMode == ScaleMode.Both && this.data_ScaleX_Render > 0.95f;
|
|
|
if (flag8)
|
|
|
{
|
|
|
this.data_ScaleY_Render = this.data_ScaleX_Render;
|
|
|
this.offsetPaintScrollY = this.EnsureOffsetPaintScrollY(Convert.ToInt32((double)num2 * 1.0 * (double)this.scale_x_options[this.scale_x_index] / (double)this.scale_x_options[this.scale_x_index - 1]) - (this.mouse_location.Y - 20));
|
|
|
}
|
|
|
int num3 = this.CalculatePaintWidthAndScrollMax(base.Width - actualLeftWidth - this.rightWidth);
|
|
|
bool flag9 = num3 - (base.Width - actualLeftWidth - this.rightWidth) == 0;
|
|
|
if (flag9)
|
|
|
{
|
|
|
this.SetScrollXNewValue(0);
|
|
|
this.offsetPaintScrollX = 0;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
this.SetScrollXNewValue(Convert.ToInt32(((double)num * 1.0 * (double)this.scale_x_options[this.scale_x_index] / (double)this.scale_x_options[this.scale_x_index - 1] - (double)this.mouse_location.X) * 1.0 * (double)this.scrollMaxX * 1.0 / (double)(num3 - (base.Width - actualLeftWidth - this.rightWidth))));
|
|
|
this.offsetPaintScrollX = Convert.ToInt32((double)num * 1.0 * (double)this.scale_x_options[this.scale_x_index] / (double)this.scale_x_options[this.scale_x_index - 1]) - this.mouse_location.X;
|
|
|
this.offsetPaintScrollX = HslHelper.Middle(0, this.offsetPaintScrollX, num3 - (base.Width - actualLeftWidth - this.rightWidth));
|
|
|
}
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag10 = this.ScaleMode == ScaleMode.XThenY && this.scale_y_index < this.scale_y_options.Length - 1;
|
|
|
if (flag10)
|
|
|
{
|
|
|
this.scale_y_index++;
|
|
|
this.data_ScaleY_Render = this.scale_y_options[this.scale_y_index];
|
|
|
this.offsetPaintScrollY = this.EnsureOffsetPaintScrollY(Convert.ToInt32((double)num2 * 1.0 * (double)this.scale_y_options[this.scale_y_index] / (double)this.scale_y_options[this.scale_y_index - 1]) - (this.mouse_location.Y - 20));
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag11 = e.Delta == -120;
|
|
|
if (flag11)
|
|
|
{
|
|
|
bool flag12 = this.ScaleMode == ScaleMode.XThenY && this.scale_y_index > 0;
|
|
|
if (flag12)
|
|
|
{
|
|
|
this.scale_y_index--;
|
|
|
this.data_ScaleY_Render = this.scale_y_options[this.scale_y_index];
|
|
|
this.offsetPaintScrollY = this.EnsureOffsetPaintScrollY(Convert.ToInt32((double)num2 * 1.0 * (double)this.scale_y_options[this.scale_y_index] / (double)this.scale_y_options[this.scale_y_index + 1]) - (this.mouse_location.Y - 20));
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag13 = this.scale_x_index > 0;
|
|
|
if (flag13)
|
|
|
{
|
|
|
this.scale_x_index--;
|
|
|
this.data_ScaleX_Render = this.scale_x_options[this.scale_x_index];
|
|
|
bool flag14 = this.ScaleMode == ScaleMode.Both && this.data_ScaleX_Render > 0.95f;
|
|
|
if (flag14)
|
|
|
{
|
|
|
this.data_ScaleY_Render = this.data_ScaleX_Render;
|
|
|
this.offsetPaintScrollY = this.EnsureOffsetPaintScrollY(Convert.ToInt32((double)num2 * 1.0 * (double)this.scale_x_options[this.scale_x_index] / (double)this.scale_x_options[this.scale_x_index + 1]) - (this.mouse_location.Y - 20));
|
|
|
}
|
|
|
int num4 = this.CalculatePaintWidthAndScrollMax(base.Width - actualLeftWidth - this.rightWidth);
|
|
|
bool flag15 = num4 - (base.Width - actualLeftWidth - this.rightWidth) <= 0;
|
|
|
if (flag15)
|
|
|
{
|
|
|
this.SetScrollXNewValue(0);
|
|
|
this.offsetPaintScrollX = 0;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
this.SetScrollXNewValue(Convert.ToInt32(((double)num * 1.0 * (double)this.scale_x_options[this.scale_x_index] / (double)this.scale_x_options[this.scale_x_index + 1] - (double)this.mouse_location.X) * 1.0 * (double)this.scrollMaxX * 1.0 / (double)(num4 - (base.Width - actualLeftWidth - this.rightWidth))));
|
|
|
this.offsetPaintScrollX = Convert.ToInt32((double)num * 1.0 * (double)this.scale_x_options[this.scale_x_index] / (double)this.scale_x_options[this.scale_x_index + 1]) - this.mouse_location.X;
|
|
|
this.offsetPaintScrollX = HslHelper.Middle(0, this.offsetPaintScrollX, num4 - (base.Width - actualLeftWidth - this.rightWidth));
|
|
|
}
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
HslCurveHistory.CurveScollScaleChanged onScaleChanged = this.OnScaleChanged;
|
|
|
if (onScaleChanged != null)
|
|
|
{
|
|
|
onScaleChanged(this, this.scrollX, this.data_ScaleX_Render, this.offsetPaintScrollX);
|
|
|
}
|
|
|
}
|
|
|
base.OnMouseWheel(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Token: 0x060002E3 RID: 739 RVA: 0x00022E10 File Offset: 0x00021010
|
|
|
private int EnsureOffsetPaintScrollY(int offsetPaintScrollY)
|
|
|
{
|
|
|
int num = (int)((float)(base.Height - this.topHeadHeight - this.buttomHeight - 40) * this.data_ScaleY_Render);
|
|
|
offsetPaintScrollY = HslHelper.Middle(0, offsetPaintScrollY, num - (base.Height - this.topHeadHeight - this.buttomHeight - 40));
|
|
|
return offsetPaintScrollY;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 设置横向滚动条的位置信息
|
|
|
/// </summary>
|
|
|
/// <param name="e">位置信息</param>
|
|
|
// Token: 0x060002E4 RID: 740 RVA: 0x00022E66 File Offset: 0x00021066
|
|
|
public void SetScrollPosition(ScrollEventArgs e)
|
|
|
{
|
|
|
this.SetScrollXNewValue(e.NewValue);
|
|
|
this.Refresh();
|
|
|
HslCurveHistory.CurveScollScaleChanged onScaleChanged = this.OnScaleChanged;
|
|
|
if (onScaleChanged != null)
|
|
|
{
|
|
|
onScaleChanged(this, this.scrollX, this.data_ScaleX_Render, this.offsetPaintScrollX);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 设置一个同步的历史曲线控件,本历史曲线的工作将根据目标历史曲线控件来动作
|
|
|
/// </summary>
|
|
|
/// <param name="hslCurveHistory">目标历史曲线控件</param>
|
|
|
// Token: 0x060002E5 RID: 741 RVA: 0x00022EA4 File Offset: 0x000210A4
|
|
|
public void SetSyncHslCurveHistory(HslCurveHistory hslCurveHistory)
|
|
|
{
|
|
|
this.syncHslCurveHistory = hslCurveHistory;
|
|
|
bool flag = hslCurveHistory != null;
|
|
|
if (flag)
|
|
|
{
|
|
|
hslCurveHistory.OnScaleChanged += delegate (HslCurveHistory curve, int i, float j, int k)
|
|
|
{
|
|
|
this.data_ScaleX_Render = j;
|
|
|
this.SetScrollXNewValue(i);
|
|
|
this.offsetPaintScrollX = k;
|
|
|
this.Refresh();
|
|
|
};
|
|
|
hslCurveHistory.onCurveMouseMove += delegate (HslCurveHistory curve, int x, int y)
|
|
|
{
|
|
|
this.SetCurveMousePosition(x, y);
|
|
|
};
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 将曲线的滚动条设置到最右侧
|
|
|
/// </summary>
|
|
|
// Token: 0x060002E6 RID: 742 RVA: 0x00022EEC File Offset: 0x000210EC
|
|
|
public void ScrollToRight()
|
|
|
{
|
|
|
this.isShowTextInfomation = false;
|
|
|
int actualLeftWidth = this.GetActualLeftWidth();
|
|
|
this.CalculatePaintWidthAndScrollMax(base.Width - actualLeftWidth - this.rightWidth);
|
|
|
this.SetScrollXNewValue(this.scrollMaxX);
|
|
|
this.HslInvalidate();
|
|
|
HslCurveHistory.CurveScollScaleChanged onScaleChanged = this.OnScaleChanged;
|
|
|
if (onScaleChanged != null)
|
|
|
{
|
|
|
onScaleChanged(this, this.scrollX, this.data_ScaleX_Render, this.offsetPaintScrollX);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Token: 0x060002E7 RID: 743 RVA: 0x00022F58 File Offset: 0x00021158
|
|
|
public void ScrollToIndex(int index)
|
|
|
{
|
|
|
int actualLeftWidth = this.GetActualLeftWidth();
|
|
|
this.CalculatePaintWidthAndScrollMax(base.Width - actualLeftWidth - this.rightWidth);
|
|
|
int curvePaintActualWidth = this.GetCurvePaintActualWidth();
|
|
|
int num = this.CalculatePaintWidthAndScrollMax(curvePaintActualWidth);
|
|
|
bool flag = num <= curvePaintActualWidth;
|
|
|
if (!flag)
|
|
|
{
|
|
|
this.offsetPaintScrollX = (int)((float)index * this.data_ScaleX_Render);
|
|
|
this.SetScrollXNewValue(Convert.ToInt32((float)((long)this.offsetPaintScrollX * (long)this.scrollMaxX) * 1f / (float)(num - curvePaintActualWidth)));
|
|
|
this.offsetPaintScrollX = (int)((float)index * this.data_ScaleX_Render);
|
|
|
this.HslInvalidate();
|
|
|
HslCurveHistory.CurveScollScaleChanged onScaleChanged = this.OnScaleChanged;
|
|
|
if (onScaleChanged != null)
|
|
|
{
|
|
|
onScaleChanged(this, this.scrollX, this.data_ScaleX_Render, this.offsetPaintScrollX);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Token: 0x060002E8 RID: 744 RVA: 0x00023014 File Offset: 0x00021214
|
|
|
public void ScrollToDateTime(DateTime dateTime)
|
|
|
{
|
|
|
int num = this.FindIndexByDateTime(dateTime, 0);
|
|
|
bool flag = num >= 0;
|
|
|
if (flag)
|
|
|
{
|
|
|
this.ScrollToIndex(num);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Token: 0x060002E9 RID: 745 RVA: 0x00023040 File Offset: 0x00021240
|
|
|
public void RenderCurveUI(int start, int end)
|
|
|
{
|
|
|
bool flag = start >= end;
|
|
|
if (!flag)
|
|
|
{
|
|
|
bool flag2 = end < 0;
|
|
|
if (!flag2)
|
|
|
{
|
|
|
int curvePaintActualWidth = this.GetCurvePaintActualWidth();
|
|
|
bool flag3 = end >= this.data_count;
|
|
|
if (flag3)
|
|
|
{
|
|
|
end = this.data_count - 1;
|
|
|
}
|
|
|
bool flag4 = start < 0;
|
|
|
if (flag4)
|
|
|
{
|
|
|
start = 0;
|
|
|
}
|
|
|
int num = end - start;
|
|
|
this.data_ScaleX_Render = Convert.ToSingle((double)curvePaintActualWidth * 1.0 / (double)num);
|
|
|
this.ScrollToIndex(start);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Token: 0x060002EA RID: 746 RVA: 0x000230BC File Offset: 0x000212BC
|
|
|
public void RenderCurveUI(DateTime start, DateTime end)
|
|
|
{
|
|
|
int num = this.FindIndexByDateTime(start, 0);
|
|
|
bool flag = num < 0;
|
|
|
if (flag)
|
|
|
{
|
|
|
num = 0;
|
|
|
}
|
|
|
int end2 = this.FindIndexByDateTime(end, num);
|
|
|
this.RenderCurveUI(num, end2);
|
|
|
}
|
|
|
|
|
|
// Token: 0x060002EB RID: 747 RVA: 0x000230F0 File Offset: 0x000212F0
|
|
|
private int FindIndexByDateTime(DateTime dateTime, int startIndex = 0)
|
|
|
{
|
|
|
bool flag = this.data_times == null;
|
|
|
int result;
|
|
|
if (flag)
|
|
|
{
|
|
|
result = -1;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag2 = this.data_times.Count == 0;
|
|
|
if (flag2)
|
|
|
{
|
|
|
result = -1;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
for (int i = startIndex; i < this.data_times.Count; i += 100)
|
|
|
{
|
|
|
int num = i + 100;
|
|
|
bool flag3 = num >= this.data_times.Count;
|
|
|
if (flag3)
|
|
|
{
|
|
|
num = this.data_times.Count - 1;
|
|
|
}
|
|
|
bool flag4 = dateTime < this.data_times[i];
|
|
|
if (flag4)
|
|
|
{
|
|
|
return i;
|
|
|
}
|
|
|
bool flag5 = dateTime >= this.data_times[i] && dateTime < this.data_times[num];
|
|
|
if (flag5)
|
|
|
{
|
|
|
for (int j = i; j < num - 1; j++)
|
|
|
{
|
|
|
bool flag6 = dateTime >= this.data_times[j] && dateTime < this.data_times[j + 1];
|
|
|
if (flag6)
|
|
|
{
|
|
|
return j;
|
|
|
}
|
|
|
}
|
|
|
return -1;
|
|
|
}
|
|
|
}
|
|
|
result = -1;
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
// Token: 0x060002EC RID: 748 RVA: 0x0002322C File Offset: 0x0002142C
|
|
|
private int GetAcutalSegment(float m_data_ScaleY_Render)
|
|
|
{
|
|
|
return this.value_Segment * ((m_data_ScaleY_Render < 3.95f) ? 1 : ((int)(m_data_ScaleY_Render / 4f) * 2));
|
|
|
}
|
|
|
|
|
|
// Token: 0x060002ED RID: 749 RVA: 0x0002325C File Offset: 0x0002145C
|
|
|
private void DrawCoordinate(Graphics g, bool isLeft, float dx, float dy, ReferenceAxis referenceAxis, bool needPaintDash)
|
|
|
{
|
|
|
StringFormat format = isLeft ? HslHelper.StringFormatRight : HslHelper.StringFormatLeft;
|
|
|
float calculateMax = referenceAxis.GetCalculateMax();
|
|
|
float calculateMin = referenceAxis.GetCalculateMin();
|
|
|
string unit = referenceAxis.Unit;
|
|
|
Brush brush = referenceAxis.Brush;
|
|
|
Pen pen = new Pen(referenceAxis.Brush);
|
|
|
g.TranslateTransform(dx, dy);
|
|
|
float num = this.isShowTextInfomation ? 1f : this.data_ScaleY_Render;
|
|
|
float num2 = (float)(base.Height - this.topHeadHeight - this.buttomHeight);
|
|
|
float num3 = (float)(isLeft ? this.leftWidth : this.rightWidth);
|
|
|
int num4 = this.isShowTextInfomation ? 0 : this.offsetPaintScrollY;
|
|
|
if (isLeft)
|
|
|
{
|
|
|
g.DrawLine(pen, num3 - 1f, 5f, num3 - 1f, num2 - 15f);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
g.DrawLine(pen, 0f, 5f, 0f, num2 - 15f);
|
|
|
}
|
|
|
bool flag = this.RenderInvertedTriangle;
|
|
|
if (flag)
|
|
|
{
|
|
|
if (isLeft)
|
|
|
{
|
|
|
HslHelper.PaintTriangle(g, brush, new PointF(num3 - 1f, 10f), 5, GraphDirection.Upward);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
HslHelper.PaintTriangle(g, brush, new PointF(0f, 10f), 5, GraphDirection.Upward);
|
|
|
}
|
|
|
}
|
|
|
g.DrawString(unit, this.Font, brush, new RectangleF(0f, -15f, num3 - 5f, 30f), HslHelper.StringFormatRight);
|
|
|
g.TranslateTransform(0f, (float)(-(float)num4 + 20));
|
|
|
int acutalSegment = this.GetAcutalSegment(num);
|
|
|
int i = 0;
|
|
|
while (i <= acutalSegment)
|
|
|
{
|
|
|
float num5 = (float)((double)i * (double)(calculateMax - calculateMin) / (double)acutalSegment + (double)calculateMin);
|
|
|
bool flag2 = this.IsAoordinateRoundInt;
|
|
|
if (flag2)
|
|
|
{
|
|
|
num5 = (float)Math.Round((double)num5, 0);
|
|
|
}
|
|
|
float num6 = HslHelper.ComputePaintLocationY(calculateMax, calculateMin, (num2 - 40f) * num, num5);
|
|
|
bool flag3 = referenceAxis.IsUseLogarithms();
|
|
|
if (flag3)
|
|
|
{
|
|
|
num5 = (float)Math.Pow(10.0, (double)num5);
|
|
|
}
|
|
|
bool flag4 = needPaintDash || this.IsNeedPaintDash(num6);
|
|
|
if (flag4)
|
|
|
{
|
|
|
bool flag5 = num6 - (float)num4 + 20f < 0f || num6 - (float)num4 + 20f > num2 - 20f;
|
|
|
if (!flag5)
|
|
|
{
|
|
|
if (isLeft)
|
|
|
{
|
|
|
g.DrawLine(pen, num3 - 5f, num6, num3 - 2f, num6);
|
|
|
RectangleF layoutRectangle = new RectangleF(0f, num6 - 9f, num3 - 4f, 20f);
|
|
|
g.DrawString(HslHelper.GetFormatString(referenceAxis.Format, num5, false), this.Font, brush, layoutRectangle, format);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
g.DrawLine(pen, 1f, num6, 5f, num6);
|
|
|
RectangleF layoutRectangle2 = new RectangleF(5f, num6 - 9f, num3 - 3f, 20f);
|
|
|
g.DrawString(HslHelper.GetFormatString(referenceAxis.Format, num5, false), this.Font, brush, layoutRectangle2, format);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
IL_30F:
|
|
|
i++;
|
|
|
continue;
|
|
|
goto IL_30F;
|
|
|
}
|
|
|
bool flag6 = !needPaintDash;
|
|
|
if (flag6)
|
|
|
{
|
|
|
int j = 0;
|
|
|
while (j < this.auxiliary_lines.Count)
|
|
|
{
|
|
|
bool isLeftFrame = this.auxiliary_lines[j].IsLeftFrame;
|
|
|
if (isLeftFrame)
|
|
|
{
|
|
|
float num7 = HslHelper.ComputePaintLocationY(calculateMax, calculateMin, (num2 - 40f) * num, referenceAxis.IsUseLogarithms() ? ((float)Math.Log10((double)this.auxiliary_lines[j].Value)) : this.auxiliary_lines[j].Value);
|
|
|
bool flag7 = num7 - (float)num4 + 20f < 0f || num7 - (float)num4 + 20f > num2 - 20f;
|
|
|
if (!flag7)
|
|
|
{
|
|
|
if (isLeft)
|
|
|
{
|
|
|
g.DrawLine(pen, num3 - 5f, num7, num3 - 2f, num7);
|
|
|
RectangleF layoutRectangle3 = new RectangleF(0f, num7 - 9f, num3 - 4f, 20f);
|
|
|
g.DrawString(HslHelper.GetFormatString(referenceAxis.Format, this.auxiliary_lines[j].Value, false), this.Font, brush, layoutRectangle3, format);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
g.DrawLine(pen, 1f, num7, 5f, num7);
|
|
|
RectangleF layoutRectangle4 = new RectangleF(6f, num7 - 9f, num3 - 3f, 20f);
|
|
|
g.DrawString(HslHelper.GetFormatString(referenceAxis.Format, this.auxiliary_lines[j].Value, false), this.Font, brush, layoutRectangle4, format);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
IL_4C3:
|
|
|
j++;
|
|
|
continue;
|
|
|
goto IL_4C3;
|
|
|
}
|
|
|
}
|
|
|
bool flag8 = this.isRenderYTip && this.is_mouse_on_picture && !this.isShowTextInfomation && this.markLineVisible;
|
|
|
if (flag8)
|
|
|
{
|
|
|
RectangleF rectangleF = new RectangleF(1f, (float)(this.mouse_location.Y - 9 + num4 - 20), num3 - 3f, 20f);
|
|
|
g.FillRectangle(this.mouseHoverBackBrush, rectangleF);
|
|
|
g.DrawRectangles(this.markBorderPen, new RectangleF[]
|
|
|
{
|
|
|
rectangleF
|
|
|
});
|
|
|
if (isLeft)
|
|
|
{
|
|
|
rectangleF = new RectangleF(0f, (float)(this.mouse_location.Y - 9 + num4 - 20), num3 - 4f, 20f);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
rectangleF = new RectangleF(5f, (float)(this.mouse_location.Y - 9 + num4 - 20), num3 - 6f, 20f);
|
|
|
}
|
|
|
float num8 = HslHelper.ComputeValueFromPaintLocationY(calculateMax, calculateMin, (num2 - 40f) * num, (float)(this.mouse_location.Y + num4 - 20));
|
|
|
bool flag9 = referenceAxis.IsUseLogarithms();
|
|
|
if (flag9)
|
|
|
{
|
|
|
num8 = (float)Math.Pow(10.0, (double)num8);
|
|
|
}
|
|
|
g.DrawString((referenceAxis.Format == "{0}") ? num8.ToString("F2") : HslHelper.GetFormatString(referenceAxis.Format, num8, false), this.Font, brush, rectangleF, format);
|
|
|
}
|
|
|
g.TranslateTransform(0f, (float)(num4 - 20));
|
|
|
g.TranslateTransform(-dx, -dy);
|
|
|
pen.Dispose();
|
|
|
}
|
|
|
|
|
|
// Token: 0x060002EE RID: 750 RVA: 0x000238E4 File Offset: 0x00021AE4
|
|
|
private void PaintFromString(Graphics g, string text)
|
|
|
{
|
|
|
int actualLeftWidth = this.GetActualLeftWidth();
|
|
|
int num = base.Width - actualLeftWidth - this.rightWidth;
|
|
|
int num2 = base.Height - this.topHeadHeight - this.buttomHeight;
|
|
|
Font font = new Font(this.Font.FontFamily, 18f);
|
|
|
bool flag = text != null && text.Length > 400;
|
|
|
if (flag)
|
|
|
{
|
|
|
font = new Font(this.Font.FontFamily, 12f);
|
|
|
}
|
|
|
int num3 = num2 - 40;
|
|
|
g.DrawLine(this.coordinatePen, 0, num2 - 20, num - 1, num2 - 20);
|
|
|
for (int i = 1; i <= this.value_Segment; i++)
|
|
|
{
|
|
|
float value = (float)((double)i * (double)(this.referenceAxisLeft.GetCalculateMax() - this.referenceAxisLeft.GetCalculateMin()) / (double)this.value_Segment + (double)this.referenceAxisLeft.GetCalculateMin());
|
|
|
float num4 = HslHelper.ComputePaintLocationY(this.referenceAxisLeft.GetCalculateMax(), this.referenceAxisLeft.GetCalculateMin(), (float)num3, value) + 20f;
|
|
|
bool flag2 = this.IsNeedPaintDash(num4);
|
|
|
if (flag2)
|
|
|
{
|
|
|
g.DrawLine(this.coordinateDashPen, 0f, num4, (float)(num - 1), num4);
|
|
|
}
|
|
|
}
|
|
|
for (int j = 0; j < this.auxiliary_lines.Count; j++)
|
|
|
{
|
|
|
bool flag3 = this.auxiliary_lines[j].PaintValue - (float)this.offsetPaintScrollY + 20f < 0f || this.auxiliary_lines[j].PaintValue - (float)this.offsetPaintScrollY + 20f > (float)(num2 - 20);
|
|
|
if (!flag3)
|
|
|
{
|
|
|
g.DrawLine(this.auxiliary_lines[j].GetPen(), 0f, this.auxiliary_lines[j].PaintValue, (float)(num - 1), this.auxiliary_lines[j].PaintValue);
|
|
|
}
|
|
|
}
|
|
|
for (int k = this.value_IntervalAbscissaText; k < num; k += this.value_IntervalAbscissaText)
|
|
|
{
|
|
|
g.DrawLine(this.coordinateDashPen, k, num2 - 20, k, 0);
|
|
|
}
|
|
|
Rectangle r = new Rectangle(0, 0, num, num2);
|
|
|
using (Brush brush = new SolidBrush(this.ForeColor))
|
|
|
{
|
|
|
g.DrawString(text, font, brush, r, HslHelper.StringFormatCenter);
|
|
|
}
|
|
|
font.Dispose();
|
|
|
}
|
|
|
|
|
|
// Token: 0x060002EF RID: 751 RVA: 0x00023B84 File Offset: 0x00021D84
|
|
|
private bool IsNeedPaintDash(float paintValue)
|
|
|
{
|
|
|
for (int i = 0; i < this.auxiliary_lines.Count; i++)
|
|
|
{
|
|
|
bool flag = Math.Abs(this.auxiliary_lines[i].PaintValue - paintValue) < (float)this.Font.Height;
|
|
|
if (flag)
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
// Token: 0x060002F0 RID: 752 RVA: 0x00023BE4 File Offset: 0x00021DE4
|
|
|
private int GetActualLeftWidth()
|
|
|
{
|
|
|
bool flag = this.isOtherAxisHide;
|
|
|
int result;
|
|
|
if (flag)
|
|
|
{
|
|
|
result = this.leftWidth;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
result = this.leftWidth + this.leftWidth * this.referenceAxes.Count;
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取曲线绘制区域的实际像素宽度
|
|
|
/// </summary>
|
|
|
/// <returns>像素宽度</returns>
|
|
|
// Token: 0x060002F1 RID: 753 RVA: 0x00023C24 File Offset: 0x00021E24
|
|
|
private int GetCurvePaintActualWidth()
|
|
|
{
|
|
|
return base.Width - this.GetActualLeftWidth() - this.rightWidth;
|
|
|
}
|
|
|
|
|
|
/// <inheritdoc cref="M:HslControls.HslCurveHistory.GetCurvePaintActualWidth" />
|
|
|
// Token: 0x060002F2 RID: 754 RVA: 0x00023C4C File Offset: 0x00021E4C
|
|
|
private int GetCurvePaintActualWidth(int width)
|
|
|
{
|
|
|
return width - this.GetActualLeftWidth() - this.rightWidth;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取曲线绘制区域的实际像素高度
|
|
|
/// </summary>
|
|
|
/// <param name="height">总高度信息</param>
|
|
|
/// <returns>像素高度</returns>
|
|
|
// Token: 0x060002F3 RID: 755 RVA: 0x00023C70 File Offset: 0x00021E70
|
|
|
private int GetCurvePaintActualHeight(int height)
|
|
|
{
|
|
|
return height - this.topHeadHeight - this.buttomHeight;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 判断实际绘制的点位X,是否处于显示的区域里,为了防止误差,在两侧留有一些剩余宽度
|
|
|
/// </summary>
|
|
|
/// <param name="x">按照像素为单位的</param>
|
|
|
/// <param name="width">实际画曲线的像素宽度</param>
|
|
|
/// <param name="offset">偏移信息</param>
|
|
|
/// <returns>是否显示</returns>
|
|
|
// Token: 0x060002F4 RID: 756 RVA: 0x00023C94 File Offset: 0x00021E94
|
|
|
private bool IsPaintxInRenderRegion(int x, int width, int offset = 10)
|
|
|
{
|
|
|
bool flag = this.data_ScaleX_Render >= 1f;
|
|
|
bool result;
|
|
|
if (flag)
|
|
|
{
|
|
|
result = ((float)x >= (float)this.offsetPaintScrollX - (float)offset * this.data_ScaleX_Render && (float)x <= (float)(this.offsetPaintScrollX + width) + (float)offset * this.data_ScaleX_Render);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
result = (x >= this.offsetPaintScrollX - offset && x <= this.offsetPaintScrollX + width + offset);
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
// Token: 0x060002F5 RID: 757 RVA: 0x00023D10 File Offset: 0x00021F10
|
|
|
private bool IsRectangleInRenderRegion(Rectangle rectangle, int width)
|
|
|
{
|
|
|
bool flag = this.IsPaintxInRenderRegion(rectangle.X, width, 10) || this.IsPaintxInRenderRegion(rectangle.X + rectangle.Width, width, 10);
|
|
|
bool result;
|
|
|
if (flag)
|
|
|
{
|
|
|
result = true;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag2 = rectangle.X <= this.offsetPaintScrollX && rectangle.X + rectangle.Width >= this.offsetPaintScrollX + width;
|
|
|
result = flag2;
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 控件的重绘信息
|
|
|
/// </summary>
|
|
|
/// <param name="e">重绘的方法</param>
|
|
|
// Token: 0x060002F6 RID: 758 RVA: 0x00023D90 File Offset: 0x00021F90
|
|
|
protected override void OnPaint(PaintEventArgs e)
|
|
|
{
|
|
|
Graphics graphics = e.Graphics;
|
|
|
this.PaintHslControls(graphics, base.Width, base.Height);
|
|
|
base.OnPaint(e);
|
|
|
}
|
|
|
|
|
|
/// <inheritdoc cref="M:HslControls.HslArrow.PaintHslControls(System.Drawing.Graphics,System.Single,System.Single)" />
|
|
|
// Token: 0x060002F7 RID: 759 RVA: 0x00023DC4 File Offset: 0x00021FC4
|
|
|
public void PaintHslControls(Graphics g, int width, int height)
|
|
|
{
|
|
|
bool flag2 = this.data_ScaleX_Render < 0.1f;
|
|
|
if (flag2)
|
|
|
{
|
|
|
g.SmoothingMode = SmoothingMode.HighSpeed;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
g.SmoothingMode = SmoothingMode.AntiAlias;
|
|
|
}
|
|
|
g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
|
|
|
this.PaintMain(g, width, height);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 绘制当前的曲线图形
|
|
|
/// </summary>
|
|
|
/// <param name="g">绘图上下文</param>
|
|
|
/// <param name="width">宽度信息</param>
|
|
|
/// <param name="height">高度信息</param>
|
|
|
// Token: 0x060002F8 RID: 760 RVA: 0x00023E18 File Offset: 0x00022018
|
|
|
public void PaintMain(Graphics g, int width, int height)
|
|
|
{
|
|
|
bool flag = false;
|
|
|
if (!flag)
|
|
|
{
|
|
|
DateTime now = DateTime.Now;
|
|
|
this.paintCount++;
|
|
|
int actualLeftWidth = this.GetActualLeftWidth();
|
|
|
int curvePaintActualWidth = this.GetCurvePaintActualWidth(width);
|
|
|
int curvePaintActualHeight = this.GetCurvePaintActualHeight(height);
|
|
|
g.TranslateTransform((float)actualLeftWidth, (float)this.topHeadHeight);
|
|
|
bool flag2 = this.isShowTextInfomation;
|
|
|
if (flag2)
|
|
|
{
|
|
|
this.CalculateAuxiliaryPaintY(20);
|
|
|
this.PaintFromString(g, this.Text);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
g.SetClip(new Rectangle(0, 0, curvePaintActualWidth, height - this.topHeadHeight));
|
|
|
this.GetRenderCurveMain(g, curvePaintActualWidth, curvePaintActualHeight);
|
|
|
g.ResetClip();
|
|
|
}
|
|
|
g.TranslateTransform((float)(-(float)actualLeftWidth), (float)(-(float)this.topHeadHeight));
|
|
|
bool flag3 = this.isShowTextInfomation;
|
|
|
if (flag3)
|
|
|
{
|
|
|
this.CalculateAuxiliaryPaintY(0);
|
|
|
}
|
|
|
this.DrawCoordinate(g, true, (float)(this.isOtherAxisHide ? 0 : (this.leftWidth * this.referenceAxes.Count)), (float)this.topHeadHeight, this.referenceAxisLeft, false);
|
|
|
bool flag4 = this.isRederRightCoordinate;
|
|
|
if (flag4)
|
|
|
{
|
|
|
this.DrawCoordinate(g, false, (float)(width - this.rightWidth), (float)this.topHeadHeight, this.referenceAxisRight, false);
|
|
|
}
|
|
|
bool flag5 = !this.isOtherAxisHide;
|
|
|
if (flag5)
|
|
|
{
|
|
|
for (int i = 0; i < this.referenceAxes.Count; i++)
|
|
|
{
|
|
|
this.DrawCoordinate(g, true, (float)(this.leftWidth * i), (float)this.topHeadHeight, this.referenceAxes[i], true);
|
|
|
}
|
|
|
}
|
|
|
bool flag6 = !this.RenderInvertedTriangle;
|
|
|
if (flag6)
|
|
|
{
|
|
|
g.DrawLine(this.coordinatePen, this.leftWidth + this.leftWidth * this.referenceAxes.Count - 1, this.topHeadHeight + 5, width - this.rightWidth, this.topHeadHeight + 5);
|
|
|
}
|
|
|
this.PaintHeadText(g, actualLeftWidth);
|
|
|
bool flag7 = this.ReferenceAxis.Count > 0;
|
|
|
if (flag7)
|
|
|
{
|
|
|
Rectangle r = new Rectangle(this.GetActualLeftWidth() - this.leftWidth, base.Height - this.scrollHeight - 5, this.leftWidth, this.scrollHeight);
|
|
|
g.DrawString(this.isOtherAxisHide ? "<<" : ">>", this.Font, this.coordinateBrush, r, HslHelper.StringFormatCenter);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Token: 0x060002F9 RID: 761 RVA: 0x0002407C File Offset: 0x0002227C
|
|
|
private void PaintHeadText(Graphics g, int actualLeftWidth)
|
|
|
{
|
|
|
bool flag = this.topHeadHeight <= 0;
|
|
|
if (!flag)
|
|
|
{
|
|
|
float num = (float)(actualLeftWidth + 1);
|
|
|
float num2 = 11f;
|
|
|
foreach (KeyValuePair<string, HslCurveItem> keyValuePair in this.data_dicts)
|
|
|
{
|
|
|
bool visible = keyValuePair.Value.Visible;
|
|
|
if (visible)
|
|
|
{
|
|
|
Pen pen = keyValuePair.Value.LineRenderVisiable ? new Pen(keyValuePair.Value.LineColor) : new Pen(Color.FromArgb(70, keyValuePair.Value.LineColor));
|
|
|
g.DrawLine(pen, num, num2, num + 30f, num2);
|
|
|
g.DrawEllipse(pen, num + 8f, num2 - 7f, 14f, 14f);
|
|
|
pen.Dispose();
|
|
|
SolidBrush solidBrush = keyValuePair.Value.LineRenderVisiable ? new SolidBrush(keyValuePair.Value.LineColor) : new SolidBrush(Color.FromArgb(70, keyValuePair.Value.LineColor));
|
|
|
g.DrawString(keyValuePair.Key, this.Font, solidBrush, new RectangleF(num + 35f, num2 - 10f, (float)(this.curveNameWidth - 35), 20f), HslHelper.StringFormatLeft);
|
|
|
keyValuePair.Value.TitleRegion = new RectangleF(num, num2 - 10f, (float)this.curveNameWidth, 20f);
|
|
|
solidBrush.Dispose();
|
|
|
num += (float)this.curveNameWidth;
|
|
|
bool flag2 = num >= (float)(base.Width - this.rightWidth - 30);
|
|
|
if (flag2)
|
|
|
{
|
|
|
num = (float)(actualLeftWidth + 1);
|
|
|
num2 += 22f;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
for (int i = 0; i < this.auxiliary_Labels.Count; i++)
|
|
|
{
|
|
|
bool flag3 = !string.IsNullOrEmpty(this.auxiliary_Labels[i].Text);
|
|
|
if (flag3)
|
|
|
{
|
|
|
int num3 = (this.auxiliary_Labels[i].LocationX > 1f) ? ((int)this.auxiliary_Labels[i].LocationX) : ((int)(this.auxiliary_Labels[i].LocationX * (float)base.Width));
|
|
|
int num4 = (int)g.MeasureString(this.auxiliary_Labels[i].Text, this.Font).Width + 3;
|
|
|
Point[] points = new Point[]
|
|
|
{
|
|
|
new Point(num3, 11),
|
|
|
new Point(num3 + 10, 20),
|
|
|
new Point(num3 + num4 + 10, 20),
|
|
|
new Point(num3 + num4 + 10, 0),
|
|
|
new Point(num3 + 10, 0),
|
|
|
new Point(num3, 11)
|
|
|
};
|
|
|
g.FillPolygon(this.auxiliary_Labels[i].TextBack, points);
|
|
|
g.DrawString(this.auxiliary_Labels[i].Text, this.Font, this.auxiliary_Labels[i].TextBrush, new Rectangle(num3 + 7, 0, num4 + 3, 20), HslHelper.StringFormatCenter);
|
|
|
}
|
|
|
}
|
|
|
bool flag4 = this.renderScaleInfo;
|
|
|
if (flag4)
|
|
|
{
|
|
|
using (Brush brush = new SolidBrush(this.scrollColor))
|
|
|
{
|
|
|
g.DrawString(string.Format("Scale:X{0} Y{1}", this.data_ScaleX_Render, this.data_ScaleY_Render), this.Font, brush, new RectangleF((float)(base.Width - 205), 0f, 200f, (float)(this.Font.Height + 2)), HslHelper.StringFormatRight);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Token: 0x060002FA RID: 762 RVA: 0x000244AC File Offset: 0x000226AC
|
|
|
private string GetScale()
|
|
|
{
|
|
|
bool flag = this.data_ScaleX_Render > 0.8f;
|
|
|
string result;
|
|
|
if (flag)
|
|
|
{
|
|
|
result = this.data_ScaleX_Render.ToString("F0");
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag2 = this.data_ScaleX_Render > 0.3f;
|
|
|
if (flag2)
|
|
|
{
|
|
|
result = this.data_ScaleX_Render.ToString("F1");
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
result = this.data_ScaleX_Render.ToString();
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
// Token: 0x060002FB RID: 763 RVA: 0x00024514 File Offset: 0x00022714
|
|
|
public void RenderCurveUI(bool stretchToFull = false)
|
|
|
{
|
|
|
this.isShowTextInfomation = false;
|
|
|
if (stretchToFull)
|
|
|
{
|
|
|
bool flag = this.data_count > 0;
|
|
|
if (flag)
|
|
|
{
|
|
|
this.RenderCurveUI(0, this.data_count - 1);
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 计算实际的需要绘制的像素宽度,以及计算滚动条的实际像素宽度
|
|
|
/// </summary>
|
|
|
/// <param name="width">曲线区域的实际像素宽度</param>
|
|
|
/// <returns>计算实际的需要绘制的像素宽度</returns>
|
|
|
// Token: 0x060002FC RID: 764 RVA: 0x0002455C File Offset: 0x0002275C
|
|
|
private int CalculatePaintWidthAndScrollMax(int width)
|
|
|
{
|
|
|
int num = Math.Max(Convert.ToInt32((float)this.data_count * this.data_ScaleX_Render) + this.rightRemainWidth, width);
|
|
|
this.scrollWidth = (int)((long)width * (long)width / (long)num);
|
|
|
bool flag = this.scrollWidth < 10;
|
|
|
if (flag)
|
|
|
{
|
|
|
this.scrollWidth = 10;
|
|
|
}
|
|
|
this.scrollMaxX = width - this.scrollWidth;
|
|
|
return num;
|
|
|
}
|
|
|
|
|
|
// Token: 0x060002FD RID: 765 RVA: 0x000245C4 File Offset: 0x000227C4
|
|
|
private void SetScrollXNewValue(int scrollValue)
|
|
|
{
|
|
|
int curvePaintActualWidth = this.GetCurvePaintActualWidth();
|
|
|
int num = this.CalculatePaintWidthAndScrollMax(curvePaintActualWidth);
|
|
|
bool flag = scrollValue > this.scrollMaxX;
|
|
|
if (flag)
|
|
|
{
|
|
|
scrollValue = this.scrollMaxX;
|
|
|
}
|
|
|
bool flag2 = scrollValue < 0;
|
|
|
if (flag2)
|
|
|
{
|
|
|
scrollValue = 0;
|
|
|
}
|
|
|
bool flag3 = this.scrollX != scrollValue;
|
|
|
if (flag3)
|
|
|
{
|
|
|
this.scrollX = scrollValue;
|
|
|
}
|
|
|
bool flag4 = num > curvePaintActualWidth && this.scrollMaxX > 0;
|
|
|
if (flag4)
|
|
|
{
|
|
|
this.offsetPaintScrollX = Convert.ToInt32((double)((long)(num - curvePaintActualWidth) * (long)this.scrollX) * 1.0 / (double)this.scrollMaxX);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
this.offsetPaintScrollX = 0;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Token: 0x060002FE RID: 766 RVA: 0x00024668 File Offset: 0x00022868
|
|
|
private ReferenceAxis GetReferenceAxisByIndex(int index)
|
|
|
{
|
|
|
bool flag = index == 0;
|
|
|
ReferenceAxis result;
|
|
|
if (flag)
|
|
|
{
|
|
|
result = new ReferenceAxis(this.referenceAxisLeft.Max, this.referenceAxisLeft.Min, this.referenceAxisLeft.UseLogarithms);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag2 = index == 1;
|
|
|
if (flag2)
|
|
|
{
|
|
|
result = new ReferenceAxis(this.referenceAxisRight.Max, this.referenceAxisRight.Min, this.referenceAxisRight.UseLogarithms);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag3 = index - 2 < this.referenceAxes.Count;
|
|
|
if (flag3)
|
|
|
{
|
|
|
result = this.referenceAxes[index - 2];
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
result = null;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
// Token: 0x060002FF RID: 767 RVA: 0x00024704 File Offset: 0x00022904
|
|
|
private float ComputePaintLocationY(ReferenceAxis reference, int m_height, float value)
|
|
|
{
|
|
|
return HslHelper.ComputePaintLocationY(reference.GetCalculateMax(), reference.GetCalculateMin(), (float)(m_height - 40) * this.data_ScaleY_Render, reference.IsUseLogarithms() ? ((float)Math.Log10((double)value)) : value);
|
|
|
}
|
|
|
|
|
|
// Token: 0x06000300 RID: 768 RVA: 0x00024748 File Offset: 0x00022948
|
|
|
private void GetRenderCurveMain(Graphics g, int width, int height)
|
|
|
{
|
|
|
int num = this.CalculatePaintWidthAndScrollMax(width);
|
|
|
bool flag = num > width;
|
|
|
if (flag)
|
|
|
{
|
|
|
g.TranslateTransform((float)(-(float)this.offsetPaintScrollX), 0f);
|
|
|
}
|
|
|
for (int i = 0; i < this.markBackSections.Count; i++)
|
|
|
{
|
|
|
Rectangle rectangle = new Rectangle(Convert.ToInt32((float)this.markBackSections[i].StartIndex * this.data_ScaleX_Render), 0, Convert.ToInt32((float)(this.markBackSections[i].EndIndex - this.markBackSections[i].StartIndex) * this.data_ScaleX_Render), height - 20);
|
|
|
bool flag2 = this.IsRectangleInRenderRegion(rectangle, width);
|
|
|
if (flag2)
|
|
|
{
|
|
|
using (Brush brush = new SolidBrush(this.markBackSections[i].BackColor))
|
|
|
{
|
|
|
g.FillRectangle(brush, rectangle);
|
|
|
}
|
|
|
g.DrawRectangle(Pens.DimGray, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
|
|
|
string text = this.markBackSections[i].MarkText ?? string.Empty;
|
|
|
bool flag3 = this.markBackSections[i].StartIndex < this.data_times.Count && this.markBackSections[i].EndIndex < this.data_times.Count;
|
|
|
if (flag3)
|
|
|
{
|
|
|
text = text + " (" + (this.data_times[this.markBackSections[i].EndIndex] - this.data_times[this.markBackSections[i].StartIndex]).TotalMinutes.ToString("F1") + " 分钟)";
|
|
|
}
|
|
|
g.DrawString(text, this.Font, Brushes.DimGray, new RectangleF((float)rectangle.X, 3f, (float)rectangle.Width, (float)(height - 20)), HslHelper.StringFormatTopCenter);
|
|
|
}
|
|
|
}
|
|
|
g.TranslateTransform(0f, (float)(-(float)this.offsetPaintScrollY + 20));
|
|
|
foreach (HslMarkImage hslMarkImage in this.hslMarkImages)
|
|
|
{
|
|
|
bool flag4 = hslMarkImage.MarkImage == null;
|
|
|
if (!flag4)
|
|
|
{
|
|
|
Point point = default(Point);
|
|
|
point.X = Convert.ToInt32((double)hslMarkImage.Index * 1.0 * (double)this.data_ScaleX_Render);
|
|
|
point.Y = Convert.ToInt32((hslMarkImage.OffsetY < 1f) ? (hslMarkImage.OffsetY * (float)(height - 40) * this.data_ScaleY_Render) : (hslMarkImage.OffsetY * this.data_ScaleY_Render));
|
|
|
int width2 = hslMarkImage.ScaleEnable ? Convert.ToInt32((float)hslMarkImage.MarkImage.Width * this.data_ScaleX_Render) : hslMarkImage.MarkImage.Width;
|
|
|
int height2 = hslMarkImage.ScaleEnable ? Convert.ToInt32((float)hslMarkImage.MarkImage.Height * this.data_ScaleY_Render) : hslMarkImage.MarkImage.Height;
|
|
|
Rectangle rectangle2 = default(Rectangle);
|
|
|
bool flag5 = hslMarkImage.ReferencePoint == ContentAlignment.TopLeft;
|
|
|
if (flag5)
|
|
|
{
|
|
|
rectangle2 = new Rectangle(point.X, point.Y, width2, height2);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag6 = hslMarkImage.ReferencePoint == ContentAlignment.TopCenter;
|
|
|
if (flag6)
|
|
|
{
|
|
|
rectangle2 = new Rectangle(point.X - hslMarkImage.MarkImage.Width / 2, point.Y, width2, height2);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag7 = hslMarkImage.ReferencePoint == ContentAlignment.TopRight;
|
|
|
if (flag7)
|
|
|
{
|
|
|
rectangle2 = new Rectangle(point.X - hslMarkImage.MarkImage.Width, point.Y, width2, height2);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag8 = hslMarkImage.ReferencePoint == ContentAlignment.MiddleLeft;
|
|
|
if (flag8)
|
|
|
{
|
|
|
rectangle2 = new Rectangle(point.X, point.Y - hslMarkImage.MarkImage.Height / 2, width2, height2);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag9 = hslMarkImage.ReferencePoint == ContentAlignment.MiddleCenter;
|
|
|
if (flag9)
|
|
|
{
|
|
|
rectangle2 = new Rectangle(point.X - hslMarkImage.MarkImage.Width / 2, point.Y - hslMarkImage.MarkImage.Height / 2, width2, height2);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag10 = hslMarkImage.ReferencePoint == ContentAlignment.MiddleRight;
|
|
|
if (flag10)
|
|
|
{
|
|
|
rectangle2 = new Rectangle(point.X - hslMarkImage.MarkImage.Width, point.Y - hslMarkImage.MarkImage.Height / 2, width2, height2);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag11 = hslMarkImage.ReferencePoint == ContentAlignment.BottomLeft;
|
|
|
if (flag11)
|
|
|
{
|
|
|
rectangle2 = new Rectangle(point.X, point.Y - hslMarkImage.MarkImage.Height, width2, height2);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag12 = hslMarkImage.ReferencePoint == ContentAlignment.BottomCenter;
|
|
|
if (flag12)
|
|
|
{
|
|
|
rectangle2 = new Rectangle(point.X - hslMarkImage.MarkImage.Width / 2, point.Y - hslMarkImage.MarkImage.Height, width2, height2);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag13 = hslMarkImage.ReferencePoint == ContentAlignment.BottomRight;
|
|
|
if (flag13)
|
|
|
{
|
|
|
rectangle2 = new Rectangle(point.X - hslMarkImage.MarkImage.Width, point.Y - hslMarkImage.MarkImage.Height, width2, height2);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
bool flag14 = this.IsRectangleInRenderRegion(rectangle2, width);
|
|
|
if (flag14)
|
|
|
{
|
|
|
g.DrawImage(hslMarkImage.MarkImage, rectangle2);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
g.TranslateTransform(0f, (float)(this.offsetPaintScrollY - 20));
|
|
|
bool flag15 = num > width;
|
|
|
if (flag15)
|
|
|
{
|
|
|
g.TranslateTransform((float)this.offsetPaintScrollX, 0f);
|
|
|
}
|
|
|
g.DrawLine(this.coordinatePen, 0, height - 20, width, height - 20);
|
|
|
g.TranslateTransform(0f, (float)(-(float)this.offsetPaintScrollY + 20));
|
|
|
for (int j = 0; j < this.auxiliary_lines.Count; j++)
|
|
|
{
|
|
|
bool isLeftFrame = this.auxiliary_lines[j].IsLeftFrame;
|
|
|
if (isLeftFrame)
|
|
|
{
|
|
|
this.auxiliary_lines[j].PaintValue = this.ComputePaintLocationY(this.referenceAxisLeft, height, this.auxiliary_lines[j].Value);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
this.auxiliary_lines[j].PaintValue = this.ComputePaintLocationY(this.referenceAxisRight, height, this.auxiliary_lines[j].Value);
|
|
|
}
|
|
|
}
|
|
|
int acutalSegment = this.GetAcutalSegment(this.isShowTextInfomation ? 1f : this.data_ScaleY_Render);
|
|
|
int num2 = this.isShowTextInfomation ? 0 : this.offsetPaintScrollY;
|
|
|
int k = 1;
|
|
|
while (k <= acutalSegment)
|
|
|
{
|
|
|
float num3 = (float)((double)k * (double)(this.referenceAxisLeft.GetCalculateMax() - this.referenceAxisLeft.GetCalculateMin()) / (double)acutalSegment + (double)this.referenceAxisLeft.GetCalculateMin());
|
|
|
bool flag16 = this.IsAoordinateRoundInt;
|
|
|
if (flag16)
|
|
|
{
|
|
|
num3 = (float)Math.Round((double)num3, 0);
|
|
|
}
|
|
|
bool flag17 = this.referenceAxisLeft.IsUseLogarithms();
|
|
|
if (flag17)
|
|
|
{
|
|
|
num3 = (float)Math.Pow(10.0, (double)num3);
|
|
|
}
|
|
|
float num4 = this.ComputePaintLocationY(this.referenceAxisLeft, height, num3);
|
|
|
bool flag18 = this.IsNeedPaintDash(num4);
|
|
|
if (flag18)
|
|
|
{
|
|
|
bool flag19 = num4 - (float)num2 + 20f < 0f || num4 - (float)num2 + 20f > (float)(height - 20);
|
|
|
if (!flag19)
|
|
|
{
|
|
|
g.DrawLine(this.coordinateDashPen, 0f, num4, (float)width, num4);
|
|
|
}
|
|
|
}
|
|
|
IL_7EA:
|
|
|
k++;
|
|
|
continue;
|
|
|
goto IL_7EA;
|
|
|
}
|
|
|
for (int l = 0; l < this.auxiliary_lines.Count; l++)
|
|
|
{
|
|
|
bool flag20 = this.auxiliary_lines[l].PaintValue - (float)this.offsetPaintScrollY + 20f < 0f || this.auxiliary_lines[l].PaintValue - (float)this.offsetPaintScrollY + 20f > (float)(height - 20);
|
|
|
if (!flag20)
|
|
|
{
|
|
|
g.DrawLine(this.auxiliary_lines[l].GetPen(), 0f, this.auxiliary_lines[l].PaintValue, (float)width, this.auxiliary_lines[l].PaintValue);
|
|
|
}
|
|
|
}
|
|
|
g.TranslateTransform(0f, (float)(this.offsetPaintScrollY - 20));
|
|
|
bool flag21 = num > width;
|
|
|
if (flag21)
|
|
|
{
|
|
|
g.TranslateTransform((float)(-(float)this.offsetPaintScrollX), 0f);
|
|
|
}
|
|
|
int m = this.value_IntervalAbscissaText;
|
|
|
while (m < num)
|
|
|
{
|
|
|
bool flag22 = num > width;
|
|
|
if (!flag22)
|
|
|
{
|
|
|
goto IL_946;
|
|
|
}
|
|
|
bool flag23 = m < this.offsetPaintScrollX - 10;
|
|
|
if (!flag23)
|
|
|
{
|
|
|
bool flag24 = m > this.offsetPaintScrollX + width + 10;
|
|
|
if (!flag24)
|
|
|
{
|
|
|
goto IL_946;
|
|
|
}
|
|
|
}
|
|
|
IL_A64:
|
|
|
m += this.value_IntervalAbscissaText;
|
|
|
continue;
|
|
|
IL_946:
|
|
|
int num5 = Convert.ToInt32((float)m / this.data_ScaleX_Render);
|
|
|
g.DrawLine(this.coordinateDashPen, m, height - 18, m, this.RenderInvertedTriangle ? 0 : 5);
|
|
|
Rectangle r = new Rectangle(m - 100, height - 18, 200, 17);
|
|
|
bool flag25 = this.buttomHeight > 20;
|
|
|
if (flag25)
|
|
|
{
|
|
|
r.Height += this.buttomHeight - 20;
|
|
|
}
|
|
|
bool flag26 = this.isRenderTimeData;
|
|
|
if (flag26)
|
|
|
{
|
|
|
bool flag27 = num5 < this.data_times.Count;
|
|
|
if (flag27)
|
|
|
{
|
|
|
g.DrawString(this.data_times[num5].ToString(this.data_time_formate, CultureInfo.InvariantCulture), this.Font, this.coordinateBrush, r, HslHelper.StringFormatCenter);
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag28 = num5 < this.data_customer.Count;
|
|
|
if (flag28)
|
|
|
{
|
|
|
g.DrawString(this.data_customer[num5], this.Font, this.coordinateBrush, r, HslHelper.StringFormatCenter);
|
|
|
}
|
|
|
}
|
|
|
goto IL_A64;
|
|
|
}
|
|
|
g.TranslateTransform(0f, (float)(-(float)this.offsetPaintScrollY + 20));
|
|
|
foreach (HslMarkText hslMarkText in this.hslMarkTexts)
|
|
|
{
|
|
|
foreach (KeyValuePair<string, HslCurveItem> keyValuePair in this.data_dicts)
|
|
|
{
|
|
|
bool flag29 = !keyValuePair.Value.Visible;
|
|
|
if (!flag29)
|
|
|
{
|
|
|
bool flag30 = !keyValuePair.Value.LineRenderVisiable;
|
|
|
if (!flag30)
|
|
|
{
|
|
|
bool flag31 = keyValuePair.Key != hslMarkText.CurveKey;
|
|
|
if (!flag31)
|
|
|
{
|
|
|
float[] data = keyValuePair.Value.Data;
|
|
|
bool flag32 = data != null && data.Length > 1;
|
|
|
if (flag32)
|
|
|
{
|
|
|
bool flag33 = hslMarkText.Index >= 0 && hslMarkText.Index < keyValuePair.Value.Data.Length;
|
|
|
if (flag33)
|
|
|
{
|
|
|
bool flag34 = float.IsNaN(keyValuePair.Value.Data[hslMarkText.Index]);
|
|
|
if (!flag34)
|
|
|
{
|
|
|
PointF center = new PointF((float)hslMarkText.Index * this.data_ScaleX_Render, this.ComputePaintLocationY(this.GetReferenceAxisByIndex(keyValuePair.Value.ReferenceAxisIndex), height, keyValuePair.Value.Data[hslMarkText.Index]));
|
|
|
MarkTextPositionStyle markTextPosition = (hslMarkText.PositionStyle == MarkTextPositionStyle.Auto) ? HslMarkText.CalculateDirectionFromDataIndex(keyValuePair.Value.Data, hslMarkText.Index) : hslMarkText.PositionStyle;
|
|
|
bool flag35 = this.IsPaintxInRenderRegion((int)center.X, width, 10);
|
|
|
if (flag35)
|
|
|
{
|
|
|
bool flag36 = (int)center.X <= this.offsetPaintScrollX + 10;
|
|
|
if (flag36)
|
|
|
{
|
|
|
markTextPosition = MarkTextPositionStyle.Right;
|
|
|
}
|
|
|
HslCurveHelper.DrawHslMarkTextPoint(g, hslMarkText, center, this.Font, markTextPosition);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
foreach (HslMarkLine hslMarkLine in this.hslMarkLines)
|
|
|
{
|
|
|
PointF[] points = hslMarkLine.Points;
|
|
|
bool flag37 = points != null && points.Length > 1;
|
|
|
if (flag37)
|
|
|
{
|
|
|
PointF[] array = new PointF[hslMarkLine.Points.Length];
|
|
|
for (int n = 0; n < hslMarkLine.Points.Length; n++)
|
|
|
{
|
|
|
array[n].X = hslMarkLine.Points[n].X * this.data_ScaleX_Render;
|
|
|
array[n].Y = this.ComputePaintLocationY(hslMarkLine.IsLeftFrame ? this.referenceAxisLeft : this.referenceAxisRight, height, hslMarkLine.Points[n].Y);
|
|
|
MarkTextPositionStyle markTextPosition2 = HslMarkText.CalculateDirectionFromDataIndex(hslMarkLine.Points, n);
|
|
|
g.FillEllipse(hslMarkLine.CircleBrush, new RectangleF(array[n].X - 3f, array[n].Y - 3f, 6f, 6f));
|
|
|
bool flag38 = hslMarkLine.Marks != null;
|
|
|
if (flag38)
|
|
|
{
|
|
|
HslCurveHelper.DrawTextByPoint(g, hslMarkLine.Marks[n], array[n], this.Font, hslMarkLine.TextBrush, markTextPosition2, 5);
|
|
|
}
|
|
|
}
|
|
|
bool isLineClosed = hslMarkLine.IsLineClosed;
|
|
|
if (isLineClosed)
|
|
|
{
|
|
|
g.DrawLines(hslMarkLine.LinePen, array);
|
|
|
g.DrawLine(hslMarkLine.LinePen, array[0], array[array.Length - 1]);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
g.DrawLines(hslMarkLine.LinePen, array);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
int num6 = 0;
|
|
|
bool flag39 = num > width;
|
|
|
if (flag39)
|
|
|
{
|
|
|
bool flag40 = this.offsetPaintScrollX > 20;
|
|
|
if (flag40)
|
|
|
{
|
|
|
num6 = Convert.ToInt32((double)this.offsetPaintScrollX * 1.0 / (double)this.data_ScaleX_Render);
|
|
|
}
|
|
|
bool flag41 = num6 > 10;
|
|
|
if (flag41)
|
|
|
{
|
|
|
num6 -= 10;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
num6 = 0;
|
|
|
}
|
|
|
}
|
|
|
HslCurveRange[] curveRanges = this.CurveRanges;
|
|
|
bool flag42 = curveRanges != null && curveRanges.Length != 0;
|
|
|
if (flag42)
|
|
|
{
|
|
|
for (int num7 = 0; num7 < this.CurveRanges.Length; num7++)
|
|
|
{
|
|
|
HslCurveRange hslCurveRange = this.CurveRanges[num7];
|
|
|
GraphicsPath graphicsPath = new GraphicsPath();
|
|
|
List<PointF> list = new List<PointF>(Convert.ToInt32((float)width / this.data_ScaleX_Render) + 10);
|
|
|
List<PointF> list2 = new List<PointF>(Convert.ToInt32((float)width / this.data_ScaleX_Render) + 10);
|
|
|
for (int num8 = num6; num8 < hslCurveRange.Upper.Length; num8++)
|
|
|
{
|
|
|
PointF item = default(PointF);
|
|
|
item.X = (float)num8 * this.data_ScaleX_Render;
|
|
|
item.Y = this.ComputePaintLocationY(this.GetReferenceAxisByIndex(hslCurveRange.ReferenceAxisIndex), height, hslCurveRange.Upper[num8]);
|
|
|
PointF item2 = default(PointF);
|
|
|
bool flag43 = hslCurveRange.Lower != null;
|
|
|
if (flag43)
|
|
|
{
|
|
|
item2.X = (float)num8 * this.data_ScaleX_Render;
|
|
|
item2.Y = this.ComputePaintLocationY(this.GetReferenceAxisByIndex(hslCurveRange.ReferenceAxisIndex), height, hslCurveRange.Lower[num8]);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
item2.X = (float)num8 * this.data_ScaleX_Render;
|
|
|
item2.Y = this.ComputePaintLocationY(this.GetReferenceAxisByIndex(hslCurveRange.ReferenceAxisIndex), height, this.GetReferenceAxisByIndex(hslCurveRange.ReferenceAxisIndex).Min);
|
|
|
}
|
|
|
bool flag44 = num <= width;
|
|
|
if (flag44)
|
|
|
{
|
|
|
list.Add(item);
|
|
|
list2.Add(item2);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag45 = item.X >= (float)this.offsetPaintScrollX - 10f * this.data_ScaleX_Render;
|
|
|
if (flag45)
|
|
|
{
|
|
|
bool flag46 = item.X < (float)(this.offsetPaintScrollX + width) + 10f * this.data_ScaleX_Render;
|
|
|
if (!flag46)
|
|
|
{
|
|
|
break;
|
|
|
}
|
|
|
list.Add(item);
|
|
|
list2.Add(item2);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
list2.Reverse();
|
|
|
bool flag47 = hslCurveRange.Style == CurveStyle.LineSegment;
|
|
|
if (flag47)
|
|
|
{
|
|
|
graphicsPath.AddLines(list.ToArray());
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
graphicsPath.AddCurve(list.ToArray());
|
|
|
}
|
|
|
graphicsPath.AddLine(list[list.Count - 1], list2[0]);
|
|
|
bool flag48 = hslCurveRange.Style == CurveStyle.LineSegment;
|
|
|
if (flag48)
|
|
|
{
|
|
|
graphicsPath.AddLines(list2.ToArray());
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
graphicsPath.AddCurve(list2.ToArray());
|
|
|
}
|
|
|
graphicsPath.AddLine(list2[list2.Count - 1], list[0]);
|
|
|
using (Brush brush2 = new SolidBrush(Color.FromArgb(48, hslCurveRange.LineColor)))
|
|
|
{
|
|
|
g.FillPath(brush2, graphicsPath);
|
|
|
}
|
|
|
using (Pen pen = new Pen(hslCurveRange.LineColor))
|
|
|
{
|
|
|
g.DrawPath(pen, graphicsPath);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
foreach (HslCurveItem hslCurveItem in this.data_dicts.Values)
|
|
|
{
|
|
|
bool flag49 = !hslCurveItem.Visible;
|
|
|
if (!flag49)
|
|
|
{
|
|
|
bool flag50 = !hslCurveItem.LineRenderVisiable;
|
|
|
if (!flag50)
|
|
|
{
|
|
|
float[] data2 = hslCurveItem.Data;
|
|
|
bool flag51 = data2 != null && data2.Length > 1;
|
|
|
if (flag51)
|
|
|
{
|
|
|
List<PointF> list3 = new List<PointF>(Convert.ToInt32((float)width / this.data_ScaleX_Render) + 10);
|
|
|
for (int num9 = num6; num9 < hslCurveItem.Data.Length; num9++)
|
|
|
{
|
|
|
bool flag52 = !float.IsNaN(hslCurveItem.Data[num9]);
|
|
|
if (flag52)
|
|
|
{
|
|
|
PointF item3 = default(PointF);
|
|
|
item3.X = (float)num9 * this.data_ScaleX_Render;
|
|
|
item3.Y = this.ComputePaintLocationY(this.GetReferenceAxisByIndex(hslCurveItem.ReferenceAxisIndex), height, hslCurveItem.Data[num9]);
|
|
|
bool flag53 = num <= width;
|
|
|
if (flag53)
|
|
|
{
|
|
|
list3.Add(item3);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag54 = item3.X >= (float)this.offsetPaintScrollX - 10f * this.data_ScaleX_Render;
|
|
|
if (flag54)
|
|
|
{
|
|
|
bool flag55 = item3.X < (float)(this.offsetPaintScrollX + width) + 10f * this.data_ScaleX_Render;
|
|
|
if (!flag55)
|
|
|
{
|
|
|
break;
|
|
|
}
|
|
|
list3.Add(item3);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
HslCurveHelper.DrawLineCore(g, hslCurveItem, list3, this.GetPointsRadius(), (float)(height - 40) * this.data_ScaleY_Render);
|
|
|
list3.Clear();
|
|
|
}
|
|
|
}
|
|
|
HslCurveHelper.DrawLineCore(g, hslCurveItem, list3, this.GetPointsRadius(), (float)(height - 40) * this.data_ScaleY_Render);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
for (int num10 = 0; num10 < this.markForeSections.Count; num10++)
|
|
|
{
|
|
|
this.DrawMarkForeSection(g, this.markForeSections[num10], this.Font, true);
|
|
|
}
|
|
|
g.TranslateTransform(0f, (float)(this.offsetPaintScrollY - 20));
|
|
|
bool flag56 = num > width;
|
|
|
if (flag56)
|
|
|
{
|
|
|
g.TranslateTransform((float)this.offsetPaintScrollX, 0f);
|
|
|
}
|
|
|
g.SmoothingMode = SmoothingMode.None;
|
|
|
bool flag57 = this.buttomHeight <= 0;
|
|
|
if (flag57)
|
|
|
{
|
|
|
this.scrollRectage = new Rectangle(-1, -1, 1, 1);
|
|
|
this.scrollRectageBack = new Rectangle(0, 0, 0, 0);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
using (Brush brush3 = new SolidBrush(this.backColor))
|
|
|
{
|
|
|
g.FillRectangle(brush3, 0, base.Height - this.topHeadHeight - this.scrollHeight - 5, width, this.scrollHeight + 3);
|
|
|
}
|
|
|
bool flag58 = num <= width;
|
|
|
if (flag58)
|
|
|
{
|
|
|
this.scrollRectage = new Rectangle(-1, -1, 1, 1);
|
|
|
this.scrollRectageBack = new Rectangle(0, 0, 0, 0);
|
|
|
this.scrollX = 0;
|
|
|
HslCurveHistory.CurveScollScaleChanged onScaleChanged = this.OnScaleChanged;
|
|
|
if (onScaleChanged != null)
|
|
|
{
|
|
|
onScaleChanged(this, this.scrollX, this.data_ScaleX_Render, this.offsetPaintScrollX);
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
this.scrollRectage = new Rectangle(this.scrollX, base.Height - this.topHeadHeight - this.scrollHeight - 3, this.scrollWidth, this.scrollHeight);
|
|
|
this.scrollRectageBack = new Rectangle(0, base.Height - this.topHeadHeight - this.scrollHeight - 3, width, this.scrollHeight);
|
|
|
using (Brush brush4 = new SolidBrush(Color.FromArgb(80, this.scrollColor)))
|
|
|
{
|
|
|
g.FillRectangle(brush4, this.scrollRectageBack);
|
|
|
}
|
|
|
using (Brush brush5 = new SolidBrush(this.scrollColor))
|
|
|
{
|
|
|
g.FillRectangle(brush5, this.scrollRectage);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
g.SmoothingMode = SmoothingMode.AntiAlias;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 引发controls的dock的变化
|
|
|
/// </summary>
|
|
|
/// <param name="e">事件消息</param>
|
|
|
// Token: 0x06000301 RID: 769 RVA: 0x00025E30 File Offset: 0x00024030
|
|
|
protected override void OnDockChanged(EventArgs e)
|
|
|
{
|
|
|
base.OnDockChanged(e);
|
|
|
this.OnAutoSizeChanged(e);
|
|
|
}
|
|
|
|
|
|
// Token: 0x06000302 RID: 770 RVA: 0x00025E44 File Offset: 0x00024044
|
|
|
private int GetPointsRadius()
|
|
|
{
|
|
|
bool flag = this.data_ScaleX_Render >= 15f && this.pointsRadius == -1;
|
|
|
int result;
|
|
|
if (flag)
|
|
|
{
|
|
|
result = 2;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
result = this.pointsRadius;
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置控件的背景色
|
|
|
/// </summary>
|
|
|
// Token: 0x170000F5 RID: 245
|
|
|
// (get) Token: 0x06000303 RID: 771 RVA: 0x00025E7D File Offset: 0x0002407D
|
|
|
// (set) Token: 0x06000304 RID: 772 RVA: 0x00025E85 File Offset: 0x00024085
|
|
|
[Browsable(true)]
|
|
|
[Description("获取或设置控件的背景色")]
|
|
|
[Category("HslControls")]
|
|
|
[DefaultValue(typeof(Color), "46, 46, 46")]
|
|
|
[EditorBrowsable(EditorBrowsableState.Always)]
|
|
|
public override Color BackColor
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return base.BackColor;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.backColor = value;
|
|
|
base.BackColor = value;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置控件的背景色
|
|
|
/// </summary>
|
|
|
// Token: 0x170000F6 RID: 246
|
|
|
// (get) Token: 0x06000305 RID: 773 RVA: 0x00025E97 File Offset: 0x00024097
|
|
|
// (set) Token: 0x06000306 RID: 774 RVA: 0x00025E9F File Offset: 0x0002409F
|
|
|
[Browsable(true)]
|
|
|
[Description("获取或设置控件的背景色")]
|
|
|
[Category("HslControls")]
|
|
|
[Bindable(true)]
|
|
|
[DefaultValue(typeof(Color), "Yellow")]
|
|
|
[EditorBrowsable(EditorBrowsableState.Always)]
|
|
|
public override Color ForeColor
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return base.ForeColor;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
base.ForeColor = value;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置曲线控件是否显示右侧的坐标轴
|
|
|
/// </summary>
|
|
|
// Token: 0x170000F7 RID: 247
|
|
|
// (get) Token: 0x06000307 RID: 775 RVA: 0x00025EAA File Offset: 0x000240AA
|
|
|
// (set) Token: 0x06000308 RID: 776 RVA: 0x00025EB2 File Offset: 0x000240B2
|
|
|
[Browsable(true)]
|
|
|
[Description("获取或设置曲线控件是否显示右侧的坐标轴")]
|
|
|
[Category("HslControls")]
|
|
|
[DefaultValue(true)]
|
|
|
public virtual bool RenderRightCoordinate
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.isRederRightCoordinate;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.isRederRightCoordinate = value;
|
|
|
base.Invalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置图形的左轴的坐标轴信息
|
|
|
/// </summary>
|
|
|
// Token: 0x170000F8 RID: 248
|
|
|
// (get) Token: 0x06000309 RID: 777 RVA: 0x00025EC3 File Offset: 0x000240C3
|
|
|
[Category("HslControls")]
|
|
|
[Description("获取或设置图形的左轴的坐标轴信息")]
|
|
|
[Browsable(true)]
|
|
|
[TypeConverter(typeof(ReferenceAxisConverter))]
|
|
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
|
|
|
public ReferenceAxis ReferenceAxisLeft
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.referenceAxisLeft;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置图形的右轴的坐标轴信息
|
|
|
/// </summary>
|
|
|
// Token: 0x170000F9 RID: 249
|
|
|
// (get) Token: 0x0600030A RID: 778 RVA: 0x00025ECB File Offset: 0x000240CB
|
|
|
[Category("HslControls")]
|
|
|
[Description("获取或设置图形的右轴的坐标轴信息")]
|
|
|
[Browsable(true)]
|
|
|
[TypeConverter(typeof(ReferenceAxisConverter))]
|
|
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
|
|
|
public ReferenceAxis ReferenceAxisRight
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.referenceAxisRight;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置图形的纵轴分段数
|
|
|
/// </summary>
|
|
|
// Token: 0x170000FA RID: 250
|
|
|
// (get) Token: 0x0600030B RID: 779 RVA: 0x00025ED4 File Offset: 0x000240D4
|
|
|
// (set) Token: 0x0600030C RID: 780 RVA: 0x00025EEC File Offset: 0x000240EC
|
|
|
[Category("HslControls")]
|
|
|
[Description("获取或设置图形的纵轴分段数")]
|
|
|
[Browsable(true)]
|
|
|
[DefaultValue(5)]
|
|
|
public virtual int ValueSegment
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.value_Segment;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.value_Segment = value;
|
|
|
base.Invalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置当前控件的文本
|
|
|
/// </summary>
|
|
|
// Token: 0x170000FB RID: 251
|
|
|
// (get) Token: 0x0600030D RID: 781 RVA: 0x00025F00 File Offset: 0x00024100
|
|
|
// (set) Token: 0x0600030E RID: 782 RVA: 0x00025F18 File Offset: 0x00024118
|
|
|
[Browsable(true)]
|
|
|
[Description("获取或设置当前控件的文本")]
|
|
|
[Category("HslControls")]
|
|
|
[EditorBrowsable(EditorBrowsableState.Always)]
|
|
|
[Bindable(true)]
|
|
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
|
|
public override string Text
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return base.Text;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.isShowTextInfomation = true;
|
|
|
base.Text = value;
|
|
|
this.scrollX = 0;
|
|
|
base.Invalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 或者或设置所有的实线坐标轴的颜色
|
|
|
/// </summary>
|
|
|
// Token: 0x170000FC RID: 252
|
|
|
// (get) Token: 0x0600030F RID: 783 RVA: 0x00025F38 File Offset: 0x00024138
|
|
|
// (set) Token: 0x06000310 RID: 784 RVA: 0x00025F40 File Offset: 0x00024140
|
|
|
[Browsable(true)]
|
|
|
[Description("或者或设置所有的实线坐标轴的颜色")]
|
|
|
[Category("HslControls")]
|
|
|
[DefaultValue(typeof(Color), "LightGray")]
|
|
|
public virtual Color CoordinateColor
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.coordinateColor;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.coordinateColor = value;
|
|
|
this.coordinatePen.Dispose();
|
|
|
this.coordinatePen = new Pen(this.coordinateColor);
|
|
|
this.coordinateBrush.Dispose();
|
|
|
this.coordinateBrush = new SolidBrush(this.coordinateColor);
|
|
|
base.Invalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 或者或设置所有的虚线坐标轴的颜色
|
|
|
/// </summary>
|
|
|
// Token: 0x170000FD RID: 253
|
|
|
// (get) Token: 0x06000311 RID: 785 RVA: 0x00025F96 File Offset: 0x00024196
|
|
|
// (set) Token: 0x06000312 RID: 786 RVA: 0x00025FA0 File Offset: 0x000241A0
|
|
|
[Browsable(true)]
|
|
|
[Description("或者或设置所有的虚线坐标轴的颜色")]
|
|
|
[Category("HslControls")]
|
|
|
[DefaultValue(typeof(Color), "72, 72, 72")]
|
|
|
public virtual Color DashCoordinateColor
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.coordinateDashColor;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.coordinateDashColor = value;
|
|
|
this.coordinateDashPen.Dispose();
|
|
|
this.coordinateDashPen = new Pen(this.coordinateDashColor);
|
|
|
this.coordinateDashPen.DashPattern = new float[]
|
|
|
{
|
|
|
5f,
|
|
|
5f
|
|
|
};
|
|
|
this.coordinateDashPen.DashStyle = DashStyle.Custom;
|
|
|
base.Invalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 或者或设置所有的区间标记的线条颜色
|
|
|
/// </summary>
|
|
|
// Token: 0x170000FE RID: 254
|
|
|
// (get) Token: 0x06000313 RID: 787 RVA: 0x00026008 File Offset: 0x00024208
|
|
|
// (set) Token: 0x06000314 RID: 788 RVA: 0x00026010 File Offset: 0x00024210
|
|
|
[Browsable(true)]
|
|
|
[Description("或者或设置所有的区间标记的线条颜色")]
|
|
|
[Category("HslControls")]
|
|
|
[DefaultValue(typeof(Color), "Cyan")]
|
|
|
public virtual Color MarkLineColor
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.markLineColor;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.markLineColor = value;
|
|
|
this.markLinePen.Dispose();
|
|
|
this.markLinePen = new Pen(this.markLineColor);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 或者或设置所有的区间标记的文本颜色
|
|
|
/// </summary>
|
|
|
// Token: 0x170000FF RID: 255
|
|
|
// (get) Token: 0x06000315 RID: 789 RVA: 0x00026037 File Offset: 0x00024237
|
|
|
// (set) Token: 0x06000316 RID: 790 RVA: 0x0002603F File Offset: 0x0002423F
|
|
|
[Browsable(true)]
|
|
|
[Description("或者或设置所有的区间标记的文本颜色")]
|
|
|
[Category("HslControls")]
|
|
|
[DefaultValue(typeof(Color), "Cyan")]
|
|
|
public virtual Color MarkTextColor
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.markTextColor;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.markTextColor = value;
|
|
|
this.markTextBrush.Dispose();
|
|
|
this.markTextBrush = new SolidBrush(this.markTextColor);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 或者或设置光标移动时显示信息的边框颜色
|
|
|
/// </summary>
|
|
|
// Token: 0x17000100 RID: 256
|
|
|
// (get) Token: 0x06000317 RID: 791 RVA: 0x00026066 File Offset: 0x00024266
|
|
|
// (set) Token: 0x06000318 RID: 792 RVA: 0x0002606E File Offset: 0x0002426E
|
|
|
[Browsable(true)]
|
|
|
[Description("或者或设置光标移动时显示信息的边框颜色")]
|
|
|
[Category("HslControls")]
|
|
|
[DefaultValue(typeof(Color), "HotPink")]
|
|
|
public virtual Color MarkBorderColor
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.markBorderColor;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.markBorderColor = value;
|
|
|
Pen pen = this.markBorderPen;
|
|
|
if (pen != null)
|
|
|
{
|
|
|
pen.Dispose();
|
|
|
}
|
|
|
this.markBorderPen = new Pen(this.markBorderColor);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置鼠标移动的时候,显示的提示信息的背景颜色
|
|
|
/// </summary>
|
|
|
// Token: 0x17000101 RID: 257
|
|
|
// (get) Token: 0x06000319 RID: 793 RVA: 0x0002609B File Offset: 0x0002429B
|
|
|
// (set) Token: 0x0600031A RID: 794 RVA: 0x000260A3 File Offset: 0x000242A3
|
|
|
[Browsable(true)]
|
|
|
[Description("获取或设置鼠标移动的时候,显示的提示信息的背景颜色")]
|
|
|
[Category("HslControls")]
|
|
|
[DefaultValue(typeof(Color), "52, 52, 52")]
|
|
|
public Color HoverBackColor
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.hoverBackColor;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.hoverBackColor = value;
|
|
|
Brush brush = this.mouseHoverBackBrush;
|
|
|
if (brush != null)
|
|
|
{
|
|
|
brush.Dispose();
|
|
|
}
|
|
|
this.mouseHoverBackBrush = new SolidBrush(Color.FromArgb(220, this.hoverBackColor));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置鼠标移动过程中的提示线的颜色
|
|
|
/// </summary>
|
|
|
// Token: 0x17000102 RID: 258
|
|
|
// (get) Token: 0x0600031B RID: 795 RVA: 0x000260DA File Offset: 0x000242DA
|
|
|
// (set) Token: 0x0600031C RID: 796 RVA: 0x000260E2 File Offset: 0x000242E2
|
|
|
[Browsable(true)]
|
|
|
[Description("或者或设置鼠标移动过程中的提示线的颜色")]
|
|
|
[Category("HslControls")]
|
|
|
[DefaultValue(typeof(Color), "White")]
|
|
|
public virtual Color MoveLineColor
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.moveLineColor;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.moveLineColor = value;
|
|
|
this.moveLinePen.Dispose();
|
|
|
this.moveLinePen = new Pen(this.moveLineColor);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置当前滚动条的颜色信息,默认为 <see cref="P:System.Drawing.Color.DimGray" /> 颜色
|
|
|
/// </summary>
|
|
|
// Token: 0x17000103 RID: 259
|
|
|
// (get) Token: 0x0600031D RID: 797 RVA: 0x00026109 File Offset: 0x00024309
|
|
|
// (set) Token: 0x0600031E RID: 798 RVA: 0x00026111 File Offset: 0x00024311
|
|
|
[Browsable(true)]
|
|
|
[Description("获取或设置当前滚动条的颜色信息,默认为 Color.DimGray 颜色")]
|
|
|
[Category("HslControls")]
|
|
|
[DefaultValue(typeof(Color), "DimGray")]
|
|
|
public virtual Color ScrollColor
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.scrollColor;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.scrollColor = value;
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置鼠标移动过程中提示信息的宽度
|
|
|
/// </summary>
|
|
|
// Token: 0x17000104 RID: 260
|
|
|
// (get) Token: 0x0600031F RID: 799 RVA: 0x00026122 File Offset: 0x00024322
|
|
|
// (set) Token: 0x06000320 RID: 800 RVA: 0x0002612A File Offset: 0x0002432A
|
|
|
[Browsable(true)]
|
|
|
[Description("获取或设置鼠标移动过程中提示信息的宽度,如果是小于0表示自动宽度,如果是0表示不显示提示信息,如果大于0就表示绝对像素宽度")]
|
|
|
[Category("HslControls")]
|
|
|
[DefaultValue(-1)]
|
|
|
public virtual int DataTipWidth
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.data_tip_width;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.data_tip_width = value;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置曲线名称的布局宽度,默认为150
|
|
|
/// </summary>
|
|
|
// Token: 0x17000105 RID: 261
|
|
|
// (get) Token: 0x06000321 RID: 801 RVA: 0x00026134 File Offset: 0x00024334
|
|
|
// (set) Token: 0x06000322 RID: 802 RVA: 0x0002613C File Offset: 0x0002433C
|
|
|
[Browsable(true)]
|
|
|
[Description("获取或设置曲线名称的布局宽度,默认为150")]
|
|
|
[Category("HslControls")]
|
|
|
[DefaultValue(150)]
|
|
|
public virtual int CurveNameWidth
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.curveNameWidth;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
bool flag = value > 10;
|
|
|
if (flag)
|
|
|
{
|
|
|
this.curveNameWidth = value;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置纵向虚线的分隔情况,单位为多少个像素点
|
|
|
/// </summary>
|
|
|
// Token: 0x17000106 RID: 262
|
|
|
// (get) Token: 0x06000323 RID: 803 RVA: 0x0002615C File Offset: 0x0002435C
|
|
|
// (set) Token: 0x06000324 RID: 804 RVA: 0x00026174 File Offset: 0x00024374
|
|
|
[Category("HslControls")]
|
|
|
[Description("获取或设置纵向虚线的分隔情况,单位为多少个像素点")]
|
|
|
[Browsable(true)]
|
|
|
[DefaultValue(200)]
|
|
|
public virtual int IntervalAbscissaText
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.value_IntervalAbscissaText;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.value_IntervalAbscissaText = value;
|
|
|
base.Invalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置左坐标轴的宽度信息,单位为多少个像素点
|
|
|
/// </summary>
|
|
|
// Token: 0x17000107 RID: 263
|
|
|
// (get) Token: 0x06000325 RID: 805 RVA: 0x00026185 File Offset: 0x00024385
|
|
|
// (set) Token: 0x06000326 RID: 806 RVA: 0x0002618D File Offset: 0x0002438D
|
|
|
[Category("HslControls")]
|
|
|
[Description("获取或设置左坐标轴的宽度信息,单位为多少个像素点")]
|
|
|
[Browsable(true)]
|
|
|
[DefaultValue(50)]
|
|
|
public virtual int LeftWidth
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.leftWidth;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.leftWidth = value;
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置右坐标轴的宽度信息,单位为多少个像素点
|
|
|
/// </summary>
|
|
|
// Token: 0x17000108 RID: 264
|
|
|
// (get) Token: 0x06000327 RID: 807 RVA: 0x0002619E File Offset: 0x0002439E
|
|
|
// (set) Token: 0x06000328 RID: 808 RVA: 0x000261A6 File Offset: 0x000243A6
|
|
|
[Category("HslControls")]
|
|
|
[Description("获取或设置右坐标轴的宽度信息,单位为多少个像素点")]
|
|
|
[Browsable(true)]
|
|
|
[DefaultValue(50)]
|
|
|
public virtual int RightWidth
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.rightWidth;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.rightWidth = value;
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置顶部曲线名称部分的高度信息,单位为多少个像素点
|
|
|
/// </summary>
|
|
|
// Token: 0x17000109 RID: 265
|
|
|
// (get) Token: 0x06000329 RID: 809 RVA: 0x000261B7 File Offset: 0x000243B7
|
|
|
// (set) Token: 0x0600032A RID: 810 RVA: 0x000261BF File Offset: 0x000243BF
|
|
|
[Category("HslControls")]
|
|
|
[Description("获取或设置顶部曲线名称部分的高度信息,单位为多少个像素点")]
|
|
|
[Browsable(true)]
|
|
|
[DefaultValue(30)]
|
|
|
public virtual int TopCurveNameHeight
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.topHeadHeight;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.topHeadHeight = value;
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置底部部分的高度信息,单位为多少个像素点
|
|
|
/// </summary>
|
|
|
// Token: 0x1700010A RID: 266
|
|
|
// (get) Token: 0x0600032B RID: 811 RVA: 0x000261D0 File Offset: 0x000243D0
|
|
|
// (set) Token: 0x0600032C RID: 812 RVA: 0x000261D8 File Offset: 0x000243D8
|
|
|
[Category("HslControls")]
|
|
|
[Description("获取或设置底部部分的高度信息,单位为多少个像素点")]
|
|
|
[Browsable(true)]
|
|
|
[DefaultValue(20)]
|
|
|
public virtual int ButtomHeight
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.buttomHeight;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.buttomHeight = value;
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置底部滚动条部分的高度信息,单位为多少个像素点
|
|
|
/// </summary>
|
|
|
// Token: 0x1700010B RID: 267
|
|
|
// (get) Token: 0x0600032D RID: 813 RVA: 0x000261E9 File Offset: 0x000243E9
|
|
|
// (set) Token: 0x0600032E RID: 814 RVA: 0x000261F1 File Offset: 0x000243F1
|
|
|
[Category("HslControls")]
|
|
|
[Description("获取或设置底部滚动条部分的高度信息,单位为多少个像素点")]
|
|
|
[Browsable(true)]
|
|
|
[DefaultValue(15)]
|
|
|
public virtual int ScrollHeight
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.scrollHeight;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.scrollHeight = value;
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置曲线图里所有的时间的格式,默认是 yyyy-MM-dd HH:mm:ss
|
|
|
/// </summary>
|
|
|
// Token: 0x1700010C RID: 268
|
|
|
// (get) Token: 0x0600032F RID: 815 RVA: 0x00026202 File Offset: 0x00024402
|
|
|
// (set) Token: 0x06000330 RID: 816 RVA: 0x0002620A File Offset: 0x0002440A
|
|
|
[Category("HslControls")]
|
|
|
[Description("获取或设置曲线图里所有的时间的格式,默认是 yyyy-MM-dd HH:mm:ss")]
|
|
|
[Browsable(true)]
|
|
|
[DefaultValue("yyyy-MM-dd HH:mm:ss")]
|
|
|
public virtual string DateTimeFormate
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.data_time_formate;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.data_time_formate = value;
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置曲线图里光标移动时下方显示的时间格式,默认是HH:mm:ss
|
|
|
/// </summary>
|
|
|
// Token: 0x1700010D RID: 269
|
|
|
// (get) Token: 0x06000331 RID: 817 RVA: 0x0002621B File Offset: 0x0002441B
|
|
|
// (set) Token: 0x06000332 RID: 818 RVA: 0x00026223 File Offset: 0x00024423
|
|
|
[Category("HslControls")]
|
|
|
[Description("获取或设置曲线图里光标移动时下方显示的时间格式,默认是HH:mm:ss")]
|
|
|
[Browsable(true)]
|
|
|
[DefaultValue("HH:mm:ss")]
|
|
|
public virtual string HoverDateTimeFormate
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.mouse_hover_time_formate;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.mouse_hover_time_formate = value;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置曲线图里光标移动时下方显示的矩形宽度信息,默认100
|
|
|
/// </summary>
|
|
|
// Token: 0x1700010E RID: 270
|
|
|
// (get) Token: 0x06000333 RID: 819 RVA: 0x0002622D File Offset: 0x0002442D
|
|
|
// (set) Token: 0x06000334 RID: 820 RVA: 0x00026235 File Offset: 0x00024435
|
|
|
[Category("HslControls")]
|
|
|
[Description("获取或设置曲线图里光标移动时下方显示的矩形宽度信息,默认100")]
|
|
|
[Browsable(true)]
|
|
|
[DefaultValue(100)]
|
|
|
public virtual int HoverDateTimeWidth
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.mouseHoverTimeWidth;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.mouseHoverTimeWidth = value;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置曲线是否禁止鼠标选择区间的功能。
|
|
|
/// </summary>
|
|
|
// Token: 0x1700010F RID: 271
|
|
|
// (get) Token: 0x06000335 RID: 821 RVA: 0x0002623E File Offset: 0x0002443E
|
|
|
// (set) Token: 0x06000336 RID: 822 RVA: 0x00026246 File Offset: 0x00024446
|
|
|
[Category("HslControls")]
|
|
|
[Description("获取或设置曲线是否禁止鼠标选择区间的功能。")]
|
|
|
[Browsable(true)]
|
|
|
[DefaultValue(true)]
|
|
|
public virtual bool IsAllowSelectSection
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.isAllowSelectSection;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.isAllowSelectSection = value;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置纵轴是否强制使用整型
|
|
|
/// </summary>
|
|
|
// Token: 0x17000110 RID: 272
|
|
|
// (get) Token: 0x06000337 RID: 823 RVA: 0x00026250 File Offset: 0x00024450
|
|
|
// (set) Token: 0x06000338 RID: 824 RVA: 0x00026258 File Offset: 0x00024458
|
|
|
[Category("HslControls")]
|
|
|
[Description("获取或设置纵轴是否强制使用整型。")]
|
|
|
[Browsable(true)]
|
|
|
[DefaultValue(false)]
|
|
|
public virtual bool IsAoordinateRoundInt
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.isAoordinateRoundInt;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.isAoordinateRoundInt = value;
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置所有的数据点显示的半径大小,默认是-1,不显示数据点
|
|
|
/// </summary>
|
|
|
// Token: 0x17000111 RID: 273
|
|
|
// (get) Token: 0x06000339 RID: 825 RVA: 0x00026269 File Offset: 0x00024469
|
|
|
// (set) Token: 0x0600033A RID: 826 RVA: 0x00026271 File Offset: 0x00024471
|
|
|
[Browsable(true)]
|
|
|
[Description("获取或设置所有的数据点显示的半径大小,默认是-1,不显示数据点")]
|
|
|
[Category("HslControls")]
|
|
|
[DefaultValue(-1)]
|
|
|
public virtual int PointsRadius
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.pointsRadius;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.pointsRadius = value;
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置鼠标移动的时候,是否显示鼠标的标记线,这个标记线跟随着光标移动
|
|
|
/// </summary>
|
|
|
// Token: 0x17000112 RID: 274
|
|
|
// (get) Token: 0x0600033B RID: 827 RVA: 0x00026282 File Offset: 0x00024482
|
|
|
// (set) Token: 0x0600033C RID: 828 RVA: 0x0002628A File Offset: 0x0002448A
|
|
|
[Browsable(true)]
|
|
|
[Description("获取或设置鼠标移动的时候,是否显示鼠标的标记线,这个标记线跟随着光标移动")]
|
|
|
[Category("HslControls")]
|
|
|
[DefaultValue(true)]
|
|
|
public bool MarkLineVisible
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.markLineVisible;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.markLineVisible = value;
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置其他的坐标轴信息
|
|
|
/// </summary>
|
|
|
// Token: 0x17000113 RID: 275
|
|
|
// (get) Token: 0x0600033D RID: 829 RVA: 0x0002629B File Offset: 0x0002449B
|
|
|
// (set) Token: 0x0600033E RID: 830 RVA: 0x000262A3 File Offset: 0x000244A3
|
|
|
[Description("获取或设置其他的坐标轴信息")]
|
|
|
[Category("HslControls")]
|
|
|
[TypeConverter(typeof(CollectionConverter))]
|
|
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
|
|
|
public virtual ReferenceAxisCollection ReferenceAxis
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.referenceAxes;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.referenceAxes = value;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置是否显示倒三角的信息,默认为True,如果显示不限制倒三角,则顶部会连线
|
|
|
/// </summary>
|
|
|
// Token: 0x17000114 RID: 276
|
|
|
// (get) Token: 0x0600033F RID: 831 RVA: 0x000262AC File Offset: 0x000244AC
|
|
|
// (set) Token: 0x06000340 RID: 832 RVA: 0x000262C4 File Offset: 0x000244C4
|
|
|
[Browsable(true)]
|
|
|
[Description("获取或设置是否显示倒三角的信息,默认为True,如果显示不限制倒三角,则顶部会连线")]
|
|
|
[Category("HslControls")]
|
|
|
[DefaultValue(true)]
|
|
|
public virtual bool RenderInvertedTriangle
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.renderInvertedTriangle;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.renderInvertedTriangle = value;
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置是否显示缩放倍率信息,默认为True,如果想要不显示右上角的倍率信息,则设置为False
|
|
|
/// </summary>
|
|
|
// Token: 0x17000115 RID: 277
|
|
|
// (get) Token: 0x06000341 RID: 833 RVA: 0x000262D8 File Offset: 0x000244D8
|
|
|
// (set) Token: 0x06000342 RID: 834 RVA: 0x000262F0 File Offset: 0x000244F0
|
|
|
[Description("获取或设置是否显示缩放倍率信息,默认为True,如果想要不显示右上角的倍率信息,则设置为False")]
|
|
|
[Category("HslControls")]
|
|
|
[DefaultValue(true)]
|
|
|
public virtual bool RenderScaleInfo
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.renderScaleInfo;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.renderScaleInfo = value;
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置当前曲线的缩放模式,默认只有X轴,还可以选择同时缩放,或是先缩放X轴后缩放Y轴
|
|
|
/// </summary>
|
|
|
// Token: 0x17000116 RID: 278
|
|
|
// (get) Token: 0x06000343 RID: 835 RVA: 0x00026301 File Offset: 0x00024501
|
|
|
// (set) Token: 0x06000344 RID: 836 RVA: 0x00026309 File Offset: 0x00024509
|
|
|
[Description("获取或设置当前曲线的缩放模式,默认只有X轴,还可以选择同时缩放,或是先缩放X轴后缩放Y轴")]
|
|
|
[Category("HslControls")]
|
|
|
[DefaultValue(typeof(ScaleMode), "OnlyX")]
|
|
|
public virtual ScaleMode ScaleMode
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.scaleMode;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.scaleMode = value;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置当前的曲线控件右侧的预留的空白宽度信息,像素为单位,默认200
|
|
|
/// </summary>
|
|
|
// Token: 0x17000117 RID: 279
|
|
|
// (get) Token: 0x06000345 RID: 837 RVA: 0x00026312 File Offset: 0x00024512
|
|
|
// (set) Token: 0x06000346 RID: 838 RVA: 0x0002631A File Offset: 0x0002451A
|
|
|
[Description("获取或设置当前的曲线控件右侧的预留的空白宽度信息,像素为单位,默认200")]
|
|
|
[Category("HslControls")]
|
|
|
[DefaultValue(200)]
|
|
|
public int RightRemainWidth
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.rightRemainWidth;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.rightRemainWidth = value;
|
|
|
this.RenderCurveUI(false);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置当前的曲线控件的额外的轴是否隐藏,额外的轴主要指在属性<see cref="P:HslControls.HslCurveHistory.ReferenceAxis" />配置的第三轴,第四轴,等等
|
|
|
/// </summary>
|
|
|
// Token: 0x17000118 RID: 280
|
|
|
// (get) Token: 0x06000347 RID: 839 RVA: 0x0002632C File Offset: 0x0002452C
|
|
|
// (set) Token: 0x06000348 RID: 840 RVA: 0x00026334 File Offset: 0x00024534
|
|
|
[Description("获取或设置当前的曲线控件的额外的轴是否隐藏,额外的轴主要指在属性 ReferenceAxis 配置的第三轴,第四轴,等等")]
|
|
|
[Category("HslControls")]
|
|
|
[DefaultValue(false)]
|
|
|
public bool IsOtherAxisHide
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.isOtherAxisHide;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.isOtherAxisHide = value;
|
|
|
base.Invalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置光标移动时,是否在每个Y轴上显示光标位置对应的值(这个值反计算时存在一定的微小误差),默认为 true,显示
|
|
|
/// </summary>
|
|
|
// Token: 0x17000119 RID: 281
|
|
|
// (get) Token: 0x06000349 RID: 841 RVA: 0x00026345 File Offset: 0x00024545
|
|
|
// (set) Token: 0x0600034A RID: 842 RVA: 0x0002634D File Offset: 0x0002454D
|
|
|
[Description("获取或设置光标移动时,是否在每个Y轴上显示光标位置对应的值(这个值反计算时存在一定的微小误差),默认为 true,显示")]
|
|
|
[Category("HslControls")]
|
|
|
[DefaultValue(true)]
|
|
|
public bool IsRenderYTip
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this.isRenderYTip;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
this.isRenderYTip = value;
|
|
|
base.Invalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取或设置曲线范围的类信息
|
|
|
/// </summary>
|
|
|
// Token: 0x1700011A RID: 282
|
|
|
// (get) Token: 0x0600034B RID: 843 RVA: 0x0002635E File Offset: 0x0002455E
|
|
|
// (set) Token: 0x0600034C RID: 844 RVA: 0x00026366 File Offset: 0x00024566
|
|
|
[Browsable(false)]
|
|
|
public HslCurveRange[] CurveRanges { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 当鼠标在曲线上双击时触发,由此获取到点击的数据的索引位置,时间坐标
|
|
|
/// </summary>
|
|
|
// Token: 0x14000002 RID: 2
|
|
|
// (add) Token: 0x0600034D RID: 845 RVA: 0x00026370 File Offset: 0x00024570
|
|
|
// (remove) Token: 0x0600034E RID: 846 RVA: 0x000263A8 File Offset: 0x000245A8
|
|
|
[Category("Mouse")]
|
|
|
[Description("当鼠标在曲线上双击时触发,由此获取到点击的数据的索引位置,时间坐标")]
|
|
|
// [DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
|
|
public event HslCurveHistory.CurveDoubleClick onCurveDoubleClick;
|
|
|
|
|
|
/// <summary>
|
|
|
/// 当鼠标在曲线上双击时触发,由此获取到点击的数据的索引位置,用户自定义的坐标
|
|
|
/// </summary>
|
|
|
// Token: 0x14000003 RID: 3
|
|
|
// (add) Token: 0x0600034F RID: 847 RVA: 0x000263E0 File Offset: 0x000245E0
|
|
|
// (remove) Token: 0x06000350 RID: 848 RVA: 0x00026418 File Offset: 0x00024618
|
|
|
[Category("Mouse")]
|
|
|
[Description("当鼠标在曲线上双击时触发,由此获取到点击的数据的索引位置,用户自定义的坐标")]
|
|
|
// [DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
|
|
public event HslCurveHistory.CurveCustomerDoubleClick onCurveCustomerDoubleClick;
|
|
|
|
|
|
/// <summary>
|
|
|
/// 当鼠标在曲线上移动时触发,由此获取到鼠标的移动位置
|
|
|
/// </summary>
|
|
|
// Token: 0x14000004 RID: 4
|
|
|
// (add) Token: 0x06000351 RID: 849 RVA: 0x00026450 File Offset: 0x00024650
|
|
|
// (remove) Token: 0x06000352 RID: 850 RVA: 0x00026488 File Offset: 0x00024688
|
|
|
[Category("Mouse")]
|
|
|
[Description("当鼠标在曲线上双击时触发,由此获取到鼠标的移动位置")]
|
|
|
// [DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
|
|
public event HslCurveHistory.CurveMouseMove onCurveMouseMove;
|
|
|
|
|
|
/// <summary>
|
|
|
/// 当鼠标在曲线上双击时触发,由此获取到点击的数据的索引位置,时间坐标
|
|
|
/// </summary>
|
|
|
// Token: 0x14000005 RID: 5
|
|
|
// (add) Token: 0x06000353 RID: 851 RVA: 0x000264C0 File Offset: 0x000246C0
|
|
|
// (remove) Token: 0x06000354 RID: 852 RVA: 0x000264F8 File Offset: 0x000246F8
|
|
|
[Category("Mouse")]
|
|
|
[Description("当鼠标在曲线上选择了一个区间,由此出发了一个选择事件,注意,包含两侧的端点。")]
|
|
|
// [DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
|
|
public event HslCurveHistory.CurveRangeSelect onCurveRangeSelect;
|
|
|
|
|
|
/// <summary>
|
|
|
/// 当曲线放大缩小调整的时候触发
|
|
|
/// </summary>
|
|
|
// Token: 0x14000006 RID: 6
|
|
|
// (add) Token: 0x06000355 RID: 853 RVA: 0x00026530 File Offset: 0x00024730
|
|
|
// (remove) Token: 0x06000356 RID: 854 RVA: 0x00026568 File Offset: 0x00024768
|
|
|
// [DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
|
|
public event HslCurveHistory.CurveScollScaleChanged OnScaleChanged;
|
|
|
|
|
|
// Token: 0x14000007 RID: 7
|
|
|
// (add) Token: 0x06000357 RID: 855 RVA: 0x000265A0 File Offset: 0x000247A0
|
|
|
// (remove) Token: 0x06000358 RID: 856 RVA: 0x000265D8 File Offset: 0x000247D8
|
|
|
// [DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
|
|
public event HslCurveHistory.CurveScollScaleChanged OnScrollChanged;
|
|
|
|
|
|
/// <summary>
|
|
|
/// 计算所有的辅助线的缓存的文本信息,在界面大小变化的时候,需要重新计算
|
|
|
/// </summary>
|
|
|
// Token: 0x06000359 RID: 857 RVA: 0x00026610 File Offset: 0x00024810
|
|
|
private void CalculateAuxiliaryPaintY(int offset)
|
|
|
{
|
|
|
for (int i = 0; i < this.auxiliary_lines.Count; i++)
|
|
|
{
|
|
|
bool isLeftFrame = this.auxiliary_lines[i].IsLeftFrame;
|
|
|
if (isLeftFrame)
|
|
|
{
|
|
|
this.auxiliary_lines[i].PaintValue = HslHelper.ComputePaintLocationY(this.referenceAxisLeft.GetCalculateMax(), this.referenceAxisLeft.GetCalculateMin(), (float)(base.Height - 40 - this.topHeadHeight - this.buttomHeight), this.referenceAxisLeft.IsUseLogarithms() ? ((float)Math.Log10((double)this.auxiliary_lines[i].Value)) : this.auxiliary_lines[i].Value) + (float)offset;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
this.auxiliary_lines[i].PaintValue = HslHelper.ComputePaintLocationY(this.referenceAxisRight.GetCalculateMax(), this.referenceAxisRight.GetCalculateMin(), (float)(base.Height - 40 - this.topHeadHeight - this.buttomHeight), this.referenceAxisRight.IsUseLogarithms() ? ((float)Math.Log10((double)this.auxiliary_lines[i].Value)) : this.auxiliary_lines[i].Value) + (float)offset;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增一条左侧的辅助线,使用默认的文本颜色
|
|
|
/// </summary>
|
|
|
/// <param name="value">数据值</param>
|
|
|
// Token: 0x0600035A RID: 858 RVA: 0x00026764 File Offset: 0x00024964
|
|
|
public AuxiliaryLine AddLeftAuxiliary(float value)
|
|
|
{
|
|
|
return this.AddLeftAuxiliary(value, this.coordinateColor);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增一条左侧的辅助线,使用指定的颜色
|
|
|
/// </summary>
|
|
|
/// <param name="value">数据值</param>
|
|
|
/// <param name="lineColor">线条颜色</param>
|
|
|
// Token: 0x0600035B RID: 859 RVA: 0x00026784 File Offset: 0x00024984
|
|
|
public AuxiliaryLine AddLeftAuxiliary(float value, Color lineColor)
|
|
|
{
|
|
|
return this.AddLeftAuxiliary(value, lineColor, 1f, true);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增一条左侧的辅助线
|
|
|
/// </summary>
|
|
|
/// <param name="value">数据值</param>
|
|
|
/// <param name="lineColor">线条颜色</param>
|
|
|
/// <param name="lineThickness">线条宽度</param>
|
|
|
/// <param name="isDashLine">是否是虚线</param>
|
|
|
// Token: 0x0600035C RID: 860 RVA: 0x000267A4 File Offset: 0x000249A4
|
|
|
public AuxiliaryLine AddLeftAuxiliary(float value, Color lineColor, float lineThickness, bool isDashLine)
|
|
|
{
|
|
|
return this.AddAuxiliary(value, lineColor, lineThickness, isDashLine, true);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增一条右侧的辅助线,使用默认的文本颜色
|
|
|
/// </summary>
|
|
|
/// <param name="value">数据值</param>
|
|
|
// Token: 0x0600035D RID: 861 RVA: 0x000267C4 File Offset: 0x000249C4
|
|
|
public AuxiliaryLine AddRightAuxiliary(float value)
|
|
|
{
|
|
|
return this.AddRightAuxiliary(value, this.coordinateColor);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增一条右侧的辅助线,使用指定的颜色
|
|
|
/// </summary>
|
|
|
/// <param name="value">数据值</param>
|
|
|
/// <param name="lineColor">线条颜色</param>
|
|
|
// Token: 0x0600035E RID: 862 RVA: 0x000267E4 File Offset: 0x000249E4
|
|
|
public AuxiliaryLine AddRightAuxiliary(float value, Color lineColor)
|
|
|
{
|
|
|
return this.AddRightAuxiliary(value, lineColor, 1f, true);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增一条右侧的辅助线
|
|
|
/// </summary>
|
|
|
/// <param name="value">数据值</param>
|
|
|
/// <param name="lineColor">线条颜色</param>
|
|
|
/// <param name="lineThickness">线条宽度</param>
|
|
|
/// <param name="isDashLine">是否是虚线的信息</param>
|
|
|
// Token: 0x0600035F RID: 863 RVA: 0x00026804 File Offset: 0x00024A04
|
|
|
public AuxiliaryLine AddRightAuxiliary(float value, Color lineColor, float lineThickness, bool isDashLine)
|
|
|
{
|
|
|
return this.AddAuxiliary(value, lineColor, lineThickness, isDashLine, false);
|
|
|
}
|
|
|
|
|
|
// Token: 0x06000360 RID: 864 RVA: 0x00026824 File Offset: 0x00024A24
|
|
|
private AuxiliaryLine AddAuxiliary(float value, Color lineColor, float lineThickness, bool isDashLine, bool isLeft)
|
|
|
{
|
|
|
AuxiliaryLine auxiliaryLine = new AuxiliaryLine
|
|
|
{
|
|
|
Value = value,
|
|
|
LineColor = lineColor,
|
|
|
PenDash = new Pen(lineColor)
|
|
|
{
|
|
|
DashStyle = DashStyle.Custom,
|
|
|
DashPattern = new float[]
|
|
|
{
|
|
|
5f,
|
|
|
5f
|
|
|
}
|
|
|
},
|
|
|
PenSolid = new Pen(lineColor),
|
|
|
IsDashStyle = isDashLine,
|
|
|
IsLeftFrame = isLeft,
|
|
|
LineThickness = lineThickness,
|
|
|
LineTextBrush = new SolidBrush(lineColor)
|
|
|
};
|
|
|
this.auxiliary_lines.Add(auxiliaryLine);
|
|
|
return auxiliaryLine;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 移除所有的指定值的辅助曲线,包括左边的和右边的
|
|
|
/// </summary>
|
|
|
/// <param name="value"></param>
|
|
|
// Token: 0x06000361 RID: 865 RVA: 0x000268C4 File Offset: 0x00024AC4
|
|
|
public void RemoveAuxiliary(float value)
|
|
|
{
|
|
|
int num = 0;
|
|
|
for (int i = this.auxiliary_lines.Count - 1; i >= 0; i--)
|
|
|
{
|
|
|
bool flag = this.auxiliary_lines[i].Value == value;
|
|
|
if (flag)
|
|
|
{
|
|
|
this.auxiliary_lines[i].Dispose();
|
|
|
this.auxiliary_lines.RemoveAt(i);
|
|
|
num++;
|
|
|
}
|
|
|
}
|
|
|
bool flag2 = num > 0;
|
|
|
if (flag2)
|
|
|
{
|
|
|
base.Invalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 移除一个指定的辅助对象
|
|
|
/// </summary>
|
|
|
/// <param name="auxiliary">移除的数据值</param>
|
|
|
// Token: 0x06000362 RID: 866 RVA: 0x00026944 File Offset: 0x00024B44
|
|
|
public void RemoveAuxiliary(AuxiliaryLine auxiliary)
|
|
|
{
|
|
|
bool flag = this.auxiliary_lines.Remove(auxiliary);
|
|
|
if (flag)
|
|
|
{
|
|
|
base.Invalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 移除所有的辅助线
|
|
|
/// </summary>
|
|
|
// Token: 0x06000363 RID: 867 RVA: 0x0002696C File Offset: 0x00024B6C
|
|
|
public void RemoveAllAuxiliary()
|
|
|
{
|
|
|
int count = this.auxiliary_lines.Count;
|
|
|
this.auxiliary_lines.Clear();
|
|
|
bool flag = count > 0;
|
|
|
if (flag)
|
|
|
{
|
|
|
base.Invalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增一条辅助标签
|
|
|
/// </summary>
|
|
|
/// <param name="auxiliaryLable">描述的标签值</param>
|
|
|
// Token: 0x06000364 RID: 868 RVA: 0x000269A1 File Offset: 0x00024BA1
|
|
|
public void AddAuxiliaryLabel(AuxiliaryLable auxiliaryLable)
|
|
|
{
|
|
|
this.auxiliary_Labels.Add(auxiliaryLable);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 移除指定的辅助标签
|
|
|
/// </summary>
|
|
|
/// <param name="auxiliaryLable">等待删除的对象</param>
|
|
|
// Token: 0x06000365 RID: 869 RVA: 0x000269B4 File Offset: 0x00024BB4
|
|
|
public void RemoveAuxiliaryLable(AuxiliaryLable auxiliaryLable)
|
|
|
{
|
|
|
bool flag = this.auxiliary_Labels.Remove(auxiliaryLable);
|
|
|
if (flag)
|
|
|
{
|
|
|
base.Invalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 移除所有的辅助标签
|
|
|
/// </summary>
|
|
|
// Token: 0x06000366 RID: 870 RVA: 0x000269DC File Offset: 0x00024BDC
|
|
|
public void RemoveAllAuxiliaryLable()
|
|
|
{
|
|
|
int count = this.auxiliary_Labels.Count;
|
|
|
this.auxiliary_Labels.Clear();
|
|
|
bool flag = count > 0;
|
|
|
if (flag)
|
|
|
{
|
|
|
base.Invalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增一个标记的线段信息
|
|
|
/// </summary>
|
|
|
/// <param name="markLine">线段标记信息</param>
|
|
|
// Token: 0x06000367 RID: 871 RVA: 0x00026A11 File Offset: 0x00024C11
|
|
|
public void AddMarkLine(HslMarkLine markLine)
|
|
|
{
|
|
|
this.hslMarkLines.Add(markLine);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 移除一个标记的线段信息
|
|
|
/// </summary>
|
|
|
/// <param name="markLine">线段标记信息</param>
|
|
|
// Token: 0x06000368 RID: 872 RVA: 0x00026A21 File Offset: 0x00024C21
|
|
|
public void RemoveMarkLine(HslMarkLine markLine)
|
|
|
{
|
|
|
this.hslMarkLines.Remove(markLine);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 移除所有的标记的线段信息
|
|
|
/// </summary>
|
|
|
// Token: 0x06000369 RID: 873 RVA: 0x00026A31 File Offset: 0x00024C31
|
|
|
public void RemoveAllMarkLine()
|
|
|
{
|
|
|
this.hslMarkLines.Clear();
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增一个标记的文本信息
|
|
|
/// </summary>
|
|
|
/// <param name="markText">文本标记信息</param>
|
|
|
// Token: 0x0600036A RID: 874 RVA: 0x00026A40 File Offset: 0x00024C40
|
|
|
public void AddMarkText(HslMarkText markText)
|
|
|
{
|
|
|
this.hslMarkTexts.Add(markText);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 移除一个标记的文本信息
|
|
|
/// </summary>
|
|
|
/// <param name="markText">文本标记信息</param>
|
|
|
// Token: 0x0600036B RID: 875 RVA: 0x00026A50 File Offset: 0x00024C50
|
|
|
public void RemoveMarkText(HslMarkText markText)
|
|
|
{
|
|
|
this.hslMarkTexts.Remove(markText);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 移除所有的标记的文本信息
|
|
|
/// </summary>
|
|
|
// Token: 0x0600036C RID: 876 RVA: 0x00026A60 File Offset: 0x00024C60
|
|
|
public void RemoveAllMarkText()
|
|
|
{
|
|
|
this.hslMarkTexts.Clear();
|
|
|
}
|
|
|
|
|
|
// Token: 0x0600036D RID: 877 RVA: 0x00026A70 File Offset: 0x00024C70
|
|
|
public void AddMarkCurvePeakPoint(string curveKey)
|
|
|
{
|
|
|
bool flag = !this.data_dicts.ContainsKey(curveKey);
|
|
|
if (!flag)
|
|
|
{
|
|
|
float[] data = this.data_dicts[curveKey].Data;
|
|
|
for (int i = 0; i < data.Length; i++)
|
|
|
{
|
|
|
bool flag2 = i == 0;
|
|
|
if (flag2)
|
|
|
{
|
|
|
bool flag3 = data[i] > data[i + 1];
|
|
|
if (flag3)
|
|
|
{
|
|
|
this.AddMarkText(new HslMarkText
|
|
|
{
|
|
|
CurveKey = curveKey,
|
|
|
Index = i,
|
|
|
MarkText = string.Format(this.data_dicts[curveKey].RenderFormat, data[i]),
|
|
|
TextBrush = this.data_dicts[curveKey].GetLineBrush()
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag4 = i == data.Length - 1;
|
|
|
if (flag4)
|
|
|
{
|
|
|
bool flag5 = data[i] > data[i - 1];
|
|
|
if (flag5)
|
|
|
{
|
|
|
this.AddMarkText(new HslMarkText
|
|
|
{
|
|
|
CurveKey = curveKey,
|
|
|
Index = i,
|
|
|
MarkText = string.Format(this.data_dicts[curveKey].RenderFormat, data[i]),
|
|
|
TextBrush = this.data_dicts[curveKey].GetLineBrush()
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag6 = data[i] > data[i - 1] && data[i] >= data[i + 1];
|
|
|
if (flag6)
|
|
|
{
|
|
|
int j = i + 1;
|
|
|
while (j < data.Length)
|
|
|
{
|
|
|
bool flag7 = data[i] == data[j];
|
|
|
if (flag7)
|
|
|
{
|
|
|
j++;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag8 = data[i] > data[j];
|
|
|
if (flag8)
|
|
|
{
|
|
|
this.AddMarkText(new HslMarkText
|
|
|
{
|
|
|
CurveKey = curveKey,
|
|
|
Index = i,
|
|
|
MarkText = string.Format(this.data_dicts[curveKey].RenderFormat, data[i]),
|
|
|
TextBrush = this.data_dicts[curveKey].GetLineBrush()
|
|
|
});
|
|
|
i = j;
|
|
|
break;
|
|
|
}
|
|
|
i = j;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 增加一个新的标记图片
|
|
|
/// </summary>
|
|
|
/// <param name="markImage">标记图片对象</param>
|
|
|
// Token: 0x0600036E RID: 878 RVA: 0x00026C8B File Offset: 0x00024E8B
|
|
|
public void AddMarkImage(HslMarkImage markImage)
|
|
|
{
|
|
|
this.hslMarkImages.Add(markImage);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 移除一个标记图片信息
|
|
|
/// </summary>
|
|
|
/// <param name="markImage">标记图片信息</param>
|
|
|
// Token: 0x0600036F RID: 879 RVA: 0x00026C9B File Offset: 0x00024E9B
|
|
|
public void RemoveMarkImage(HslMarkImage markImage)
|
|
|
{
|
|
|
this.hslMarkImages.Remove(markImage);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 移除所有的标记图片信息
|
|
|
/// </summary>
|
|
|
// Token: 0x06000370 RID: 880 RVA: 0x00026CAB File Offset: 0x00024EAB
|
|
|
public void RemoveAllMarkImages()
|
|
|
{
|
|
|
this.hslMarkImages.Clear();
|
|
|
}
|
|
|
|
|
|
// Token: 0x06000371 RID: 881 RVA: 0x00026CBC File Offset: 0x00024EBC
|
|
|
private void CalculateCurveDataMax()
|
|
|
{
|
|
|
this.data_count = 0;
|
|
|
for (int i = 0; i < this.data_lists.Count; i++)
|
|
|
{
|
|
|
bool flag = this.data_count < this.data_lists[i].Data.Length;
|
|
|
if (flag)
|
|
|
{
|
|
|
this.data_count = this.data_lists[i].Data.Length;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 设置系统横轴的显示坐标信息
|
|
|
/// </summary>
|
|
|
/// <param name="times">时间数组</param>
|
|
|
// Token: 0x06000372 RID: 882 RVA: 0x00026D25 File Offset: 0x00024F25
|
|
|
public void SetDateTimes(DateTime[] times)
|
|
|
{
|
|
|
this.data_times = new List<DateTime>(times);
|
|
|
this.isRenderTimeData = true;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 设置系统横轴的显示坐标信息
|
|
|
/// </summary>
|
|
|
/// <param name="customers">自定义的数组</param>
|
|
|
// Token: 0x06000373 RID: 883 RVA: 0x00026D3B File Offset: 0x00024F3B
|
|
|
public void SetDateCustomer(string[] customers)
|
|
|
{
|
|
|
this.data_customer = new List<string>(customers);
|
|
|
this.isRenderTimeData = false;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 设置当前曲线的横轴的缩放等级,必须大于0,小于1则为缩放,大于1则为放大
|
|
|
/// </summary>
|
|
|
/// <param name="scale">缩放等级,必须大于0,小于1则为缩放,大于1则为放大</param>
|
|
|
// Token: 0x06000374 RID: 884 RVA: 0x00026D51 File Offset: 0x00024F51
|
|
|
public void SetScaleByXAxis(float scale)
|
|
|
{
|
|
|
this.data_ScaleX_Render = scale;
|
|
|
this.SetScrollXNewValue(this.scrollX);
|
|
|
HslCurveHistory.CurveScollScaleChanged onScaleChanged = this.OnScaleChanged;
|
|
|
if (onScaleChanged != null)
|
|
|
{
|
|
|
onScaleChanged(this, this.scrollX, this.data_ScaleX_Render, this.offsetPaintScrollX);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 设置新的X轴缩放等级的数组,滚轮将在数组上滚动,缩放等级应该从小到大排序参数, index 为默认的等级所在的索引,默认的缩放等级一般都是 1<br />
|
|
|
/// 例如float数组 [1/4f, 1/2f, 1f, 2f, 3f, 4f, 10f ],index 就是 2 ,也即是 1f 所在数组的索引
|
|
|
/// </summary>
|
|
|
/// <param name="scales">X轴的缩放等级</param>
|
|
|
/// <param name="index">index 为默认的等级所在的索引</param>
|
|
|
// Token: 0x06000375 RID: 885 RVA: 0x00026D90 File Offset: 0x00024F90
|
|
|
public void SetScaleXOptions(float[] scales, int index)
|
|
|
{
|
|
|
this.scale_x_options = scales;
|
|
|
bool flag = index >= 0 && index < this.scale_x_options.Length;
|
|
|
if (flag)
|
|
|
{
|
|
|
this.scale_x_index = index;
|
|
|
this.data_ScaleX_Render = this.scale_x_options[index];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 设置新的Y轴缩放等级的数组,滚轮将在数组上滚动,缩放等级应该从小到大排序参数, index 为默认的等级所在的索引,默认的缩放等级一般都是 1<br />
|
|
|
/// Y轴的缩放等级需要从1开始,例如float数组 [1f, 2f, 3f, 4f, 10f ],index 就是 0 ,也即是 1f 所在数组的索引
|
|
|
/// </summary>
|
|
|
/// <param name="scales">X轴的缩放等级</param>
|
|
|
/// <param name="index">index 为默认的等级所在的索引</param>
|
|
|
// Token: 0x06000376 RID: 886 RVA: 0x00026DD4 File Offset: 0x00024FD4
|
|
|
public void SetScaleYOptions(float[] scales, int index)
|
|
|
{
|
|
|
this.scale_y_options = scales;
|
|
|
bool flag = index >= 0 && index < this.scale_y_options.Length;
|
|
|
if (flag)
|
|
|
{
|
|
|
this.scale_y_index = index;
|
|
|
this.data_ScaleY_Render = this.scale_y_options[index];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增或修改一条指定关键字的左参考系曲线数据,需要指定数据,颜色随机,没有数据上限,线条宽度为1
|
|
|
/// </summary>
|
|
|
/// <param name="key">曲线关键字</param>
|
|
|
/// <param name="data">曲线的具体数据</param>
|
|
|
// Token: 0x06000377 RID: 887 RVA: 0x00026E18 File Offset: 0x00025018
|
|
|
public void SetLeftCurve(string key, float[] data)
|
|
|
{
|
|
|
this.SetLeftCurve(key, data, Color.FromArgb(this.random.Next(256), this.random.Next(256), this.random.Next(256)));
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增或修改一条指定关键字的左参考系曲线数据,需要指定数据,颜色,没有数据上限,线条宽度为1
|
|
|
/// </summary>
|
|
|
/// <param name="key">曲线关键字</param>
|
|
|
/// <param name="data">数据内容</param>
|
|
|
/// <param name="lineColor">曲线颜色</param>
|
|
|
// Token: 0x06000378 RID: 888 RVA: 0x00026E64 File Offset: 0x00025064
|
|
|
public void SetLeftCurve(string key, float[] data, Color lineColor)
|
|
|
{
|
|
|
this.SetCurve(key, 0, data, lineColor, 1f, CurveStyle.LineSegment);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增或修改一条指定关键字的左参考系曲线数据,需要指定数据,颜色,没有数据上限,线条宽度为1
|
|
|
/// </summary>
|
|
|
/// <param name="key">曲线关键字</param>
|
|
|
/// <param name="data">数据内容</param>
|
|
|
/// <param name="lineColor">曲线颜色</param>
|
|
|
/// <param name="style">曲线的样式</param>
|
|
|
// Token: 0x06000379 RID: 889 RVA: 0x00026E78 File Offset: 0x00025078
|
|
|
public void SetLeftCurve(string key, float[] data, Color lineColor, CurveStyle style)
|
|
|
{
|
|
|
this.SetCurve(key, 0, data, lineColor, 1f, style);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增或修改一条指定关键字的左参考系曲线数据,需要指定数据,颜色,没有数据上限,线条宽度为1
|
|
|
/// </summary>
|
|
|
/// <param name="key">曲线关键字</param>
|
|
|
/// <param name="data">数据内容</param>
|
|
|
/// <param name="lineColor">曲线颜色</param>
|
|
|
/// <param name="style">曲线的样式</param>
|
|
|
/// <param name="renderFormat">数据显示的格式化操作</param>
|
|
|
// Token: 0x0600037A RID: 890 RVA: 0x00026E8D File Offset: 0x0002508D
|
|
|
public void SetLeftCurve(string key, float[] data, Color lineColor, CurveStyle style, string renderFormat)
|
|
|
{
|
|
|
this.SetCurve(key, 0, data, lineColor, 1f, style, renderFormat);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增或修改一条指定关键字的右参考系曲线数据,需要指定数据,颜色随机,没有数据上限,线条宽度为1
|
|
|
/// </summary>
|
|
|
/// <param name="key">曲线关键字</param>
|
|
|
/// <param name="data">数据内容</param>
|
|
|
// Token: 0x0600037B RID: 891 RVA: 0x00026EA4 File Offset: 0x000250A4
|
|
|
public void SetRightCurve(string key, float[] data)
|
|
|
{
|
|
|
this.SetRightCurve(key, data, Color.FromArgb(this.random.Next(256), this.random.Next(256), this.random.Next(256)));
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增或修改一条指定关键字的右参考系曲线数据,需要指定数据,颜色,没有数据上限,线条宽度为1
|
|
|
/// </summary>
|
|
|
/// <param name="key">曲线关键字</param>
|
|
|
/// <param name="data">数据内容</param>
|
|
|
/// <param name="lineColor">曲线颜色</param>
|
|
|
// Token: 0x0600037C RID: 892 RVA: 0x00026EF0 File Offset: 0x000250F0
|
|
|
public void SetRightCurve(string key, float[] data, Color lineColor)
|
|
|
{
|
|
|
this.SetCurve(key, 1, data, lineColor, 1f, CurveStyle.LineSegment);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增或修改一条指定关键字的右参考系曲线数据,需要指定数据,颜色,没有数据上限,线条宽度为1
|
|
|
/// </summary>
|
|
|
/// <param name="key">曲线关键字</param>
|
|
|
/// <param name="data">数据内容</param>
|
|
|
/// <param name="lineColor">曲线颜色</param>
|
|
|
/// <param name="style">曲线的样式</param>
|
|
|
// Token: 0x0600037D RID: 893 RVA: 0x00026F04 File Offset: 0x00025104
|
|
|
public void SetRightCurve(string key, float[] data, Color lineColor, CurveStyle style)
|
|
|
{
|
|
|
this.SetCurve(key, 1, data, lineColor, 1f, style);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增或修改一条指定关键字的右参考系曲线数据,需要指定数据,颜色,没有数据上限,线条宽度为1
|
|
|
/// </summary>
|
|
|
/// <param name="key">曲线关键字</param>
|
|
|
/// <param name="data">数据内容</param>
|
|
|
/// <param name="lineColor">曲线颜色</param>
|
|
|
/// <param name="style">曲线的样式</param>
|
|
|
/// <param name="renderFormat">数据显示的格式化操作</param>
|
|
|
// Token: 0x0600037E RID: 894 RVA: 0x00026F19 File Offset: 0x00025119
|
|
|
public void SetRightCurve(string key, float[] data, Color lineColor, CurveStyle style, string renderFormat)
|
|
|
{
|
|
|
this.SetCurve(key, 1, data, lineColor, 1f, style, renderFormat);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增或修改一条指定关键字的曲线数据,需要指定参考系及数据,颜色,线条宽度
|
|
|
/// </summary>
|
|
|
/// <param name="key">曲线关键字</param>
|
|
|
/// <param name="referenceAxis">是否以左侧坐标轴为参照系</param>
|
|
|
/// <param name="data">数据</param>
|
|
|
/// <param name="lineColor">线条颜色</param>
|
|
|
/// <param name="thickness">线条宽度</param>
|
|
|
/// <param name="style">曲线的样式</param>
|
|
|
// Token: 0x0600037F RID: 895 RVA: 0x00026F30 File Offset: 0x00025130
|
|
|
public void SetCurve(string key, int referenceAxis, float[] data, Color lineColor, float thickness, CurveStyle style)
|
|
|
{
|
|
|
this.SetCurve(key, referenceAxis, data, lineColor, thickness, style, "{0}");
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增或修改一条指定关键字的曲线数据,需要指定参考系及数据,颜色,线条宽度
|
|
|
/// </summary>
|
|
|
/// <param name="key">曲线关键字</param>
|
|
|
/// <param name="referenceAxis">是否以左侧坐标轴为参照系</param>
|
|
|
/// <param name="data">数据</param>
|
|
|
/// <param name="lineColor">线条颜色</param>
|
|
|
/// <param name="thickness">线条宽度</param>
|
|
|
/// <param name="style">曲线的样式</param>
|
|
|
/// <param name="renderFormat">数据显示的格式化操作</param>
|
|
|
// Token: 0x06000380 RID: 896 RVA: 0x00026F48 File Offset: 0x00025148
|
|
|
public void SetCurve(string key, int referenceAxis, float[] data, Color lineColor, float thickness, CurveStyle style, string renderFormat)
|
|
|
{
|
|
|
bool flag = this.data_dicts.ContainsKey(key);
|
|
|
if (flag)
|
|
|
{
|
|
|
bool flag2 = data == null;
|
|
|
if (flag2)
|
|
|
{
|
|
|
data = new float[0];
|
|
|
}
|
|
|
this.data_dicts[key].Data = data;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag3 = data == null;
|
|
|
if (flag3)
|
|
|
{
|
|
|
data = new float[0];
|
|
|
}
|
|
|
this.data_dicts.Add(key, new HslCurveItem
|
|
|
{
|
|
|
Data = data,
|
|
|
LineThickness = thickness,
|
|
|
LineColor = lineColor,
|
|
|
ReferenceAxisIndex = referenceAxis,
|
|
|
Style = style,
|
|
|
RenderFormat = renderFormat
|
|
|
});
|
|
|
this.data_lists.Add(this.data_dicts[key]);
|
|
|
}
|
|
|
this.CalculateCurveDataMax();
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增一条新的曲线信息,需要指定关键字,曲线的对象内容,可以自由的设置曲线的细节。
|
|
|
/// </summary>
|
|
|
/// <param name="key">关键字</param>
|
|
|
/// <param name="curveItem">曲线内容</param>
|
|
|
// Token: 0x06000381 RID: 897 RVA: 0x00027002 File Offset: 0x00025202
|
|
|
public void SetCurve(string key, HslCurveItem curveItem)
|
|
|
{
|
|
|
this.data_dicts.Add(key, curveItem);
|
|
|
this.CalculateCurveDataMax();
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 修改某一条曲线的颜色信息
|
|
|
/// </summary>
|
|
|
/// <param name="key">曲线关键字</param>
|
|
|
/// <param name="lineColor">曲线的颜色信息</param>
|
|
|
// Token: 0x06000382 RID: 898 RVA: 0x0002701C File Offset: 0x0002521C
|
|
|
public void SetCurveLineColor(string key, Color lineColor)
|
|
|
{
|
|
|
bool flag = this.data_dicts.ContainsKey(key);
|
|
|
if (flag)
|
|
|
{
|
|
|
this.data_dicts[key].LineColor = lineColor;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 修改某一条曲线的线条宽度
|
|
|
/// </summary>
|
|
|
/// <param name="key">曲线关键字</param>
|
|
|
/// <param name="thickness">曲线的线宽</param>
|
|
|
// Token: 0x06000383 RID: 899 RVA: 0x00027050 File Offset: 0x00025250
|
|
|
public void SetCurveLineThickness(string key, float thickness)
|
|
|
{
|
|
|
bool flag = this.data_dicts.ContainsKey(key);
|
|
|
if (flag)
|
|
|
{
|
|
|
this.data_dicts[key].LineThickness = thickness;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 修改某一条曲线的样式,线段,还是圆滑,还是阶跃,还是阶梯
|
|
|
/// </summary>
|
|
|
/// <param name="key">曲线关键字</param>
|
|
|
/// <param name="style">曲线的样式</param>
|
|
|
// Token: 0x06000384 RID: 900 RVA: 0x00027084 File Offset: 0x00025284
|
|
|
public void SetCurveLineCurveStyle(string key, CurveStyle style)
|
|
|
{
|
|
|
bool flag = this.data_dicts.ContainsKey(key);
|
|
|
if (flag)
|
|
|
{
|
|
|
this.data_dicts[key].Style = style;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 修改某一条曲线的显示的格式化信息文本。
|
|
|
/// </summary>
|
|
|
/// <param name="key">曲线关键字</param>
|
|
|
/// <param name="renderFormat">曲线的样式</param>
|
|
|
// Token: 0x06000385 RID: 901 RVA: 0x000270B8 File Offset: 0x000252B8
|
|
|
public void SetCurveLineRenderFormat(string key, string renderFormat)
|
|
|
{
|
|
|
bool flag = this.data_dicts.ContainsKey(key);
|
|
|
if (flag)
|
|
|
{
|
|
|
this.data_dicts[key].RenderFormat = renderFormat;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 移除指定关键字的曲线
|
|
|
/// </summary>
|
|
|
/// <param name="key">曲线关键字</param>
|
|
|
// Token: 0x06000386 RID: 902 RVA: 0x000270EC File Offset: 0x000252EC
|
|
|
public void RemoveCurve(string key)
|
|
|
{
|
|
|
bool flag = this.data_dicts.ContainsKey(key);
|
|
|
if (flag)
|
|
|
{
|
|
|
this.data_lists.Remove(this.data_dicts[key]);
|
|
|
this.data_dicts.Remove(key);
|
|
|
}
|
|
|
bool flag2 = this.data_dicts.Count == 0;
|
|
|
if (flag2)
|
|
|
{
|
|
|
this.data_times = new List<DateTime>(0);
|
|
|
this.data_customer = new List<string>();
|
|
|
}
|
|
|
this.CalculateCurveDataMax();
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取当前曲线的字典信息,所有的曲线都在这里面,可以进行一些自由的控制
|
|
|
/// </summary>
|
|
|
/// <returns>包含所有曲线的词典信息</returns>
|
|
|
// Token: 0x06000387 RID: 903 RVA: 0x00027163 File Offset: 0x00025363
|
|
|
public Dictionary<string, HslCurveItem> GetAllCurve()
|
|
|
{
|
|
|
return this.data_dicts;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 移除指定关键字的曲线,包含了所有的特殊标记信息
|
|
|
/// </summary>
|
|
|
// Token: 0x06000388 RID: 904 RVA: 0x0002716C File Offset: 0x0002536C
|
|
|
public void RemoveAllCurve()
|
|
|
{
|
|
|
this.data_dicts.Clear();
|
|
|
this.data_lists.Clear();
|
|
|
this.markBackSections.Clear();
|
|
|
this.markForeSections.Clear();
|
|
|
this.markForeSectionsTmp.Clear();
|
|
|
this.markForeActiveSections.Clear();
|
|
|
this.hslMarkTexts.Clear();
|
|
|
this.auxiliary_Labels.Clear();
|
|
|
this.hslMarkLines.Clear();
|
|
|
bool flag = this.data_dicts.Count == 0;
|
|
|
if (flag)
|
|
|
{
|
|
|
this.data_times = new List<DateTime>(0);
|
|
|
}
|
|
|
this.CalculateCurveDataMax();
|
|
|
this.SetScrollXNewValue(0);
|
|
|
HslCurveHistory.CurveScollScaleChanged onScaleChanged = this.OnScaleChanged;
|
|
|
if (onScaleChanged != null)
|
|
|
{
|
|
|
onScaleChanged(this, this.scrollX, this.data_ScaleX_Render, this.offsetPaintScrollX);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 设置一条曲线是否是可见的,如果该曲线不存在,则无效。
|
|
|
/// </summary>
|
|
|
/// <param name="key">关键字</param>
|
|
|
/// <param name="visible">是否可见,如果设置不可见,名称不可见,曲线不可见,但是提示可见</param>
|
|
|
/// <param name="lineRenderVisiable">曲线是否可见,如果设置不可见,曲线隐藏,提示隐藏,名称暗淡显示。</param>
|
|
|
// Token: 0x06000389 RID: 905 RVA: 0x00027238 File Offset: 0x00025438
|
|
|
public void SetCurveVisible(string key, bool visible, bool lineRenderVisiable = true)
|
|
|
{
|
|
|
bool flag = this.data_dicts.ContainsKey(key);
|
|
|
if (flag)
|
|
|
{
|
|
|
HslCurveItem hslCurveItem = this.data_dicts[key];
|
|
|
hslCurveItem.Visible = visible;
|
|
|
hslCurveItem.LineRenderVisiable = lineRenderVisiable;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 设置多条曲线是否是可见的,如果该曲线不存在,则无效。
|
|
|
/// </summary>
|
|
|
/// <param name="keys">关键字</param>
|
|
|
/// <param name="visible">是否可见</param>
|
|
|
/// <param name="lineRenderVisiable">曲线是否可见,如果设置不可见,曲线隐藏,提示隐藏,名称暗淡显示。</param>
|
|
|
// Token: 0x0600038A RID: 906 RVA: 0x00027278 File Offset: 0x00025478
|
|
|
public void SetCurveVisible(string[] keys, bool visible, bool lineRenderVisiable = true)
|
|
|
{
|
|
|
foreach (string key in keys)
|
|
|
{
|
|
|
bool flag = this.data_dicts.ContainsKey(key);
|
|
|
if (flag)
|
|
|
{
|
|
|
HslCurveItem hslCurveItem = this.data_dicts[key];
|
|
|
hslCurveItem.Visible = visible;
|
|
|
hslCurveItem.LineRenderVisiable = lineRenderVisiable;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Token: 0x0600038B RID: 907 RVA: 0x000272D0 File Offset: 0x000254D0
|
|
|
private void PictureBox3_MouseEnter(object sender, EventArgs e)
|
|
|
{
|
|
|
bool flag = this.syncHslCurveHistory != null;
|
|
|
if (flag)
|
|
|
{
|
|
|
this.syncHslCurveHistory.OnMouseEnter(e);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
this.is_mouse_on_picture = true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Token: 0x0600038C RID: 908 RVA: 0x00027304 File Offset: 0x00025504
|
|
|
private void PictureBox3_MouseLeave(object sender, EventArgs e)
|
|
|
{
|
|
|
bool flag = this.syncHslCurveHistory != null;
|
|
|
if (flag)
|
|
|
{
|
|
|
this.syncHslCurveHistory.OnMouseLeave(e);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag2 = !this.isMouseFreeze;
|
|
|
if (flag2)
|
|
|
{
|
|
|
this.is_mouse_on_picture = false;
|
|
|
HslCurveHistory.CurveMouseMove curveMouseMove = this.onCurveMouseMove;
|
|
|
if (curveMouseMove != null)
|
|
|
{
|
|
|
curveMouseMove(this, -1, -1);
|
|
|
}
|
|
|
}
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Token: 0x0600038D RID: 909 RVA: 0x00027364 File Offset: 0x00025564
|
|
|
private void PictureBox3_MouseDoubleClick(object sender, MouseEventArgs e)
|
|
|
{
|
|
|
bool flag = this.syncHslCurveHistory != null;
|
|
|
if (flag)
|
|
|
{
|
|
|
this.syncHslCurveHistory.OnMouseDoubleClick(e);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag2 = this.isShowTextInfomation;
|
|
|
if (!flag2)
|
|
|
{
|
|
|
bool flag3 = this.IsPointInDataRegion(e.Location);
|
|
|
if (flag3)
|
|
|
{
|
|
|
int actualLeftWidth = this.GetActualLeftWidth();
|
|
|
bool flag4 = e.X - actualLeftWidth + this.offsetPaintScrollX < 0;
|
|
|
if (!flag4)
|
|
|
{
|
|
|
this.mouse_location = new Point(e.Location.X - actualLeftWidth, e.Location.Y - this.topHeadHeight);
|
|
|
this.isMouseFreeze = true;
|
|
|
int num = Convert.ToInt32((float)(e.X - actualLeftWidth + this.offsetPaintScrollX) / this.data_ScaleX_Render);
|
|
|
bool flag5 = this.isRenderTimeData;
|
|
|
if (flag5)
|
|
|
{
|
|
|
bool flag6 = num >= 0 && num < this.data_times.Count;
|
|
|
if (flag6)
|
|
|
{
|
|
|
HslCurveHistory.CurveDoubleClick curveDoubleClick = this.onCurveDoubleClick;
|
|
|
if (curveDoubleClick != null)
|
|
|
{
|
|
|
curveDoubleClick(this, num, this.data_times[num]);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag7 = num >= 0 && num < this.data_customer.Count;
|
|
|
if (flag7)
|
|
|
{
|
|
|
HslCurveHistory.CurveCustomerDoubleClick curveCustomerDoubleClick = this.onCurveCustomerDoubleClick;
|
|
|
if (curveCustomerDoubleClick != null)
|
|
|
{
|
|
|
curveCustomerDoubleClick(this, num, this.data_customer[num]);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Token: 0x0600038E RID: 910 RVA: 0x000274C8 File Offset: 0x000256C8
|
|
|
private void PictureBox3_MouseUp(object sender, MouseEventArgs e)
|
|
|
{
|
|
|
bool flag = this.is_mouse_click_scroll;
|
|
|
if (flag)
|
|
|
{
|
|
|
this.is_mouse_click_scroll = false;
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag2 = e.Button == MouseButtons.Left && this.isAllowSelectSection;
|
|
|
if (flag2)
|
|
|
{
|
|
|
HslMarkForeSection hslMarkForeSection = new HslMarkForeSection
|
|
|
{
|
|
|
StartIndex = this.m_RowBetweenStart,
|
|
|
EndIndex = this.m_RowBetweenEnd,
|
|
|
Height = (float)this.m_RowBetweenHeight,
|
|
|
StartHeight = (float)this.m_RowBetweenStartHeight,
|
|
|
LinePen = this.markLinePen,
|
|
|
FontBrush = this.markTextBrush
|
|
|
};
|
|
|
this.markForeSectionsTmp.Add(hslMarkForeSection);
|
|
|
this.m_IsMouseLeftDown = false;
|
|
|
this.HslInvalidate();
|
|
|
HslCurveHistory.CurveRangeSelect curveRangeSelect = this.onCurveRangeSelect;
|
|
|
if (curveRangeSelect != null)
|
|
|
{
|
|
|
curveRangeSelect(this, hslMarkForeSection);
|
|
|
}
|
|
|
this.m_RowBetweenStart = -1;
|
|
|
this.m_RowBetweenEnd = -1;
|
|
|
this.m_RowBetweenHeight = -1;
|
|
|
this.m_RowBetweenStartHeight = -1;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag3 = e.Button == MouseButtons.Middle;
|
|
|
if (flag3)
|
|
|
{
|
|
|
bool flag4 = this.syncHslCurveHistory != null;
|
|
|
if (flag4)
|
|
|
{
|
|
|
this.syncHslCurveHistory.OnMouseUp(e);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
this.m_IsMouseMiddleDown = false;
|
|
|
this.mouse_right_location = new Point(-1, -1);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Token: 0x0600038F RID: 911 RVA: 0x000275FC File Offset: 0x000257FC
|
|
|
private void PictureBox3_MouseDown(object sender, MouseEventArgs e)
|
|
|
{
|
|
|
int actualLeftWidth = this.GetActualLeftWidth();
|
|
|
foreach (KeyValuePair<string, HslCurveItem> keyValuePair in this.data_dicts)
|
|
|
{
|
|
|
bool flag = keyValuePair.Value.TitleRegion.Contains(e.Location);
|
|
|
if (flag)
|
|
|
{
|
|
|
keyValuePair.Value.LineRenderVisiable = !keyValuePair.Value.LineRenderVisiable;
|
|
|
this.HslInvalidate();
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
bool flag2 = this.ReferenceAxis.Count > 0 && new Rectangle(this.GetActualLeftWidth() - this.leftWidth, base.Height - this.scrollHeight - 5, this.leftWidth, this.scrollHeight).Contains(e.Location);
|
|
|
if (flag2)
|
|
|
{
|
|
|
this.isOtherAxisHide = !this.isOtherAxisHide;
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag3 = this.scrollRectage.X >= 0 && this.scrollRectage.Contains(new Point(e.Location.X - actualLeftWidth, e.Location.Y - this.topHeadHeight)) && e.Button == MouseButtons.Left;
|
|
|
if (flag3)
|
|
|
{
|
|
|
this.is_mouse_click_scroll = true;
|
|
|
this.mouse_scroll_location = e.Location;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag4 = this.scrollRectageBack.Width > 0 && this.scrollRectageBack.Contains(new Point(e.Location.X - actualLeftWidth, e.Location.Y - this.topHeadHeight)) && e.Button == MouseButtons.Left;
|
|
|
if (flag4)
|
|
|
{
|
|
|
this.is_mouse_click_scroll = true;
|
|
|
this.mouse_scroll_location = e.Location;
|
|
|
this.SetScrollXNewValue(e.Location.X - actualLeftWidth);
|
|
|
HslCurveHistory.CurveScollScaleChanged onScaleChanged = this.OnScaleChanged;
|
|
|
if (onScaleChanged != null)
|
|
|
{
|
|
|
onScaleChanged(this, this.scrollX, this.data_ScaleX_Render, this.offsetPaintScrollX);
|
|
|
}
|
|
|
this.Refresh();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag5 = e.Button == MouseButtons.Right;
|
|
|
if (flag5)
|
|
|
{
|
|
|
this.isMouseFreeze = false;
|
|
|
this.markForeSectionsTmp.Clear();
|
|
|
this.m_RowBetweenStart = -1;
|
|
|
this.m_RowBetweenEnd = -1;
|
|
|
this.m_RowBetweenHeight = -1;
|
|
|
this.m_RowBetweenStartHeight = -1;
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag6 = e.Button == MouseButtons.Middle;
|
|
|
if (flag6)
|
|
|
{
|
|
|
bool flag7 = this.syncHslCurveHistory != null;
|
|
|
if (flag7)
|
|
|
{
|
|
|
this.syncHslCurveHistory.OnMouseDown(e);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
this.m_IsMouseMiddleDown = true;
|
|
|
this.mouse_right_location = e.Location;
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag8 = this.isAllowSelectSection;
|
|
|
if (flag8)
|
|
|
{
|
|
|
bool flag9 = e == null;
|
|
|
if (!flag9)
|
|
|
{
|
|
|
bool flag10 = e.X - actualLeftWidth + this.offsetPaintScrollX < 0;
|
|
|
if (!flag10)
|
|
|
{
|
|
|
bool flag11 = this.IsPointInDataRegion(e.Location);
|
|
|
if (flag11)
|
|
|
{
|
|
|
this.m_IsMouseLeftDown = true;
|
|
|
this.m_RowBetweenStart = Convert.ToInt32((float)(e.X - actualLeftWidth + this.offsetPaintScrollX) / this.data_ScaleX_Render);
|
|
|
this.m_RowBetweenStartHeight = e.Y - this.topHeadHeight;
|
|
|
this.m_RowBetweenHeight = e.Y - this.topHeadHeight;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Token: 0x06000390 RID: 912 RVA: 0x0002797C File Offset: 0x00025B7C
|
|
|
private void PictureBox3_MouseMove(object sender, MouseEventArgs e)
|
|
|
{
|
|
|
bool flag = this.syncHslCurveHistory != null;
|
|
|
if (flag)
|
|
|
{
|
|
|
this.syncHslCurveHistory.OnMouseMove(e);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag2 = false;
|
|
|
foreach (KeyValuePair<string, HslCurveItem> keyValuePair in this.data_dicts)
|
|
|
{
|
|
|
bool flag3 = keyValuePair.Value.TitleRegion.Contains(e.Location);
|
|
|
if (flag3)
|
|
|
{
|
|
|
flag2 = true;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
bool flag4 = this.ReferenceAxis.Count > 0 && new Rectangle(this.GetActualLeftWidth() - this.leftWidth, base.Height - this.scrollHeight - 5, this.leftWidth, this.scrollHeight).Contains(e.Location);
|
|
|
if (flag4)
|
|
|
{
|
|
|
flag2 = true;
|
|
|
}
|
|
|
this.Cursor = (flag2 ? Cursors.Hand : Cursors.Arrow);
|
|
|
bool flag5 = this.is_mouse_click_scroll;
|
|
|
if (flag5)
|
|
|
{
|
|
|
int num = e.Location.X - this.mouse_scroll_location.X;
|
|
|
this.mouse_scroll_location = new Point(e.Location.X, e.Location.Y);
|
|
|
this.SetScrollXNewValue(this.scrollX + num);
|
|
|
this.Refresh();
|
|
|
HslCurveHistory.CurveScollScaleChanged onScaleChanged = this.OnScaleChanged;
|
|
|
if (onScaleChanged != null)
|
|
|
{
|
|
|
onScaleChanged(this, this.scrollX, this.data_ScaleX_Render, this.offsetPaintScrollX);
|
|
|
}
|
|
|
HslCurveHistory.CurveScollScaleChanged onScrollChanged = this.OnScrollChanged;
|
|
|
if (onScrollChanged != null)
|
|
|
{
|
|
|
onScrollChanged(this, this.scrollX, this.data_ScaleX_Render, this.offsetPaintScrollX);
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag6 = this.IsPointInDataRegion(e.Location);
|
|
|
if (flag6)
|
|
|
{
|
|
|
int actualLeftWidth = this.GetActualLeftWidth();
|
|
|
int curvePaintActualWidth = this.GetCurvePaintActualWidth();
|
|
|
this.is_mouse_on_picture = true;
|
|
|
bool flag7 = this.is_mouse_on_picture && !this.isShowTextInfomation && !this.isMouseFreeze;
|
|
|
if (flag7)
|
|
|
{
|
|
|
this.mouse_location = new Point(e.Location.X - actualLeftWidth, e.Location.Y - this.topHeadHeight);
|
|
|
HslCurveHistory.CurveMouseMove curveMouseMove = this.onCurveMouseMove;
|
|
|
if (curveMouseMove != null)
|
|
|
{
|
|
|
curveMouseMove(this, this.mouse_location.X, this.mouse_location.Y);
|
|
|
}
|
|
|
this.Refresh();
|
|
|
}
|
|
|
bool isMouseMiddleDown = this.m_IsMouseMiddleDown;
|
|
|
if (isMouseMiddleDown)
|
|
|
{
|
|
|
int num2 = e.Location.X - this.mouse_right_location.X;
|
|
|
int num3 = (this.data_ScaleY_Render > 1.1f) ? (e.Location.Y - this.mouse_right_location.Y) : 0;
|
|
|
this.mouse_right_location = e.Location;
|
|
|
int num4 = this.CalculatePaintWidthAndScrollMax(curvePaintActualWidth);
|
|
|
bool flag8 = num4 <= curvePaintActualWidth;
|
|
|
if (!flag8)
|
|
|
{
|
|
|
int num5 = this.offsetPaintScrollX - num2;
|
|
|
this.SetScrollXNewValue(Convert.ToInt32((float)((long)(this.offsetPaintScrollX - num2) * (long)this.scrollMaxX) * 1f / (float)(num4 - curvePaintActualWidth)));
|
|
|
this.offsetPaintScrollX = num5;
|
|
|
bool flag9 = this.offsetPaintScrollX >= num4 - curvePaintActualWidth;
|
|
|
if (flag9)
|
|
|
{
|
|
|
this.offsetPaintScrollX = num4 - curvePaintActualWidth;
|
|
|
}
|
|
|
bool flag10 = this.offsetPaintScrollX < 0;
|
|
|
if (flag10)
|
|
|
{
|
|
|
this.offsetPaintScrollX = 0;
|
|
|
}
|
|
|
this.offsetPaintScrollY = this.EnsureOffsetPaintScrollY(this.offsetPaintScrollY - num3);
|
|
|
this.Refresh();
|
|
|
HslCurveHistory.CurveScollScaleChanged onScaleChanged2 = this.OnScaleChanged;
|
|
|
if (onScaleChanged2 != null)
|
|
|
{
|
|
|
onScaleChanged2(this, this.scrollX, this.data_ScaleX_Render, this.offsetPaintScrollX);
|
|
|
}
|
|
|
HslCurveHistory.CurveScollScaleChanged onScrollChanged2 = this.OnScrollChanged;
|
|
|
if (onScrollChanged2 != null)
|
|
|
{
|
|
|
onScrollChanged2(this, this.scrollX, this.data_ScaleX_Render, this.offsetPaintScrollX);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag11 = !this.isMouseFreeze;
|
|
|
if (flag11)
|
|
|
{
|
|
|
this.mouse_location = new Point(-2);
|
|
|
bool flag12 = this.is_mouse_on_picture;
|
|
|
if (flag12)
|
|
|
{
|
|
|
HslCurveHistory.CurveMouseMove curveMouseMove2 = this.onCurveMouseMove;
|
|
|
if (curveMouseMove2 != null)
|
|
|
{
|
|
|
curveMouseMove2(this, -1, -1);
|
|
|
}
|
|
|
}
|
|
|
this.is_mouse_on_picture = false;
|
|
|
}
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 强行设置曲线中活动的点信息,显示数值
|
|
|
/// </summary>
|
|
|
/// <param name="x">横坐标x</param>
|
|
|
/// <param name="y">横坐标y</param>
|
|
|
// Token: 0x06000391 RID: 913 RVA: 0x00027DAC File Offset: 0x00025FAC
|
|
|
public void SetCurveMousePosition(int x, int y)
|
|
|
{
|
|
|
bool flag = x < 0 || y < 0;
|
|
|
if (flag)
|
|
|
{
|
|
|
this.is_mouse_on_picture = false;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
this.is_mouse_on_picture = true;
|
|
|
}
|
|
|
this.mouse_location.X = x;
|
|
|
this.mouse_location.Y = y;
|
|
|
this.Refresh();
|
|
|
}
|
|
|
|
|
|
// Token: 0x06000392 RID: 914 RVA: 0x00027DFC File Offset: 0x00025FFC
|
|
|
private bool IsPointInDataRegion(Point point)
|
|
|
{
|
|
|
int actualLeftWidth = this.GetActualLeftWidth();
|
|
|
return point.X >= actualLeftWidth && point.X <= base.Width - this.rightWidth && point.Y >= this.topHeadHeight && point.Y <= base.Height - this.buttomHeight;
|
|
|
}
|
|
|
|
|
|
// Token: 0x06000393 RID: 915 RVA: 0x00027E60 File Offset: 0x00026060
|
|
|
private void PictureBox3_Paint(object sender, PaintEventArgs e)
|
|
|
{
|
|
|
Graphics graphics = e.Graphics;
|
|
|
graphics.SmoothingMode = SmoothingMode.AntiAlias;
|
|
|
graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
|
|
|
int actualLeftWidth = this.GetActualLeftWidth();
|
|
|
graphics.TranslateTransform((float)actualLeftWidth, (float)this.topHeadHeight);
|
|
|
graphics.Clip = new Region(new Rectangle(0, 0, base.Width - actualLeftWidth - this.rightWidth + 1, base.Height - this.topHeadHeight - this.scrollHeight + 1));
|
|
|
Font font = new Font(this.Font.FontFamily, 12f);
|
|
|
int num = (int)((float)(this.mouse_location.X + this.offsetPaintScrollX) / this.data_ScaleX_Render);
|
|
|
graphics.TranslateTransform((float)(-(float)this.offsetPaintScrollX), 0f);
|
|
|
for (int i = 0; i < this.markForeSectionsTmp.Count; i++)
|
|
|
{
|
|
|
this.DrawMarkForeSection(graphics, this.markForeSectionsTmp[i], font, false);
|
|
|
}
|
|
|
bool flag = this.m_IsMouseLeftDown && this.m_RowBetweenStart != -1;
|
|
|
if (flag)
|
|
|
{
|
|
|
bool flag2 = num < this.data_count;
|
|
|
if (flag2)
|
|
|
{
|
|
|
this.m_RowBetweenEnd = Convert.ToInt32((float)(this.mouse_location.X + this.offsetPaintScrollX) / this.data_ScaleX_Render);
|
|
|
this.m_RowBetweenHeight = this.mouse_location.Y;
|
|
|
}
|
|
|
}
|
|
|
HslMarkForeSection markForeSection = new HslMarkForeSection
|
|
|
{
|
|
|
StartIndex = this.m_RowBetweenStart,
|
|
|
EndIndex = this.m_RowBetweenEnd,
|
|
|
Height = (float)this.m_RowBetweenHeight,
|
|
|
StartHeight = (float)this.m_RowBetweenStartHeight,
|
|
|
LinePen = this.markLinePen,
|
|
|
FontBrush = this.markTextBrush
|
|
|
};
|
|
|
this.DrawMarkForeSection(graphics, markForeSection, font, false);
|
|
|
for (int j = 0; j < this.markForeActiveSections.Count; j++)
|
|
|
{
|
|
|
bool flag3 = this.IsPointInDataRegion(new Point(this.mouse_location.X + actualLeftWidth, this.mouse_location.Y + this.topHeadHeight)) && this.is_mouse_on_picture;
|
|
|
if (flag3)
|
|
|
{
|
|
|
bool flag4 = num >= this.markForeActiveSections[j].StartIndex && num <= this.markForeActiveSections[j].EndIndex;
|
|
|
if (flag4)
|
|
|
{
|
|
|
this.DrawMarkForeSection(graphics, this.markForeActiveSections[j], font, false);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
graphics.TranslateTransform((float)this.offsetPaintScrollX, 0f);
|
|
|
bool flag5 = this.is_mouse_on_picture && !this.isShowTextInfomation && this.markLineVisible;
|
|
|
if (flag5)
|
|
|
{
|
|
|
graphics.DrawLine(this.moveLinePen, this.mouse_location.X, 15, this.mouse_location.X, base.Height - this.topHeadHeight - this.buttomHeight - 18);
|
|
|
bool flag6 = this.isRenderYTip;
|
|
|
if (flag6)
|
|
|
{
|
|
|
graphics.DrawLine(this.moveLinePen, 0, this.mouse_location.Y, base.Width - this.rightWidth, this.mouse_location.Y);
|
|
|
}
|
|
|
bool flag7 = num >= this.data_count;
|
|
|
if (flag7)
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
bool flag8 = num < 0;
|
|
|
if (flag8)
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
int num2 = this.mouse_location.Y - this.data_dicts.Count * 20 - 20;
|
|
|
bool flag9 = num2 < 5;
|
|
|
if (flag9)
|
|
|
{
|
|
|
num2 = 5;
|
|
|
}
|
|
|
int num3 = this.mouse_location.X;
|
|
|
int num4 = this.data_tip_width;
|
|
|
int num5 = 0;
|
|
|
foreach (KeyValuePair<string, HslCurveItem> keyValuePair in this.data_dicts)
|
|
|
{
|
|
|
bool lineRenderVisiable = keyValuePair.Value.LineRenderVisiable;
|
|
|
if (lineRenderVisiable)
|
|
|
{
|
|
|
num5++;
|
|
|
}
|
|
|
bool flag10 = this.data_tip_width < 0;
|
|
|
if (flag10)
|
|
|
{
|
|
|
int num6 = (int)graphics.MeasureString(keyValuePair.Key, font).Width;
|
|
|
bool flag11 = num < keyValuePair.Value.Data.Length;
|
|
|
if (flag11)
|
|
|
{
|
|
|
num6 += (int)graphics.MeasureString(string.Format(keyValuePair.Value.RenderFormat, keyValuePair.Value.Data[num]), font).Width;
|
|
|
}
|
|
|
num6 += 25;
|
|
|
num4 = Math.Max(num4, num6);
|
|
|
}
|
|
|
}
|
|
|
bool flag12 = num3 + num4 + 20 > base.Width - this.rightWidth - actualLeftWidth;
|
|
|
if (flag12)
|
|
|
{
|
|
|
num3 = this.mouse_location.X - num4 - 10;
|
|
|
}
|
|
|
Rectangle rectangle = new Rectangle(num3 + 5, num2 - 5, num4, num5 * 20 + 10);
|
|
|
bool flag13 = num4 > 0;
|
|
|
if (flag13)
|
|
|
{
|
|
|
using (GraphicsPath roundRectange = HslHelper.GetRoundRectange(rectangle, 4, true, true, true, true))
|
|
|
{
|
|
|
graphics.FillPath(this.mouseHoverBackBrush, roundRectange);
|
|
|
graphics.DrawPath(this.markBorderPen, roundRectange);
|
|
|
}
|
|
|
foreach (KeyValuePair<string, HslCurveItem> keyValuePair2 in this.data_dicts)
|
|
|
{
|
|
|
bool lineRenderVisiable2 = keyValuePair2.Value.LineRenderVisiable;
|
|
|
if (lineRenderVisiable2)
|
|
|
{
|
|
|
Rectangle r = new Rectangle(rectangle.X + 3, num2, num4 - 6, 20);
|
|
|
graphics.DrawString(keyValuePair2.Key, font, this.markTextBrush, r, HslHelper.StringFormatLeft);
|
|
|
bool flag14 = num < keyValuePair2.Value.Data.Length;
|
|
|
if (flag14)
|
|
|
{
|
|
|
graphics.DrawString(string.Format(keyValuePair2.Value.RenderFormat, keyValuePair2.Value.Data[num]), font, this.markTextBrush, r, HslHelper.StringFormatRight);
|
|
|
}
|
|
|
num2 += 20;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
num2 = this.mouse_location.Y + 25;
|
|
|
for (int k = 0; k < this.markForeActiveSections.Count; k++)
|
|
|
{
|
|
|
bool flag15 = num >= this.markForeActiveSections[k].StartIndex && num <= this.markForeActiveSections[k].EndIndex;
|
|
|
if (flag15)
|
|
|
{
|
|
|
float num7 = 0f;
|
|
|
foreach (KeyValuePair<string, string> keyValuePair3 in this.markForeActiveSections[k].CursorTexts)
|
|
|
{
|
|
|
num7 += graphics.MeasureString(keyValuePair3.Key + " : " + keyValuePair3.Value, this.Font, 244).Height + 8f;
|
|
|
}
|
|
|
rectangle = new Rectangle(num3 + 5, num2 - 5, 250, (int)num7 + 10);
|
|
|
bool flag16 = num3 < this.mouse_location.X;
|
|
|
if (flag16)
|
|
|
{
|
|
|
rectangle.X = this.mouse_location.X - 250 - 10;
|
|
|
}
|
|
|
graphics.FillRectangle(this.mouseHoverBackBrush, rectangle);
|
|
|
graphics.DrawRectangle(this.markBorderPen, rectangle);
|
|
|
foreach (KeyValuePair<string, string> keyValuePair4 in this.markForeActiveSections[k].CursorTexts)
|
|
|
{
|
|
|
num7 = graphics.MeasureString(keyValuePair4.Key + " : " + keyValuePair4.Value, this.Font, 244).Height;
|
|
|
Rectangle r2 = new Rectangle(rectangle.X + 3, num2, 244, 200);
|
|
|
graphics.DrawString(keyValuePair4.Key + " : " + keyValuePair4.Value, font, Brushes.Yellow, r2, HslHelper.StringFormatDefault);
|
|
|
num2 += (int)num7 + 8;
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
Rectangle rectangle2 = new Rectangle(this.mouse_location.X - this.mouseHoverTimeWidth / 2, base.Height - this.topHeadHeight - this.buttomHeight - 18, this.mouseHoverTimeWidth, 17);
|
|
|
bool flag17 = rectangle2.X < 0;
|
|
|
if (flag17)
|
|
|
{
|
|
|
rectangle2.X = 0;
|
|
|
}
|
|
|
bool flag18 = rectangle2.X > base.Width - actualLeftWidth - this.rightWidth - this.mouseHoverTimeWidth - 1;
|
|
|
if (flag18)
|
|
|
{
|
|
|
rectangle2.X = base.Width - actualLeftWidth - this.rightWidth - this.mouseHoverTimeWidth - 1;
|
|
|
}
|
|
|
bool flag19 = this.buttomHeight > 20;
|
|
|
if (flag19)
|
|
|
{
|
|
|
rectangle2.Height += this.buttomHeight - 20;
|
|
|
}
|
|
|
bool flag20 = this.isRenderTimeData;
|
|
|
if (flag20)
|
|
|
{
|
|
|
bool flag21 = num < this.data_times.Count;
|
|
|
if (flag21)
|
|
|
{
|
|
|
graphics.FillRectangle(this.mouseHoverBackBrush, rectangle2);
|
|
|
graphics.DrawRectangle(this.markBorderPen, rectangle2);
|
|
|
graphics.DrawString(this.data_times[num].ToString(this.mouse_hover_time_formate, CultureInfo.InvariantCulture), this.Font, this.markTextBrush, rectangle2, HslHelper.StringFormatCenter);
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag22 = num < this.data_customer.Count;
|
|
|
if (flag22)
|
|
|
{
|
|
|
graphics.FillRectangle(this.mouseHoverBackBrush, rectangle2);
|
|
|
graphics.DrawRectangle(this.markBorderPen, rectangle2);
|
|
|
graphics.DrawString(this.data_customer[num], this.Font, this.markTextBrush, rectangle2, HslHelper.StringFormatCenter);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
font.Dispose();
|
|
|
graphics.TranslateTransform((float)(-(float)actualLeftWidth), (float)(-(float)this.topHeadHeight));
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增一段背景标识,用于隔离显示报警区段,特殊信息区段的数据
|
|
|
/// </summary>
|
|
|
/// <param name="markBackSection">背景标识层</param>
|
|
|
// Token: 0x06000394 RID: 916 RVA: 0x00028888 File Offset: 0x00026A88
|
|
|
public void AddMarkBackSection(HslMarkBackSection markBackSection)
|
|
|
{
|
|
|
this.markBackSections.Add(markBackSection);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 移除一个背景标识的内容,如果为null,则无效
|
|
|
/// </summary>
|
|
|
/// <param name="markBackSection">标记信息</param>
|
|
|
// Token: 0x06000395 RID: 917 RVA: 0x00028898 File Offset: 0x00026A98
|
|
|
public void RemoveMarkBackSection(HslMarkBackSection markBackSection)
|
|
|
{
|
|
|
this.markBackSections.Remove(markBackSection);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 移除所有的前置的辅助标记曲线区间
|
|
|
/// </summary>
|
|
|
// Token: 0x06000396 RID: 918 RVA: 0x000288A8 File Offset: 0x00026AA8
|
|
|
public void RemoveAllMarkBackSection()
|
|
|
{
|
|
|
this.markBackSections.Clear();
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增一段辅助标记区间的信息,将会绘制在背景图层。
|
|
|
/// </summary>
|
|
|
/// <param name="markForeSection">标记信息</param>
|
|
|
// Token: 0x06000397 RID: 919 RVA: 0x000288B7 File Offset: 0x00026AB7
|
|
|
public void AddMarkForeSection(HslMarkForeSection markForeSection)
|
|
|
{
|
|
|
this.markForeSections.Add(markForeSection);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 移除一段辅助标记区间的信息,如果为null,则无效
|
|
|
/// </summary>
|
|
|
/// <param name="markForeSection">标记信息</param>
|
|
|
// Token: 0x06000398 RID: 920 RVA: 0x000288C7 File Offset: 0x00026AC7
|
|
|
public void RemoveMarkForeSection(HslMarkForeSection markForeSection)
|
|
|
{
|
|
|
this.markForeSections.Remove(markForeSection);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 移除所有的前置的辅助标记曲线区间
|
|
|
/// </summary>
|
|
|
// Token: 0x06000399 RID: 921 RVA: 0x000288D7 File Offset: 0x00026AD7
|
|
|
public void RemoveAllMarkForeSection()
|
|
|
{
|
|
|
this.markForeSections.Clear();
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 移除所有的因为鼠标手动选择的辅助标记曲线区间
|
|
|
/// </summary>
|
|
|
// Token: 0x0600039A RID: 922 RVA: 0x000288E6 File Offset: 0x00026AE6
|
|
|
public void RemoveAllMarkMouseSection()
|
|
|
{
|
|
|
this.markForeSectionsTmp.Clear();
|
|
|
this.m_RowBetweenStart = -1;
|
|
|
this.m_RowBetweenEnd = -1;
|
|
|
this.m_RowBetweenHeight = -1;
|
|
|
this.m_RowBetweenStartHeight = -1;
|
|
|
this.HslInvalidate();
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 新增一段辅助标记的区间信息,将在鼠标光标移动的时候显示出数据信息,可用来标记一个产品的额外的信息内容,比如条码,生产信息
|
|
|
/// </summary>
|
|
|
/// <param name="markActiveSection">额外的活动的内容</param>
|
|
|
// Token: 0x0600039B RID: 923 RVA: 0x00028918 File Offset: 0x00026B18
|
|
|
public void AddMarkActiveSection(HslMarkForeSection markActiveSection)
|
|
|
{
|
|
|
this.markForeActiveSections.Add(markActiveSection);
|
|
|
}
|
|
|
|
|
|
// Token: 0x0600039C RID: 924 RVA: 0x00028928 File Offset: 0x00026B28
|
|
|
private void DrawMarkForeSection(Graphics g, HslMarkForeSection markForeSection, Font font, bool paintMain = false)
|
|
|
{
|
|
|
bool flag = markForeSection != null;
|
|
|
if (flag)
|
|
|
{
|
|
|
float num;
|
|
|
if (paintMain)
|
|
|
{
|
|
|
num = ((markForeSection.Height > 1f) ? markForeSection.Height : ((float)(base.Height - this.topHeadHeight - this.buttomHeight - 40) * this.data_ScaleY_Render * markForeSection.Height));
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
num = ((markForeSection.Height > 1f) ? markForeSection.Height : ((float)(base.Height - this.topHeadHeight - this.buttomHeight - 40) * markForeSection.Height + 20f));
|
|
|
}
|
|
|
float num2;
|
|
|
if (paintMain)
|
|
|
{
|
|
|
num2 = ((markForeSection.StartHeight > 1f) ? markForeSection.StartHeight : ((float)(base.Height - this.topHeadHeight - this.buttomHeight - 40) * this.data_ScaleY_Render * markForeSection.StartHeight));
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
num2 = ((markForeSection.StartHeight > 1f) ? markForeSection.StartHeight : ((float)(base.Height - this.topHeadHeight - this.buttomHeight - 40) * markForeSection.StartHeight + 20f));
|
|
|
}
|
|
|
bool flag2 = markForeSection.StartIndex != -1 && markForeSection.EndIndex != -1 && markForeSection.EndIndex > markForeSection.StartIndex && num2 < num;
|
|
|
if (flag2)
|
|
|
{
|
|
|
int num3 = Convert.ToInt32((float)markForeSection.StartIndex * this.data_ScaleX_Render);
|
|
|
int num4 = Convert.ToInt32((float)markForeSection.EndIndex * this.data_ScaleX_Render);
|
|
|
bool flag3 = markForeSection.StartIndex < this.data_count && markForeSection.EndIndex < this.data_count && markForeSection.StartIndex < this.data_times.Count && markForeSection.EndIndex < this.data_times.Count;
|
|
|
if (flag3)
|
|
|
{
|
|
|
g.DrawLine(markForeSection.LinePen, new PointF((float)num3, num2), new PointF((float)num3, num + 30f));
|
|
|
g.DrawLine(markForeSection.LinePen, new PointF((float)num4, num2), new PointF((float)num4, num + 30f));
|
|
|
int num5 = markForeSection.IsRenderTimeText ? 20 : 0;
|
|
|
int num6 = (num4 - num3 > 100) ? num5 : 110;
|
|
|
int num7 = num4 - num3;
|
|
|
g.DrawLine(markForeSection.LinePen, new PointF((float)(num3 - num6), num), new PointF((float)(num4 + num5), num));
|
|
|
g.DrawLines(markForeSection.LinePen, new PointF[]
|
|
|
{
|
|
|
new PointF((float)(num3 + 20), num + 10f),
|
|
|
new PointF((float)num3, num),
|
|
|
new PointF((float)(num3 + 20), num - 10f)
|
|
|
});
|
|
|
g.DrawLines(markForeSection.LinePen, new PointF[]
|
|
|
{
|
|
|
new PointF((float)(num4 - 20), num - 10f),
|
|
|
new PointF((float)num4, num),
|
|
|
new PointF((float)(num4 - 20), num + 10f)
|
|
|
});
|
|
|
TimeSpan timeSpan = this.data_times[markForeSection.EndIndex] - this.data_times[markForeSection.StartIndex];
|
|
|
string s = string.Empty;
|
|
|
bool flag4 = timeSpan.TotalMinutes > 2.0;
|
|
|
if (flag4)
|
|
|
{
|
|
|
s = timeSpan.TotalMinutes.ToString("F1") + " 分钟";
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
bool flag5 = timeSpan.TotalSeconds > 1.0;
|
|
|
if (flag5)
|
|
|
{
|
|
|
s = timeSpan.TotalSeconds.ToString("F1") + " 秒";
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
s = ((int)timeSpan.TotalMilliseconds).ToString() + " 毫秒";
|
|
|
}
|
|
|
}
|
|
|
bool flag6 = num4 - num3 <= 100;
|
|
|
if (flag6)
|
|
|
{
|
|
|
g.DrawString(s, font, markForeSection.FontBrush, new PointF((float)(num3 - 100), num - 17f));
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
g.DrawString(s, font, markForeSection.FontBrush, new RectangleF((float)num3, num - (float)font.Height - 2f, (float)(num4 - num3), (float)font.Height), HslHelper.StringFormatCenter);
|
|
|
}
|
|
|
bool flag7 = !string.IsNullOrEmpty(markForeSection.MarkText);
|
|
|
if (flag7)
|
|
|
{
|
|
|
g.DrawString(markForeSection.MarkText, font, markForeSection.FontBrush, new RectangleF((float)num3, num + 3f, (float)(num4 - num3), (float)font.Height), HslHelper.StringFormatCenter);
|
|
|
}
|
|
|
bool isRenderTimeText = markForeSection.IsRenderTimeText;
|
|
|
if (isRenderTimeText)
|
|
|
{
|
|
|
g.DrawString("开始 " + this.data_times[markForeSection.StartIndex].ToString(this.mouse_hover_time_formate), font, markForeSection.FontBrush, new PointF((float)(num4 + 5), num - 17f));
|
|
|
g.DrawString("结束 " + this.data_times[markForeSection.EndIndex].ToString(this.mouse_hover_time_formate), font, markForeSection.FontBrush, new PointF((float)(num4 + 5), num + 2f));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 将当前的图形曲线保存为图片内容,可用于存储本地的文件,或是打印到纸张,默认大小为控件的大小
|
|
|
/// </summary>
|
|
|
/// <param name="isCurrentRegion">可以选择是否输出当前的界面内容还是全部图像,默认为全部界面</param>
|
|
|
/// <returns>图片内容</returns>
|
|
|
// Token: 0x0600039D RID: 925 RVA: 0x00028E5C File Offset: 0x0002705C
|
|
|
public Bitmap SaveToBitmap(bool isCurrentRegion = false)
|
|
|
{
|
|
|
int actualLeftWidth = this.GetActualLeftWidth();
|
|
|
bool flag = this.isShowTextInfomation;
|
|
|
Bitmap result;
|
|
|
if (flag)
|
|
|
{
|
|
|
Bitmap bitmap = new Bitmap(base.Width, base.Height);
|
|
|
Graphics graphics = Graphics.FromImage(bitmap);
|
|
|
graphics.SmoothingMode = SmoothingMode.AntiAlias;
|
|
|
graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
|
|
|
graphics.Clear(this.backColor);
|
|
|
this.PaintMain(graphics, base.Width, base.Height);
|
|
|
graphics.TranslateTransform((float)actualLeftWidth, (float)this.topHeadHeight);
|
|
|
this.PaintFromString(graphics, this.Text);
|
|
|
graphics.TranslateTransform((float)(-(float)actualLeftWidth), (float)(-(float)this.topHeadHeight));
|
|
|
graphics.Dispose();
|
|
|
result = bitmap;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
int num = (int)((float)this.data_count * this.data_ScaleX_Render) + this.rightRemainWidth;
|
|
|
bool flag2 = num < base.Width - actualLeftWidth - this.rightWidth;
|
|
|
if (flag2)
|
|
|
{
|
|
|
num = base.Width - actualLeftWidth - this.rightWidth;
|
|
|
}
|
|
|
int num2 = base.Height - this.topHeadHeight - this.buttomHeight;
|
|
|
Bitmap bitmap2 = new Bitmap(isCurrentRegion ? base.Width : (num + actualLeftWidth + this.rightWidth), base.Height);
|
|
|
Graphics graphics2 = Graphics.FromImage(bitmap2);
|
|
|
graphics2.SmoothingMode = SmoothingMode.AntiAlias;
|
|
|
graphics2.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
|
|
|
graphics2.Clear(this.backColor);
|
|
|
this.PaintMain(graphics2, bitmap2.Width, bitmap2.Height);
|
|
|
if (isCurrentRegion)
|
|
|
{
|
|
|
this.PictureBox3_Paint(this, new PaintEventArgs(graphics2, new Rectangle(0, 0, bitmap2.Width, bitmap2.Height)));
|
|
|
}
|
|
|
graphics2.Dispose();
|
|
|
result = bitmap2;
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 清理所有正在使用的资源。
|
|
|
/// </summary>
|
|
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
|
|
// Token: 0x0600039E RID: 926 RVA: 0x00029000 File Offset: 0x00027200
|
|
|
protected override void Dispose(bool disposing)
|
|
|
{
|
|
|
bool flag = disposing && this.components != null;
|
|
|
if (flag)
|
|
|
{
|
|
|
this.components.Dispose();
|
|
|
}
|
|
|
base.Dispose(disposing);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 设计器支持所需的方法 - 不要修改
|
|
|
/// 使用代码编辑器修改此方法的内容。
|
|
|
/// </summary>
|
|
|
// Token: 0x0600039F RID: 927 RVA: 0x00029038 File Offset: 0x00027238
|
|
|
private void InitializeComponent()
|
|
|
{
|
|
|
base.SuspendLayout();
|
|
|
base.AutoScaleMode = AutoScaleMode.None;
|
|
|
this.BackColor = Color.FromArgb(46, 46, 46);
|
|
|
base.Name = "HslCurveHistory";
|
|
|
base.Size = new Size(852, 478);
|
|
|
base.ResumeLayout(false);
|
|
|
}
|
|
|
|
|
|
// Token: 0x04000167 RID: 359
|
|
|
private int paintCount = 0;
|
|
|
|
|
|
// Token: 0x0400016F RID: 367
|
|
|
private List<AuxiliaryLable> auxiliary_Labels;
|
|
|
|
|
|
// Token: 0x04000170 RID: 368
|
|
|
private List<HslMarkLine> hslMarkLines;
|
|
|
|
|
|
// Token: 0x04000171 RID: 369
|
|
|
private List<HslMarkText> hslMarkTexts;
|
|
|
|
|
|
// Token: 0x04000172 RID: 370
|
|
|
private List<HslMarkImage> hslMarkImages;
|
|
|
|
|
|
// Token: 0x04000173 RID: 371
|
|
|
private Dictionary<string, HslCurveItem> data_dicts = null;
|
|
|
|
|
|
// Token: 0x04000174 RID: 372
|
|
|
private List<HslCurveItem> data_lists = null;
|
|
|
|
|
|
// Token: 0x04000175 RID: 373
|
|
|
private List<DateTime> data_times = null;
|
|
|
|
|
|
// Token: 0x04000176 RID: 374
|
|
|
private List<string> data_customer = null;
|
|
|
|
|
|
// Token: 0x04000177 RID: 375
|
|
|
private List<AuxiliaryLine> auxiliary_lines;
|
|
|
|
|
|
// Token: 0x04000178 RID: 376
|
|
|
private float data_ScaleX_Render = 1f;
|
|
|
|
|
|
// Token: 0x04000179 RID: 377
|
|
|
private float[] scale_x_options = new float[]
|
|
|
{
|
|
|
0.0625f,
|
|
|
0.125f,
|
|
|
0.25f,
|
|
|
0.5f,
|
|
|
1f,
|
|
|
2f,
|
|
|
4f,
|
|
|
8f,
|
|
|
16f,
|
|
|
32f
|
|
|
};
|
|
|
|
|
|
// Token: 0x0400017A RID: 378
|
|
|
private int scale_x_index = 4;
|
|
|
|
|
|
// Token: 0x0400017B RID: 379
|
|
|
private float data_ScaleY_Render = 1f;
|
|
|
|
|
|
// Token: 0x0400017C RID: 380
|
|
|
private float[] scale_y_options = new float[]
|
|
|
{
|
|
|
1f,
|
|
|
2f,
|
|
|
4f,
|
|
|
8f,
|
|
|
16f,
|
|
|
32f
|
|
|
};
|
|
|
|
|
|
// Token: 0x0400017D RID: 381
|
|
|
private int scale_y_index = 0;
|
|
|
|
|
|
// Token: 0x0400017E RID: 382
|
|
|
private int data_count = 0;
|
|
|
|
|
|
// Token: 0x0400017F RID: 383
|
|
|
private string data_time_formate = "yyyy-MM-dd HH:mm:ss";
|
|
|
|
|
|
// Token: 0x04000180 RID: 384
|
|
|
private string mouse_hover_time_formate = "HH:mm:ss";
|
|
|
|
|
|
// Token: 0x04000181 RID: 385
|
|
|
private Point mouse_scroll_location = new Point(-1, -1);
|
|
|
|
|
|
// Token: 0x04000182 RID: 386
|
|
|
private bool is_mouse_click_scroll = false;
|
|
|
|
|
|
// Token: 0x04000183 RID: 387
|
|
|
private bool is_mouse_on_picture = false;
|
|
|
|
|
|
// Token: 0x04000184 RID: 388
|
|
|
private Point mouse_location = new Point(-1, -1);
|
|
|
|
|
|
// Token: 0x04000185 RID: 389
|
|
|
private int m_RowBetweenStart = -1;
|
|
|
|
|
|
// Token: 0x04000186 RID: 390
|
|
|
private int m_RowBetweenEnd = -1;
|
|
|
|
|
|
// Token: 0x04000187 RID: 391
|
|
|
private int m_RowBetweenStartHeight = -1;
|
|
|
|
|
|
// Token: 0x04000188 RID: 392
|
|
|
private int m_RowBetweenHeight = -1;
|
|
|
|
|
|
// Token: 0x04000189 RID: 393
|
|
|
private bool m_IsMouseLeftDown = false;
|
|
|
|
|
|
// Token: 0x0400018A RID: 394
|
|
|
private bool m_IsMouseMiddleDown = false;
|
|
|
|
|
|
// Token: 0x0400018B RID: 395
|
|
|
private Point mouse_right_location = new Point(-1, -1);
|
|
|
|
|
|
// Token: 0x0400018C RID: 396
|
|
|
private List<HslMarkBackSection> markBackSections = null;
|
|
|
|
|
|
// Token: 0x0400018D RID: 397
|
|
|
private List<HslMarkForeSection> markForeSections = null;
|
|
|
|
|
|
// Token: 0x0400018E RID: 398
|
|
|
private List<HslMarkForeSection> markForeSectionsTmp = null;
|
|
|
|
|
|
// Token: 0x0400018F RID: 399
|
|
|
private List<HslMarkForeSection> markForeActiveSections = null;
|
|
|
|
|
|
// Token: 0x04000190 RID: 400
|
|
|
private Color backColor = Color.White;
|
|
|
|
|
|
// Token: 0x04000191 RID: 401
|
|
|
private Random random = null;
|
|
|
|
|
|
// Token: 0x04000192 RID: 402
|
|
|
private Color coordinateColor = Color.LightGray;
|
|
|
|
|
|
// Token: 0x04000193 RID: 403
|
|
|
private Brush coordinateBrush = new SolidBrush(Color.LightGray);
|
|
|
|
|
|
// Token: 0x04000194 RID: 404
|
|
|
private Pen coordinatePen = new Pen(Color.LightGray);
|
|
|
|
|
|
// Token: 0x04000195 RID: 405
|
|
|
private Color coordinateDashColor = Color.FromArgb(72, 72, 72);
|
|
|
|
|
|
// Token: 0x04000196 RID: 406
|
|
|
private Pen coordinateDashPen = null;
|
|
|
|
|
|
// Token: 0x04000197 RID: 407
|
|
|
private Color markLineColor = Color.Cyan;
|
|
|
|
|
|
// Token: 0x04000198 RID: 408
|
|
|
private Pen markLinePen = new Pen(Color.Cyan);
|
|
|
|
|
|
// Token: 0x04000199 RID: 409
|
|
|
private Color markTextColor = Color.Yellow;
|
|
|
|
|
|
// Token: 0x0400019A RID: 410
|
|
|
private Brush markTextBrush = new SolidBrush(Color.Yellow);
|
|
|
|
|
|
// Token: 0x0400019B RID: 411
|
|
|
private Color moveLineColor = Color.White;
|
|
|
|
|
|
// Token: 0x0400019C RID: 412
|
|
|
private Pen moveLinePen = new Pen(Color.White);
|
|
|
|
|
|
// Token: 0x0400019D RID: 413
|
|
|
private int data_tip_width = -1;
|
|
|
|
|
|
// Token: 0x0400019E RID: 414
|
|
|
private int curveNameWidth = 150;
|
|
|
|
|
|
// Token: 0x0400019F RID: 415
|
|
|
private int value_IntervalAbscissaText = 200;
|
|
|
|
|
|
// Token: 0x040001A0 RID: 416
|
|
|
private Brush mouseHoverBackBrush = new SolidBrush(Color.FromArgb(220, Color.FromArgb(52, 52, 52)));
|
|
|
|
|
|
// Token: 0x040001A1 RID: 417
|
|
|
private Color hoverBackColor = Color.FromArgb(52, 52, 52);
|
|
|
|
|
|
// Token: 0x040001A2 RID: 418
|
|
|
private Color markBorderColor = Color.HotPink;
|
|
|
|
|
|
// Token: 0x040001A3 RID: 419
|
|
|
private Pen markBorderPen = new Pen(Color.HotPink);
|
|
|
|
|
|
// Token: 0x040001A4 RID: 420
|
|
|
private ReferenceAxis referenceAxisLeft;
|
|
|
|
|
|
// Token: 0x040001A5 RID: 421
|
|
|
private ReferenceAxis referenceAxisRight;
|
|
|
|
|
|
// Token: 0x040001A6 RID: 422
|
|
|
private bool isOtherAxisHide = false;
|
|
|
|
|
|
// Token: 0x040001A7 RID: 423
|
|
|
private int leftWidth = 50;
|
|
|
|
|
|
// Token: 0x040001A8 RID: 424
|
|
|
private int rightWidth = 50;
|
|
|
|
|
|
// Token: 0x040001A9 RID: 425
|
|
|
private int mouseHoverTimeWidth = 100;
|
|
|
|
|
|
// Token: 0x040001AA RID: 426
|
|
|
private int topHeadHeight = 30;
|
|
|
|
|
|
// Token: 0x040001AB RID: 427
|
|
|
private int buttomHeight = 20;
|
|
|
|
|
|
// Token: 0x040001AC RID: 428
|
|
|
private int scrollHeight = 15;
|
|
|
|
|
|
// Token: 0x040001AD RID: 429
|
|
|
private int scrollX = 0;
|
|
|
|
|
|
// Token: 0x040001AE RID: 430
|
|
|
private int scrollMaxX = 0;
|
|
|
|
|
|
// Token: 0x040001AF RID: 431
|
|
|
private int scrollWidth = 10;
|
|
|
|
|
|
/// <summary>
|
|
|
/// 横向绘制偏移的X坐标信息
|
|
|
/// </summary>
|
|
|
// Token: 0x040001B0 RID: 432
|
|
|
private int offsetPaintScrollX = 0;
|
|
|
|
|
|
/// <summary>
|
|
|
/// 横向绘制偏移的Y坐标信息
|
|
|
/// </summary>
|
|
|
// Token: 0x040001B1 RID: 433
|
|
|
private int offsetPaintScrollY = 0;
|
|
|
|
|
|
// Token: 0x040001B2 RID: 434
|
|
|
private Rectangle scrollRectage = new Rectangle(0, 0, 0, 0);
|
|
|
|
|
|
// Token: 0x040001B3 RID: 435
|
|
|
private Rectangle scrollRectageBack = new Rectangle(0, 0, 0, 0);
|
|
|
|
|
|
// Token: 0x040001B4 RID: 436
|
|
|
private Color scrollColor = Color.DimGray;
|
|
|
|
|
|
// Token: 0x040001B5 RID: 437
|
|
|
private ScaleMode scaleMode = ScaleMode.OnlyX;
|
|
|
|
|
|
// Token: 0x040001B6 RID: 438
|
|
|
private bool renderInvertedTriangle = true;
|
|
|
|
|
|
// Token: 0x040001B7 RID: 439
|
|
|
private bool renderScaleInfo = true;
|
|
|
|
|
|
// Token: 0x040001B8 RID: 440
|
|
|
private int rightRemainWidth = 200;
|
|
|
|
|
|
// Token: 0x040001B9 RID: 441
|
|
|
private bool markLineVisible = true;
|
|
|
|
|
|
// Token: 0x040001BA RID: 442
|
|
|
private int value_Segment = 5;
|
|
|
|
|
|
// Token: 0x040001BB RID: 443
|
|
|
private int pointsRadius = -1;
|
|
|
|
|
|
// Token: 0x040001BC RID: 444
|
|
|
private bool isShowTextInfomation = true;
|
|
|
|
|
|
// Token: 0x040001BD RID: 445
|
|
|
private bool isRederRightCoordinate = true;
|
|
|
|
|
|
// Token: 0x040001BE RID: 446
|
|
|
private bool isAllowSelectSection = true;
|
|
|
|
|
|
// Token: 0x040001BF RID: 447
|
|
|
private bool isRenderTimeData = false;
|
|
|
|
|
|
// Token: 0x040001C0 RID: 448
|
|
|
private bool isMouseFreeze = false;
|
|
|
|
|
|
// Token: 0x040001C1 RID: 449
|
|
|
private bool isAoordinateRoundInt = false;
|
|
|
|
|
|
// Token: 0x040001C2 RID: 450
|
|
|
private HslCurveHistory syncHslCurveHistory;
|
|
|
|
|
|
// Token: 0x040001C3 RID: 451
|
|
|
private ReferenceAxisCollection referenceAxes;
|
|
|
|
|
|
// Token: 0x040001C4 RID: 452
|
|
|
private bool isRenderYTip = true;
|
|
|
|
|
|
/// <summary>
|
|
|
/// 必需的设计器变量。
|
|
|
/// </summary>
|
|
|
// Token: 0x040001C5 RID: 453
|
|
|
private IContainer components = null;
|
|
|
|
|
|
/// <summary>
|
|
|
/// 基于时间的曲线双击的委托方法
|
|
|
/// </summary>
|
|
|
/// <param name="hslCurve">曲线控件信息</param>
|
|
|
/// <param name="index">数据的索引</param>
|
|
|
/// <param name="dateTime">时间信息</param>
|
|
|
// Token: 0x020000F1 RID: 241
|
|
|
// (Invoke) Token: 0x06000F68 RID: 3944
|
|
|
public delegate void CurveDoubleClick(HslCurveHistory hslCurve, int index, DateTime dateTime);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 基于用户自定义的字符串的曲线双击的委托方法
|
|
|
/// </summary>
|
|
|
/// <param name="hslCurve">曲线控件信息</param>
|
|
|
/// <param name="index">数据的索引</param>
|
|
|
/// <param name="customer">时间信息</param>
|
|
|
// Token: 0x020000F2 RID: 242
|
|
|
// (Invoke) Token: 0x06000F6C RID: 3948
|
|
|
public delegate void CurveCustomerDoubleClick(HslCurveHistory hslCurve, int index, string customer);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 当鼠标在曲线上移动的时候触发的委托方法
|
|
|
/// </summary>
|
|
|
/// <param name="hslCurve">曲线控件信息</param>
|
|
|
/// <param name="x">横坐标x</param>
|
|
|
/// <param name="y">横坐标y</param>
|
|
|
// Token: 0x020000F3 RID: 243
|
|
|
// (Invoke) Token: 0x06000F70 RID: 3952
|
|
|
public delegate void CurveMouseMove(HslCurveHistory hslCurve, int x, int y);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 曲线的区间的委托签名
|
|
|
/// </summary>
|
|
|
/// <param name="hslCurve">曲线控件信息</param>
|
|
|
/// <param name="markForeSection">传出</param>
|
|
|
// Token: 0x020000F4 RID: 244
|
|
|
// (Invoke) Token: 0x06000F74 RID: 3956
|
|
|
public delegate void CurveRangeSelect(HslCurveHistory hslCurve, HslMarkForeSection markForeSection);
|
|
|
|
|
|
/// <summary>
|
|
|
/// 曲线的放大缩小倍数变化的委托签名
|
|
|
/// </summary>
|
|
|
/// <param name="hslCurve">曲线控件信息</param>
|
|
|
/// <param name="scrollX">缩放信息</param>
|
|
|
/// <param name="offsetPaintScrollX">显示偏移信息</param>
|
|
|
/// <param name="scale">方法缩小系数</param>
|
|
|
// Token: 0x020000F5 RID: 245
|
|
|
// (Invoke) Token: 0x06000F78 RID: 3960
|
|
|
public delegate void CurveScollScaleChanged(HslCurveHistory hslCurve, int scrollX, float scale, int offsetPaintScrollX);
|
|
|
}
|
|
|
} |