Example #1
0
 //根据播放状态来播放下一曲
 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 { }
      *
      * }
      */
 }
Example #2
0
 private void Media_PlaylistChange(object sender, AxWMPLib._WMPOCXEvents_PlaylistChangeEvent e)
 {
 }
Example #3
0
 private void axWindowsMediaPlayer1_PlaylistChange(object sender, AxWMPLib._WMPOCXEvents_PlaylistChangeEvent e)
 {
 }
Example #4
0
 /// <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);
 }