<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom">
  <title>PK Software Blog (old)</title>
  <link rel="alternate" type="text/html" href="http://www.pksoftware.net/blog/" />
  <link rel="self" href="http://www.pksoftware.net/blog/SyndicationService.asmx/GetAtom" />
  <icon>favicon.ico</icon>
  <updated>2008-04-24T03:15:06.8664103-07:00</updated>
  <author>
    <name>Paul Kohler</name>
  </author>
  <subtitle>My blog has moved!!</subtitle>
  <id>http://www.pksoftware.net/blog/</id>
  <generator uri="http://www.dasblog.net" version="1.9.6264.0">DasBlog</generator>
  <entry>
    <title>Blog has moved - but not far!</title>
    <link rel="alternate" type="text/html" href="http://www.pksoftware.net/blog/2008/03/11/Blog+Has+Moved+But+Not+Far.aspx" />
    <id>http://www.pksoftware.net/blog/PermaLink,guid,f08b331c-885c-4c65-a641-f1fa85daf4ce.aspx</id>
    <published>2008-03-11T05:10:58.7770759-07:00</published>
    <updated>2008-03-11T05:10:58.7770759-07:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
My blog has moved... to <a href="http://www.pksoftware.net/devblog/">http://www.pksoftware.net/devblog/</a> and
the RSS feed is now <a href="http://www.pksoftware.net/devblog/syndication.axd">http://www.pksoftware.net/devblog/syndication.axd</a></p>
        <p>
 
</p>
        <img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=f08b331c-885c-4c65-a641-f1fa85daf4ce" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Slight upgrade to Mini SQL Query</title>
    <link rel="alternate" type="text/html" href="http://www.pksoftware.net/blog/2008/03/03/Slight+Upgrade+To+Mini+SQL+Query.aspx" />
    <id>http://www.pksoftware.net/blog/PermaLink,guid,8e67288a-52f3-414c-9a6f-ed41a1117dab.aspx</id>
    <published>2008-03-03T02:30:11.0967614-08:00</published>
    <updated>2008-03-03T02:30:11.0967614-08:00</updated>
    <category term="Products" label="Products" scheme="http://www.pksoftware.net/blog/CategoryView,category,Products.aspx" />
    <category term="Products/Mini SQL Query" label="Products/Mini SQL Query" scheme="http://www.pksoftware.net/blog/CategoryView,category,Products%2cMini%2BSQL%2BQuery.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">Last week I slipped an update in to <b><a href="http://www.pksoftware.net/MiniSqlQuery/">Mini
SQL Query</a></b> - version 0.9.37.<br />
Just minor fixes, updates, a <a href="http://www.pksoftware.net/MiniSqlQuery/Help/">quick
start help page</a> and I added a "Templates" tool window plugin...<br /><p></p><img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=8e67288a-52f3-414c-9a6f-ed41a1117dab" /></div>
    </content>
  </entry>
  <entry>
    <title>Beta Release of Mini SQL Query</title>
    <link rel="alternate" type="text/html" href="http://www.pksoftware.net/blog/2008/02/01/Beta+Release+Of+Mini+SQL+Query.aspx" />
    <id>http://www.pksoftware.net/blog/PermaLink,guid,13c6f6d8-20cc-458a-a254-ff50355e0685.aspx</id>
    <published>2008-01-31T18:43:45.381-08:00</published>
    <updated>2008-01-31T20:46:13.3186272-08:00</updated>
    <category term="Products" label="Products" scheme="http://www.pksoftware.net/blog/CategoryView,category,Products.aspx" />
    <category term="Products/Mini SQL Query" label="Products/Mini SQL Query" scheme="http://www.pksoftware.net/blog/CategoryView,category,Products%2cMini%2BSQL%2BQuery.aspx" />
    <content type="html">&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Arial&gt;&lt;strong&gt;Mini
SQL Query&lt;/strong&gt; is one of those tools that I have had in my &lt;em&gt;self coded toolbox&lt;/em&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt; for
a long time now. Last year I almost released it to the public but a few things happened
and the release sadly didn't. My apologies to those that were waiting, I had plenty
of emails in the months to follow asking where the editor was!&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;
&lt;o:p&gt;
&lt;font face=Arial color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Arial&gt;Well,
I finally uploaded the beta - see &lt;/font&gt;&lt;a href="http://www.pksoftware.net/MiniSqlQuery/"&gt;&lt;strong&gt;&lt;font face=Arial&gt;http://www.pksoftware.net/MiniSqlQuery/&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt;&lt;font face=Arial&gt; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font size=3&gt;&lt;font face=Arial color=#000000&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=center&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font face=Arial&gt;&amp;nbsp;&lt;img title="Mini SQL Query hitting an MSSQL database" src="http://www.pksoftware.net/blog/content/binary/msq-view-table.png" border=0&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=center&gt;
&lt;strong&gt;Mini SQL Query&lt;/strong&gt; hitting an MSSQL database.
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face=Arial&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Arial&gt;Make
sure you register so that when fixes or major releases are made you know – there is
also the &lt;/font&gt;&lt;a href="http://www.pksoftware.net/blog/SyndicationService.asmx/GetRssCategory?categoryName=Products%7CMini%20SQL%20Query"&gt;&lt;font face=Arial&gt;Mini
SQL Query product RSS feed&lt;/font&gt;&lt;/a&gt;&lt;font face=Arial&gt;). Keep in mind its &lt;em&gt;in no
way&lt;/em&gt;&amp;nbsp;intended as a replacement for Microsoft's "SQL Server Management Studio".
I use it for making quick queries or updates to my databases. I find it particularly
good for managing a remotely hosted database. I don't use it for modeling databases
etc but I do plan on making a bunch of plugins to help with quickly putting together
a &lt;strong&gt;NetTiers&lt;/strong&gt; focused database model.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;
&lt;o:p&gt;
&lt;font face=Arial color=#000000 size=3&gt;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Arial&gt;&lt;img title="Mini SQL Query hitting an MS Access database with a table window floating" src="http://www.pksoftware.net/blog/content/binary/msq-dockable-windows.PNG" border=0&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=center&gt;
&lt;strong&gt;Mini SQL Query&lt;/strong&gt; hitting an MS Access database with a table window
floating.
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=center&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Arial&gt;The
application itself it an exercise in &lt;strong&gt;minimalist coding&lt;/strong&gt;. I made use
of open source libraries such as the &lt;strong&gt;ICSharpTextEditor&lt;/strong&gt; giving lots
of edit functionality with little effort. I used &lt;strong&gt;Weifen Luo’s docking library&lt;/strong&gt; which
has been great (I need to track down the correct links etc will post later). The design
employs a &lt;em&gt;service model&lt;/em&gt; with &lt;em&gt;commands &lt;/em&gt;which keeps code nicely separated
and easily extendable (see the &lt;/font&gt;&lt;a href="http://www.pksoftware.net/MiniSqlQuery/Help/api/" target=_blank&gt;&lt;font face=Arial&gt;API
docs&lt;/font&gt;&lt;/a&gt;&lt;font face=Arial&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;on making
plugins if you have the geekish urge to!) The testing is done with a combination of
stubs and mocks (I use &lt;strong&gt;Rhino Mocks&lt;/strong&gt;, just love the style...)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;The whole
application was actually coded with &lt;strong&gt;Microsoft Visual C# Express Edition&lt;/strong&gt;.
I wanted to see what a hobby developer IDE could come up with.&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;&lt;strong&gt;&lt;em&gt;Some
notes...&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;&lt;strong&gt;Multiple
Connection Types&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;One of
the main features is the fact that you can connect to pretty much any database so
long as you know the Provider type and connection string. I have only had MSSQL and
Access databases to test against so far but I might try and ressurect my Oracle instance
just to check out the schema details.&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;Probaby
the main usability thing to keep in mind is that if you change the provider type and/or
the connection string you should hit the 'Refresh Database Connection' button/menu
item. The 'Database Inspector' gets reloaded at this point too.&amp;nbsp;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;&lt;strong&gt;Database
Inspector&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;The inspector
window shows basic details that are taken from the DBConnection.GetSchema output.
I have noticed that some of the types for the access databases are not actually defined
and so come though as a number with a question mark (e.g. 130? with is actually a
variable string) .&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial size=3&gt;&lt;strong&gt;Settings Persistance&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial size=3&gt;There is none! I have
not worried about it to date but that will turn up in time.&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial size=3&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial size=3&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial size=3&gt;Let me know what you
think, PK&amp;nbsp; :-)&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=13c6f6d8-20cc-458a-a254-ff50355e0685" /&gt;</content>
  </entry>
  <entry>
    <title>An MVC Project Template for Visual Web Developer 2008 Express</title>
    <link rel="alternate" type="text/html" href="http://www.pksoftware.net/blog/2007/12/24/An+MVC+Project+Template+For+Visual+Web+Developer+2008+Express.aspx" />
    <id>http://www.pksoftware.net/blog/PermaLink,guid,321d2fd6-bec9-4de2-9501-d34115e7bd6a.aspx</id>
    <published>2007-12-23T19:09:14.999-08:00</published>
    <updated>2008-03-12T04:57:00.8633885-07:00</updated>
    <category term="Coding" label="Coding" scheme="http://www.pksoftware.net/blog/CategoryView,category,Coding.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I was working with the new MS MVC framework but with express, I used <a href="http://www.lazycoder.com/weblog/index.php/archives/2007/12/10/using-the-aspnet-mvc-framework-with-visual-web-developer-express" target="_blank">Lazycoders
