Exemplo n.º 1
0
 public override void LeftButtonDrag(Pane pane, PointF location, PointF locationStart, float pixelSize, ref bool displayUpdateNeeded)
 {
     if (pane == Pane.Map)
     {
         // If we dragged an object or corner, we would have entered a new mode. So this must be a delayed drag that should
         // become map dragging.
         controller.InitiateMapDragging(locationStart, System.Windows.Forms.MouseButtons.Left);
     }
     else if (pane == Pane.Topology)
     {
         CourseObj clickedObject = HitTest(pane, locationStart, pixelSize,
                                           co => !(co.layer == CourseLayer.AllVariations && !(co is TopologyDropTargetCourseObj)) &&
                                           !((co is MapIssueCourseObj) && co.controlId.IsNone));
         TopologyDragControlMode commandMode = new TopologyDragControlMode(controller, eventDB, selectionMgr, clickedObject, locationStart, location);
         controller.SetCommandMode(commandMode);
     }
 }
Exemplo n.º 2
0
 public override void LeftButtonDrag(Pane pane, PointF location, PointF locationStart, float pixelSize, ref bool displayUpdateNeeded)
 {
     if (pane == Pane.Map) {
         // If we dragged an object or corner, we would have entered a new mode. So this must be a delayed drag that should
         // become map dragging.
         controller.InitiateMapDragging(locationStart, System.Windows.Forms.MouseButtons.Left);
     }
     else if (pane == Pane.Topology) {
         CourseObj clickedObject = HitTest(pane, locationStart, pixelSize, (co => !(co is TopologyDropTargetCourseObj)));
         TopologyDragControlMode commandMode = new TopologyDragControlMode(controller, eventDB, selectionMgr, clickedObject, locationStart, location);
         controller.SetCommandMode(commandMode);
     }
 }