summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-04-28 12:06:10 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-04-28 12:06:10 -0700
commitae2d2663f7231ae6133d5c8a33c90dbe4832a490 (patch)
treeea7253542aff3b3210f0ac069cf2b5e62257d070
parente8376fc81563d06c36bf05cfa00b3bfe6813d06b (diff)
downloadDotNetOpenAuth-ae2d2663f7231ae6133d5c8a33c90dbe4832a490.zip
DotNetOpenAuth-ae2d2663f7231ae6133d5c8a33c90dbe4832a490.tar.gz
DotNetOpenAuth-ae2d2663f7231ae6133d5c8a33c90dbe4832a490.tar.bz2
Fixed StyleCop messages in offline OP app.
-rw-r--r--samples/OpenIdOfflineProvider/NativeMethods.cs32
1 files changed, 28 insertions, 4 deletions
diff --git a/samples/OpenIdOfflineProvider/NativeMethods.cs b/samples/OpenIdOfflineProvider/NativeMethods.cs
index ec12819..b512d70 100644
--- a/samples/OpenIdOfflineProvider/NativeMethods.cs
+++ b/samples/OpenIdOfflineProvider/NativeMethods.cs
@@ -10,6 +10,9 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider {
using System.Windows;
using System.Windows.Interop;
+ /// <summary>
+ /// P/Invoke methods and wrappers.
+ /// </summary>
internal static class NativeMethods {
/// <summary>
/// Gets the HWND of the current foreground window on the system.
@@ -17,20 +20,41 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider {
/// <returns>A handle to the foreground window.</returns>
[DllImport("user32.dll")]
internal static extern IntPtr GetForegroundWindow();
-
+
+ /// <summary>
+ /// Sets the foreground window of the system.
+ /// </summary>
+ /// <param name="hWnd">The HWND of the window to set as active.</param>
+ /// <returns>A value indicating whether the foreground window was actually changed.</returns>
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
internal static extern bool SetForegroundWindow(IntPtr hWnd);
- [DllImport("user32.dll")]
- private static extern IntPtr SetActiveWindow(IntPtr hWnd);
-
+ /// <summary>
+ /// Sets the foreground window of the system.
+ /// </summary>
+ /// <param name="window">The window to bring to the foreground.</param>
+ /// <returns>
+ /// A value indicating whether the foreground window was actually changed.
+ /// </returns>
internal static bool SetForegroundWindow(Window window) {
return SetForegroundWindow(new WindowInteropHelper(window).Handle);
}
+ /// <summary>
+ /// Sets the active window of the process.
+ /// </summary>
+ /// <param name="window">The window to bring to the foreground.</param>
internal static void SetActiveWindow(Window window) {
SetActiveWindow(new WindowInteropHelper(window).Handle);
}
+
+ /// <summary>
+ /// Sets the active window of the process.
+ /// </summary>
+ /// <param name="hWnd">The HWND of the window to set as active.</param>
+ /// <returns>The window that was previously active?</returns>
+ [DllImport("user32.dll")]
+ private static extern IntPtr SetActiveWindow(IntPtr hWnd);
}
}