private string getUri(CityCoordinates cityCoordinates) { NumberFormatInfo nfi = new NumberFormatInfo(); nfi.NumberDecimalSeparator = "."; return($"/v2/informers?lat={cityCoordinates.lat.ToString(nfi)}&lon={cityCoordinates.lon.ToString(nfi)}"); }
private void uiCityList_SelectionChanged(object sender, SelectionChangedEventArgs e) { var cb = e.Source as ComboBox; CityCoordinates cc = CoordinatesDictionary.ElementAt(GetCityIndex(cb.SelectedValue.ToString())).Value; Latitude = cc.Latitude; Longitude = cc.Longitude; uiLatitude.Text = cc.Latitude.ToString(); uiLongitude.Text = cc.Longitude.ToString(); }