PurplePen.EventDB.GetCourseControl C# (CSharp) Method

GetCourseControl() public method

public GetCourseControl ( Id courseControlId ) : CourseControl
courseControlId Id
return CourseControl
        public CourseControl GetCourseControl(Id<CourseControl> courseControlId)
        {
            return courseControlStore[courseControlId];
        }

Usage Example

Example #1
0
        // Create a single object associated with the leg from courseControlId1 to courseControlId2. Does not consider
        // flagging (but does consider bends and gaps.) Used for highlighting on the map.
        public static CourseObj CreateSimpleLeg(EventDB eventDB, float scaleRatio, CourseAppearance appearance, Id<CourseControl> courseControlId1, Id<CourseControl> courseControlId2)
        {
            Id<ControlPoint> controlId1 = eventDB.GetCourseControl(courseControlId1).control;
            Id<ControlPoint> controlId2 = eventDB.GetCourseControl(courseControlId2).control;
            ControlPoint control1 = eventDB.GetControl(controlId1);
            ControlPoint control2 = eventDB.GetControl(controlId2);
            LegGap[] gaps;

            SymPath legPath = GetLegPath(eventDB, control1.location, control1.kind, controlId1, control2.location, control2.kind, controlId2, scaleRatio, appearance, out gaps);
            if (legPath == null)
                return null;

            return new LegCourseObj(controlId1, courseControlId1, courseControlId2, scaleRatio, appearance, legPath, gaps);
        }
All Usage Examples Of PurplePen.EventDB::GetCourseControl