/// <summary> /// 歌曲播放结束事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void MediaPlayer_MediaEnded(object sender, EventArgs e) { StopTimer(); _mediaPlayer.Position = TimeSpan.FromSeconds(0); ChangePlayState(); MusicPlaySwitchedUtil.Invoke(GetMusicPlayMode(), true); }
/// <summary> /// 切歌 /// </summary> /// <param name="isDown">是否向下切换</param> private void SwitchMusic(bool isDown) { var musicPlayMode = GetMusicPlayMode(); if (musicPlayMode.Equals(MusicPlayMode.Single)) { musicPlayMode = MusicPlayMode.List; } MusicPlaySwitchedUtil.Invoke(musicPlayMode, isDown); }