Ejemplo n.º 1
0
 private void AddTrackToWptList(TrackNodes item)
 {
     try
     {
         AddMainRoute(item);
         item.ConnectionRoutes.ForEach(i => AddPairs(i));
     }
     catch
     {
         recorder.AddEntry(
             StatusRecorder.Severity.Caution,
             "Failed to process track " + item.Ident + ".",
             type);
     }
 }
Ejemplo n.º 2
0
        // Can throw exception.
        private void AddMainRoute(TrackNodes nodes)
        {
            var rte = nodes.MainRoute;

            int indexStart = AddFirstWpt(rte.FirstWaypoint);
            int indexEnd   = AddLastWpt(rte.LastWaypoint);
            var innerWpts  = rte.Select(n => n.Waypoint).ToList()
                             .WithoutFirstAndLast();

            var neighbor = new Neighbor(
                nodes.AirwayIdent,
                rte.TotalDistance(),
                innerWpts,
                InnerWaypointsType.Track);

            editor.AddNeighbor(indexStart, indexEnd, neighbor);
        }