Exemple #1
0
        public void Play()
        {
            if (!playlist.Any())
            {
                Console.WriteLine("There are no items on the playlist. Please load some.");
                return;
            }

            MediaEntity currentPlaylistItem = playlist.ElementAtOrDefault(currentIndex);

            if (currentPlaylistItem == null)
            {
                Console.WriteLine("The item was not found!");
                return;
            }

            Console.WriteLine("Started playing {0}.{1}", currentPlaylistItem.Title, currentPlaylistItem.FileExtention);
        }
Exemple #2
0
 public void Add(MediaEntity media)
 {
     this.availableMedia.Add(media);
 }
Exemple #3
0
 public void Add(MediaEntity media)
 {
     this.availableMedia.Add(media);
 }
Exemple #4
0
 public void Load(MediaEntity media)
 {
     this.playlist.Add(media);
     Console.WriteLine("Loaded {0}.{1}", media.Title, media.FileExtention);
 }
 public void Load(MediaEntity media)
 {
     this.playlist.Add(media);
     Console.WriteLine("Loaded {0}.{1}", media.Title, media.FileExtention);
 }