public void ChooseTheWayToEnd(MouseEventArgs e) { Shape theLastShape = listShapes[listShapes.Count - 1]; if (status == Status.Curve) { if (isCurve) { if (isSecondClickCurve) { theLastShape.ListPoints[2] = e.Location; isSecondClickCurve = false; isCurve = false; } else { theLastShape.ListPoints[1] = e.Location; theLastShape.ListPoints[2] = theLastShape.ListPoints[3]; isSecondClickCurve = true; } } else { theLastShape.ListPoints[3] = e.Location; isCurve = true; } } else { theLastShape.ListPoints[theLastShape.ListPoints.Count - 1] = e.Location; } theLastShape.DistaceWithCenter(); }