public OsmCity(long osmId, string name, string suburbDistrict, LocalityType localityType) { OsmId = osmId; Name = name; SuburbDistrict = suburbDistrict; LocalityType = localityType; }
void Completion_MatchSelected(object o, MatchSelectedArgs args) { city = args.Model.GetValue(args.Iter, (int)columns.City).ToString(); cityDistrict = args.Model.GetValue(args.Iter, (int)columns.District).ToString(); locality = (LocalityType)args.Model.GetValue(args.Iter, (int)columns.Locality); UpdateText(); OsmId = (long)args.Model.GetValue(args.Iter, (int)columns.OsmId); OnCitySelected(); args.RetVal = true; }
public static string ConvertToString(this LocalityType localityType) { return(LocalityTypeConsts.Dict[localityType]); }
void Completion_MatchSelected(object o, MatchSelectedArgs args) { city = args.Model.GetValue (args.Iter, (int)columns.City).ToString (); cityDistrict = args.Model.GetValue (args.Iter, (int)columns.District).ToString (); locality = (LocalityType)args.Model.GetValue (args.Iter, (int)columns.Locality); UpdateText (); osmId = (long)args.Model.GetValue (args.Iter, (int)columns.OsmId); OnCitySelected (); args.RetVal = true; }
public static string GetShortNameOfLocalityType(LocalityType type) { switch (type) { case LocalityType.allotments: return "д.п."; case LocalityType.city: return "г."; case LocalityType.farm: return "фер."; case LocalityType.hamlet: return "дер."; case LocalityType.isolated_dwelling: return "х."; case LocalityType.town: return "г."; case LocalityType.village: return "н.п."; default: throw new NotSupportedException (); } }
public long GetCityId(string City, string CityDistrict, LocalityType localityType) { logger.Debug($"Запрос id для города {City}({CityDistrict})..."); return(Osm.GetCityId(City, CityDistrict, localityType.ToString()));; }