[Mwinapi-commits] SF.net SVN: mwinapi:[86] trunk/ManagedWinapi/KeyboardKey.cs
Status: Beta
Brought to you by:
schierlm
From: <sch...@us...> - 2009-11-27 20:28:05
|
Revision: 86 http://mwinapi.svn.sourceforge.net/mwinapi/?rev=86&view=rev Author: schierlm Date: 2009-11-27 18:34:29 +0000 (Fri, 27 Nov 2009) Log Message: ----------- Make sure that the KeyboardKey class is not instantiated with modifier key constants. Modified Paths: -------------- trunk/ManagedWinapi/KeyboardKey.cs Modified: trunk/ManagedWinapi/KeyboardKey.cs =================================================================== --- trunk/ManagedWinapi/KeyboardKey.cs 2009-11-10 17:19:48 UTC (rev 85) +++ trunk/ManagedWinapi/KeyboardKey.cs 2009-11-27 18:34:29 UTC (rev 86) @@ -19,6 +19,8 @@ /// <param name="key"></param> public KeyboardKey(Keys key) { + if ((key & Keys.Modifiers) != 0) + throw new ArgumentException("Modifier keys not supported. Use ShiftKey instead of Shift etc."); this.key = key; switch (key) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |