Exemple #1
0
        private void SearchShowPath(NavigatorPath path, HotspotLocation location, List <string> searchPaths)
        {
            // show points
            for (int i = 0; i < path.Points.Count; i++)
            {
                NavigatorPoint point = path.Points[i];

                SearchShowPoint(point, path.Id);

                // if current point is the one looking for
                if (point.Id == location.GetNavigatorPoint().Id)
                {
                    // TODO: turn and show as given in HotspotLocation
                    return;
                }
            }

            // connent to another path
            List <JunctionPoint> junctionPoints = path.Points[path.Points.Count - 1].JunctionPoints;

            if (junctionPoints != null)
            {
                foreach (JunctionPoint junctionPoint in junctionPoints)
                {
                    if (searchPaths.Contains(junctionPoint.Path.Id))
                    {
                        SearchShowPath(junctionPoint.Path, location, searchPaths);
                    }
                }
            }
        }
Exemple #2
0
        public void SearchAndNavigate(HotspotLocation location)
        {
            List <string> paths = NavigatorSearch.Search(currentPath, location.GetNavigatorPoint());

            // navigate to hotspot location
            Thread searchNavigateThread = new Thread(new ParameterizedThreadStart(SearchNavigateThread));

            searchNavigateThread.IsBackground = true;
            searchNavigateThread.Start(new object[] { paths, location });
        }