post</a> as a helper to what lead to this template. I have put together a simple C#
project template for Visual Web Developer 2008 Express Edition. Just dump it into
your 
</p>
        <p>
  "(my docs)\Visual Studio 2008\Templates\<strong>ProjectTemplates</strong>\Visual
Web Developer"
</p>
        <p>
folder and choose “new website” etc (may need to restart the IDE to pick up the files).
</p>
        <p>
          <img src="http://www.pksoftware.net/blog/content/binary/mvc-1.Png" border="0" />
        </p>
        <p>
It puts together the basic structure using the "App_Code" restriction in the express
edition of the IDE (well, and some others...)
</p>
        <p>
          <img src="http://www.pksoftware.net/blog/content/binary/mvc-2.Png" border="0" />
        </p>
        <p>
 
</p>
        <p>
There is also a simple “view page” item template, drop this into 
</p>
        <p>
  "(my docs)\Visual Studio 2008\Templates\<strong>ItemTemplates</strong>\Visual
Web Developer"
</p>
        <p>
I did not worry about the controller (simgle page + simple change etc)...
</p>
        <p>
Merry Christmas! PK :-)
</p>
        <p>
 
</p>
        <p>
          <strong>Files:</strong>
        </p>
        <p>
        </p>
        <ul>
          <li>
            <a href="http://www.pksoftware.net/blog/content/binary/WebDevMvcAspNetSite.zip">WebDevMvcAspNetSite.zip
