下面显示的相应 MouseDown 事件的等效 vb.net 代码是什么(C#)?我应该如何在 vb.net 中实现这个事件?
提前谢谢你,Goicox
var model = new PlotModel("MouseDown HitTestResult", "Reports the index of the nearest point.");
var s1 = new LineSeries();
s1.Points.Add(new DataPoint(0, 10));
s1.Points.Add(new DataPoint(10, 40));
s1.Points.Add(new DataPoint(40, 20));
s1.Points.Add(new DataPoint(60, 30));
model.Series.Add(s1);
s1.MouseDown += (s, e) =>
{
model.Subtitle = "Index of nearest point in LineSeries: " + Math.Round(e.HitTestResult.Index);
model.InvalidatePlot(false);
};