Esempio n. 1
0
        public void RemoveBookmark(string artist, string category = "None")
        {
            if (rating_model == null)
            {
                return;
            }

            rating_model.BookmarkCategory.RemoveAll(x => x.Item1 == artist && x.Item2 == category);
            ZipArtistsModelManager.SaveRatingModel(rate_filename, rating_model);
        }
Esempio n. 2
0
        public void AddBookmark(string artist, string category = "None")
        {
            if (rating_model == null)
            {
                rating_model = new ZipArtistsRatingModel();
                rating_model.BookmarkCategory = new List <Tuple <string, string, Color> >();
                rating_model.Rating           = new Dictionary <string, int>();
            }

            if (rating_model.BookmarkCategory.Any(x => x.Item1 == artist && x.Item2 == category))
            {
                return;
            }

            rating_model.BookmarkCategory.Add(Tuple.Create(artist, category, Colors.White));
            ZipArtistsModelManager.SaveRatingModel(rate_filename, rating_model);
        }