ProjectsForTest/WinForm.NET5TeeChart-NET-Pro-Samples/Tools/Tool_CursorSynchro.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_CursorSynchro : Steema.TeeChart.Samples.BaseNoChart
	{
		private Steema.TeeChart.TChart tChart1;
		private Steema.TeeChart.Styles.Line lineSeries1;
		private System.Windows.Forms.CheckBox checkBox1;
		private Steema.TeeChart.Tools.CursorTool cursorSRC;
		private Steema.TeeChart.TChart tChart2;
		private Steema.TeeChart.Styles.Line lineSeries2;
		private Steema.TeeChart.Tools.CursorTool cursorDEST;
		private System.Windows.Forms.CheckBox checkBox2;
		private System.Windows.Forms.Label label1;
		private System.ComponentModel.IContainer components = null;


		/// <summary>
		/// This procedure synchronizes two cursors.
		/// "SRC" is the original cursor, and "DEST" the cursor
		/// that is re-positioned.
		/// </summary>
		private void CursorSynchronize(Steema.TeeChart.Tools.CursorTool SRC, Steema.TeeChart.Tools.CursorTool DEST)
		{
			/* DEST.Chart.AutoRepaint = false; // stop repainting
				TODO: DEST.RedrawCursor();   // hide cursor
			*/

			DEST.XValue = SRC.XValue;
			DEST.YValue = SRC.YValue;

			/* TODO: DEST.RedrawCursor();   // draw cursor again
			DEST.Chart.AutoRepaint = true; // enable repainting
			*/
		}

		private void ShowXY(double X, double Y)
		{
			this.label1.Text = X.ToString("#.00") + "   " + Y.ToString("#.00");
		}

		public Tool_CursorSynchro()
		{
			// This call is required by the Windows Form Designer.
			InitializeComponent();
			
			this.lineSeries1.FillSampleValues(1000);
			this.lineSeries2.DataSource = this.lineSeries1;

			// Setup cursors
			this.cursorSRC.FollowMouse = true;
			this.cursorSRC.Series = this.lineSeries1;
			this.cursorSRC.XValue = 500;

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。