//add playlist to observable collection of playlist and creates a playlist file public async void AddPlayList(PlayList p) { if (await PlayListFileHelper.IsDuplicateNewPlaylistAsync(p) == false) { playLists.Add(p); //also call Write to file function PlayListFileHelper.WritePlayListToFileAsync(p); } else { var messageDialog = new MessageDialog("The playlist name already exist.Please chose another one"); // Show the message dialog await messageDialog.ShowAsync(); return; } }
public void AddSongtoPlayList(PlayList p) { //add song to playlist on file PlayListFileHelper.WritePlayListToFileAsync(p); }