private Location getAndPopRandomLocation() { int randIndex = Utils.getRandomIndex(locations.Count); Location location = locations[randIndex]; locations.RemoveAt(randIndex); return(location); }
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) }
private void initRandomStreetLocation() { if (locations.Count == 0) { locations = FindMyLocations.src.Location.getAllLocations(); } Location randomLocation = getAndPopRandomLocation(); navigateToLocation(randomLocation); }