<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Converting Visual Studio 2003 WinForms to Visual Studio 2005/2008 partial classes</title>
	<atom:link href="http://blog.dotsmart.net/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dotsmart.net/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/</link>
	<description>insert witty, geeky tagline here...</description>
	<lastBuildDate>Fri, 03 Feb 2012 22:33:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Craig Larsen</title>
		<link>http://blog.dotsmart.net/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/#comment-1892</link>
		<dc:creator><![CDATA[Craig Larsen]]></dc:creator>
		<pubDate>Thu, 24 Feb 2011 04:50:26 +0000</pubDate>
		<guid isPermaLink="false">http://dotsmart.wordpress.com/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/#comment-1892</guid>
		<description><![CDATA[Works with VS2010, too.  Thanks !]]></description>
		<content:encoded><![CDATA[<p>Works with VS2010, too.  Thanks !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Shelby</title>
		<link>http://blog.dotsmart.net/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/#comment-1196</link>
		<dc:creator><![CDATA[Jeff Shelby]]></dc:creator>
		<pubDate>Thu, 01 Jul 2010 20:41:23 +0000</pubDate>
		<guid isPermaLink="false">http://dotsmart.wordpress.com/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/#comment-1196</guid>
		<description><![CDATA[There&#039;s a version for VB code &lt;a href=&quot;http://www.nathanpjones.com/wp/2010/02/converting-vb-net-2003-winforms-to-20052008-partial-classes&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; that also fixes a couple of bugs in this one.]]></description>
		<content:encoded><![CDATA[<p>There&#8217;s a version for VB code <a href="http://www.nathanpjones.com/wp/2010/02/converting-vb-net-2003-winforms-to-20052008-partial-classes" rel="nofollow">here</a> that also fixes a couple of bugs in this one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harald Mühlhoff</title>
		<link>http://blog.dotsmart.net/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/#comment-910</link>
		<dc:creator><![CDATA[Harald Mühlhoff]]></dc:creator>
		<pubDate>Fri, 11 Dec 2009 11:19:25 +0000</pubDate>
		<guid isPermaLink="false">http://dotsmart.wordpress.com/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/#comment-910</guid>
		<description><![CDATA[Thanks a lot! Worked as &quot;advertised&quot; ... ;)]]></description>
		<content:encoded><![CDATA[<p>Thanks a lot! Worked as &#8220;advertised&#8221; &#8230; ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David C</title>
		<link>http://blog.dotsmart.net/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/#comment-873</link>
		<dc:creator><![CDATA[David C]]></dc:creator>
		<pubDate>Tue, 24 Nov 2009 21:58:58 +0000</pubDate>
		<guid isPermaLink="false">http://dotsmart.wordpress.com/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/#comment-873</guid>
		<description><![CDATA[Thank you so much!  Not only does it work for windows forms, but also third party tools such as Datadynamics&#039; Active Reports.]]></description>
		<content:encoded><![CDATA[<p>Thank you so much!  Not only does it work for windows forms, but also third party tools such as Datadynamics&#8217; Active Reports.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guy</title>
		<link>http://blog.dotsmart.net/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/#comment-767</link>
		<dc:creator><![CDATA[Guy]]></dc:creator>
		<pubDate>Wed, 14 Oct 2009 19:19:54 +0000</pubDate>
		<guid isPermaLink="false">http://dotsmart.wordpress.com/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/#comment-767</guid>
		<description><![CDATA[Very nice.  I don&#039;t know why VS doesn&#039;t do this automatically to clean things up!

Thank you!]]></description>
		<content:encoded><![CDATA[<p>Very nice.  I don&#8217;t know why VS doesn&#8217;t do this automatically to clean things up!</p>
<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duncan Smart</title>
		<link>http://blog.dotsmart.net/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/#comment-534</link>
		<dc:creator><![CDATA[Duncan Smart]]></dc:creator>
		<pubDate>Fri, 08 May 2009 18:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://dotsmart.wordpress.com/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/#comment-534</guid>
		<description><![CDATA[Thanks Adam, I&#039;ll look into updating my code with your changes.]]></description>
		<content:encoded><![CDATA[<p>Thanks Adam, I&#8217;ll look into updating my code with your changes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Best</title>
		<link>http://blog.dotsmart.net/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/#comment-530</link>
		<dc:creator><![CDATA[Adam Best]]></dc:creator>
		<pubDate>Wed, 06 May 2009 10:22:46 +0000</pubDate>
		<guid isPermaLink="false">http://dotsmart.wordpress.com/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/#comment-530</guid>
		<description><![CDATA[Hey man,

Awesome macro, really helped me out a lot!

I made a few enhancements, like only creating the designer if one doesn&#039;t exist already, and automatically making the original class partial...

Sub ExtractWinFormsDesignerFile()
...
...
Dim newItemPath As String = dir &amp; &quot;\&quot; &amp; bareName &amp; &quot;.Designer.cs&quot;

        &#039;Check if designer file already exists
        &#039;If it does, don&#039;t create one -- Adam Best
        Dim childItems As ProjectItems = item.ProjectItems
        Dim childItem As ProjectItem
        Dim designer As Boolean = False

        For Each childItem In childItems
            If (childItem.FileNames(1) = newItemPath) Then                
                designer = True
                Exit For
            End If
        Next

        If (Not designer) Then
            Dim codeClass As CodeClass = findClass(item.FileCodeModel.CodeElements)
...
...
makeOriginalClassPartial(item.FileCodeModel.CodeElements)

End If
End Sub

And the added function is...

&#039;Make original class partial -- Adam Best
    Function makeOriginalClassPartial(ByVal items As System.Collections.IEnumerable)

        Dim text As String = String.Empty
        Dim newText As String = String.Empty

        For Each codeEl As CodeElement In items
            If codeEl.Kind = vsCMElement.vsCMElementClass Then
                Dim start As EditPoint = codeEl.GetStartPoint().CreateEditPoint()
                Dim endPoint As TextPoint = codeEl.GetStartPoint(vsCMPart.vsCMPartBody)
                text = start.GetText(endPoint)
                If (Not text.Contains(&quot;partial class&quot;)) Then
                    newText = text.Replace(&quot;class&quot;, &quot;partial class&quot;)
                    start.Delete(endPoint)
                    start.Insert(newText)
                End If
            ElseIf codeEl.Children.Count &gt; 0 Then
                Dim partialOrigClass As Boolean = makeOriginalClassPartial(codeEl.Children)
            End If
        Next

    End Function]]></description>
		<content:encoded><![CDATA[<p>Hey man,</p>
<p>Awesome macro, really helped me out a lot!</p>
<p>I made a few enhancements, like only creating the designer if one doesn&#8217;t exist already, and automatically making the original class partial&#8230;</p>
<p>Sub ExtractWinFormsDesignerFile()<br />
&#8230;<br />
&#8230;<br />
Dim newItemPath As String = dir &amp; &#8220;\&#8221; &amp; bareName &amp; &#8220;.Designer.cs&#8221;</p>
<p>        &#8216;Check if designer file already exists<br />
        &#8216;If it does, don&#8217;t create one &#8212; Adam Best<br />
        Dim childItems As ProjectItems = item.ProjectItems<br />
        Dim childItem As ProjectItem<br />
        Dim designer As Boolean = False</p>
<p>        For Each childItem In childItems<br />
            If (childItem.FileNames(1) = newItemPath) Then<br />
                designer = True<br />
                Exit For<br />
            End If<br />
        Next</p>
<p>        If (Not designer) Then<br />
            Dim codeClass As CodeClass = findClass(item.FileCodeModel.CodeElements)<br />
&#8230;<br />
&#8230;<br />
makeOriginalClassPartial(item.FileCodeModel.CodeElements)</p>
<p>End If<br />
End Sub</p>
<p>And the added function is&#8230;</p>
<p>&#8216;Make original class partial &#8212; Adam Best<br />
    Function makeOriginalClassPartial(ByVal items As System.Collections.IEnumerable)</p>
<p>        Dim text As String = String.Empty<br />
        Dim newText As String = String.Empty</p>
<p>        For Each codeEl As CodeElement In items<br />
            If codeEl.Kind = vsCMElement.vsCMElementClass Then<br />
                Dim start As EditPoint = codeEl.GetStartPoint().CreateEditPoint()<br />
                Dim endPoint As TextPoint = codeEl.GetStartPoint(vsCMPart.vsCMPartBody)<br />
                text = start.GetText(endPoint)<br />
                If (Not text.Contains(&#8220;partial class&#8221;)) Then<br />
                    newText = text.Replace(&#8220;class&#8221;, &#8220;partial class&#8221;)<br />
                    start.Delete(endPoint)<br />
                    start.Insert(newText)<br />
                End If<br />
            ElseIf codeEl.Children.Count &gt; 0 Then<br />
                Dim partialOrigClass As Boolean = makeOriginalClassPartial(codeEl.Children)<br />
            End If<br />
        Next</p>
<p>    End Function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max</title>
		<link>http://blog.dotsmart.net/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/#comment-453</link>
		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Tue, 17 Mar 2009 19:28:42 +0000</pubDate>
		<guid isPermaLink="false">http://dotsmart.wordpress.com/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/#comment-453</guid>
		<description><![CDATA[Thanks a lot!
Very useful tool!]]></description>
		<content:encoded><![CDATA[<p>Thanks a lot!<br />
Very useful tool!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lakshmipathy</title>
		<link>http://blog.dotsmart.net/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/#comment-420</link>
		<dc:creator><![CDATA[lakshmipathy]]></dc:creator>
		<pubDate>Tue, 17 Feb 2009 06:51:36 +0000</pubDate>
		<guid isPermaLink="false">http://dotsmart.wordpress.com/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/#comment-420</guid>
		<description><![CDATA[Thank you. you save a lot of time. i want to generate a boiler plate template so i used your code for getting the namespace and class name. thank you]]></description>
		<content:encoded><![CDATA[<p>Thank you. you save a lot of time. i want to generate a boiler plate template so i used your code for getting the namespace and class name. thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Diana</title>
		<link>http://blog.dotsmart.net/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/#comment-402</link>
		<dc:creator><![CDATA[Diana]]></dc:creator>
		<pubDate>Mon, 02 Feb 2009 13:03:00 +0000</pubDate>
		<guid isPermaLink="false">http://dotsmart.wordpress.com/2008/05/20/converting-visual-studio-2003-winforms-to-visual-studio-20052008-partial-classes/#comment-402</guid>
		<description><![CDATA[Great work! Save my life!]]></description>
		<content:encoded><![CDATA[<p>Great work! Save my life!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

