protected override void OnActivated(EventArgs e) { base.OnActivated(e); if (m_ViewModel.IsLoggedIn) { return; } if (m_AuthenticationWindow == null) { if (SpotifyAuthenticator.StartCached(OnLoggedIn)) { return; } m_AuthenticationWindow = new AuthenticationWindow(OnLoggedIn); m_AuthenticationWindow.Owner = this; m_AuthenticationWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner; m_AuthenticationWindow.Show(); } if (!m_AuthenticationWindow.IsVisible) { m_AuthenticationWindow.Show(); } }
private async void LoginButton_Click(object sender, RoutedEventArgs e) { await SpotifyAuthenticator.StartRemote(OnLoggedIn); }