(8.73 KB)</a> (C# project template) 
</li>
          <li>
            <a href="http://www.pksoftware.net/blog/content/binary/MvcViewPage.zip">MvcViewPage.zip
(2.27 KB)</a> (C# item template)</li>
        </ul>
        <img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=321d2fd6-bec9-4de2-9501-d34115e7bd6a" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Tip - Use failing Unit Tests to mark your TODO Items</title>
    <link rel="alternate" type="text/html" href="http://www.pksoftware.net/blog/2007/10/31/Tip+Use+Failing+Unit+Tests+To+Mark+Your+TODO+Items.aspx" />
    <id>http://www.pksoftware.net/blog/PermaLink,guid,5e2051cc-df44-415d-ac7f-4d027416e414.aspx</id>
    <published>2007-10-31T02:40:05.149-07:00</published>
    <updated>2007-10-31T03:12:06.4711726-07:00</updated>
    <category term="Coding" label="Coding" scheme="http://www.pksoftware.net/blog/CategoryView,category,Coding.aspx" />
    <category term="TDD" label="TDD" scheme="http://www.pksoftware.net/blog/CategoryView,category,TDD.aspx" />
    <category term="Testing" label="Testing" scheme="http://www.pksoftware.net/blog/CategoryView,category,Testing.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">It's common practice for developers to make
small "TODO" notes in code as they work for themselves or others to clarify at some
time...<br /><p><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"><span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">//
TODO: confirm this business requirement...</span><br /><span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">//
TODO: make this better!</span><br /><span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">//
TODO: bread, butter, eggs and milk...</span><br /></span></p>
Issues can arise when the TODO's are not taken care of for whatever reason or get
lost in the mayhem of meeting deadlines. A worst case scenario could arise when there
is a production defect for an obscure situation and the maintenance programmer finds
something like this:<br /><p><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"><span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">//
TODO: Not sure if there are any more response codes for this one, check before release.</span></span></p>
Opps! Now that's expensive.<br />
Now I am not saying this is good or bad (!) practice - but what I have started to
do within my team is create either a <b>failing </b>or <b>ignored unit test</b> (depending
on the importance) marking what would normally be an innocent "TODO" item. The unit
test stays in the build as either a fail or ignore and does not drop off the radar. 
<br /><p><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;">[Test]<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> Need_to_confirm_foo()<br />
{<br />
  Assert.Fail();<br />
}</span></p>
Or...<br /><p><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;">[Test]<br />
[Ignore(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"Confirmation
required from the business"</span>)]<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> A_foo_only_has_a_bla()<br />
{<br />
}</span></p>
It's much harder to miss a bunch of ignored or failing unit tests before that production
release than some well hidden TODO comments!<br /><br /><p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.pksoftware.net%2fblog%2f2007%2f10%2f31%2fTip%2bUse%2bFailing%2bUnit%2bTests%2bTo%2bMark%2bYour%2bTODO%2bItems.aspx"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.pksoftware.net%2fblog%2f2007%2f10%2f31%2fTip%2bUse%2bFailing%2bUnit%2bTests%2bTo%2bMark%2bYour%2bTODO%2bItems.aspx&amp;bgcolor=0099FF" alt="kick it on DotNetKicks.com" border="0" /></a></p><img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=5e2051cc-df44-415d-ac7f-4d027416e414" /></div>
    </content>
  </entry>
  <entry>
    <title>Microsoft to Release the Source Code for the .NET Framework Libraries</title>
    <link rel="alternate" type="text/html" href="http://www.pksoftware.net/blog/2007/10/04/Microsoft+To+Release+The+Source+Code+For+The+NET+Framework+Libraries.aspx" />
    <id>http://www.pksoftware.net/blog/PermaLink,guid,01dbfdf0-aa7e-4827-b4fa-2723dec9adb2.aspx</id>
    <published>2007-10-03T19:22:05.235-07:00</published>
    <updated>2007-10-05T19:22:05.2350929-07:00</updated>
    <category term="Coding" label="Coding" scheme="http://www.pksoftware.net/blog/CategoryView,category,Coding.aspx" />
    <category term="Links" label="Links" scheme="http://www.pksoftware.net/blog/CategoryView,category,Links.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Scott Guthrie talks about Microsoft releasing the .Net framework source code later
this year.<br />
A very good move by Microsoft I think :-)
</p>
        <p>
          <a href="http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx">http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx</a>
        </p>
        <img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=01dbfdf0-aa7e-4827-b4fa-2723dec9adb2" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Behaviour Driven Unit Test Design Tool Updated</title>
    <link rel="alternate" type="text/html" href="http://www.pksoftware.net/blog/2007/09/04/Behaviour+Driven+Unit+Test+Design+Tool+Updated.aspx" />
    <id>http://www.pksoftware.net/blog/PermaLink,guid,74e669ee-3ef9-4348-8996-8b16b866aad1.aspx</id>
    <published>2007-09-04T03:49:31.293-07:00</published>
    <updated>2007-09-06T02:24:10.2895132-07:00</updated>
    <category term="Products" label="Products" scheme="http://www.pksoftware.net/blog/CategoryView,category,Products.aspx" />
    <category term="Products/Behaviour to Unit Test" label="Products/Behaviour to Unit Test" scheme="http://www.pksoftware.net/blog/CategoryView,category,Products%2cBehaviour%2Bto%2BUnit%2BTest.aspx" />
    <category term="TDD" label="TDD" scheme="http://www.pksoftware.net/blog/CategoryView,category,TDD.aspx" />
    <category term="Testing" label="Testing" scheme="http://www.pksoftware.net/blog/CategoryView,category,Testing.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Make that version 1.0.0.3!<br /></p>
        <p>
I did not quite get this feature into the previous version and just posted the updates
in case I got busy.
</p>
        <p>
The big (and very useful) change for <em>build 3</em> is that you can "paste" <em>unit
test code</em> into the tool and the phrases will be extracted - if they use
underscores and the code is C# (sorry, minor bug, I'll fix that shortly!) In practice
I have found the underscore styke far more readable.
</p>
        <p>
For example, if you have the following unit test code, copy it to the clipboard...
</p>
        <p>
        </p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">namespace</span> Tests<br />
{<br />
    [TestFixture]<br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> PersonEntityTests<br />
    {<br />
        [SetUp]<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> TestSetUp()<br />
        {<br />
            <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//
...</span><br />
        }<br />
        <br />
        [Test]<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span><strong>A_method_will_be_extracted_from_the_clipboard()</strong><br />
        {<br />
            <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//
asserts etc</span><br />
        }<br />
    }<br />
}<br /></span>
        </p>
...and use the new "<strong>Paste beaviours from clipboard</strong>" menu option (or <strong>ALT+F5</strong>)
and you get the method name extracted.<br /><p></p><p><img src="http://www.pksoftware.net/blog/content/binary/btut-past-code.png" border="0" /></p><p>
The full round trip. Whe you want to continue working on a unit test class you can
use this feature to get the current context of the testing... have fun! PK :-)
</p><p>
  <a href="http://www.pksoftware.net/BehaviourToUnitTest/"><strong>http://www.pksoftware.net/BehaviourToUnitTest/</strong></a></p><hr width="100%" size="2" /><i>Quick note - now at v1.0.0.2 - the main changes are:</i><ul><li><i>The use of the ICSharp.TextEditor for better editing</i></li><li><i>The defaults are C# with the underscore style</i></li><li><i>A few more word substitutions by default</i></li></ul><p><i>Enjoy!</i></p><img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=74e669ee-3ef9-4348-8996-8b16b866aad1" /></div>
    </content>
  </entry>
  <entry>
    <title>New Tool - Behaviour to Unit Test</title>
    <link rel="alternate" type="text/html" href="http://www.pksoftware.net/blog/2007/08/27/New+Tool+Behaviour+To+Unit+Test.aspx" />
    <id>http://www.pksoftware.net/blog/PermaLink,guid,e73cf1a0-95a9-4947-ac47-057b30b7f95a.aspx</id>
    <published>2007-08-27T02:43:04.213-07:00</published>
    <updated>2007-08-29T05:31:40.2226268-07:00</updated>
    <category term="Coding" label="Coding" scheme="http://www.pksoftware.net/blog/CategoryView,category,Coding.aspx" />
    <category term="Products" label="Products" scheme="http://www.pksoftware.net/blog/CategoryView,category,Products.aspx" />
    <category term="Products/Behaviour to Unit Test" label="Products/Behaviour to Unit Test" scheme="http://www.pksoftware.net/blog/CategoryView,category,Products%2cBehaviour%2Bto%2BUnit%2BTest.aspx" />
    <category term="TDD" label="TDD" scheme="http://www.pksoftware.net/blog/CategoryView,category,TDD.aspx" />
    <category term="Testing" label="Testing" scheme="http://www.pksoftware.net/blog/CategoryView,category,Testing.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I have uploaded a small development tool that I put together recently, its called
"Behaviour to Unit Test". Basically it converts code functionality from <em>plain
sentences</em> (or stories) into <em>unit test stub code</em>. You could also think
of it as a cure for TDD writers block!
</p>
        <p>
For an example of the usage, use the <strong>Generation</strong> -&gt; <strong>Fill
out example</strong> menu option and hit <strong>Convert</strong>. Basically it takes
a set of plain language behaviours for an object such as "person":
</p>
        <ul>
          <li>
Check that the default values of all string properties are empty 
</li>
          <li>
The ToString method renders the first and last names 
</li>
          <li>
If the date of birth is null, calculate age will return -1 
</li>
          <li>
If the date of birth is not null, calculate age will return a value</li>
        </ul>
        <p>
...and converts them into something like:
</p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> System;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> NUnit.Framework;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> NUnit.Framework.SyntaxHelpers;<br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">namespace</span> Tests<br />
{<br />
    [TestFixture]<br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> PersonEntityTests<br />
    {<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span> PersonEntity
person;<br />
        <br />
        [SetUp]<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> TestSetUp()<br />
        {<br />
            person <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> PersonEntity();<br />
        }<br />
        <br />
        [Test]<br />
        [Ignore(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Currently
only a unit test stub"</span>)]<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> CheckThatTheDefaultValuesOfAllStringPropertiesAreEmpty()<br />
        {<br />
        }<br />
        <br />
        [Test]<br />
        [Ignore(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Currently
only a unit test stub"</span>)]<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> TheToStringMethodRendersTheFirstAndLastNames()<br />
        {<br />
        }<br />
        <br />
        [Test]<br />
        [Ignore(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Currently
only a unit test stub"</span>)]<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> IfTheDateOfBirthIsNullCalculateAgeWillReturnMinus1()<br />
        {<br />
        }<br />
        <br />
        [Test]<br />
        [Ignore(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Currently
only a unit test stub"</span>)]<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> IfTheDateOfBirthIsNotNullCalculateAgeWillReturnAValue()<br />
        {<br />
        }<br />
    }<br />
}<br /></span>
        </p>
        <p>
There are C# and VB.NET templates for now. Check it out:
</p>
        <p>
  <a href="http://www.pksoftware.net/BehaviourToUnitTest/"><strong>http://www.pksoftware.net/BehaviourToUnitTest/</strong></a></p>
        <p>
My intention is to keep the tool small and simple. The main thing I want to add at
the moment is some load/save functionality and drop in the ICSharp.TextEditor for
more friendly editing...
</p>
        <p>
          <a href="http://www.dotnetkicks.com/kick/?url=http://www.pksoftware.net/blog/2007/08/27/New%2bTool%2bBehaviour%2bTo%2bUnit%2bTest.aspx">
            <img alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://www.pksoftware.net/blog/2007/08/27/New%2bTool%2bBehaviour%2bTo%2bUnit%2bTest.aspx" border="0" />
          </a>
        </p>
        <img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=e73cf1a0-95a9-4947-ac47-057b30b7f95a" />
      </div>
    </content>
  </entry>
  <entry>
    <title>A quick plug for Castle</title>
    <link rel="alternate" type="text/html" href="http://www.pksoftware.net/blog/2007/07/19/A+Quick+Plug+For+Castle.aspx" />
    <id>http://www.pksoftware.net/blog/PermaLink,guid,6e3c894e-5ba9-4971-9d1e-4f15846e87a9.aspx</id>
    <published>2007-07-19T04:21:35.6311629-07:00</published>
    <updated>2007-07-19T04:21:35.6311629-07:00</updated>
    <category term="Coding" label="Coding" scheme="http://www.pksoftware.net/blog/CategoryView,category,Coding.aspx" />
    <category term="TDD" label="TDD" scheme="http://www.pksoftware.net/blog/CategoryView,category,TDD.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
This is just a quick heads up to say that I think the <a target="_blank" href="http://castleproject.org/">Castle
Project</a> rocks!
</p>
        <p>
I have been using it allot of late especially <a target="_blank" href="http://castleproject.org/activerecord/index.html">Active
Record</a>. I'll blog more detail later but it's what I have been looking for all
these years! Many time I have implemented simple subsets of the functionality that
Castle provides to help get the job done. Castle wraps up all those funky framework
fragments and more with a great "action pack" flavour to it in the form of <a target="_blank" href="http://castleproject.org/monorail/index.html">Mono
Rail</a> (i.e. 'ruby on rails' for .Net)
</p>
        <p>
Very cool  ;-)<br /></p>
        <img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=6e3c894e-5ba9-4971-9d1e-4f15846e87a9" />
      </div>
    </content>
  </entry>
  <entry>
    <title>An NUnitForms Note for the Form Shown Event</title>
    <link rel="alternate" type="text/html" href="http://www.pksoftware.net/blog/2007/06/13/An+NUnitForms+Note+For+The+Form+Shown+Event.aspx" />
    <id>http://www.pksoftware.net/blog/PermaLink,guid,6af04fba-8fae-469a-b827-55b623fc0732.aspx</id>
    <published>2007-06-13T02:30:07.7584497-07:00</published>
    <updated>2007-06-13T02:30:07.7584497-07:00</updated>
    <category term="Coding/Work Arrounds" label="Coding/Work Arrounds" scheme="http://www.pksoftware.net/blog/CategoryView,category,Coding%2cWork%2BArrounds.aspx" />
    <category term="NUnitForms" label="NUnitForms" scheme="http://www.pksoftware.net/blog/CategoryView,category,NUnitForms.aspx" />
    <category term="TDD" label="TDD" scheme="http://www.pksoftware.net/blog/CategoryView,category,TDD.aspx" />
    <category term="Testing" label="Testing" scheme="http://www.pksoftware.net/blog/CategoryView,category,Testing.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Just a quick note that could drive you completely mad if you were not aware... 
</p>
        <p>
If you are using <b>NUnitForms </b>for testing your GUI and have code in the forms
"Shown" event, it will not run unless you follow the <b>Form.Show</b> call with <b>Application.DoEvents()</b>,
see sample code below
</p>
        <p>
This example is just a Label (label1) dumped on a Form with the <i>Load </i>and <i>Shown </i>events
updating the label with the respective event text:<br /></p>
        <p>
          <span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;">
            <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System.Collections.Generic;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System.ComponentModel;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System.Data;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System.Drawing;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System.Text;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System.Windows.Forms;<br /><br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">namespace</span> NUnitFormsDemo1<br />
{<br />
    <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span> partial <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">class</span> ShownTestForm
: Form<br />
    {<br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span> ShownTestForm()<br />
        {<br />
            InitializeComponent();<br />
        }<br /><br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">private</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> ShownTestForm_Load(<span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">object</span> sender,
EventArgs e)<br />
        {<br />
            label1.Text <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span><span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"Load"</span>;<br />
        }<br /><br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">private</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> ShownTestForm_Shown(<span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">object</span> sender,
EventArgs e)<br />
        {<br />
            label1.Text <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span><span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"Shown"</span>;<br />
        }<br />
    }<br />
}<br /></span>
        </p>
Here is some sample NUnitForms test code, the first test asserts that after the <i>Form.Show</i> call
the label text is "Load" and the second test shows that the label text is "Shown".<br /><p><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System.Windows.Forms;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> NUnit.Framework;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> NUnit.Extensions.Forms;<br /><br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">namespace</span> NUnitFormsDemo1.UnitTests<br />
{<br />
    [TestFixture]<br />
    <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">class</span> TestFormShownIssue
: NUnitFormTest<br />
    {<br />
        [Test]<br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> TestFormShow()<br />
        {<br />
            ShownTestForm
frm <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">new</span> ShownTestForm();<br />
            LabelTester
label1Tester <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">new</span> LabelTester(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"label1"</span>);<br />
            frm.Show();<br />
            Assert.AreEqual(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"Load"</span>,
label1Tester.Text);<br />
        }<br /><br />
        [Test]<br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> TestFormShowWithDoEvents()<br />
        {<br />
            ShownTestForm
frm <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">new</span> ShownTestForm();<br />
            LabelTester
label1Tester <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">new</span> LabelTester(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"label1"</span>);<br />
            frm.Show();<br />
            Application.DoEvents(); <span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">//
allows the 'Shown' event to fire</span><br />
            Assert.AreEqual(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"Shown"</span>,
label1Tester.Text);<br />
        }<br />
    }<br />
}</span></p><p></p><p>
I will take an educated guess that this is due to the GUI message pump etc.
</p><p>
In general if I come across this any of this type of unexpected behavior with NUnitForms
I will try a DoEvents before tearing my hair out. 
</p><img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=6af04fba-8fae-469a-b827-55b623fc0732" /></div>
    </content>
  </entry>
  <entry>
    <title>Free Useful PNG Images for Windows and Web Applications - famfamfam.com</title>
    <link rel="alternate" type="text/html" href="http://www.pksoftware.net/blog/2007/06/07/Free+Useful+PNG+Images+For+Windows+And+Web+Applications+Famfamfamcom.aspx" />
    <id>http://www.pksoftware.net/blog/PermaLink,guid,5c82f81d-3ec9-4195-8477-55c78c067996.aspx</id>
    <published>2007-06-07T03:05:56.329-07:00</published>
    <updated>2007-06-07T03:07:02.5472444-07:00</updated>
    <category term="Links" label="Links" scheme="http://www.pksoftware.net/blog/CategoryView,category,Links.aspx" />
    <category term="Products/Mini SQL Query" label="Products/Mini SQL Query" scheme="http://www.pksoftware.net/blog/CategoryView,category,Products%2cMini%2BSQL%2BQuery.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I have had some questions regarding the icons (or rather images) that I use in my
applications (such as the 'pending' <a target="miniSqlQuery" href="http://www.pksoftware.net/MiniSqlQuery/Default.aspx">Mini
SQL Query</a> tool)... 
</p>
        <p>
They are by <a target="famfamfam" href="http://famfamfam.com/about/">Mark James</a> -
he has a bunch of great free stuff available at:<br /><b><a target="famfamfam" href="http://famfamfam.com/">http://famfamfam.com/</a></b> -
more so the "Silk" set at <a target="famfamfam" href="http://famfamfam.com/lab/icons/silk/">http://famfamfam.com/lab/icons/silk/</a></p>
        <p>
The images are licensed under a <a target="license" href="http://creativecommons.org/licenses/by/2.5/">Creative
Commons Attribution 2.5 License</a>.<br /></p>
        <img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=5c82f81d-3ec9-4195-8477-55c78c067996" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Run a Windows Forms application as the Windows User - Integrated Security</title>
    <link rel="alternate" type="text/html" href="http://www.pksoftware.net/blog/2007/05/17/Run+A+Windows+Forms+Application+As+The+Windows+User+Integrated+Security.aspx" />
    <id>http://www.pksoftware.net/blog/PermaLink,guid,1c20e079-491d-4995-baea-65bafd3dae98.aspx</id>
    <published>2007-05-17T06:32:42.352-07:00</published>
    <updated>2007-05-20T23:20:26.1034527-07:00</updated>
    <category term="Coding" label="Coding" scheme="http://www.pksoftware.net/blog/CategoryView,category,Coding.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">This is the line of code that I keep forgetting...<br /><p><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;">AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);</span></p>
Use it in (for example) the Program.Main function when the application starts up and
the threads currrent principal is now the windows user. So... 
<br /><p><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;">Thread.CurrentPrincipal.Identity.IsAuthenticated</span></p>
Will now be <b>true </b>and you can make use of the <b>Identity.Name</b> property
etc.<br /><br />
Self reminder over...<br /><br /><i>More Notes...</i><br /><br />
If for example you need to perform unit tests as a windows user (to access the username
or hit a resource) you can make use of the <b>AppDomain.CurrentDomain.SetPrincipalPolicy</b> method
in the test fixture setup/teardown methods - see example below. I put the UnauthenticatedPrincipal
setting in the teardown so that subsequent tests do not have their principal modified
by accident...<br /><p><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System.Security.Principal;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System.Threading;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> NUnit.Framework;<br /><br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">namespace</span> Tests.SetPrincipalPolicyExample<br />
{<br />
    [TestFixture]<br />
    <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">class</span> TestSomethingUsingCurrentWindowsPrincipal<br />
    {<br />
        <span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">///
&lt;summary&gt;Called once before all tests are run.&lt;/summary&gt;</span><br />
        [TestFixtureSetUp()]<br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> TestFixtureSetUp()<br />
        {<br />
            AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);<br />
        }<br /><br />
        <span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">///
&lt;summary&gt;Called once after all tests have run.&lt;/summary&gt;</span><br />
        [TestFixtureTearDown()]<br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> TestFixtureTearDown()<br />
        {<br />
            AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.UnauthenticatedPrincipal);<br />
        }<br /><br />
        [Test]<br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> VerifySomething()<br />
        {<br />
            <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">string</span> expectedUsername <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span> Thread.CurrentPrincipal.Identity.Name;<br />
            <span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">//
more testing stuff</span><br />
        }<br />
    }<br />
}<br /></span></p><br /><img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=1c20e079-491d-4995-baea-65bafd3dae98" /></div>
    </content>
  </entry>
  <entry>
    <title>Pending Release of Mini SQL Query</title>
    <link rel="alternate" type="text/html" href="http://www.pksoftware.net/blog/2007/05/14/Pending+Release+Of+Mini+SQL+Query.aspx" />
    <id>http://www.pksoftware.net/blog/PermaLink,guid,3d848b6c-f05d-400b-a580-9f5e274880bc.aspx</id>
    <published>2007-05-13T19:38:15.471-07:00</published>
    <updated>2008-02-06T04:56:26.4796822-08:00</updated>
    <category term="Products" label="Products" scheme="http://www.pksoftware.net/blog/CategoryView,category,Products.aspx" />
    <category term="Products/Mini SQL Query" label="Products/Mini SQL Query" scheme="http://www.pksoftware.net/blog/CategoryView,category,Products%2cMini%2BSQL%2BQuery.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <strong>NOTE - Mini SQL Query has been released now - see </strong>
          <a href="http://www.pksoftware.net/blog/2008/02/01/Beta+Release+Of+Mini+SQL+Query.aspx">
            <strong>http://www.pksoftware.net/blog/2008/02/01/Beta+Release+Of+Mini+SQL+Query.aspx</strong>
          </a>
          <strong>.</strong>
        </p>
        <p>
 
</p>
        <p>
This is not a <i>product release</i>, but a <i>notice of release (!) </i>for my latest
pet project, "<b><a href="http://www.pksoftware.net/MiniSqlQuery/Default.aspx" target="miniSqlQuery">Mini
SQL Query</a></b>".<br /><br />
What is Mini SQL Query?...<br /></p>
        <blockquote>"Mini SQL Query from PK Software is a minimalist SQL query tool for multiple
providers (MSSQL, Oracle, OLEDB, MS Access files etc). The goal of the Mini SQL Query
tool is to allow a developer or trouble-shooter to quickly diagnose issues or make
changes to a database using a tool with a small footprint, that is fast, expandable
and easy to use."<br /></blockquote>
        <b>Some Features:</b>
        <br />
        <ul>
          <li>
Multiple database type connections (e.g. MSSQL, Oracle, Access etc) 
</li>
          <li>
Syntax Highlighting 
</li>
          <li>
Object Inspector (Browse the tables, columns etc for the connection) 
</li>
          <li>
Easy to utilize Plug-In system that has access to all the applications internals</li>
        </ul>
        <i>Sample Screenshot </i>- The Mini SQL Query tool in use against the Northwind Sample
DB:<br /><br /><img src="http://www.pksoftware.net/blog/content/binary/msq-shot1.png" border="0" /><br /><br />
I call it "mini" because I wanted to keep it simple and fast. I uses a straight forward
but powerful plugin architecture that makes adding menu or toolbar options as simple
as adding a reference in a DLL project and implementing a few functions from the <i>IPlugIn </i>interface.
I will be pushing out a few posts about the service and command style of coding soon
due to its implicit focus on issues such as dependency injection (DIP) and (dare I
say it) service-oriented architecture (and no I am not talking about web services!)
These techniques in turn improve code quality, testing and in turn maintenance (and
again in turn our sanity as programmers...)<br /><br />
I will publish a core product and then make other plugins available for download.<br /><br /><b>Plugin Example 1...</b><br /><br />
Here is a simple example - display connection...<br /><br /><img src="http://www.pksoftware.net/blog/content/binary/msq-shot-download-plugins.png" border="0" /><br /><br />
Below is the example C# plugin code that displays the <i>current connection string</i> in
the <i>editor </i>window.<br /><p><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">namespace</span> MiniSqlQuery.Plugin.Example<br />
{<br />
    <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">///
&lt;summary&gt;</span><br />
    <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">///
This example command inserts the current connection string details into the editor
text.</span><br />
    <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">///
&lt;/summary&gt;</span><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> DisplayConnectionCommand
: CommandBase<br />
    {<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span> DisplayConnectionCommand(IServiceContainer
services)<br />
            : <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">base</span>(services, <span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"Display
Connection Example"</span>)<br />
        {<br />
        }<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">override</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> Execute()<br />
        {<br />
            IEditor editorService <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>.ServiceManager.CurrentEditor;<br />
            editorService.Query <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span>.Format(<br />
                <span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"--
Connection: {0}\r\n\r\n{1}"</span>,<br />
                <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>.ServiceManager.DatabaseConfigurationManager.ConnectionString,<br />
                editorService.Query);<br />
        }<br />
    }<br />
}<br /></span></p>
Running the menu command:<br /><br /><img src="http://www.pksoftware.net/blog/content/binary/msq-shot-display-conn-plugin.png" border="0" /><br /><br />
Simple I know but I wanted to show the command execution approach using services.<b><br /><br />
Plugin Example 2...<br /></b><br />
OK - not that exciting! Here is another example where a business object is generated
from the result set...<br /><br /><p><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Class</span> MakeBusinessObjectFromResultsCommand<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"></span></span><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">    </span><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Inherits</span> CommandBase<br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"></span></span><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">    </span><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Sub</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">New</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</span> services <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> IServiceContainer)<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"></span></span><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">    </span><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">    </span><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">MyBase</span>.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">New</span>(services, <span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"Make
BO from Results"</span>)<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"></span></span><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">    </span><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Sub</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Overrides</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Sub</span> Execute()<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Dim</span> editor <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> IEditor <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Me</span>.ServiceManager.CurrentEditor<br /><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">If</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Not</span> editor.Result <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Is</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Nothing</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AndAlso</span> _<br />
         editor.Result.Tables.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Count</span> &gt;
0 <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Then</span><br />
            <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'
create some simple code gen using the results</span><br />
            editor.Messages <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> GenerateClass(editor.Result.Tables(0))<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Else</span><br />
            editor.Messages <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"No
results to generate code from."</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">If</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Sub</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'''
&lt;summary&gt;</span><br />
    <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'''
Given a DataTable (&lt;paramref name="dt"/&gt;), a basic VB.NET class is generated.</span><br />
    <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'''
&lt;/summary&gt;</span><br />
    <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'''
&lt;param name="dt"&gt;A DataTabel to generate a class from.&lt;/param&gt;</span><br />
    <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'''
&lt;returns&gt;&lt;/returns&gt;</span><br />
    <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'''
&lt;remarks&gt;&lt;/remarks&gt;</span><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Function</span> GenerateClass(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</span> dt <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> DataTable) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Dim</span> code <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">New</span> Text.StringBuilder()<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Dim</span> fieldName <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Dim</span><font color="#000000"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">typeName</span></font><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br /><br />
        code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"Public
Class {0}{1}"</span>, dt.TableName, vbCrLf)<br />
        code.AppendLine()<br />
        code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
Public Sub New{0}"</span>, vbCrLf)<br />
        code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
End Sub{0}"</span>, vbCrLf)<br />
        code.AppendLine()<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">For</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Each</span> column <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> DataColumn <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">In</span> dt.Columns<br />
            fieldName <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"_"</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> column.ColumnName<br />
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">typeName</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> column.DataType.FullName<br />
            code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
Private {0} As {1}{2}"</span>, fieldName, column.DataType.FullName, vbCrLf)<br />
            code.AppendLine()<br />
            code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
Public Property {0}() As {1}{2}"</span>, column.ColumnName, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">typeName</span>,
vbCrLf)<br />
            code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
Get{0}"</span>, vbCrLf)<br />
            code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
Return {0}{1}"</span>, fieldName, vbCrLf)<br />
            code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
End Get{0}"</span>, vbCrLf)<br />
            code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
Set(ByVal value As {0}){1}"</span>, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">typeName</span>,
vbCrLf)<br />
            code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
{0} = value{1}"</span>, fieldName, vbCrLf)<br />
            code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
End Set{0}"</span>, vbCrLf)<br />
            code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
End Property{0}"</span>, vbCrLf)<br />
            code.AppendLine()<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Next</span><br /><br />
        code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"End
Class"</span>)<br /><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Return</span> code.ToString()<br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Function</span><br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Class</span></span></p><br />
Running this command against the "select * from customers" query produces the following:<br /><p><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><p><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Class</span> Table<br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Sub</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">New</span>()<br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Sub</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Private</span> _CustomerID <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span> CustomerID() <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Return</span> _CustomerID<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</span> value <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span>)<br />
            _CustomerID <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> value<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Private</span> _CompanyName <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span> CompanyName() <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Return</span> _CompanyName<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</span> value <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span>)<br />
            _CompanyName <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> value<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Private</span> _ContactName <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span> ContactName() <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Return</span> _ContactName<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</span> value <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span>)<br />
            _ContactName <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> value<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Private</span> _ContactTitle <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span> ContactTitle() <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Return</span> _ContactTitle<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</span> value <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span>)<br />
            _ContactTitle <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> value<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Private</span> _Address <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span> Address() <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Return</span> _Address<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</span> value <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span>)<br />
            _Address <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> value<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Private</span> _City <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span> City() <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Return</span> _City<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</span> value <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span>)<br />
            _City <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> value<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Private</span> _Region <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span> Region() <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Return</span> _Region<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</span> value <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span>)<br />
            _Region <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> value<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Private</span> _PostalCode <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span> PostalCode() <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Return</span> _PostalCode<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</span> value <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span>)<br />
            _PostalCode <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> value<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Private</span> _Country <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span> Country() <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Return</span> _Country<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</span> value <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span>)<br />
            _Country <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> value<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Private</span> _Phone <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span> Phone() <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Return</span> _Phone<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</span> value <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span>)<br />
            _Phone <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> value<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Private</span> _Fax <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span> Fax() <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Return</span> _Fax<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</span> value <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span>)<br />
            _Fax <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> value<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span><br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Class</span></span></p><p><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><br /></span></span></p></span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"></span></span></p><p></p><b>Motivation</b><br /><br />
