Beispiel #1
0
 /// <summary>
 /// Display all artists
 /// </summary>
 private void showArtistList()
 {
     foreach (Artist artist in ArtistsManager.db_GetAllArtists())
     {
         ArtistNames.Add(artist.name);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Display all tracks from a slected Artists
        /// </summary>
        /// <param name="artistName"></param>
        private void showSelectedArtist(string artistName)
        {
            // Find selected Artist in DB
            Artist currentArtist = ArtistsManager.db_GetAllArtists().Find(x => x.name == artistName);

            // Find all tracks from selected Artist
            foreach (Album album in currentArtist.Albums)
            {
                foreach (Track track in album.Tracks)
                {
                    TrackList.Add(new TrackMetadata {
                        Title = track.title, Album = track.Album.name, Genre = track.Metadata.Genre, Year = (track.Metadata.Year).ToString(), Length = track.Metadata.Length.ToString("hh:mm:ss")
                    });;
                }
            }
            ListVisi = Visibility.Visible;
        }