Ejemplo n.º 1
0
 private void updateStatistics(VisitedLocation i_ChosenLocation)
 {
     labelName.Text     = "Name: " + i_ChosenLocation.LocationName;
     labelPosts.Text    = "Posts from this location: " + i_ChosenLocation.NumOfPosts;
     labelCheckins.Text = "Checkins from this location: " + i_ChosenLocation.NumOfCheckins;
     labelPhotos.Text   = "Photos from this location: " + i_ChosenLocation.NumOfTaggedPhotos;
 }
Ejemplo n.º 2
0
 private void listBoxLocations_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (listBoxLocations.SelectedItems.Count == 1)
     {
         VisitedLocation chosenLocation = listBoxLocations.SelectedItem as VisitedLocation;
         updateStatistics(chosenLocation);
     }
 }
Ejemplo n.º 3
0
 private void buttonLoadMap_Click(object sender, EventArgs e)
 {
     if (listBoxLocations.SelectedItems.Count == 1)
     {
         VisitedLocation chosenLocation = listBoxLocations.SelectedItem as VisitedLocation;
         string          url            = string.Format("{0}{1},{2}", k_GoogleMapsUrl, chosenLocation.Latitude, chosenLocation.Longitude);
         webBrowserMap.ScriptErrorsSuppressed = true;
         webBrowserMap.Navigate(url);
         updateStatistics(chosenLocation);
     }
 }
Ejemplo n.º 4
0
        public List <KeyValuePair <string, VisitedLocation> > HardcodedLocation(ISortMethod <string, VisitedLocation> i_SortStartegy)
        {
            SortedDictionary <string, VisitedLocation> fakeLocations = new SortedDictionary <string, VisitedLocation>();

            fakeLocations["Rishon Lezion"] = new VisitedLocation("Rishon Lezion", 12, 5, 4, 3, 31.961020, 34.801620);
            fakeLocations["Ashdod"]        = new VisitedLocation("Ashdod", 12, 0, 3, 9, 31.8024, 34.6405);
            fakeLocations["Ashkelon"]      = new VisitedLocation("Ashkelon", 14, 9, 2, 3, 31.6677203, 34.5996736);
            fakeLocations["Tel Aviv"]      = new VisitedLocation("Tel Aviv", 10, 2, 2, 6, 32.0750224, 34.7771282);
            List <KeyValuePair <string, VisitedLocation> > sortedLocations = i_SortStartegy.Sort(fakeLocations);

            return(sortedLocations);
        }