Ejemplo n.º 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;
                }
            }
        }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 4
0
 partial void DeleteSong(Song instance);
Ejemplo n.º 5
0
 partial void UpdateSong(Song instance);
Ejemplo n.º 6
0
 partial void InsertSong(Song instance);
Ejemplo n.º 7
0
		private void detach_Songs(Song entity)
		{
			this.SendPropertyChanging();
			entity.Album = null;
		}
Ejemplo n.º 8
0
		private void attach_Songs(Song entity)
		{
			this.SendPropertyChanging();
			entity.Album = this;
		}