# Sunday, October 31, 2004
Something usefull i posted in my old blog and promised Christian and Günther to post it again...

#Region "NDoc()"
    Sub NDoc()
        Dim nDocPath As String = "C:\Program files\NDoc\bin\.net-1.1\"

        Dim objProj As Object()
        Dim proj As Project

        'Get Project
        objProj = DTE.ActiveSolutionProjects
        If objProj.Length = 0 Then
            Exit Sub
        End If
        proj = DTE.ActiveSolutionProjects(0)

        If (proj.ConfigurationManager.ActiveConfiguration.ConfigurationName = "Debug"Then
            MsgBox("You cannot run this Macro in the Debug-configuration." & vbCrLf & _
            "Switch to ""Realease"", build the project and run this Macro again.")
            Exit Sub
        End If

        proj.ConfigurationManager.ActiveConfiguration.Properties.Item("DocumentationFile").Value =
            proj.Properties.Item("AssemblyName").Value() & ".xml"
        proj.Save()

        Dim XmlString As String = "<project>" & vbCrLf & _
            "    <assemblies>" & vbCrLf & _
            "        <assembly location=""" & proj.Properties.Item("FullPath").Value() & _
            "bin\Release\" & proj.Properties.Item("OutputFileName").Value() & """ documentation=""" & _
            proj.Properties.Item("FullPath").Value() & "bin\Release\" & _
            proj.Properties.Item("AssemblyName").Value() & ".xml"" />" & vbCrLf & _
            "    </assemblies>" & vbCrLf & _
            "    <namespaces>" & vbCrLf & _
            "    </namespaces>" & vbCrLf & _
            "    <documenters>" & vbCrLf & _
            "        <documenter name=""MSDN"">" & vbCrLf & _
            "            <property name=""OutputDirectory"" value=""" & _
            proj.Properties.Item("FullPath").Value() & "doc\"" />" & vbCrLf & _
            "            <property name=""HtmlHelpName"" value=""" & _
            proj.Properties.Item("AssemblyName").Value() & """ />" & vbCrLf & _
            "            <property name=""IncludeFavorites"" value=""True"" />" & vbCrLf & _
            "            <property name=""Title"" value=""" & _
            proj.Properties.Item("AssemblyName").Value() & _
            """ />" & vbCrLf & _
            "            <property name=""SplitTOCs"" value=""False"" />" & vbCrLf & _
            "            <property name=""DefaulTOC"" value="""" />" & vbCrLf & _
            "            <property name=""IncludeHierarchy"" value=""True"" />" & vbCrLf & _
            "            <property name=""ShowVisualBasic"" value=""True"" />" & vbCrLf & _
            "            <property name=""RootPageContainsNamespaces"" value=""True"" />" & vbCrLf & _
            "            <property name=""SortTOCByNamespace"" value=""True"" />" & vbCrLf & _
            "            <property name=""OutputTarget"" value=""HtmlHelpAndWeb"" />" & vbCrLf & _
            "            <property name=""HeaderHtml"" value="""" />" & vbCrLf & _
            "            <property name=""FooterHtml"" value=""Copyright © " & Year(Now) & _
            " &lt;a href=http://www." & _
            proj.Properties.Item("AssemblyName").Value().Split(".".ToCharArray)(0) & _
            ".com&gt;" & _
            proj.Properties.Item("AssemblyName").Value().Split(".".ToCharArray)(0) & _
            " &lt;/a&gt; - all rights reserved."" />" & vbCrLf & _
            "            <property name=""FilesToInclude"" value="""" />" & vbCrLf & _
            "            <property name=""LinkToSdkDocVersion"" value=""MsdnOnline"" />" & vbCrLf & _
            "            <property name=""ShowMissingSummaries"" value=""True"" />" & vbCrLf & _
            "            <property name=""ShowMissingRemarks"" value=""False"" />" & vbCrLf & _
            "            <property name=""ShowMissingParams"" value=""True"" />" & vbCrLf & _
            "            <property name=""ShowMissingReturns"" value=""True"" />" & vbCrLf & _
            "            <property name=""ShowMissingValues"" value=""True"" />" & vbCrLf & _
            "            <property name=""DocumentInternals"" value=""False"" />" & vbCrLf & _
            "            <property name=""DocumentProtected"" value=""True"" />" & vbCrLf & _
            "            <property name=""DocumentPrivates"" value=""False"" />" & vbCrLf & _
            "            <property name=""DocumentProtectedInternalAsProtected"" value=""False"" />" & _
            vbCrLf & _
            "            <property name=""DocumentEmptyNamespaces"" value=""False"" />" & vbCrLf & _
            "            <property name=""IncludeAssemblyVersion"" value=""False"" />" & vbCrLf & _
            "            <property name=""CopyrightText"" value="""" />" & vbCrLf & _
            "            <property name=""CopyrightHref"" value="""" />" & vbCrLf & _
            "            <property name=""ReferencesPath"" value="""" />" & vbCrLf & _
            "            <property name=""SkipNamespacesWithoutSummaries"" value=""False"" />" & _
            vbCrLf & _
            "            <property name=""UseNamespaceDocSummaries"" value=""False"" />" & vbCrLf & _
            "            <property name=""AutoPropertyBackerSummaries"" value=""False"" />" & vbCrLf & _
            "            <property name=""AutoDocumentConstructors"" value=""True"" />" & vbCrLf & _
            "            <property name=""DocumentAttributes"" value=""True"" />" & vbCrLf & _
            "            <property name=""ShowTypeIdInAttributes"" value=""True"" />" & vbCrLf & _
            "            <property name=""DocumentedAttributes"" value="""" />" & vbCrLf & _
            "            <property name=""GetExternalSummaries"" value=""True"" />" & vbCrLf & _
            "            <property name=""EditorBrowsableFilter"" value=""Off"" />" & vbCrLf & _
            "            <property name=""UseNDocXmlFile"" value="""" />" & vbCrLf & _
            "        </documenter>" & vbCrLf & _
            "    </documenters>" & vbCrLf & _
            "</project>"

        Dim FileWriter As System.IO.StreamWriter
        FileWriter = System.IO.File.CreateText(proj.Properties.Item("FullPath").Value() & _
        proj.Properties.Item("AssemblyName").Value() & ".ndoc")
        FileWriter.WriteLine(XmlString)
        FileWriter.Close()

        proj.ProjectItems.AddFromFile(proj.Properties.Item("FullPath").Value() & _
        proj.Properties.Item("AssemblyName").Value() & ".ndoc")
        proj.Save()

        If System.IO.Directory.Exists(proj.Properties.Item("FullPath").Value & "\doc\") = False Then
            System.IO.Directory.CreateDirectory(proj.Properties.Item("FullPath").Value & "\doc\")
        End If

        Dim hasDocDir As Boolean = False

        For Each pitem As EnvDTE.ProjectItem In proj.ProjectItems
            If pitem.Name = "doc" Then
                hasDocDir = True
            End If
        Next

        If hasDocDir = False Then
            proj.ProjectItems.AddFolder("doc")
            proj.Save()
        End If

        If System.IO.File.Exists(proj.Properties.Item("FullPath").Value & "\doc\" & proj.Properties.Item("AssemblyName").Value & ".chm") = False Then
            Dim chmWriter As System.IO.StreamWriter = 
                System.IO.File.CreateText(proj.Properties.Item("FullPath").Value() & "\doc\" & _
            proj.Properties.Item("AssemblyName").Value() & ".chm")
            chmWriter.WriteLine("")
            chmWriter.Close()
        End If
        proj.ProjectItems.AddFromFile(proj.Properties.Item("FullPath").Value() & "\doc\" & proj.Properties.Item("AssemblyName").Value() & ".chm")
        proj.Save()

        If proj.Properties.Item("PostBuildEvent").Value = "" Then
            proj.Properties.Item("PostBuildEvent").Value = """" & nDocPath & _
                 "NDocConsole.exe"" -documenter=MSDN -project=""$(ProjectDir)" & _
                 proj.Properties.Item("AssemblyName").Value() & ".ndoc"" -verbose" & vbCrLf & _
                 "copy $(ProjectDir)doc\" & proj.Properties.Item("AssemblyName").Value() & _
                 ".chm $(TargetDir)"
        Else
            Dim existing As String = ("" & proj.Properties.Item("PostBuildEvent").Value)
            Dim exArr As String() = existing.Split(vbCrLf)
            existing = ""
            Dim y As Integer
            For y = 0 To (exArr.Length - 1)
                If exArr(y).IndexOf(nDocPath) = -1 And exArr(y).IndexOf(".chm") = -1 Then
                    existing = existing & vbCr & exArr(y)
                End If
            Next
            existing = nDocPath & _
                 "NDocConsole.exe -documenter=MSDN -project=""$(ProjectDir)" & _
                 proj.Properties.Item("AssemblyName").Value() & ".ndoc"" -verbose" & vbCrLf & _
                 "copy $(ProjectDir)doc\" & proj.Properties.Item("AssemblyName").Value() & _
                 ".chm $(TargetDir)" & _
                 existing
            proj.Properties.Item("PostBuildEvent").Value = existing
        End If
        proj.Save()

        MsgBox("The file """ & proj.Properties.Item("AssemblyName").Value() & _
            ".ndoc"" has been added to the project." & vbCrLf & _
            "NDoc was registred as PostBuildEvent.")

    End Sub
#End Region
Friday, August 05, 2005 10:20:44 PM (W. Europe Standard Time, UTC+01:00)
Take your time to check some relevant pages in the field of http://www.poker-stadium.com/pacific-poker.html
http://www.poker-stadium.com/texas-hold-em.html
http://www.poker-stadium.com/poker-rooms.html
http://www.poker-stadium.com/party-poker.html
http://www.poker-stadium.com/poker-games.html
http://www.poker-stadium.com/poker.html
http://www.poker-stadium.com/online-poker.html
http://www.poker-stadium.com/texas-holdem.html
http://www.poker-stadium.com/empire-poker.html
.
Saturday, August 06, 2005 8:40:27 AM (W. Europe Standard Time, UTC+01:00)
You may find it interesting to check the sites in the field of jackie s strip poker party http://www.hackerssupply.com/poker-party.html
...
Sunday, August 07, 2005 5:12:29 PM (W. Europe Standard Time, UTC+01:00)
You can also check some relevant information on online casinos http://www.randppro-cuts.com/online-casinos.html
slot machines http://www.randppro-cuts.com/slot-machines.html
gambling http://www.randppro-cuts.com/gambling.html
casino http://www.randppro-cuts.com/casino.html
online casino http://www.randppro-cuts.com/online-casino.html
... Thanks!!!
Monday, August 08, 2005 7:27:31 AM (W. Europe Standard Time, UTC+01:00)
You may find it interesting to take a look at some information in the field of order diet pills online http://www.the-discount-store.com/order-diet-pills-online.html
... Thanks!!!
Tuesday, August 09, 2005 9:23:33 AM (W. Europe Standard Time, UTC+01:00)
Take your time to visit some helpful info in the field of poker rooms http://www.unique-poker.com/poker-rooms.html
online poker http://www.unique-poker.com/online-poker.html
pacific poker http://www.unique-poker.com/pacific-poker.html
empire poker http://www.unique-poker.com/empire-poker.html
poker games http://www.unique-poker.com/poker-games.html
texas hold em http://www.unique-poker.com/texas-hold-em.html
poker http://www.unique-poker.com/poker.html
texas holdem http://www.unique-poker.com/texas-holdem.html
party poker http://www.unique-poker.com/party-poker.html
...
Wednesday, August 10, 2005 2:17:02 AM (W. Europe Standard Time, UTC+01:00)
In your free time, visit some relevant pages about empire poker http://empire-poker.black-poker.com/
texas holdem http://texas-holdem.black-poker.com/
poker rules http://poker-rules.black-poker.com/
poker games http://poker-games.black-poker.com/
pacific poker http://pacific-poker.black-poker.com/
poker http://www.black-poker.com/
free poker http://free-poker.black-poker.com/
texas hold em http://texas-hold-em.black-poker.com/
online poker http://online-poker.black-poker.com/
party poker http://party-poker.black-poker.com/
... Thanks!!!
Wednesday, August 10, 2005 5:32:18 PM (W. Europe Standard Time, UTC+01:00)
Take your time to check the sites about poker http://www.e-online-poker-4u.org/poker.html
poker games http://www.e-online-poker-4u.org/poker-games.html
pacific poker http://www.e-online-poker-4u.org/pacific-poker.html
texas holdem http://www.e-online-poker-4u.org/texas-holdem.html
empire poker http://www.e-online-poker-4u.org/empire-poker.html
...
Thursday, August 11, 2005 3:18:13 AM (W. Europe Standard Time, UTC+01:00)
You are invited to check some relevant information about party poker http://www.e-online-poker-4u.org/party-poker.html
poker http://www.e-online-poker-4u.org/poker.html
pacific poker http://www.e-online-poker-4u.org/pacific-poker.html
texas hold em http://www.e-online-poker-4u.org/texas-hold-em.html
empire poker http://www.e-online-poker-4u.org/empire-poker.html
- Tons of interesdting stuff!!!
Friday, August 12, 2005 1:08:28 AM (W. Europe Standard Time, UTC+01:00)
You can also check out some relevant information in the field of payday loans http://payday-loans.cash-net.biz/
discover card http://discover-card.cash-net.biz/
home loans http://home-loans.cash-net.biz/
mortgage http://mortgage.cash-net.biz/
cash advance http://cash-advance.cash-net.biz/
.
Friday, August 12, 2005 1:08:41 AM (W. Europe Standard Time, UTC+01:00)
You can also check out some relevant information in the field of payday loans http://payday-loans.cash-net.biz/
discover card http://discover-card.cash-net.biz/
home loans http://home-loans.cash-net.biz/
mortgage http://mortgage.cash-net.biz/
cash advance http://cash-advance.cash-net.biz/
.
Friday, August 12, 2005 1:08:46 AM (W. Europe Standard Time, UTC+01:00)
You can also check out some relevant information in the field of payday loans http://payday-loans.cash-net.biz/
discover card http://discover-card.cash-net.biz/
home loans http://home-loans.cash-net.biz/
mortgage http://mortgage.cash-net.biz/
cash advance http://cash-advance.cash-net.biz/
.
Monday, August 22, 2005 5:41:11 PM (W. Europe Standard Time, UTC+01:00)
Please check the sites dedicated to texas holdem http://www.blest-poker.com/texas-holdem.html
online poker http://www.blest-poker.com/online-poker.html
poker games http://www.blest-poker.com/poker-games.html
empire poker http://www.blest-poker.com/empire-poker.html
party poker http://www.blest-poker.com/party-poker.html
... Thanks!!!
Monday, August 22, 2005 10:04:11 PM (W. Europe Standard Time, UTC+01:00)
You are invited to check the pages in the field of texas holdem http://www.blest-poker.com/texas-holdem.html
poker http://www.blest-poker.com/poker.html
poker games http://www.blest-poker.com/poker-games.html
pacific poker http://www.blest-poker.com/pacific-poker.html
poker rooms http://www.blest-poker.com/poker-rooms.html
... Thanks!!!
Tuesday, August 23, 2005 10:50:53 PM (W. Europe Standard Time, UTC+01:00)
In your free time, check out some information about holdem online poker texas tournament http://www.aponte.net/texas-holdem-tournament.html
... Thanks!!!
Wednesday, August 24, 2005 5:36:31 PM (W. Europe Standard Time, UTC+01:00)
You can also take a look at some helpful info about texas hold em http://texas-hold-em.take-poker.com/
poker games http://poker-games.take-poker.com/
poker rules http://poker-rules.take-poker.com/
poker http://www.take-poker.com/
online poker http://online-poker.take-poker.com/
.
Thursday, August 25, 2005 3:34:27 PM (W. Europe Standard Time, UTC+01:00)
You can also visit some relevant pages on Party Poker Cheat Programs http://www.base-poker.com/party-poker.html
- Tons of interesdting stuff!!!
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview