Esempio n. 1
0
        private async void SelectedSong(object sender, SelectionChangedEventArgs e)
        {
            if (listBox.SelectedItem == null) return;

            
            selectedSong = myList[listBox.SelectedIndex];
            MessageDialog messageDialog = new MessageDialog(selectedSong.ArtistName +
                    "\n" +
                    selectedSong.SongName + "\n" +
                    (selectedSong.AlbumName));
            messageDialog.Commands.Add(new UICommand("Add To Playlist", new UICommandInvokedHandler(AddPlaylist)));
            messageDialog.DefaultCommandIndex = 0;
            messageDialog.CancelCommandIndex = 1;
            await messageDialog.ShowAsync();

        }
Esempio n. 2
0
        private QueriedSong setData(QueriedSong qs, Song md, DateTime dt)
        {
            qs.Album = md.AlbumName;
            qs.Artist = md.ArtistName;
            qs.Path = md.PathString;
            qs.SongName = md.SongName;
            qs.SongId = md.Id;
            qs.dt = dt;

            return qs;
        }