private void c1Chart1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            if (moving)
            {
                double x = 0, y = 0;
                if (trendChart.ChartGroups[0].CoordToDataCoord(e.X, e.Y, ref x, ref y))
                {
                    if (y > 100)
                    {
                        y = 100;
                    }
                    else if (y < 0)
                    {
                        y = 0;
                    }

                    trendChart.ChartGroups[0].ChartData[move_si].X[move_pi] = x;
                    trendChart.ChartGroups[0].ChartData[move_si].Y[move_pi] = y;
                    CalculateErrors();
                }

                trendChart.Cursor = Cursors.Default;
                moving            = false;

                if (!prev.IsEmpty)
                {
                    Point pt1 = trendChart.PointToScreen(move_pt);
                    ControlPaint.DrawReversibleLine(pt1, prev, trendChart.ChartArea.PlotArea.BackColor);
                    prev = Point.Empty;
                }
            }
        }
 private void RedrawChart()
 {
     if (!curPosition.IsEmpty)
     {
         Point pt = c1Chart1.PointToScreen(curPosition);
         ControlPaint.DrawReversibleLine(new Point(pt.X - 10, pt.Y), new Point(pt.X + 10, pt.Y), c1Chart1.ChartArea.PlotArea.BackColor);
         ControlPaint.DrawReversibleLine(new Point(pt.X, pt.Y - 10), new Point(pt.X, pt.Y + 10), c1Chart1.ChartArea.PlotArea.BackColor);
     }
 }