Exemplo n.º 1
0
        public static RepeatEnum Change()
        {
            RepeatEnum newEnum = Next(CurrentState());

            ApplicationSettingsHelper.SaveSettingsValue(AppConstants.Repeat, newEnum.ToString());
            return(newEnum);
        }
Exemplo n.º 2
0
        public static bool Change()
        {
            bool s = CurrentState();

            ApplicationSettingsHelper.SaveSettingsValue(AppConstants.Shuffle, !s);
            return(!s);
        }
Exemplo n.º 3
0
        public void SaveTagsLater(SongData song)
        {
            bool duplicate = songs.Remove(song);

            songs.Add(song);
            if (!duplicate)
            {
                string val = (ApplicationSettingsHelper.ReadSettingsValue("savelatertags") ?? "").ToString() + song.SongId + "|";
                ApplicationSettingsHelper.SaveSettingsValue("savelatertags", val);
            }
        }
Exemplo n.º 4
0
        public static void SaveSongIndex(int index)
        {
            int    i     = -1;
            object value = ApplicationSettingsHelper.ReadSettingsValue(AppConstants.SongIndex);

            if (value != null)
            {
                i = Int32.Parse(value.ToString());
            }
            ApplicationSettingsHelper.SaveSettingsValue(AppConstants.PrevSongIndex, i);
            ApplicationSettingsHelper.SaveSettingsValue(AppConstants.SongIndex, index);
        }
Exemplo n.º 5
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 + "|");
        }
Exemplo n.º 6
0
 public static void SaveTileIdValue(int id)
 {
     ApplicationSettingsHelper.SaveSettingsValue(AppConstants.TileIdValue, id);
 }