예제 #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);
                    }
                }
            }
        }
예제 #2
0
        private void SearchNavigateThread(object o)
        {
            List <string>   paths    = (List <string>)((object[])o)[0];
            HotspotLocation location = (HotspotLocation)((object[])o)[1];

            SearchShowPath(currentPath, location, paths);
        }
예제 #3
0
        private HotSpotItemCtrl CreateHotSpotItemCtrl(HotspotLocation location)
        {
            HotSpotItemCtrl itemCtrl = new HotSpotItemCtrl();

            itemCtrl.ItemDeleted    += new EventHandler(itemCtrl_ItemDeleted);
            itemCtrl.HotspotLocation = location;
            itemCtrl.LoadControl();
            return(itemCtrl);
        }
예제 #4
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 });
        }
예제 #5
0
        private void lnkAddNewLocation_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (hotSpot != null)
            {
                HotspotLocation newLocation = new HotspotLocation();

                HotSpotItemCtrl ctrl = CreateHotSpotItemCtrl(newLocation);
                pnlHotSpotItems.Controls.Add(ctrl);

                hotSpot.Locations.Add(newLocation);
                HotspotManager.Save();
            }
        }
예제 #6
0
 public HotspotClickedEventArgs(HotspotLocation location)
 {
     this.location = location;
 }