My main motivation was the lack of speed I experience (no matter how fast my dev box)
in using the "default" tools for SQL development. No way of customizing things easily
further frustrated me. With a tool such as Mini SQL Query I can quickly add extras
as I need them. For example, one plugin I plan of adding is focused on Access databases,
I want to be able to write a query in an editor and push the .Net code to execute
that query straight into my development project. 
<br /><br />
I will but publishing a first cut within the next couple of weeks and from there get
some feedback etc.<br /><br /><img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=3d848b6c-f05d-400b-a580-9f5e274880bc" /></div>
    </content>
  </entry>
  <entry>
    <title>The first ever Olympiad of Misguided Geeks Contest</title>
    <link rel="alternate" type="text/html" href="http://www.pksoftware.net/blog/2007/05/04/The+First+Ever+Olympiad+Of+Misguided+Geeks+Contest.aspx" />
    <id>http://www.pksoftware.net/blog/PermaLink,guid,4bc04ac2-49d9-46b5-b14f-c2c0068df7c9.aspx</id>
    <published>2007-05-03T19:12:41.555-07:00</published>
    <updated>2007-05-03T19:13:19.9615459-07:00</updated>
    <category term="Links" label="Links" scheme="http://www.pksoftware.net/blog/CategoryView,category,Links.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I don’t normally just post a <a href="http://www.pksoftware.net/blog/CategoryView,category,Links.aspx">link</a> but
