Ejemplo n.º 1
0
        private Location getAndPopRandomLocation()
        {
            int      randIndex = Utils.getRandomIndex(locations.Count);
            Location location  = locations[randIndex];

            locations.RemoveAt(randIndex);
            return(location);
        }
Ejemplo n.º 2
0
        private void navigateToLocation(Location location)
        {
            string randomLocationUrl = Utils.getUrlFromCoordinates(location);

            webBrowser.Navigate(randomLocationUrl);
            webBrowser.DocumentCompleted         += WebBrowser_DocumentCompleted;
            webBrowser.WebBrowserShortcutsEnabled = false;              //disable keyboard
            webBrowser.Navigated += WebBrowser_Navigated;               //saving urls that dont contain place in url (that is marker)
        }
Ejemplo n.º 3
0
        private void initRandomStreetLocation()
        {
            if (locations.Count == 0)
            {
                locations = FindMyLocations.src.Location.getAllLocations();
            }

            Location randomLocation = getAndPopRandomLocation();

            navigateToLocation(randomLocation);
        }