Ejemplo n.º 1
0
 public void OnUpdateUsersTopArtistsCompleted(GeneralFeedRequest request, List<Song> FeedItems)
 {
   if (request.Equals(_lastUsersTopArtistsRequest))
   {
     if (_usersTopArtists != null)
     {
       _usersTopArtists.Clear();
     }
     for (int i = 0; i < FeedItems.Count; i++)
     {
       _usersTopArtists.Add(FeedItems[i].Artist);
       if (i == _configListEntryCount - 1)
       {
         break;
       }
     }
     if (_usersTopArtists.Count > 0)
     {
       // btnChooseArtist.Disabled = false;
       btnChooseArtist.Label = _usersTopArtists[0];
     }
   }
   else
   {
     Log.Warn("NowPlaying.OnUpdateUsersTopArtistsCompleted: unexpected response for request: {0}", request.Type);
   }
 }
Ejemplo n.º 2
0
 private void UpdateUsersTopArtists(string _serviceUser)
 {
   GeneralFeedRequest request = new GeneralFeedRequest(
     lastFMFeed.topartists,
     _serviceUser,
     new GeneralFeedRequest.GeneralFeedRequestHandler(OnUpdateUsersTopArtistsCompleted));
   _lastUsersTopArtistsRequest = request;
   InfoScrobbler.AddRequest(request);
 }