this one caught my eye... From <a target="_blank" href="http://omg.worsethanfailure.com/">http://omg.worsethanfailure.com/</a></p>
        <p>
A blurb from the site: 
</p>
        <blockquote> The first ever Olympiad of Misguided Geeks contest at Worse Than Failure
(or OMGWTF for short) is a new kind of programming contest. Readers are invited to
be creative with devising a calculator with the craziest code they can write. One
lucky and potentially insane winner will get either a brand new MacBook Pro or comparable
Sony VAIO laptop. </blockquote>
        <p>
Sounds really tempting! 
</p>
        <img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=4bc04ac2-49d9-46b5-b14f-c2c0068df7c9" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Working with unsupported controls in NUnitForms</title>
    <link rel="alternate" type="text/html" href="http://www.pksoftware.net/blog/2007/03/20/Working+With+Unsupported+Controls+In+NUnitForms.aspx" />
    <id>http://www.pksoftware.net/blog/PermaLink,guid,01ec306c-abfa-4a85-8552-1be776a2f1d8.aspx</id>
    <published>2007-03-20T05:32:20.919-07:00</published>
    <updated>2008-04-24T03:06:20.1945353-07:00</updated>
    <category term="NUnitForms" label="NUnitForms" scheme="http://www.pksoftware.net/blog/CategoryView,category,NUnitForms.aspx" />
    <category term="TDD" label="TDD" scheme="http://www.pksoftware.net/blog/CategoryView,category,TDD.aspx" />
    <category term="Testing" label="Testing" scheme="http://www.pksoftware.net/blog/CategoryView,category,Testing.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font color="#808080">
            <b>
              <font size="4">
                <font color="#000000">My blog has moved to:</font>
                <br />
  </font>
              <a href="http://www.pksoftware.net/devblog/">
                <font size="4">http://www.pksoftware.net/devblog/</font>
              </a>
            </b>
          </font>
        </p>
        <p>
          <strong>
            <font color="#808080">
              <font size="4">
                <font color="#000000">This post now at:</font>
                <br />
  </font>
              <a href="http://www.pksoftware.net/devblog/post/2007/03/Working-With-Unsupported-Controls-In-NUnitForms.aspx">
                <font size="4">http://www.pksoftware.net/devblog/post/2007/03/Working-With-Unsupported-Controls-In-NUnitForms.aspx</font>
              </a>
            </font>
          </strong>
        </p>
        <p>
          <strong>
            <font color="#808080" size="3">
            </font>
          </strong> 
