コード例 #1
0
        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;
        }
コード例 #2
0
 public AddControlGapMode(Controller controller, PointCourseObj courseObj)
 {
     this.controller     = controller;
     this.courseObjStart = (PointCourseObj)courseObj.Clone();
     this.courseObjDrag  = (PointCourseObj)courseObj.Clone();
 }
コード例 #3
0
        PointCourseObj courseObj;            // object to modify.

        public RemoveControlGapMode(Controller controller, PointCourseObj courseObj)
        {
            this.controller = controller;
            this.courseObj  = (PointCourseObj)courseObj.Clone();
        }