C# VLC 播放列表自动播放下一个视频时停止工作

C# VLC playlist autoplay it working stop when next video

当第一个视频结束切换到第二个视频程序时停止工作:

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();
    }
}
    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();
        }
    }