private void StreamPlayerOnNextSong(object sender, SongEventArgs e) { if (e.Song != null) { _songPlayer.Start(e.Song); } }
private void SongPlayerOnCurrentSongCompleted(object sender, SongEventArgs e) { if (!_streamPlayer.Next(CancellationToken.None)) { VoteableQueueItem<ISongStream> item; if (_queue.TryGetNext(out item)) { _streamPlayer.CurrentStream = item.Item; _streamPlayer.Next(CancellationToken.None); } } }
protected void OnNextSong(SongEventArgs e) { EventHandler<SongEventArgs> handler = NextSong; if (handler != null) handler(this, e); }