コード例 #1
0
        public long AddFavoritePlace(FavoritePlace favoritePlace)
        {
            if (FavoritePlaces.Count == MAX_FAVORITE_PLACES)
            {
                return(-2);
            }

            favoritePlace.Id = favoritePlaceIdGenerator++;
            FavoritePlaces.Add(favoritePlace);
            return(favoritePlace.Id);
        }
コード例 #2
0
 public void RefreshFavoritePlaces()
 {
     FavoritePlaces.Clear();
     foreach (var place in Settings.Settings.Instance.Places)
     {
         FavoritePlaces.Add(new FavoritePlace()
         {
             PositionText = place.Add.PlaceName,
             Place        = place.Add
         });
     }
 }