예제 #1
0
 public DefaultMode(Controller controller, EventDB eventDB, SymbolDB symbolDB, SelectionMgr selectionMgr)
 {
     this.controller   = controller;
     this.eventDB      = eventDB;
     this.symbolDB     = symbolDB;
     this.selectionMgr = selectionMgr;
 }
예제 #2
0
        CourseObj[] additionalHighlights;  // additional highlights to show also, for legs to/from control.

        public DragObjectMode(Controller controller, EventDB eventDB, SelectionMgr selectionMgr, CourseObj courseObject, PointF startDrag)
        {
            this.controller        = controller;
            this.eventDB           = eventDB;
            this.selectionMgr      = selectionMgr;
            this.courseObjectStart = courseObject;
            this.courseObjectDrag  = (CourseObj)(courseObject.Clone());
            this.startDrag         = this.currentLocation = startDrag;
        }
예제 #3
0
        PointCourseObj highlight;    // the highlight we are creating.

        public AddPointSpecialMode(Controller controller, SelectionMgr selectionMgr, UndoMgr undoMgr, EventDB eventDB, SpecialKind specialKind)
        {
            this.controller     = controller;
            this.selectionMgr   = selectionMgr;
            this.undoMgr        = undoMgr;
            this.eventDB        = eventDB;
            this.specialKind    = specialKind;
            this.appearance     = controller.GetCourseAppearance();
            this.courseObjRatio = selectionMgr.ActiveCourseView.CourseObjRatio(appearance);
        }
예제 #4
0
 public AddRectangleMode(Controller controller, UndoMgr undoMgr, SelectionMgr selectionMgr, EventDB eventDB, float aspectRatio, Func<RectangleF, CourseObj> createCourseObj, Func<RectangleF, Id<Special>> createSpecial)
 {
     this.controller = controller;
     this.undoMgr = undoMgr;
     this.selectionMgr = selectionMgr;
     this.eventDB = eventDB;
     this.aspectRatio = aspectRatio;
     this.createCourseObj = createCourseObj;
     this.createSpecial = createSpecial;
 }
예제 #5
0
 public AddRectangleMode(Controller controller, UndoMgr undoMgr, SelectionMgr selectionMgr, EventDB eventDB, float aspectRatio, Func <RectangleF, CourseObj> createCourseObj, Func <RectangleF, Id <Special> > createSpecial)
 {
     this.controller      = controller;
     this.undoMgr         = undoMgr;
     this.selectionMgr    = selectionMgr;
     this.eventDB         = eventDB;
     this.aspectRatio     = aspectRatio;
     this.createCourseObj = createCourseObj;
     this.createSpecial   = createSpecial;
 }
 public TopologyDragControlMode(Controller controller, EventDB eventDB, SelectionMgr selectionMgr, CourseObj courseObject, PointF startDrag, PointF currentLocation)
 {
     this.controller          = controller;
     this.eventDB             = eventDB;
     this.selectionMgr        = selectionMgr;
     this.courseObjectStart   = courseObject;
     this.courseObjectDrag    = (CourseObj)(courseObject.Clone());
     this.startDrag           = startDrag;
     this.currentLocation     = currentLocation;
     this.dropTargetHighlight = null;
 }
 public TopologyDragControlMode(Controller controller, EventDB eventDB, SelectionMgr selectionMgr, CourseObj courseObject, PointF startDrag, PointF currentLocation)
 {
     this.controller = controller;
     this.eventDB = eventDB;
     this.selectionMgr = selectionMgr;
     this.courseObjectStart = courseObject;
     this.courseObjectDrag = (CourseObj)(courseObject.Clone());
     this.startDrag = startDrag;
     this.currentLocation = currentLocation;
     this.dropTargetHighlight = null;
 }
예제 #8
0
 public AddDescriptionMode(Controller controller, UndoMgr undoMgr, SelectionMgr selectionMgr, EventDB eventDB, SymbolDB symbolDB, CourseDesignator courseDesignator, DescriptionLine[] description, DescriptionKind kind)
 {
     this.controller = controller;
     this.undoMgr = undoMgr;
     this.selectionMgr = selectionMgr;
     this.symbolDB = symbolDB;
     this.eventDB = eventDB;
     this.courseDesignator = courseDesignator;
     this.description = description;
     this.kind = kind;
 }
