Esempio n. 1
0
        public void SaveRatingLater(int songId, int rating)
        {
            bool duplicate = false;
            int  oldRating = 0;

            foreach (var item in ratings)
            {
                if (item.Item1 == songId)
                {
                    duplicate = true;
                    oldRating = item.Item2;
                    break;
                }
            }
            string val = (ApplicationSettingsHelper.ReadSettingsValue("savelaterratings") ?? "").ToString();

            if (duplicate)
            {
                ratings.Remove(new Tuple <int, int>(songId, oldRating));
                val = val.Replace(songId + "|" + oldRating + "|", "");
            }
            ratings.Add(new Tuple <int, int>(songId, rating));
            ApplicationSettingsHelper.SaveSettingsValue("savelaterratings", val + songId + "|" + rating + "|");
        }
Esempio n. 2
0
 public static void SaveTileIdValue(int id)
 {
     ApplicationSettingsHelper.SaveSettingsValue(AppConstants.TileIdValue, id);
 }