</p>
        <p>
          <font color="#808080">
            <b>Another sequel to the entry on "Getting Started with NUnitForms"<br />
  <a href="http://www.pksoftware.net/blog/2007/02/06/Getting+Started+With+NUnitForms.aspx">http://www.pksoftware.net/blog/2007/02/06/Getting+Started+With+NUnitForms.aspx</a><br />
This post is focused on compiling the latest NUnitForms code from sourceforge.<br /><br /></b>
          </font>I have seen/heard/had a few questions about testing windows forms controls
that are not currently supported by <b>NUnitForms </b>(specifically "<b>.Net 2.0 NUnitForms
alpha 5 release</b>" - <a href="http://sourceforge.net/project/showfiles.php?group_id=95656" target="_blank">http://sourceforge.net/project/showfiles.php?group_id=95656</a>).<br /><br />
There are 2 answers... 
<br /></p>
        <ol>
          <li>
Cut your own (see the "<b>How to add Control Testers</b>" section at <a href="http://nunitforms.sourceforge.net/docs.html" target="_blank">http://nunitforms.sourceforge.net/docs.html</a>),
or<br /></li>
          <li>
Get the latest source out of the subversion repository and use the <b>generic tester
class</b>...<br /></li>
        </ol>
The subversion connection details are here: <a href="http://sourceforge.net/svn/?group_id=95656" target="_blank">http://sourceforge.net/svn/?group_id=95656</a><br /><br />
You will need <b>TortoiseSVN </b>(<a href="http://tortoisesvn.net/" target="_blank">http://tortoisesvn.net/</a>)
or similar to get the files. 
<br /><br /><p></p><img src="http://www.pksoftware.net/blog/content/binary/svn-get-nunitforms.PNG" border="0" /><br /><br />
Note that all related files for the build are also downloaded (nant, nunit, ncover
and ndoc etc) so there won’t be any messing around trying to find the correct library
dependencies (ahhh!) Of course, because of this the download is about 8.5mb...<br /><br />
Now... from here on in things <i>could get a little messy</i>. You could have problems
with key containters, there may be a duplicate "ButtonTestser.cs" file... The list
was getting a little long - the short answer to the "problems" were to compile the <b>NUnitForms </b>project
after modifying the signing method of the 2 projects "NUnitForms" and "NUnitForms.ScreenCapture".
You will also need to delete the <b>AssemblyKeyName </b>code references in the relevent
AssemblyInfo.cs files.<br /><br /><img src="http://www.pksoftware.net/blog/content/binary/signing-nunitforms.PNG" border="0" /><br /><br />
Keep in mind that when you get the latest out of a code repository this sort of thing
is not unexpected or "bad". Its a work in progress...<br /><br />
Now the latest build of the NUnitForms DLL will give you access to the generic control
tester class. When you need to test a control that does not have its own tester class
(e.g. ButtonTester) you can use the generic declaration and create your own tester
class, e.g. for a picture box:<br /><p><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> PictureBoxTester
: <b>ControlTester&lt;PictureBox, PictureBoxTester&gt;</b><br />
{<br />
  <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//
Now implement each overloaded constructor calling the base class</span><br />
  <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span> PictureBoxTester()
{}<br />
  <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span> PictureBoxTester(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> name,
Form form) : <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">base</span>(name,
form) {}<br />
  <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span> PictureBoxTester(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> name, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> formName)
: <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">base</span>(name,
formName) {}<br />
  <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span> PictureBoxTester(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> name)
: <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">base</span>(name)
{}<br />
  <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span> PictureBoxTester(ControlTester
tester, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span> index)
: <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">base</span>(tester,
index) {}<br />
}</span></p><font face="Courier New"><br /><br /></font>Now in the tests you can create tester objects and access all the properties
and perform clicks etc:<br /><br /><font face="Courier New"></font><p><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">[Test]<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> ExamplePropertyCheckAndDoubleClickTest()<br />
{<br />
  PictureBoxTester picTester <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> PictureBoxTester(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"pictureBox1"</span>);<br />
  Assert.AreEqual(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">@"C:\dir\somePic.bmp"</span>, <b>picTester.Properties</b>.ImageLocation);<br />
  <b>picTester.DoubleClick</b>();<br />
}<br /></span></p><br />
Easy as pie right?! Well sort of. But much easier than writing your own windows forms
GUI testing framework!!<br /><br />
PK  ;-)<br /><br /><img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=01ec306c-abfa-4a85-8552-1be776a2f1d8" /></div>
    </content>
  </entry>
  <entry>
    <title>Getting Started with NUnitForms - GUI Testing with Message Boxes</title>
    <link rel="alternate" type="text/html" href="http://www.pksoftware.net/blog/2007/02/12/Getting+Started+With+NUnitForms+GUI+Testing+With+Message+Boxes.aspx" />
    <id>http://www.pksoftware.net/blog/PermaLink,guid,075da0a9-329a-4a03-92ee-354d7db1aa6e.aspx</id>
    <published>2007-02-12T04:19:41.41-08:00</published>
    <updated>2008-04-24T03:15:06.8664103-07:00</updated>
    <category term="NUnitForms" label="NUnitForms" scheme="http://www.pksoftware.net/blog/CategoryView,category,NUnitForms.aspx" />
    <category term="TDD" label="TDD" scheme="http://www.pksoftware.net/blog/CategoryView,category,TDD.aspx" />
    <category term="Testing" label="Testing" scheme="http://www.pksoftware.net/blog/CategoryView,category,Testing.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font color="#808080">
            <b>
              <font size="4">
                <font color="#000000">My blog has moved to:</font>
                <br />
  </font>
              <a href="http://www.pksoftware.net/devblog/">
                <font size="4">http://www.pksoftware.net/devblog/</font>
              </a>
            </b>
          </font>
        </p>
        <p>
          <font color="#808080">
            <b>
              <font size="4">
                <font color="#000000">This post now at:</font>
                <br />
  </font>
              <a href="http://www.pksoftware.net/devblog/post/2007/02/Getting-Started-With-NUnitForms-GUI-Testing-With-Message-Boxes.aspx">
                <font size="4">http://www.pksoftware.net/devblog/post/2007/02/Getting-Started-With-NUnitForms-GUI-Testing-With-Message-Boxes.aspx</font>
              </a>
            </b>
          </font>
        </p>
        <p>
          <strong>
            <font color="#808080" size="4">
            </font>
          </strong> 
