Esempio n. 1
0
        private void chart1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            HitTestResult hitResult = chart1.HitTest(e.X, e.Y);

            if (e.Button == MouseButtons.Right)
            {
                if (hitResult.ChartElementType == ChartElementType.DataPoint)
                {
                    DataPoint selected = (DataPoint)hitResult.Object;
                    if (chart1.Series["OpacityFunction"].Points.Contains(selected))
                    {
                        chart1.Series["OpacityFunction"].Points.Remove(selected);
                        //------
                        //chart1.Series["OpacityFunction"].Points.AddXY(selected.XValue, selected.YValues[0]);
                        List <DataPoint> points = chart1.Series["OpacityFunction"].Points.ToList <DataPoint>();
                        //points.Remove(points.Find(x => x.XValue == pX & x.YValues[0] == pY));
                        points.Sort(new Comparison <DataPoint>(Compare));
                        _vizualization3D.ChangeSplineAndPointFunction(points);

                        if (bigFourthWindow.RenderWindow != null)
                        {
                            bigFourthWindow.RenderWindow.Render();
                        }
                    }
                }
            }
        }