<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>(Ascend)guard - Portfolio and Blog</title>
	<atom:link href="http://ascendedguard.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ascendedguard.com</link>
	<description>This is the portfolio and blog for Will Eddins, a software developer, a designer, a gamer, and an overachiever.</description>
	<lastBuildDate>Mon, 15 Aug 2011 17:41:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>SC2 Replay Chat Editor</title>
		<link>http://ascendedguard.com/2011/08/sc2-replay-chat-editor/</link>
		<comments>http://ascendedguard.com/2011/08/sc2-replay-chat-editor/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 17:38:10 +0000</pubDate>
		<dc:creator>Will Eddins</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://ascendedguard.com/?p=122</guid>
		<description><![CDATA[SC2Replay Chat Log Editor is an application for editting the chat logs of replay files. All times represented while editing indicate in-game times. Potential Uses: * Erasing unnecessary chat before casting replay files (usually pause and lag chat) * Adding sponsored advertisements to the beginning of replays originating from you. * Filtering out opponent trolls [...]]]></description>
			<content:encoded><![CDATA[<p>SC2Replay Chat Log Editor is an application for editting the chat logs of replay files. All times represented while editing indicate in-game times.<br />
<strong><br />
</strong><strong>Potential Uses:</strong><br />
* Erasing unnecessary chat before casting replay files (usually pause and lag chat)<br />
* Adding sponsored advertisements to the beginning of replays originating from you.<br />
* Filtering out opponent trolls before releasing a replay pack.</p>
<p><a href="https://github.com/ascendedguard/sc2-chateditor">Contribute on Github</a><br />
<a href="http://www.teamliquid.net/forum/viewmessage.php?topic_id=220138">Discussion on TeamLiquid</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://ascendedguard.com/2011/08/sc2-replay-chat-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Starcraft 2</title>
		<link>http://ascendedguard.com/2011/08/starcraft-2/</link>
		<comments>http://ascendedguard.com/2011/08/starcraft-2/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 20:16:11 +0000</pubDate>
		<dc:creator>Will Eddins</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://ascendedguard.com/?p=107</guid>
		<description><![CDATA[Most of my work over the last few months, outside of formal work, has been on open-source work in the Starcraft 2 community. You can see Starboard used in a majority of streams for Starcraft 2, and has also been adopted in an editted form for Heroes of Newerth and League of Legends. Some of my [...]]]></description>
			<content:encoded><![CDATA[<p>Most of my work over the last few months, outside of formal work, has been on open-source work in the Starcraft 2 community. You can see <a href="http://ascendedguard.com/2011/04/starboard/">Starboard</a> used in a majority of streams for Starcraft 2, and has also been adopted in an editted form for Heroes of Newerth and League of Legends.</p>
<p>Some of my other projects, including Replay sync utilities, C# replay parsing libraries, and an open-source chat log editor has helped the community in creating more formal streaming presentations and extending out into other applications to expand the community.</p>
<p>Using Starboard in particular, I&#8217;ve started extending my reach into Android and iPad development, with a first look into networking to create an application remote control. Look forward to that in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://ascendedguard.com/2011/08/starcraft-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Starcraft Replay Sync Utility</title>
		<link>http://ascendedguard.com/2011/08/starcraft-replay-sync-utility/</link>
		<comments>http://ascendedguard.com/2011/08/starcraft-replay-sync-utility/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 20:06:02 +0000</pubDate>
		<dc:creator>Will Eddins</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://ascendedguard.com/?p=100</guid>
		<description><![CDATA[Replay Sync is a small utility to aide casters in keeping their replay timers in sync. The main caster/streamer game timer serves as a reference point, which all other casters can view and sync to appropriately. Contribute on Github. Download the latest version (Direct Link). Discussion on TeamLiquid Requires .NET 4.0 Client Profile and a [...]]]></description>
			<content:encoded><![CDATA[<p>Replay Sync is a small utility to aide casters in keeping their replay timers in sync. The main caster/streamer game timer serves as a reference point, which all other casters can view and sync to appropriately.</p>
<p><a href="https://github.com/ascendedguard/sc2-replaysync">Contribute on Github.</a><br />
<a href="http://ascendtv.com/replaysync/ReplaySync.exe">Download the latest version (Direct Link).<br />
</a><a href="http://www.teamliquid.net/forum/viewmessage.php?topic_id=243345">Discussion on TeamLiquid</a></p>
<p>Requires .NET 4.0 Client Profile and a Windows OS. No installation is required, just run the application.</p>
<p>Please try to submit bugs on the Github issues page, otherwise feel free to comment, make requests, and critique to your liking.</p>
]]></content:encoded>
			<wfw:commentRss>http://ascendedguard.com/2011/08/starcraft-replay-sync-utility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sc2replay-csharp: C# SC2Replay Parser</title>
		<link>http://ascendedguard.com/2011/08/sc2replay-csharp-c-sc2replay-parser/</link>
		<comments>http://ascendedguard.com/2011/08/sc2replay-csharp-c-sc2replay-parser/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 17:54:51 +0000</pubDate>
		<dc:creator>Will Eddins</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://ascendedguard.com/?p=92</guid>
		<description><![CDATA[sc2replay-csharp SC2Replay-CSharp is an open-source library for assisting developers in parsing information in Starcraft 2 replay files. While a work in progress, it can parse lots of useful information including player, team, match information, and chat logs. Tested to support replays from 1.1.3-1.3.4, but may work with earlier versions. Let me emphasize: This is intended [...]]]></description>
			<content:encoded><![CDATA[<p><strong>sc2replay-csharp</strong></p>
<p>SC2Replay-CSharp is an open-source library for assisting developers in parsing information in Starcraft 2 replay files. While a work in progress, it can parse lots of useful information including player, team, match information, and chat logs.</p>
<p>Tested to support replays from 1.1.3-1.3.4, but may work with earlier versions.</p>
<p>Let me emphasize: <strong>This is intended for developers.</strong></p>
<p>Releases can be found in the download section on Github, but I recommend compiling the latest version of the code to ensure the most stability with the latest replays.</p>
<p>Please try to submit bugs on the Github issues page, otherwise feel free to comment, make requests, and critique to your liking. Also let me know if you&#8217;re using this in a project, I&#8217;ll add you to the list!</p>
<p><a href="https://github.com/ascendedguard/sc2replay-csharp">Download the source on Github</a></p>
<p><a href="http://www.teamliquid.net/forum/viewmessage.php?topic_id=243345">Related thread on TeamLiquid</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://ascendedguard.com/2011/08/sc2replay-csharp-c-sc2replay-parser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Starboard</title>
		<link>http://ascendedguard.com/2011/04/starboard/</link>
		<comments>http://ascendedguard.com/2011/04/starboard/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 23:00:17 +0000</pubDate>
		<dc:creator>Will Eddins</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://ascendedguard.com/?p=82</guid>
		<description><![CDATA[Starboard Starboard is an open-source Starcraft 2 scoreboard for Windows systems. It&#8217;s design around simplicity, making the players obvious and providing caster information to the viewers in an easy-to-read interface. To run, be sure you have .NET 4.0 Client Profile installed. Past that, no installation is necessary, just run the executable and the application will [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Starboard</strong></p>
<p>Starboard is an open-source Starcraft 2 scoreboard for Windows systems. It&#8217;s design around simplicity, making the players obvious and providing caster information to the viewers in an easy-to-read interface.</p>
<p>To run, be sure you have<a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=5765d7a8-7722-4888-a970-ac39b33fd8ab"> .NET 4.0 Client Profile</a> installed. Past that, no installation is necessary, just run the executable and the application will run locally.</p>
<p>To contribute, you can <a href="http://github.com/ascendedguard/starboard-sc2">fork the project on Github.</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://ascendedguard.com/2011/04/starboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ascend TV</title>
		<link>http://ascendedguard.com/2011/03/ascend-tv/</link>
		<comments>http://ascendedguard.com/2011/03/ascend-tv/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 01:01:50 +0000</pubDate>
		<dc:creator>Will Eddins</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://ascendedguard.com/?p=59</guid>
		<description><![CDATA[Ascend TV was originally founded on Livestream, then moved to Justin.tv after acquiring a partnership. Since then, I&#8217;ve casted many events, mostly for Starcraft 2, under the name &#8220;Ascend&#8221;. Ascend TV started out co-casting with Thundertoss with Viewer King of the Hills every week as an experiment. After making the right connections and a little [...]]]></description>
			<content:encoded><![CDATA[<p>Ascend TV was originally founded on Livestream, then moved to Justin.tv after acquiring a partnership. Since then, I&#8217;ve casted many events, mostly for Starcraft 2, under the name &#8220;Ascend&#8221;.</p>
<p>Ascend TV started out co-casting with Thundertoss with Viewer King of the Hills every week as an experiment. After making the right connections and a little sponsorship money from Thundertoss, the King of the Hill expanded to a more professional scene, with Top 200 players fighting it out every week.</p>
<p>Check out Ascend TV at both <a href="http://ascendtv.com">http://ascendtv.com</a> and <a href="http://justin.tv/ascendtv">http://justin.tv/ascendtv</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ascendedguard.com/2011/03/ascend-tv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Website Redesign</title>
		<link>http://ascendedguard.com/2010/08/website-redesign/</link>
		<comments>http://ascendedguard.com/2010/08/website-redesign/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 20:56:05 +0000</pubDate>
		<dc:creator>Will Eddins</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://s265159071.onlinehome.us/ascendedguard/?p=40</guid>
		<description><![CDATA[The website has been redesigned, after having been inactive for the last couple years, with a focus on being a portfolio and blog for any projects I get around to doing. On the previous site, almost all traffic was directed towards an article for creating a Virtual Keyboard in WPF. Since then, I had reworked [...]]]></description>
			<content:encoded><![CDATA[<p>The website has been redesigned, after having been inactive for the last couple years, with a focus on being a portfolio and blog for any projects I get around to doing.</p>
<p>On the previous site, almost all traffic was directed towards an article for creating a Virtual Keyboard in WPF. Since then, I had reworked the keyboard into a more efficient design, and I have posted the code with an example project for those interested to check out in my Portfolio.</p>
<p>On a side note, Starcraft 2 was recently released as well, so I&#8217;ve taken to livestreaming games to help new players, in particular Zerg players, learn how to play the game. I offer commentary and answer questions often through the chat, as well as providing Video on Demand of previous streams. If you&#8217;re a PC gamer interested in Starcraft 2, I recommend you take a look.</p>
<p>Thanks for coming to the new site, and feel free to leave any comments if there&#8217;s something you&#8217;d like to see.</p>
]]></content:encoded>
			<wfw:commentRss>http://ascendedguard.com/2010/08/website-redesign/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual Keyboard Example (C#)</title>
		<link>http://ascendedguard.com/2010/08/virtual-keyboard-example-c/</link>
		<comments>http://ascendedguard.com/2010/08/virtual-keyboard-example-c/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 04:49:52 +0000</pubDate>
		<dc:creator>Will Eddins</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://s265159071.onlinehome.us/ascendedguard/?p=10</guid>
		<description><![CDATA[Creating a virtual keyboard in WPF can be quite an obstacle. As far as I can tell, WPF does not directly support simulating keyboard strokes. This is an example of one way you can solve this problem.]]></description>
			<content:encoded><![CDATA[<p>Creating a virtual keyboard in WPF can be quite an obstacle. As far as I can tell, WPF does not directly support simulating keyboard strokes. This is an example of one way you can solve this problem.<span id="more-10"></span></p>
<p><em>Note: This is an evolution of the virtual keyboard code previously displayed on ascendedguard.com before the redesign.</em></p>
<p>Since WPF does not directly support simulating keyboard strokes, you have two options:</p>
<ul>
<li>Import the SendInput function from a C++ DLL (User32.dll i believe it is)</li>
<li>Manually write the keyboard&#8217;s output using the built-in InputManager</li>
</ul>
<p>In the example I&#8217;m showing here, the end result gives you a simple keyboard control that can be themed from within your DLL, and requires no code. You&#8217;ll notice the test program only contains a single line of code, to focus the cursor on the first text box at startup. There are two functions that really do all the work here. In reality, there are only two kind of keys: Normal and Special Function. Normal keys output some kind of text to the screen. Special function keys will do something special, like pressing shift, backspace, or caps lock, where you don&#8217;t expect the text on the key to be printed to the screen. The following function, WriteText, uses the current InputManager to write text:</p>
<div style="color: black; overflow: auto; border: 1px solid black; padding: 5px; width: 460px; height: 400px;">
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">1:</span> <span style="color: #808080;">///<span style="color: #008000;"> <span style="color: #808080;">&lt;summary&gt;</span></span></span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">2:</span> <span style="color: #808080;">///<span style="color: #008000;"> Handles standard (letter/number) virtual keyboard presses. </span></span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">3:</span> <span style="color: #808080;">///<span style="color: #008000;"> <span style="color: #808080;">&lt;/summary&gt;</span></span></span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">4:</span> <span style="color: #0000ff;">private</span><span style="color: #000000;"> <span style="color: #0000ff;">void</span><span style="color: #000000;"> WriteText(<span style="color: #0000ff;">object</span><span style="color: #000000;"> sender, <span style="color: #2b91af;">RoutedEventArgs</span><span style="color: #000000;"> e)</span></span></span></span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">5:</span> <span style="color: #000000;">{</span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">6:</span>     <span style="color: #008000;">// For all normal letters and numbers, we can just grab the letter that was on the key.</span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">7:</span>     <span style="color: #0000ff;">string</span><span style="color: #000000;"> text = ((<span style="color: #2b91af;">Button</span><span style="color: #000000;"> )sender).Content.ToString();</span></span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">8:</span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">9:</span>     <span style="color: #0000ff;">if</span><span style="color: #000000;"> (<span style="color: #0000ff;">this</span><span style="color: #000000;"> .IsShiftPressed)</span></span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">10:</span>     <span style="color: #000000;">{</span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">11:</span>         <span style="color: #008000;">// Unselect the shift key once a capital letter has been inserted.</span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">12:</span>         <span style="color: #0000ff;">this</span><span style="color: #000000;"> .IsShiftPressed = <span style="color: #0000ff;">false</span><span style="color: #000000;"> ;</span></span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">13:</span>     <span style="color: #000000;">}</span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">14:</span>     <span style="color: #0000ff;">else</span><span style="color: #000000;"> <span style="color: #0000ff;">if</span><span style="color: #000000;"> (<span style="color: #0000ff;">this</span><span style="color: #000000;"> .IsCapsLockPressed == <span style="color: #0000ff;">false</span><span style="color: #000000;"> )</span></span></span></span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">15:</span>     <span style="color: #000000;">{</span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">16:</span>         text = text.ToLower();</pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">17:</span>     <span style="color: #000000;">}</span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">18:</span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">19:</span>     <span style="color: #0000ff;">var</span><span style="color: #000000;"> textEvent = <span style="color: #0000ff;">new</span><span style="color: #000000;"> <span style="color: #2b91af;">TextCompositionEventArgs</span><span style="color: #000000;"> (<span style="color: #2b91af;">Keyboard</span><span style="color: #000000;"> .PrimaryDevice, <span style="color: #0000ff;">new</span><span style="color: #000000;"> <span style="color: #2b91af;">TextComposition</span><span style="color: #000000;"> (<span style="color: #2b91af;">InputManager</span><span style="color: #000000;"> .Current, <span style="color: #2b91af;">Keyboard</span><span style="color: #000000;"> .FocusedElement, text))</span></span></span></span></span></span></span></span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">20:</span>                         <span style="color: #000000;">{</span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">21:</span>                             RoutedEvent = TextInputEvent</pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">22:</span>                         <span style="color: #000000;">}</span>;</pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">23:</span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">24:</span>     <span style="color: #2b91af;">InputManager</span><span style="color: #000000;"> .Current.ProcessInput(textEvent);</span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">25:</span> <span style="color: #000000;">}</span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">26:</span></pre>
</div>
<p>The special keys are, in some ways, simpler, but require special logic. For most keys, you can simply embed the Key that will be pressed within the Tag of each key, and send the appropriate RoutedEvent. For Shift and Caps Lock, though, since we&#8217;re handling logic about capitalization in our WriteText method, we simply set appropriate properties in our class:</p>
<p>&nbsp;</p>
<div style="color: black; overflow: auto; border: 1px solid black; padding: 5px; width: 460px; height: 400px;">
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">1:</span> <span style="color: #808080;">///<span style="color: #008000;"> <span style="color: #808080;">&lt;summary&gt;<span style="color: #008000;"> Handles standard (letter/number) virtual keyboard presses. <span style="color: #808080;">&lt;/summary&gt;</span></span></span></span></span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">2:</span> <span style="color: #808080;">///<span style="color: #008000;"> <span style="color: #808080;">&lt;param name="sender"&gt;<span style="color: #008000;"> Keyboard button sending the event. <span style="color: #808080;">&lt;/param&gt;</span></span></span></span></span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">3:</span> <span style="color: #808080;">///<span style="color: #008000;"> <span style="color: #808080;">&lt;param name="e"&gt;<span style="color: #008000;"> Event arguments. <span style="color: #808080;">&lt;/param&gt;</span></span></span></span></span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">4:</span> <span style="color: #0000ff;">private</span><span style="color: #000000;"> <span style="color: #0000ff;">void</span><span style="color: #000000;"> PressSpecialKey(<span style="color: #0000ff;">object</span><span style="color: #000000;"> sender, <span style="color: #2b91af;">RoutedEventArgs</span><span style="color: #000000;"> e)</span></span></span></span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">5:</span> <span style="color: #000000;">{</span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">6:</span>     <span style="color: #2b91af;">Key</span><span style="color: #000000;"> key = (<span style="color: #2b91af;">Key</span><span style="color: #000000;"> )((<span style="color: #2b91af;">Button</span><span style="color: #000000;"> )sender).Tag;</span></span></span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">7:</span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">8:</span>     <span style="color: #2b91af;">KeyEventArgs</span><span style="color: #000000;"> keyEvent = <span style="color: #0000ff;">new</span><span style="color: #000000;"> <span style="color: #2b91af;">KeyEventArgs</span><span style="color: #000000;"> (<span style="color: #2b91af;">Keyboard</span><span style="color: #000000;"> .PrimaryDevice, <span style="color: #2b91af;">Keyboard</span><span style="color: #000000;"> .PrimaryDevice.ActiveSource, 0, key)</span></span></span></span></span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">9:</span>     <span style="color: #000000;">{</span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">10:</span>         RoutedEvent = KeyDownEvent</pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">11:</span>     <span style="color: #000000;">}</span>;</pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">12:</span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">13:</span>     <span style="color: #2b91af;">InputManager</span><span style="color: #000000;"> .Current.ProcessInput(keyEvent);</span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">14:</span> <span style="color: #000000;">}</span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">15:</span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">16:</span> <span style="color: #808080;">///<span style="color: #008000;"> <span style="color: #808080;">&lt;summary&gt;<span style="color: #008000;"> Presses or depresses the shift key when caps lock is not pressed. <span style="color: #808080;">&lt;/summary&gt;</span></span></span></span></span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">17:</span> <span style="color: #808080;">///<span style="color: #008000;"> <span style="color: #808080;">&lt;param name="sender"&gt;<span style="color: #008000;"> Object sending the event. <span style="color: #808080;">&lt;/param&gt;</span></span></span></span></span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">18:</span> <span style="color: #808080;">///<span style="color: #008000;"> <span style="color: #808080;">&lt;param name="e"&gt;<span style="color: #008000;"> Event arguments. <span style="color: #808080;">&lt;/param&gt;</span></span></span></span></span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">19:</span> <span style="color: #0000ff;">private</span><span style="color: #000000;"> <span style="color: #0000ff;">void</span><span style="color: #000000;"> PressShift(<span style="color: #0000ff;">object</span><span style="color: #000000;"> sender, <span style="color: #2b91af;">RoutedEventArgs</span><span style="color: #000000;"> e)</span></span></span></span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">20:</span> <span style="color: #000000;">{</span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">21:</span>     <span style="color: #008000;">// No reason to change anything if caps is enabled.</span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">22:</span>     <span style="color: #0000ff;">if</span><span style="color: #000000;"> (<span style="color: #0000ff;">this</span><span style="color: #000000;"> .IsCapsLockPressed == <span style="color: #0000ff;">false</span><span style="color: #000000;"> )</span></span></span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">23:</span>     <span style="color: #000000;">{</span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">24:</span>         <span style="color: #0000ff;">this</span><span style="color: #000000;"> .IsShiftPressed = !IsShiftPressed;</span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">25:</span>     <span style="color: #000000;">}</span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">26:</span> <span style="color: #000000;">}</span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">27:</span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">28:</span> <span style="color: #808080;">///<span style="color: #008000;"> <span style="color: #808080;">&lt;summary&gt;<span style="color: #008000;"> Presses or depresses the caps lock key. <span style="color: #808080;">&lt;/summary&gt;</span></span></span></span></span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">29:</span> <span style="color: #808080;">///<span style="color: #008000;"> <span style="color: #808080;">&lt;param name="sender"&gt;<span style="color: #008000;"> Object sending the event. <span style="color: #808080;">&lt;/param&gt;</span></span></span></span></span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">30:</span> <span style="color: #808080;">///<span style="color: #008000;"> <span style="color: #808080;">&lt;param name="e"&gt;<span style="color: #008000;"> Event arguments. <span style="color: #808080;">&lt;/param&gt;</span></span></span></span></span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">31:</span> <span style="color: #0000ff;">private</span><span style="color: #000000;"> <span style="color: #0000ff;">void</span><span style="color: #000000;"> PressCapsLock(<span style="color: #0000ff;">object</span><span style="color: #000000;"> sender, <span style="color: #2b91af;">RoutedEventArgs</span><span style="color: #000000;"> e)</span></span></span></span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">32:</span> <span style="color: #000000;">{</span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">33:</span>     <span style="color: #0000ff;">this</span><span style="color: #000000;"> .IsCapsLockPressed = !IsCapsLockPressed;</span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">34:</span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">35:</span>     <span style="color: #0000ff;">this</span><span style="color: #000000;"> .IsShiftPressed = <span style="color: #0000ff;">false</span><span style="color: #000000;"> ;</span></span></pre>
<pre style="background: #f4f4f4; margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">36:</span> <span style="color: #000000;">}</span></pre>
<pre style="margin: 0em;"><span style="text-align: right; display: inline-block; width: 30px; margin-right: 10px; color: black;">37:</span></pre>
</div>
<p>There are a few limitations with this implementation:</p>
<ul>
<li>The virtual keyboard must be embedded on every form you intend to use it on. In some implementations, like single screen input kiosks, this may be desired even. However, it means you can&#8217;t just set a window as top-most and use it across your entire application.</li>
<li>Special characters aren&#8217;t included currently, which would be required for fields like &#8220;E-mail address&#8221;. You can treat this as an exercise to extend functionality of this keyboard.</li>
</ul>
<p>Download the full source code, including a VS2010 project, here:<br />
<a href="/downloads/VKSource1.0.0.0.zip">Virtual Keyboard Example v.1.0.0.0</a></p>
<p>You can download a pre-compiled version of the app here:<br />
<a href="/downloads/VKApp1.0.0.0.zip">Pre-compiled VK Example</a> <em>Requires minimum .NET Framework 4.0 Client Profile</em></p>
<p><em><span style="text-decoration: underline;">Revisions<br />
</span><span style="font-style: normal;">1.0.0.0 &#8211; Initial Version</span></em></p>
<p><em><br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://ascendedguard.com/2010/08/virtual-keyboard-example-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

