错了吗?可我的可以哦,大家看看吧
private void play_all()
{
if(num==this.listBox1.Items.Count)
{
num=0;
}
if(this.listBox1.Items.Count!=0)
{
this.axMediaPlayer1.URL = this.listBox1.Items[this.num].ToString();
}
}
private void axMediaPlayer1_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
{
if(this.axMediaPlayer1.playState==WMPLib.WMPPlayState.wmppsMediaEnded)
{
num++;
this.timer1.Start();
this.axMediaPlayer1.URL=this.listBox1.Items[num].ToString();
timer1.Start();
}
}
private void timer1_Tick(object sender, System.EventArgs e)
{
this.timer1.Stop();
if(this.num!=0)
{
this.play_all();
}
}