Ejemplo n.º 1
0
 private void EnsureSpotifyIsInstalled()
 {
     if (!SpotifyManager.IsSpotifyInstalled())
     {
         MessageBox.Show("Spotify must be installed to run Peekify", "Can't find Spotify");
         _app.Shutdown(-1);
     }
 }
Ejemplo n.º 2
0
        private void InitSpotifyConnection()
        {
            EnsureSpotifyIsInstalled();
            _sm = new SpotifyManager();
            RespondToStateChange();
            RefreshContent();

            _sm.TrackChanged      += OnTrackChanged;
            _sm.PlayStateChanged  += OnPlayStateChanged;
            _sm.ErrorStateChanged += OnStateChanged;
        }