当第一个视频结束时切换到第二个视频节目停止工作:
private void axVLCPlugin21_MediaPlayerEndReached(object sender, EventArgs e)
{
if (listBox1.SelectedIndex < (listBox1.Items.Count - 1))
{
axVLCPlugin21.playlist.next();
listBox1.SelectedIndex += 1;
listBox1.Update();
}
else
{
axVLCPlugin21.playlist.playItem(0);
listBox1.SelectedIndex = 0;
listBox1.Update();
}
}
答案 0 :(得分:0)
private void axVLCPlugin21_MediaPlayerEndReached(object sender, EventArgs e)
{
if (listBox1.SelectedIndex < (listBox1.Items.Count - 1))
{
axVLCPlugin21.playlist.stop();
axVLCPlugin21.playlist.next();
listBox1.SelectedIndex += 1;
listBox1.Update();
}
else
{
axVLCPlugin21.playlist.stop();
axVLCPlugin21.playlist.playItem(0);
listBox1.SelectedIndex = 0;
listBox1.Update();
}
}