public static List <TrackViewModel> ArtistProcessList(DataGridControl lst) { var art = lst.SelectedItem as ArtistViewModel; List <TrackViewModel> tl = TrackQuery.GetTracksFromArtist(art.Name).ToList(); return(tl); }
public void LoadArtist(string artistName) { ArtistViewModel art = ArtistQuery.GetArtistViewModel(artistName); if (art == null) { return; } Artist = art.Name; artist.Text = art.Name; duration.Text = " " + TimeSpan.FromSeconds(art.Duration); var tracks = TrackQuery.GetTracksFromArtist(art.Name); tracklist.ItemsSource = tracks; albums.Text = " " + tracks.GroupBy(x => x.Album).Count() + " albums"; rateCtl.Path = art.Name; rateCtl.Rate = art.Rate; selArtist.FadeOut(); }
/// <summary> /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void lst_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e) { var art = lst.SelectedItem as ArtistViewModel; if (art == null) { return; } Artist = art.Name; artist.Text = art.Name; duration.Text = " " + TimeSpan.FromSeconds(art.Duration); var tracks = TrackQuery.GetTracksFromArtist(art.Name); tracklist.ItemsSource = tracks; albums.Text = " " + tracks.GroupBy(x => x.Album).Count() + " albums"; rateCtl.Path = art.Name; rateCtl.Rate = art.Rate; selArtist.FadeOut(); }