Example #1
0
        public Song getSongFromTitle(string title)
        {
            var songs = AlbumDB.GetSongs();
            var song  = songs.Values.FirstOrDefault((list) => list.title == title);

            return(song);
        }
Example #2
0
        public Song getSong(int key)
        {
            var songs = AlbumDB.GetSongs();

            if (key + 1 > songs.Count || key - 1 < 1)
            {
                return(songs[1]);
            }
            return(songs[key]);
        }
Example #3
0
        public Song getNextSong(int key)
        {
            var songs = AlbumDB.GetSongs();

            if (key + 1 > songs.Count)
            {
                return(songs[1]);
            }
            return(songs[key + 1]);
        }
Example #4
0
        public Song getPrevSong(int key)
        {
            var songs = AlbumDB.GetSongs();

            if (key - 1 < 1)
            {
                return(songs[songs.Count]);
            }
            return(songs[key - 1]);
        }