예제 #9
0
        BoundaryCourseObj highlight;                 // the highlight of the path we are creating.

        public AddLineAreaSpecialMode(Controller controller, SelectionMgr selectionMgr, UndoMgr undoMgr, EventDB eventDB, Func <PointF[], Id <Special> > createObject, bool isArea)
        {
            this.controller     = controller;
            this.selectionMgr   = selectionMgr;
            this.undoMgr        = undoMgr;
            this.eventDB        = eventDB;
            this.createObject   = createObject;
            this.isArea         = isArea;
            this.appearance     = controller.GetCourseAppearance();
            this.courseObjRatio = selectionMgr.ActiveCourseView.CourseObjRatio(appearance);
        }
예제 #10
0
 public AddDescriptionMode(Controller controller, UndoMgr undoMgr, SelectionMgr selectionMgr, EventDB eventDB, SymbolDB symbolDB, CourseDesignator courseDesignator, DescriptionLine[] description, DescriptionKind kind)
 {
     this.controller       = controller;
     this.undoMgr          = undoMgr;
     this.selectionMgr     = selectionMgr;
     this.symbolDB         = symbolDB;
     this.eventDB          = eventDB;
     this.courseDesignator = courseDesignator;
     this.description      = description;
     this.kind             = kind;
 }
예제 #11
0
 public AddControlMode(Controller controller, SelectionMgr selectionMgr, UndoMgr undoMgr, EventDB eventDB, SymbolDB symbolDB, bool allControls, ControlPointKind controlKind, bool exchangeAtControl)
 {
     this.controller = controller;
     this.selectionMgr = selectionMgr;
     this.undoMgr = undoMgr;
     this.eventDB = eventDB;
     this.symbolDB = symbolDB;
     this.allControls = allControls;
     this.controlKind = controlKind;
     this.exchangeAtControl = exchangeAtControl;
     this.scaleRatio = selectionMgr.ActiveCourseView.ScaleRatio;
     this.appearance = controller.GetCourseAppearance();
 }
예제 #12
0
 public AddTextMode(Controller controller, UndoMgr undoMgr, SelectionMgr selectionMgr, EventDB eventDB, string text, string fontName, bool fontBold, bool fontItalic, SpecialColor fontColor)
 {
     this.controller = controller;
     this.undoMgr = undoMgr;
     this.selectionMgr = selectionMgr;
     this.eventDB = eventDB;
     this.text = text;
     this.fontName = fontName;
     this.fontBold = fontBold;
     this.fontItalic = fontItalic;
     this.fontColor = fontColor;
     this.displayText = CourseFormatter.ExpandText(eventDB, selectionMgr.ActiveCourseView, text);
 }
예제 #13
0
 public AddTextMode(Controller controller, UndoMgr undoMgr, SelectionMgr selectionMgr, EventDB eventDB, string text, string fontName, bool fontBold, bool fontItalic, SpecialColor fontColor, float fontHeight)
 {
     this.controller   = controller;
     this.undoMgr      = undoMgr;
     this.selectionMgr = selectionMgr;
     this.eventDB      = eventDB;
     this.text         = text;
     this.fontName     = fontName;
     this.fontBold     = fontBold;
     this.fontItalic   = fontItalic;
     this.fontColor    = fontColor;
     this.fontHeight   = fontHeight;
     this.displayText  = CourseFormatter.ExpandText(eventDB, selectionMgr.ActiveCourseView, text);
 }
