public PlayerForm()
        {
            try
            {
                InitializeComponent();

                // Set up the Scrobbler
                if (string.IsNullOrEmpty(ApiKey) || string.IsNullOrEmpty(ApiSecret))
                {
                    throw new InvalidOperationException(
                        "ApiKey and ApiSecret have not been set. Go to http://www.last.fm/api/account and apply for an API account. Then paste the key and secret into the constants on PlayerForm.cs");
                }

                string sessionKey = GetSessionKey();

                // instantiate the async scrobbler
                _scrobbler = new QueuingScrobbler(ApiKey, ApiSecret, sessionKey);

            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
            }
        }
Exemplo n.º 2
0
 private void InitScrobblers()
 {
     _scrobbler = new QueuingScrobbler(APIKey, APISecret, SessionKey);
 }