コード例 #1
0
        //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;
            }
        }
コード例 #2
0
 public void AddSongtoPlayList(PlayList p)
 {
     //add song to playlist on file
     PlayListFileHelper.WritePlayListToFileAsync(p);
 }