private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ListBox listBox = (ListBox)sender;

            SelectedItem = (Artist)listBox.SelectedItem;
            
            this.IsOpen = false;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns the number of tracks associated with the given artist.
        /// </summary>
        /// <param name="artist"></param>
        /// <returns></returns>
        public static int GetArtistTrackCount(Artist artist)
        {
            if (_playlistViewModel.Playlist != null) {
                return _playlistViewModel.Playlist.Tracks.SelectMany(track => track.Track.Artists).Count(trackArtist => trackArtist.ID == artist.ID);
            }

            return 0;
        }
 public RecommendationCriteria()
 {
     TargetedArtist = null;
     RelatedArtists = new List<Artist>();
     Weight = 0;
 }
Ejemplo n.º 4
0
 public NewReleaseItem(Artist artist, Album album)
 {
     Artist = artist;
     Album = album;
     Added = false;
 }
Ejemplo n.º 5
0
 public ArtistViewModel(Artist artist)
 {
     _artist = artist;
     _selected = false;
 }
Ejemplo n.º 6
0
 public NewsFeedItem(Artist artist, Album album)
 {
     Artist = artist;
     Album = album;
     Added = false;
 }
        public RecommendationWindow(Artist artist)
        {
            _artist = artist;

            InitializeComponent();
        }