private void OnBtn_Click(object sender, EventArgs e) { listBox1.Items.Clear(); if (aPlaylistBox.Text == "") { MessageBox.Show("Invalid Playlist Id"); } else { string playListId = aPlaylistBox.Text; _videos = _youtube.GetPlaylistVideos(playListId).ToArray(); webBrowser1.Navigate(YoutubeApiWrapper.GetVideoEmbedHtml(_videos[0].Id)); listBox1.Items.AddRange(_videos.Select(v => v.Title).Cast <object>().ToArray()); } }
private void PlayPreviousVideo() { webBrowser1.Navigate(YoutubeApiWrapper.GetVideoEmbedHtml(_videos[--_actualVideoId].Id)); }
private void playBtn_Click(object sender, EventArgs e) { webBrowser1.Navigate(YoutubeApiWrapper.GetVideoEmbedHtml(_videos[listBox1.SelectedIndex].Id)); }