Example #1
0
        /// <summary>
        /// Deletes specified beatmap from the list
        /// As well as deletes it from file
        /// </summary>
        /// <param name="beatmap">The beatmap to delete</param>
        public void DeleteBeatmap(BeatmapListItemViewModel beatmap)
        {
            // Delete it from the list (Make sure we do it on UI thread)
            IoC.UI.DispatcherThreadAction(() => Beatmaps.Remove(beatmap));

            // Save it to file
            SaveBeatmaps();
        }
Example #2
0
        /// <summary>
        /// Adds specified beatmap to the list
        /// As well as saving it into file
        /// </summary>
        /// <param name="beatmap">The beatmap to add</param>
        public void AddBeatmap(BeatmapListItemViewModel beatmap)
        {
            // Add it to the list (Make sure we do it on UI thread)
            IoC.UI.DispatcherThreadAction(() => Beatmaps.Add(beatmap));

            // Save it to file
            SaveBeatmaps();
        }