示例#1
0
 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
     }
 }
示例#2
0
 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
     }
 }