/// <summary> /// Adds an instance of an object with the ISong interface implemented. /// </summary> /// <param name="song">The song to add.</param> /// <param name="play">if set to <c>true</c> then the song will automatically play once added.</param> public void AddSong(ISong song, bool play = false) { song.PlaybackStopped += song_PlaybackStopped; SongList.Add(song); if (play) song.Play(); }
/// <summary> /// Adds an instance of an object with the ISong interface implemented. /// </summary> /// <param name="song">The song to add.</param> /// <param name="play">if set to <c>true</c> then the song will automatically play once added.</param> public void AddSong(ISong song, bool play = false) { song.PlaybackStopped += song_PlaybackStopped; SongList.Add(song); if (play) { song.Play(); } }