예제 #1
0
        private static WACPreference CreateNewPreference(string preferenceName)
        {
            WACPreference newPreference = new WACPreference()
            {
                PreferenceName = preferenceName
            };

            newPreference.AudioPlaylists.Add(new WACPlaylist()
            {
                PlaylistName = "First Audio Playlist"
            });
            newPreference.CurrentAudioPlaylist = newPreference.AudioPlaylists.First().PlaylistName;
            newPreference.PlaybackPlaylists.Add(new WACPlaylist()
            {
                PlaylistName = "First Playback Playlist"
            });
            newPreference.CurrentPlaybackPlaylist = newPreference.PlaybackPlaylists.First().PlaylistName;

            return(newPreference);
        }
예제 #2
0
        private void DeleteProfile(WACPreference profile)
        {
            preferences.Remove(profile);

            File.Delete(Path.Combine(preferencesFolder, $"{profile.PreferenceName}.json"));
        }