private static String Present(VelibLibrary.Station station) { StringBuilder builder = new StringBuilder(); builder.Append("Station n°= ").Append(station.Number).AppendLine(); builder.AppendLine(station.Name).AppendLine(station.Address).AppendLine(station.City); builder.Append("Number of stands : ").Append(station.TotalStands).AppendLine().Append("Number of available bikes : ").Append(station.AvailableStands).AppendLine(); return(builder.ToString()); }
void RetrieveStationData(object sender, SelectionChangedEventArgs args) { StationData.Text = ""; ListViewItem selected = ((sender as ListView).SelectedItem as ListViewItem); if (selected != null) { VelibLibrary.Station station = stationInfo[selected.Content.ToString()]; if (station == null) { StationData.Text = "This station does not exist"; } else { StationData.Text = Present(station); loadImage(station.Latitude, station.Longitude); } } }