summaryrefslogtreecommitdiffstats
path: root/src/OAuth/OAuthConsumerWpf/Authorize2.xaml.cs
blob: 2787bb739e763c050add8193dde445ea70a004a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
namespace DotNetOpenAuth.Samples.OAuthConsumerWpf {
    using System.Windows;

    using DotNetOpenAuth.OAuth2;

	/// <summary>
	/// Interaction logic for Authorize2.xaml
	/// </summary>
	public partial class Authorize2 : Window {
		internal Authorize2(UserAgentClient client) {
			this.InitializeComponent();
			this.clientAuthorizationView.Client = client;
		}

		public IAuthorizationState Authorization {
			get { return this.clientAuthorizationView.Authorization; }
		}

		private void clientAuthorizationView_Completed(object sender, ClientAuthorizationCompleteEventArgs e) {
			this.DialogResult = e.Authorization != null;
			this.Close();
		}
	}
}