//根据播放状态来播放下一曲 private void MusicPlayer_PlaylistChange(object sender, AxWMPLib._WMPOCXEvents_PlaylistChangeEvent e) { /* * if (MusicPlayer.playState == * WMPLib.WMPPlayState.wmppsMediaEnded) * { * //自动播放下一曲 * int index = listBox1.SelectedIndex; * * listBox1.SelectedIndices.Clear(); * if (index == -1) //列表为空 * return; * * index++; * if (index >= listBox1.Items.Count) * { * index = 0; * } * listBox1.SelectedIndex = index; //更新当前列表索引 * MusicPlayer.URL = listSongs[index]; * * } * * if (MusicPlayer.playState == * WMPLib.WMPPlayState.wmppsReady) * { * try * { * MusicPlayer.Ctlcontrols.play(); * } * catch { } * * } */ }
private void Media_PlaylistChange(object sender, AxWMPLib._WMPOCXEvents_PlaylistChangeEvent e) { }
private void axWindowsMediaPlayer1_PlaylistChange(object sender, AxWMPLib._WMPOCXEvents_PlaylistChangeEvent e) { }
/// <summary> /// Function which creates log when playlist is changed. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mediaPlayer_PlaylistChange(object sender, AxWMPLib._WMPOCXEvents_PlaylistChangeEvent e) { log.Info("sequence changed to " + mediaPlayer.currentPlaylist.name); }