summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2010-07-11 21:55:12 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2010-07-11 21:55:12 -0700
commit5a503f3301279dff156816a6e5e527ad065caa12 (patch)
tree7bc803d888cd889b86ab96fa3e3079731e4ec7a9
parent703dbe1ded342fbe45a9afbb2fc0106870f6ad9a (diff)
downloadDotNetOpenAuth-5a503f3301279dff156816a6e5e527ad065caa12.zip
DotNetOpenAuth-5a503f3301279dff156816a6e5e527ad065caa12.tar.gz
DotNetOpenAuth-5a503f3301279dff156816a6e5e527ad065caa12.tar.bz2
Slight UI changes to WPF OAuth 2.0 consumer app.
-rw-r--r--samples/OAuthConsumerWpf/Authorize2.xaml2
-rw-r--r--samples/OAuthConsumerWpf/Authorize2.xaml.cs6
2 files changed, 7 insertions, 1 deletions
diff --git a/samples/OAuthConsumerWpf/Authorize2.xaml b/samples/OAuthConsumerWpf/Authorize2.xaml
index ea5047f..eb59060 100644
--- a/samples/OAuthConsumerWpf/Authorize2.xaml
+++ b/samples/OAuthConsumerWpf/Authorize2.xaml
@@ -5,7 +5,7 @@
Title="Authorize" Height="500" Width="500">
<DockPanel LastChildFill="True">
<WindowsFormsHost Name="windowsFormsHost1">
- <wf:WebBrowser x:Name="webBrowser" Dock="Fill" Navigating="webBrowser_Navigating" Navigated="webBrowser_Navigated" LocationChanged="webBrowser_LocationChanged" />
+ <wf:WebBrowser x:Name="webBrowser" Dock="Fill" Navigating="webBrowser_Navigating" Navigated="webBrowser_Navigated" LocationChanged="webBrowser_LocationChanged" IsWebBrowserContextMenuEnabled="False" />
</WindowsFormsHost>
</DockPanel>
</Window>
diff --git a/samples/OAuthConsumerWpf/Authorize2.xaml.cs b/samples/OAuthConsumerWpf/Authorize2.xaml.cs
index 9c5c2dc..d407a51 100644
--- a/samples/OAuthConsumerWpf/Authorize2.xaml.cs
+++ b/samples/OAuthConsumerWpf/Authorize2.xaml.cs
@@ -39,6 +39,12 @@
}
private void locationChanged(Uri location) {
+ if (location.Scheme == "res") {
+ this.DialogResult = false;
+ this.Close();
+ MessageBox.Show("An error occurred during authorization.");
+ }
+
if (SignificantlyEqual(location, this.Authorization.Callback, UriComponents.SchemeAndServer | UriComponents.Path)) {
try {
this.client.ProcessUserAuthorization(location, this.Authorization);