</p>
        <p>
          <font color="#808080">
            <b>A sequel to the entry on "Getting Started with NUnitForms"<br />
  <a href="http://www.pksoftware.net/blog/2007/02/06/Getting+Started+With+NUnitForms.aspx">http://www.pksoftware.net/blog/2007/02/06/Getting+Started+With+NUnitForms.aspx</a><br />
This post is focused on handling the testing of message boxes in an application.<br /></b>
          </font>
          <br />
Another common test requirement that you will probably come across in the GUI world
is the use of message boxes. To handle a message box with NUnitForms (i.e. simulate
a <i>user click</i> or similar), use a "message box handler" method. Firstly set up
the test to "expect" a message box and then supply the name of the method to handle
the reaction:<br /></p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">[Test]<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> MessageBoxTest()<br />
{<br />
   <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">base</span>.ExpectModal(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"Info"</span>, <span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"MessageBoxTestHandler"</span>);<br />
  ButtonTester runButton <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> ButtonTester(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"RunButton"</span>);<br />
  runButton.Click();<br />
}<br /></span>
        </p>
This tells the test sub-system that a message box is expected and the <i>title </i>should
be "Info". Also supplied is the name of a handling method - in this case "MessageBoxTestHandler".
This method should create a "MessageBoxTester" and (most likely) click the OK button:<br /><p><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> MessageBoxTestHandler()<br />
{<br />
  MessageBoxTester messageBox <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> MessageBoxTester(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"No
Item Selected"</span>);<br />
  messageBox.ClickOk();<br />
}<br /></span></p>
Other useful methods of the <b>MessageBoxTester </b>class are "ClickCancel" and "SendCommand(cmd)"
where "cmd" is an <i>enum </i>value of type <b>MessageBoxTester.Command</b>:<br /><ul><li>
OK 
</li><li>
Cancel 
</li><li>
Abort 
</li><li>
Retry 
</li><li>
Ignore 
</li><li>
Yes 
</li><li>
No 
</li><li>
Close 
</li><li>
Help</li></ul>
For example:<br /><p><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> MessageBoxTestHandler()<br />
{<br />
  MessageBoxTester messageBox <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> MessageBoxTester(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"Cancel,
are you sure?"</span>);<br />
  messageBox.SendCommand(Command.Yes);<br />
}<br /></span></p>
A practical application of this could be tests where for example if search criteria
is not supplied a "no criteria" message box is displayed. Boundary checks in methods
are common places for bugs to occur so make sure you perform the same boundary check
on the GUI layer!<br /><img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=075da0a9-329a-4a03-92ee-354d7db1aa6e" /></div>
    </content>
  </entry>
  <entry>
    <title>Getting Started with NUnitForms</title>
    <link rel="alternate" type="text/html" href="http://www.pksoftware.net/blog/2007/02/06/Getting+Started+With+NUnitForms.aspx" />
    <id>http://www.pksoftware.net/blog/PermaLink,guid,0e8f9491-6a85-4e5e-82a6-6f62ad9208f2.aspx</id>
    <published>2007-02-06T06:30:47.247-08:00</published>
    <updated>2008-04-24T03:11:37.0851603-07:00</updated>
    <category term="NUnitForms" label="NUnitForms" scheme="http://www.pksoftware.net/blog/CategoryView,category,NUnitForms.aspx" />
    <category term="TDD" label="TDD" scheme="http://www.pksoftware.net/blog/CategoryView,category,TDD.aspx" />
    <category term="Testing" label="Testing" scheme="http://www.pksoftware.net/blog/CategoryView,category,Testing.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <strong>
          <font color="#808080">
            <p>
              <font color="#808080">
                <b>
                  <font size="4">
                    <font color="#000000">My blog has moved to:</font>
                    <br />
  </font>
                  <a href="http://www.pksoftware.net/devblog/">
                    <font size="4">http://www.pksoftware.net/devblog/</font>
                  </a>
                </b>
              </font>
            </p>
            <p>
              <strong>
                <font color="#808080">
                  <font size="4">
                    <font color="#000000">This post now at:</font>
                    <br />
  </font>
                  <a href="http://www.pksoftware.net/devblog/post/2007/02/Getting-Started-With-NUnitForms.aspx">
                    <font size="4">http://www.pksoftware.net/devblog/post/2007/02/Getting-Started-With-NUnitForms.aspx</font>
                  </a>
                  <a href="http://www.pksoftware.net/devblog/post/2007/03/Working-With-Unsupported-Controls-In-NUnitForms.aspx">
                  </a>
                </font>
              </strong>
            </p>
            <p>
              <strong>
                <font color="#808080" size="3">
                </font>
              </strong> 
</p>
            <p>
An introduction to NUnitForms with a basic example of automated Microsoft .Net Windows
Forms Testing using NUnit.
</p>
          </font>
        </strong>
        <p>
          <font face="Arial" size="2">NUnitForms is a lesser known extension to the well known
NUnit testing framework. See </font>
          <a href="http://nunitforms.sourceforge.net/">
            <u>
              <font face="Arial" color="#0000ff" size="2">http://nunitforms.sourceforge.net/</font>
            </u>
          </a>
          <font face="Arial" size="2"> for
details and downloads. It is currently in the process of being upgraded from .Net
Framework V1.1 to V2.0 and is only being distributed as an MSI with no source code
(except via CVS as Adam pointed out below).</font>
        </p>
        <p>
          <font face="Arial" size="2">I have found it quite useful but the documentation was
lacking and the learning curve a bit painful, hence this post! I will assume that
you have NUnit and NUnitForms installed for the following code samples to run.</font>
        </p>
        <h3>How can NUnitForms be used?
</h3>
        <font face="Arial" size="2">
          <p>
NUnitForms gives a developer the ability to approach forms development from
a test first perspective, or to simply provide a reliable set of automated regression
tests for a user interface. (For the record, I am not getting into concepts such as
model-view-controller/presenter, interface coding or the like - all I am demonstrating
is how to use NUnitForms for testing.)
</p>
          <p>
NUnitForms replaces (or supplements) the traditional “GUI test harness” method commonly
used for GUI development. Sometime the use of even a test harness is bypassed (because
of time restrictions of course!) The problem with manual test harnesses are that the
typically become a mess that only the original developer can even make sense of and,
all the testing is done manually. NunitForms alleviates these issues by making things
automated in the first place. I am not against the use of a manual GUI test harness
- they still have their benefits - but compared to automated testing they lose out
big time. A useful GUI test harness example that would be hard to test in an automated
fashion is control resize behaviour and positioning.<br /><br /></p>
        </font>
        <h3>How does it work?
</h3>
        <font face="Arial" size="2">
          <p>
Basically there is a lot of reflection and forms/controls parsing to locate controls
and invoke the methods that are normally performed by the user, such as pushing a
button. For example, a test uses NUnitForms code that fires the “OnClick” event for
a button. You put together a series of these events simulating a user and you have
an automated script. That’s putting it really simply!
</p>
        </font>
        <h3>A Simple Example
</h3>
        <font face="Arial" size="2">
        </font>
        <p>
          <font face="Arial" size="2">Get a new instance of VS.Net going. I created a basic
form as below:</font>
        </p>
        <p>
          <img src="http://www.pksoftware.net/blog/content/binary/nunitforms-pic-1.Png" border="0" />
        </p>
        <font face="Arial" size="2">
        </font>
        <p>
          <font face="Arial" size="2">The textbox and button are named “NameTextbox” and “RunButon”
respectively (more on that later).</font>
        </p>
        <p>
          <font face="Arial" size="2">Add a new project for the unit testing - add references
to:</font>
        </p>
        <ul>
          <font face="Arial" size="2">
            <li>
The windows application we are testing 
</li>
            <li>
NUnit 
</li>
            <li>
NUnitForms 
</li>
            <li>
System.Windows.Forms
</li>
          </font>
        </ul>
        <p>
          <font face="Arial" size="2">See sample solution setup below:</font>
        </p>
        <p>
          <img src="http://www.pksoftware.net/blog/content/binary/nunitforms-pic-4.Png" border="0" />
        </p>
        <font face="Arial" size="2">
        </font>
        <p>
          <font face="Arial" size="2">Now define a test fixture as normal (with the addition
of the <strong>NUnit.Extensions.Forms</strong> using directive) but there are 2 main
differences:</font>
        </p>
        <ul>
          <font face="Arial" size="2">
            <li>
the fixture needs to inherit from “<strong>NUnitFormTest</strong>” and to get the
test to work at all. 
</li>
            <li>
we need to override the “<strong>Setup</strong>” method. In this setup method we create
an instance of the form and show it.
</li>
          </font>
        </ul>
        <p>
          <font face="Arial" size="2">Make sure you show it or you will go crazy trying to debug
the problem (yes I forgot!) The setup method is called before each test so we start
with a clean slate.</font>
        </p>
        <p>
          <font face="Arial" size="2">Now for a test. This is a dumb test, but remember we are
looking at the concept! </font>
        </p>
        <p>
          <font face="Arial" size="2">When I push the “Run” button, I want whatever test is
in the textbox to become the form title, sample test:</font>
        </p>
        <p>
          <font face="Arial" size="2">We need a <strong>TextBoxTester</strong> and a <strong>ButtonTester</strong>.
This will give us access to the button and textbox on the form. Assign a value to
the textbox and invoke a “click” on the button. Now for the test, we have a reference
to the test form at the fixture level so we can get the form title from there.</font>
        </p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
              <font face="Arial" size="2">using</font>
            </span>
            <font face="Arial" size="2"> System;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> NUnit.Framework;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> NUnit.Extensions.Forms;<br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">namespace</span> NUnitFormsDemo1.UnitTests<br />
{<br />
    [TestFixture]<br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> SimpleFormTests
: NUnitFormTest<br />
    {<br />
        SimpleForm _simpleForm;<br /><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">override</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> Setup()<br />