public long AddFavoritePlace(FavoritePlace favoritePlace) { if (FavoritePlaces.Count == MAX_FAVORITE_PLACES) { return(-2); } favoritePlace.Id = favoritePlaceIdGenerator++; FavoritePlaces.Add(favoritePlace); return(favoritePlace.Id); }
public void RefreshFavoritePlaces() { FavoritePlaces.Clear(); foreach (var place in Settings.Settings.Instance.Places) { FavoritePlaces.Add(new FavoritePlace() { PositionText = place.Add.PlaceName, Place = place.Add }); } }