예제 #14
0
        CourseObj[] additionalHighlights; // additional highlights to show also.

        public AddControlMode(Controller controller, SelectionMgr selectionMgr, UndoMgr undoMgr, EventDB eventDB, SymbolDB symbolDB, bool allControls, ControlPointKind controlKind, bool exchangeAtControl, MapIssueKind mapIssueKind)
        {
            this.controller        = controller;
            this.selectionMgr      = selectionMgr;
            this.undoMgr           = undoMgr;
            this.eventDB           = eventDB;
            this.symbolDB          = symbolDB;
            this.allControls       = allControls;
            this.controlKind       = controlKind;
            this.exchangeAtControl = exchangeAtControl;
            this.mapIssueKind      = mapIssueKind;
            this.appearance        = controller.GetCourseAppearance();
            this.courseObjRatio    = selectionMgr.ActiveCourseView.CourseObjRatio(appearance);
        }
예제 #15
0
 public AddPointSpecialMode(Controller controller, SelectionMgr selectionMgr, UndoMgr undoMgr, EventDB eventDB, SpecialKind specialKind)
 {
     this.controller = controller;
     this.selectionMgr = selectionMgr;
     this.undoMgr = undoMgr;
     this.eventDB = eventDB;
     this.specialKind = specialKind;
     this.scaleRatio = selectionMgr.ActiveCourseView.ScaleRatio;
     this.appearance = controller.GetCourseAppearance();
 }
예제 #16
0
 public DefaultMode(Controller controller, EventDB eventDB, SymbolDB symbolDB, SelectionMgr selectionMgr)
 {
     this.controller = controller;
     this.eventDB = eventDB;
     this.symbolDB = symbolDB;
     this.selectionMgr = selectionMgr;
 }
예제 #17
0
 public DragObjectMode(Controller controller, EventDB eventDB, SelectionMgr selectionMgr, CourseObj courseObject, PointF startDrag)
 {
     this.controller = controller;
     this.eventDB = eventDB;
     this.selectionMgr = selectionMgr;
     this.courseObjectStart = courseObject;
     this.courseObjectDrag = (CourseObj) (courseObject.Clone());
     this.startDrag = this.currentLocation = startDrag;
 }
예제 #18
0
 public AddLineAreaSpecialMode(Controller controller, SelectionMgr selectionMgr, UndoMgr undoMgr, EventDB eventDB, Func<PointF[], Id<Special>> createObject, bool isArea)
 {
     this.controller = controller;
     this.selectionMgr = selectionMgr;
     this.undoMgr = undoMgr;
     this.eventDB = eventDB;
     this.createObject = createObject;
     this.isArea = isArea;
     this.scaleRatio = selectionMgr.ActiveCourseView.ScaleRatio;
     this.appearance = controller.GetCourseAppearance();
 }
예제 #19
0
 // Describe the selection, and return an array of TextParts for display in the UI.
 public static TextPart[] DescribeSelection(SymbolDB symbolDB, EventDB eventDB, CourseView activeCourseView, SelectionMgr.SelectionInfo selection)
 {
     if (selection.SelectionKind == SelectionMgr.SelectionKind.Key) {
         return DescribeKey(eventDB);
     }
     else if (selection.SelectionKind == SelectionMgr.SelectionKind.TextLine) {
         return DescribeTextLine(eventDB, selection.SelectedControl, selection.SelectedTextLineKind);
     }
     else if (selection.SelectionKind == SelectionMgr.SelectionKind.Control) {
         return DescribeControlPoint(symbolDB, eventDB, selection.SelectedControl, DescKind.DescPane);
     }
     else if (selection.SelectionKind == SelectionMgr.SelectionKind.Leg) {
         return DescribeLeg(eventDB, selection.SelectedCourseControl, selection.SelectedCourseControl2, DescKind.DescPane);
     }
     else if (selection.SelectionKind == SelectionMgr.SelectionKind.Special) {
         return DescribeSpecial(eventDB, selection.SelectedSpecial, activeCourseView.ScaleRatio, DescKind.DescPane);
     }
     else if (selection.SelectionKind == SelectionMgr.SelectionKind.MapExchangeAtControl) {
         return DescribeMapExchangeAtControl(eventDB, selection.SelectedControl);
     }
     else if (selection.ActiveCourseDesignator.IsNotAllControls) {
         return DescribeCourse(eventDB, activeCourseView);
     }
     else {
         return DescribeAllControls(eventDB, activeCourseView);
     }
 }