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

            SelectedItem = (Artist)listBox.SelectedItem;
            
            this.IsOpen = false;
        }
示例#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;
 }
示例#4
0
 public NewReleaseItem(Artist artist, Album album)
 {
     Artist = artist;
     Album = album;
     Added = false;
 }
示例#5
0
 public ArtistViewModel(Artist artist)
 {
     _artist = artist;
     _selected = false;
 }
示例#6
0
 public NewsFeedItem(Artist artist, Album album)
 {
     Artist = artist;
     Album = album;
     Added = false;
 }
        public RecommendationWindow(Artist artist)
        {
            _artist = artist;

            InitializeComponent();
        }