示例#1
0
        /// <summary>
        /// Add the list of songs to our music queue and play the selected one
        /// </summary>
        /// <param name="songs"></param>
        /// <param name="SongToPlay"></param>
        public void AddNPlay(List<Song> songList, Song SongToPlay)
        {
            //Add the selected songs to the queue
            songs = songList;

            //Play the selected song
            for (int i = 0; i <= songs.Count(); i++)
            {
                if (songs[i].Name == SongToPlay.Name)
                {
                    curIndex = i;
                    PlaySong(SongToPlay);
                    break;
                }
            }
        }
示例#2
0
 /// <summary>
 /// Play the specified song
 /// </summary>
 /// <param name="songToPlay"></param>
 public void PlaySong(Song songToPlay)
 {
     nowPlaying = songToPlay;
     player.Source = new Uri(nowPlaying.Path);
     player.Play();
 }
示例#3
0
 /// <summary>
 /// Play the current song specified by the curIndex
 /// </summary>
 /// <param name="songToPlay"></param>
 public void PlaySong()
 {
     nowPlaying = songs[curIndex];
     player.Source = new Uri(nowPlaying.Path);
     player.Play();
 }
 partial void DeleteSong(Song instance);
 partial void UpdateSong(Song instance);
 partial void InsertSong(Song instance);
		private void detach_Songs(Song entity)
		{
			this.SendPropertyChanging();
			entity.Album = null;
		}
		private void attach_Songs(Song entity)
		{
			this.SendPropertyChanging();
			entity.Album = this;
		}