Exemple #1
0
 private void RaiseAddPointEvent(string notes, CoursePoint.PointType pointType)
 {
     AddPointEvent?.Invoke(
         this,
         new AddPointEventArgs
     {
         Name      = pointType.ToString(),
         Notes     = notes,
         PointType = pointType,
     });
 }
Exemple #2
0
        private CoursePointType_t Map(CoursePoint.PointType type)
        {
            switch (type)
            {
            case CoursePoint.PointType.Generic: return(CoursePointType_t.Generic);

            case CoursePoint.PointType.Left: return(CoursePointType_t.Left);

            case CoursePoint.PointType.Right: return(CoursePointType_t.Right);

            case CoursePoint.PointType.Straight: return(CoursePointType_t.Straight);

            case CoursePoint.PointType.Food: return(CoursePointType_t.Food);

            case CoursePoint.PointType.Summit: return(CoursePointType_t.Summit);

            case CoursePoint.PointType.Valley: return(CoursePointType_t.Valley);

            case CoursePoint.PointType.ClimbCat1: return(CoursePointType_t.Item1stCategory);

            case CoursePoint.PointType.ClimbCat2: return(CoursePointType_t.Item2ndCategory);

            case CoursePoint.PointType.ClimbCat3: return(CoursePointType_t.Item3rdCategory);

            case CoursePoint.PointType.ClimbCat4: return(CoursePointType_t.Item4thCategory);

            case CoursePoint.PointType.ClimbCatHors: return(CoursePointType_t.HorsCategory);

            case CoursePoint.PointType.Danger: return(CoursePointType_t.Danger);

            case CoursePoint.PointType.Water: return(CoursePointType_t.Water);

            case CoursePoint.PointType.Sprint: return(CoursePointType_t.Sprint);

            case CoursePoint.PointType.FirstAid: return(CoursePointType_t.FirstAid);

            default:
                throw new ArgumentOutOfRangeException($"unkown type {type.ToString()}");
            }
        }