Ejemplo n.º 1
0
        public bool TryGetPoint(byte pointNum, MarkupPoint.PointType type, out MarkupPoint point)
        {
            switch (type)
            {
            case MarkupPoint.PointType.Enter:
                if (EnterPointsDic.TryGetValue(pointNum, out MarkupEnterPoint enterPoint))
                {
                    point = enterPoint;
                    return(true);
                }
                break;

            case MarkupPoint.PointType.Crosswalk:
                if (CrosswalkPointsDic.TryGetValue(pointNum, out MarkupCrosswalkPoint crosswalkPoint))
                {
                    point = crosswalkPoint;
                    return(true);
                }
                break;

            case MarkupPoint.PointType.Normal:
                if (NormalPointsDic.TryGetValue(pointNum, out MarkupNormalPoint normalPoint))
                {
                    point = normalPoint;
                    return(true);
                }
                break;
            }
            point = null;
            return(false);
        }
Ejemplo n.º 2
0
 public virtual bool TryGetPoint(byte pointNum, MarkupPoint.PointType type, out MarkupPoint point)
 {
     if (type == MarkupPoint.PointType.Enter && EnterPointsDic.TryGetValue(pointNum, out MarkupEnterPoint enterPoint))
     {
         point = enterPoint;
         return(true);
     }
     else
     {
         point = null;
         return(false);
     }
 }