diff options
Diffstat (limited to 'samples/OAuthConsumerWpf/Authorize.xaml.cs')
-rw-r--r-- | samples/OAuthConsumerWpf/Authorize.xaml.cs | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/samples/OAuthConsumerWpf/Authorize.xaml.cs b/samples/OAuthConsumerWpf/Authorize.xaml.cs index 26e5abc..c28e6cc 100644 --- a/samples/OAuthConsumerWpf/Authorize.xaml.cs +++ b/samples/OAuthConsumerWpf/Authorize.xaml.cs @@ -1,30 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -using System.Threading; -using DotNetOpenAuth.OAuth; -using DotNetOpenAuth.ApplicationBlock; -using System.Xml.Linq; +namespace DotNetOpenAuth.Samples.OAuthConsumerWpf { + using System; + using System.Collections.Generic; + using System.Linq; + using System.Text; + using System.Threading; + using System.Windows; + using System.Windows.Controls; + using System.Windows.Data; + using System.Windows.Documents; + using System.Windows.Input; + using System.Windows.Media; + using System.Windows.Media.Imaging; + using System.Windows.Shapes; + using System.Xml.Linq; + using DotNetOpenAuth.ApplicationBlock; + using DotNetOpenAuth.OAuth; -namespace DotNetOpenAuth.Samples.OAuthConsumerWpf { /// <summary> /// Interaction logic for Authorize.xaml /// </summary> - partial class Authorize : Window { + public partial class Authorize : Window { private DesktopConsumer google; private string requestToken; - internal string AccessToken { get; set; } - internal Authorize(DesktopConsumer consumer) { InitializeComponent(); @@ -42,9 +40,10 @@ namespace DotNetOpenAuth.Samples.OAuthConsumerWpf { finishButton.IsEnabled = true; })); }); - } + internal string AccessToken { get; set; } + private void finishButton_Click(object sender, RoutedEventArgs e) { var grantedAccess = this.google.ProcessUserAuthorization(this.requestToken, verifierBox.Text); this.AccessToken = grantedAccess.AccessToken; |