示例#1
0
        /// <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();
        }
示例#2
0
        /// <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();
            }
        }