public override void LeftButtonDrag(Pane pane, PointF location, PointF locationStart, float pixelSize, ref bool displayUpdateNeeded) { Debug.Assert(pane == Pane.Map); // Get the new set of gaps. CircleGap[] newGaps = CircleGap.AddGap(courseObjStart.location, courseObjStart.gaps, startDrag, location); CircleGap[] newMovableGaps = CircleGap.AddGap(courseObjStart.location, courseObjStart.movableGaps, startDrag, location); // Put the new gaps into the highlight. courseObjDrag = (PointCourseObj)courseObjStart.Clone(); courseObjDrag.gaps = newGaps; courseObjDrag.movableGaps = newMovableGaps; displayUpdateNeeded = true; }
public AddControlGapMode(Controller controller, PointCourseObj courseObj) { this.controller = controller; this.courseObjStart = (PointCourseObj)courseObj.Clone(); this.courseObjDrag = (PointCourseObj)courseObj.Clone(); }
PointCourseObj courseObj; // object to modify. public RemoveControlGapMode(Controller controller, PointCourseObj courseObj) { this.controller = controller; this.courseObj = (PointCourseObj)courseObj.Clone(); }