Exemplo n.º 1
0
        private async void datagrid_SearchTracks_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var trackAux = (Track)datagrid_SearchTracks.SelectedItem;

            if (trackAux != null)
            {
                await StreamingPlayer.UploadTrackAsync(trackAux);
            }
            else
            {
                MessageBox.Show("*Select a track");
            }
        }
        private async void datagrid_TrackPlaylist_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            textBlock_Message.Text = "";
            var trackAux = (Track)datagrid_TrackPlaylist.SelectedItem;

            if (trackAux != null)
            {
                await StreamingPlayer.UploadTrackAsync(trackAux);
            }
            else
            {
                textBlock_Message.Text = "*Select a track";
            }
        }
        private async void datagrid_MyOwnTracks_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            textBlock_Message.Text = "";
            var trackAux = (LocalTrack)datagrid_MyOwnTracks.SelectedItem;

            if (trackAux != null)
            {
                Track localTrack = new Track();
                localTrack.Title           = trackAux.Title;
                localTrack.StoragePath     = trackAux.FileName;
                localTrack.DurationSeconds = 200;
                await StreamingPlayer.UploadTrackAsync(localTrack);
            }
            else
            {
                textBlock_Message.Text = "*Select a track";
            }
        }