private void PerformOAuthAuthorization() { try { var dlg = new OAuthDialog(); bool?result = dlg.ShowDialog(); if (result.HasValue == result.Value) { if (VerifyOAuthCredentials()) { /* AuthStatusLabel.Content = "Authorized"; * AuthStatusLabel.Foreground = Brushes.Green; */ } } else { /* AuthStatusLabel.Content = "Authorization cancelled."; * AuthStatusLabel.Foreground = Brushes.Red; * tryAgainButton.Visibility = Visibility.Visible; */ } } catch { // no authorisation because no internet } }
private void PerformOAuthAuthorization() { try { var dlg = new OAuthDialog(); bool? result = dlg.ShowDialog(); if (result.HasValue == result.Value) { if (VerifyOAuthCredentials()) { /* AuthStatusLabel.Content = "Authorized"; AuthStatusLabel.Foreground = Brushes.Green; */ } } else { /* AuthStatusLabel.Content = "Authorization cancelled."; AuthStatusLabel.Foreground = Brushes.Red; tryAgainButton.Visibility = Visibility.Visible; */ } } catch { // no authorisation because no internet } }