ProjectsForTest/WinForm.NET5TeeChart-NET-Pro-Samples/Tools/Tool_Cursor.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace Steema.TeeChart.Samples
{
public class Tool_Cursor : Samples.BaseForm
{
private Steema.TeeChart.Styles.Line lineSeries1;
private Steema.TeeChart.Styles.Line lineSeries2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.CheckBox checkBox2;
private System.Windows.Forms.Button button1;
private Steema.TeeChart.Axis axis1;
private Steema.TeeChart.Tools.CursorTool cursorTool1;
private Steema.TeeChart.Tools.CursorTool cursorTool2;
private System.ComponentModel.IContainer components = null;
private bool flag;
public Tool_Cursor()
{
// This call is required by the Windows Form Designer.
InitializeComponent();
this.lineSeries1.FillSampleValues(100);
this.lineSeries2.FillSampleValues(100);
this.tChart1.Axes.Left.AutomaticMinimum = false;
this.tChart1.Axes.Left.Minimum = 0.0;
this.lineSeries2.CustomVertAxis = this.axis1;
this.tChart1.BeforeDrawSeries += new PaintChartEventHandler(tChart1_BeforeDrawSeries);
flag = true;
this.cursorTool1.Pen.Color = Color.Navy;
this.cursorTool1.Pen.Style = Drawing.DashStyle.Dash;
this.cursorTool1.Pen.Width = 2;
this.cursorTool2.Pen.Color = Color.Plum;
this.cursorTool2.Pen.Style = Drawing.DashStyle.Dot;
this.cursorTool2.Pen.Width = 2;
}
void tChart1_BeforeDrawSeries(object sender, Steema.TeeChart.Drawing.IGraphics3D g)
{
if (flag)
{
// place upper series cursor in the middle
this.cursorTool1.XValue = 0.5 * (this.lineSeries1.XValues.Maximum + this.lineSeries1.XValues.Minimum);
flag = false;
}
}
/// <summary>
/// Clean up any resources being used.
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。