<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>artiso Blog - Tipps und Tricks</title>
    <link>http://www.artiso.com/ProBlog/</link>
    <description>Neues rund um's Thema .Net</description>
    <language>de-de</language>
    <copyright>Thomas</copyright>
    <lastBuildDate>Tue, 16 Feb 2010 18:19:29 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.6264.0</generator>
    <managingEditor>tschissler@artiso.com</managingEditor>
    <webMaster>tschissler@artiso.com</webMaster>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=c85928fc-65e5-4313-a969-04f466de7bce</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,c85928fc-65e5-4313-a969-04f466de7bce.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,c85928fc-65e5-4313-a969-04f466de7bce.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=c85928fc-65e5-4313-a969-04f466de7bce</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Will man in einer Winforms-Anwendung einen String URL-encodieren, dann kann mann dafür
einen einfachen Aufruf verwenden:
</p>
        <font color="#2b91af" size="2" face="Consolas">
          <font color="#2b91af" size="2" face="Consolas">
            <p>
HttpUtility.UrlEncode(<font color="#a31515" size="2" face="Consolas">"http://www.artiso.com/page?ID=99"</font>);
</p>
          </font>
        </font>
        <p>
Das einzige wass man dafür tun muss, ist die System.Web.dll zu referenzieren. Eine
kleine Hürde gibt es bei Visual Studio 2010, da hier standardmäßig “.Net Framework
4 Client Profile” als Target-Framework ausgewählt ist und das Client Profile die System.Web
nicht enthält. Deshalb muss man in den Eigenschaften des Projektes das Target-Framework
umstellen, z.B. auf .NET Framework 4.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/URLencodierunginWinFormsAnwendung_10EA5/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/URLencodierunginWinFormsAnwendung_10EA5/image_thumb.png" width="545" height="360" />
          </a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=c85928fc-65e5-4313-a969-04f466de7bce" />
      </body>
      <title>URL encodierung in WinForms-Anwendung</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,c85928fc-65e5-4313-a969-04f466de7bce.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,c85928fc-65e5-4313-a969-04f466de7bce.aspx</link>
      <pubDate>Tue, 16 Feb 2010 18:19:29 GMT</pubDate>
      <description>&lt;p&gt;
Will man in einer Winforms-Anwendung einen String URL-encodieren, dann kann mann dafür
einen einfachen Aufruf verwenden:
&lt;/p&gt;
&lt;font color="#2b91af" size="2" face="Consolas"&gt;&lt;font color="#2b91af" size="2" face="Consolas"&gt; 
&lt;p&gt;
HttpUtility.UrlEncode(&lt;font color="#a31515" size="2" face="Consolas"&gt;"http://www.artiso.com/page?ID=99"&lt;/font&gt;);
&lt;/p&gt;
&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;
Das einzige wass man dafür tun muss, ist die System.Web.dll zu referenzieren. Eine
kleine Hürde gibt es bei Visual Studio 2010, da hier standardmäßig “.Net Framework
4 Client Profile” als Target-Framework ausgewählt ist und das Client Profile die System.Web
nicht enthält. Deshalb muss man in den Eigenschaften des Projektes das Target-Framework
umstellen, z.B. auf .NET Framework 4.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/URLencodierunginWinFormsAnwendung_10EA5/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/URLencodierunginWinFormsAnwendung_10EA5/image_thumb.png" width="545" height="360"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=c85928fc-65e5-4313-a969-04f466de7bce" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,c85928fc-65e5-4313-a969-04f466de7bce.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=00c085bb-b95a-4ef0-895a-3aa0570c4eba</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,00c085bb-b95a-4ef0-895a-3aa0570c4eba.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,00c085bb-b95a-4ef0-895a-3aa0570c4eba.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=00c085bb-b95a-4ef0-895a-3aa0570c4eba</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hype-V ist ein klasse Virtualisierungssystem das vor allem in der neuesten Version
eine Reihe nützlicher Funktionen mitbringt. Besonders hilfreich sind Snapshots mit
denen es gefahrlos möglich ist, auch auf dem Server mal was zu testen. Man kann sich
aber mit Shanpshots leicht selber überlicsten oder gar in’s Knie schießen. Deshalb
möchte ich hier ein paar Erfahrungen zum Besten geben:
</p>
        <p>
          <strong>Funktionsweise von Snapshots</strong>
        </p>
        <p>
Die Virtuellen Maschinen von Hyper-V schreiben ihre Daten in virtuelle Harddisks (VHD),
also eine Datei auf der Platte des Hosts. Wird nun ein Snapshot gemacht, passiert
vereinfach gesagt, Folgendes. Die VHD-Datei wird schreibgeschützt, so dass daran keine
Änderungen mehr vorgenommen werden können. Statt dessen wird nun eine AVHD-Datei angelegt
und alle Änderungen auf der Platte der VM werden nun dort hineingeschrieben. Wird
erneut ein Snapshot erstellt, wird die AVHD gesperrt und eine weitere angelegt.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/HyperVSnapshots_129AD/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/HyperVSnapshots_129AD/image_thumb.png" width="602" height="78" />
          </a>
        </p>
        <p>
Dies hat nun zweierlei Folgen:
</p>
        <ol>
          <li>
Je mehr Snapshots erstellt werden, desto langsamer wird der Zugriff auf die virtuelle
Disk, da Hyper-V ja aus der VHD und den verschiedenen AVHDs nun die Daten zusammensammeln
muss.</li>
          <li>
Nur die VHD und alle AVHDs zusammen ergeben den aktuellen Stand der virtuellen Disk,
mit der VHD alleine hat man nur den Stand vom ersten Snapshot.</li>
        </ol>
        <p>
Gerade der letzte Punkt ist beim Verschienen der VM oder beim Backup zu berücksichtigen,
da man hier schnell Daten verlieren kann, wenn man vergisst die AVHDs zu berücksichtigen. 
</p>
        <p>
Aus beiden oben genannten Gründen macht es Sinn, Snapshots zu löschen, sobald diese
nicht mehr gebraucht werden. Snapshots sind keine Technik zur Erstellung von Backups!
Zum löschen eines Snapshots wird dieser einfach selektiert und dann mit “Delete” gelöscht.
Aber ACHTUNG! Die Daten liegen nun immer noch in der AVHD. Erst wenn man die VM in
den Save-State fährt, beginnt Hyper-V mit einem Merge, d.h. die Änderungen der AVHDs
werden jetzt in die jeweils vorausgegangene AVHD bzw. VHD gemerged, sind alle Snapshots
gelöscht, bleibt nur noch die VHD übrig.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/HyperVSnapshots_129AD/image_4.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/HyperVSnapshots_129AD/image_thumb_1.png" width="618" height="383" />
          </a>
        </p>
        <p>
Erst nach Abschluss des Merge-Vorgangs erhält man durch eine Kopie der VHD eine komplette
Sicherung der virtuellen Disk der VM. 
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=00c085bb-b95a-4ef0-895a-3aa0570c4eba" />
      </body>
      <title>Hyper-V Snapshots</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,00c085bb-b95a-4ef0-895a-3aa0570c4eba.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,00c085bb-b95a-4ef0-895a-3aa0570c4eba.aspx</link>
      <pubDate>Mon, 02 Nov 2009 20:12:19 GMT</pubDate>
      <description>&lt;p&gt;
Hype-V ist ein klasse Virtualisierungssystem das vor allem in der neuesten Version
eine Reihe nützlicher Funktionen mitbringt. Besonders hilfreich sind Snapshots mit
denen es gefahrlos möglich ist, auch auf dem Server mal was zu testen. Man kann sich
aber mit Shanpshots leicht selber überlicsten oder gar in’s Knie schießen. Deshalb
möchte ich hier ein paar Erfahrungen zum Besten geben:
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Funktionsweise von Snapshots&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Die Virtuellen Maschinen von Hyper-V schreiben ihre Daten in virtuelle Harddisks (VHD),
also eine Datei auf der Platte des Hosts. Wird nun ein Snapshot gemacht, passiert
vereinfach gesagt, Folgendes. Die VHD-Datei wird schreibgeschützt, so dass daran keine
Änderungen mehr vorgenommen werden können. Statt dessen wird nun eine AVHD-Datei angelegt
und alle Änderungen auf der Platte der VM werden nun dort hineingeschrieben. Wird
erneut ein Snapshot erstellt, wird die AVHD gesperrt und eine weitere angelegt.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/HyperVSnapshots_129AD/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/HyperVSnapshots_129AD/image_thumb.png" width="602" height="78"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Dies hat nun zweierlei Folgen:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Je mehr Snapshots erstellt werden, desto langsamer wird der Zugriff auf die virtuelle
Disk, da Hyper-V ja aus der VHD und den verschiedenen AVHDs nun die Daten zusammensammeln
muss.&lt;/li&gt;
&lt;li&gt;
Nur die VHD und alle AVHDs zusammen ergeben den aktuellen Stand der virtuellen Disk,
mit der VHD alleine hat man nur den Stand vom ersten Snapshot.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Gerade der letzte Punkt ist beim Verschienen der VM oder beim Backup zu berücksichtigen,
da man hier schnell Daten verlieren kann, wenn man vergisst die AVHDs zu berücksichtigen. 
&lt;/p&gt;
&lt;p&gt;
Aus beiden oben genannten Gründen macht es Sinn, Snapshots zu löschen, sobald diese
nicht mehr gebraucht werden. Snapshots sind keine Technik zur Erstellung von Backups!
Zum löschen eines Snapshots wird dieser einfach selektiert und dann mit “Delete” gelöscht.
Aber ACHTUNG! Die Daten liegen nun immer noch in der AVHD. Erst wenn man die VM in
den Save-State fährt, beginnt Hyper-V mit einem Merge, d.h. die Änderungen der AVHDs
werden jetzt in die jeweils vorausgegangene AVHD bzw. VHD gemerged, sind alle Snapshots
gelöscht, bleibt nur noch die VHD übrig.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/HyperVSnapshots_129AD/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/HyperVSnapshots_129AD/image_thumb_1.png" width="618" height="383"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Erst nach Abschluss des Merge-Vorgangs erhält man durch eine Kopie der VHD eine komplette
Sicherung der virtuellen Disk der VM. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=00c085bb-b95a-4ef0-895a-3aa0570c4eba" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,00c085bb-b95a-4ef0-895a-3aa0570c4eba.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=eef081c2-f672-459d-9e7e-5ce49099fe65</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,eef081c2-f672-459d-9e7e-5ce49099fe65.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,eef081c2-f672-459d-9e7e-5ce49099fe65.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=eef081c2-f672-459d-9e7e-5ce49099fe65</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Eines der coolsten Features in Windows 7 ist für mich der Problem Steps Recorder.
Damit lassen sich Benutzeraktionen aufzeichnen und als MHT-File mit Screenshoots ausgeben.
Diese Funktion eignet sich sehr gut um z.B. Installationsanleitungen oder auch Dokumentationen
von Testdurchläufen zu erstellen. Hierzu wird einfach der Problem Steps Recorder über
den Befehl PSR gestartet. 
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ProblemStepsRecorderinWindows7_1AF3/image_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ProblemStepsRecorderinWindows7_1AF3/image_thumb.png" width="436" height="71" />
          </a>
        </p>
        <p>
Nach einem Klick auf Start Record werden nun die Benutzeraktionen aufgezeichnet. Heraus
kommt dann ungefähr so etwas:
</p>
        <p>
          <b>Problem Step 15:</b> User left double click on "Name (editable text)" in "WorkItem_Manager_Open_1.0.0_Installer[1]" 
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ProblemStepsRecorderinWindows7_1AF3/image_8.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ProblemStepsRecorderinWindows7_1AF3/image_thumb_3.png" width="691" height="433" />
          </a>
        </p>
        <p>
          <a href="file:///C:\Users\Thomas\Desktop\screenshot_0015.jpeg">
          </a>
        </p>
        <p>
          <a href="#ProblemStep15">Previous</a>
          <a href="#ProblemStep17">Next</a>
        </p>
        <p>
          <b>Problem Step 16:</b> User left click on "Run (push button)" in "Open File - Security
Warning" 
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ProblemStepsRecorderinWindows7_1AF3/image_6.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ProblemStepsRecorderinWindows7_1AF3/image_thumb_2.png" width="686" height="432" />
          </a>
        </p>
        <p>
          <a href="file:///C:\Users\Thomas\Desktop\screenshot_0016.jpeg">
          </a>
        </p>
        <p>
          <a href="#ProblemStep16">Previous</a>
          <a href="#ProblemStep18">Next</a>
        </p>
        <p>
          <b>Problem Step 17:</b> User left click on "Next &gt; (push button)" in "artiso Workitem
Manager Open" 
</p>
        <p>
          <a href="file:///C:\Users\Thomas\Desktop\screenshot_0017.jpeg">
          </a>
        </p>
        <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ProblemStepsRecorderinWindows7_1AF3/image_4.png">
          <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ProblemStepsRecorderinWindows7_1AF3/image_thumb_1.png" width="683" height="428" />
        </a>
        <p>
        </p>
        <p>
        </p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:066e2bee-242e-4044-b418-a190e1a1f87c" class="wlWriterEditableSmartContent">
          <div>
            <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ProblemStepsRecorderinWindows7_1AF3/Problem_20090407_2211.mht" target="_blank">Das
komplette Ergebnis kann hier heruntergeladen werden</a>
          </div>
        </div>
        <p>
          <br />
Diese Aufzeichnungen funktionieren sowohl mit Web- als auch Windows-Anwendungen. Und
natürlich können die erzeugten MHT-Files in Word oder anderen Editoren noch bearbeitet
werden. So können z.B. überflüssige Zwischenschritte entfernt und Texte editiert werden.
Es können auch währen des Aufzeichnungsvorgangs Kommentare erfasst und diesen ein
bestimmter Bildausschnitt zugeordnet werden.
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=eef081c2-f672-459d-9e7e-5ce49099fe65" />
      </body>
      <title>Problem Steps Recorder in Windows 7</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,eef081c2-f672-459d-9e7e-5ce49099fe65.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,eef081c2-f672-459d-9e7e-5ce49099fe65.aspx</link>
      <pubDate>Wed, 08 Apr 2009 00:07:35 GMT</pubDate>
      <description>&lt;p&gt;
Eines der coolsten Features in Windows 7 ist für mich der Problem Steps Recorder.
Damit lassen sich Benutzeraktionen aufzeichnen und als MHT-File mit Screenshoots ausgeben.
Diese Funktion eignet sich sehr gut um z.B. Installationsanleitungen oder auch Dokumentationen
von Testdurchläufen zu erstellen. Hierzu wird einfach der Problem Steps Recorder über
den Befehl PSR gestartet. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ProblemStepsRecorderinWindows7_1AF3/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ProblemStepsRecorderinWindows7_1AF3/image_thumb.png" width="436" height="71"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Nach einem Klick auf Start Record werden nun die Benutzeraktionen aufgezeichnet. Heraus
kommt dann ungefähr so etwas:
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;Problem Step 15:&lt;/b&gt; User left double click on "Name (editable text)" in "WorkItem_Manager_Open_1.0.0_Installer[1]" 
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ProblemStepsRecorderinWindows7_1AF3/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ProblemStepsRecorderinWindows7_1AF3/image_thumb_3.png" width="691" height="433"&gt;&lt;/a&gt; 
&lt;p&gt;
&lt;a href="file:///C:\Users\Thomas\Desktop\screenshot_0015.jpeg"&gt;&lt;/a&gt; 
&lt;p&gt;
&lt;a href="#ProblemStep15"&gt;Previous&lt;/a&gt; &lt;a href="#ProblemStep17"&gt;Next&lt;/a&gt; 
&lt;p&gt;
&lt;b&gt;Problem Step 16:&lt;/b&gt; User left click on "Run (push button)" in "Open File - Security
Warning" 
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ProblemStepsRecorderinWindows7_1AF3/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ProblemStepsRecorderinWindows7_1AF3/image_thumb_2.png" width="686" height="432"&gt;&lt;/a&gt; 
&lt;p&gt;
&lt;a href="file:///C:\Users\Thomas\Desktop\screenshot_0016.jpeg"&gt;&lt;/a&gt; 
&lt;p&gt;
&lt;a href="#ProblemStep16"&gt;Previous&lt;/a&gt; &lt;a href="#ProblemStep18"&gt;Next&lt;/a&gt; 
&lt;p&gt;
&lt;b&gt;Problem Step 17:&lt;/b&gt; User left click on "Next &amp;gt; (push button)" in "artiso Workitem
Manager Open" 
&lt;p&gt;
&lt;a href="file:///C:\Users\Thomas\Desktop\screenshot_0017.jpeg"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ProblemStepsRecorderinWindows7_1AF3/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ProblemStepsRecorderinWindows7_1AF3/image_thumb_1.png" width="683" height="428"&gt;&lt;/a&gt; 
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:F60BB8FA-6F02-4999-8F5E-9DD4E92C4DA7:066e2bee-242e-4044-b418-a190e1a1f87c" class="wlWriterEditableSmartContent"&gt;
&lt;div&gt;&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ProblemStepsRecorderinWindows7_1AF3/Problem_20090407_2211.mht" target="_blank"&gt;Das
komplette Ergebnis kann hier heruntergeladen werden&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;br&gt;
Diese Aufzeichnungen funktionieren sowohl mit Web- als auch Windows-Anwendungen. Und
natürlich können die erzeugten MHT-Files in Word oder anderen Editoren noch bearbeitet
werden. So können z.B. überflüssige Zwischenschritte entfernt und Texte editiert werden.
Es können auch währen des Aufzeichnungsvorgangs Kommentare erfasst und diesen ein
bestimmter Bildausschnitt zugeordnet werden.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=eef081c2-f672-459d-9e7e-5ce49099fe65" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,eef081c2-f672-459d-9e7e-5ce49099fe65.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=2b142c6d-f285-4697-ad77-9914a8bd3cfe</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,2b142c6d-f285-4697-ad77-9914a8bd3cfe.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,2b142c6d-f285-4697-ad77-9914a8bd3cfe.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=2b142c6d-f285-4697-ad77-9914a8bd3cfe</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Das Thema Test Driven Development oder auch Test First Developent gewinnt immer mehr
an Beachtung. Keine Konferenz, keine Zeitschrift, kein Sprecher der was auf sich hält
kommt um das Thema herum. Doch nach dem überzeugenden Vortrag sitzt man zu Hause im
Büro vor einem leeren Project und wie nun anfangen? Hier scheitern bereits die ersten,
weil entsprechende Publikationen oft zwar die Vorteile ausführlich schildern, aber
nicht den Einstieg darstellen. Deshalb möchte ich hier einen entsprechenden Einstieg
geben und mit einem wirklich leeren Projekt beginnen. 
</p>
        <p>
Die Theorie um TDD will ich hier einfach weglassen. Hierzu gibt es bereits Informationen
genug. Und wir werden verschiedene Vereinfachung vornehmen, über die Profis etwas
die Nase rümpfen werden, aber damit erhalten wir ein einfaches und praktikable Einstiegsszenario. 
</p>
        <p>
Zum Einsatz kommen hierbei die Testfunktionen von Visual Studio 2008 die ab der Professional
Edition enthalten sind. Wir beginnen mit einer komplett leeren Solution.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TDDQuickstart_259/image_2.png">
            <img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="245" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TDDQuickstart_259/image_thumb.png" width="359" border="0" />
          </a>
        </p>
        <p>
Die Frage, die nun im Raum steht, ist: Wie schreibe ich einen Test ohne eine Methode
zu haben. Ein Unit-Test besteht ja im Prinzip darin, dass wir eine Methode aufrufen
und den Rückgabewert mit einem Erwartungswert vergleichen. Der Test wird aber nicht
einmal kompilieren, solange die Methode nicht definiert ist. Der Workaround an dieser
Stelle sieht dann oft so aus, dass man von der Methode und ihrer Klasse erst einmal
einen Stub anlegt der im wesentlichen eine “ThrowNotImplemented”-Exception wirft.
Damit haben wir aber eigentlich schon mehr implementiert als nach dem TDD uns lieb
ist.
</p>
        <p>
Ein etwas eleganterer Ansatz geht über die Definition von Interfaces. Diese Vorgehensweise
eignet sich besonders gut bei einer komponentenorientierten Architektur mit einem
Contract First Ansatz. Dabei werden die Schnittstellen der einzelnen Komponenten erst
über Contracts (Interfaces) beschrieben bevor diese implementiert werden. Den TDD-Ablauf
Rot &gt; Grün &gt; Refactor erweitern wir ein wenig. Damit ergibt sich folgende Abfolge:
</p>
        <p>
Contract definieren &gt; Test implementieren &gt; Rot &gt; Funktion implementieren
&gt; Grün &gt; Refactor
</p>
        <p>
D.h. wir erstellen in einem ersten Schritt einen Contract (genau genommen machen wir
damit kein TDD sondern ein Test First. Beim TDD ist der Test das erste was erstellt
werden muss, aber das ist in meinen Augen eher Haarspalterei, so funktioniert es einfach
in der Praxis). Wir erstellen ein neues ClassLibrary-Projekt und erstellen dort ein
Interface.
</p>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 1:</span>
              <span style="color: #0000ff">namespace</span> Contracts</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 3:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">interface</span> IOrderCalculator</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 5:</span>
              <span style="color: #0000ff">decimal</span> CalculateShippinghCosts(<span style="color: #0000ff">decimal</span> sum, <span style="color: #0000ff">decimal</span> freeShippingMin, <span style="color: #0000ff">decimal</span> shippingCosts);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 6:</span> }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 7:</span> }</pre>
          </div>
        </div>
        <p>
        </p>
        <p>
Wir wollen hier ein überschaubares, aber auch nicht zu triviales Beispiel verwenden.
Die Methode CalculateShippingCosts soll zu einem gegebenen Rechnungsbetrag Versandkosten
hinzuaddieren, wenn ein bestimmter Mindestbetrag nicht erreicht ist. So damit haben
wir den Contract erstellt. Nun wollen wir einen Test dazu erstellen. Das geht am schnellsten
durch einen Rechts-Klick auf die Methode und dann “Create Unit-Tests”.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TDDQuickstart_259/image_8.png">
            <img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="187" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TDDQuickstart_259/image_thumb_3.png" width="385" border="0" />
          </a>
        </p>
        <p>
Hier wird standardmäßig ein neues Test-Projekt angelegt. Darin wird ein entsprechender
Unit-Test generiert.
</p>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 1:</span> [TestMethod()]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">void</span> CalculateShippinghCostsTest()</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 3:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span> IOrderCalculator
target = CreateIOrderCalculator(); <span style="color: #008000">// TODO: Initialize
to an appropriate value</span></pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 5:</span> Decimal
sum = <span style="color: #0000ff">new</span> Decimal(); <span style="color: #008000">//
TODO: Initialize to an appropriate value</span></pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 6:</span> Decimal
freeShippingMin = <span style="color: #0000ff">new</span> Decimal(); <span style="color: #008000">//
TODO: Initialize to an appropriate value</span></pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 7:</span> Decimal
shippingCosts = <span style="color: #0000ff">new</span> Decimal(); <span style="color: #008000">//
TODO: Initialize to an appropriate value</span></pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 8:</span> Decimal
expected = <span style="color: #0000ff">new</span> Decimal(); <span style="color: #008000">//
TODO: Initialize to an appropriate value</span></pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 9:</span> Decimal
actual;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 10:</span> actual
= target.CalculateShippinghCosts(sum, freeShippingMin, shippingCosts);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 11:</span> Assert.AreEqual(expected,
actual);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 12:</span> Assert.Inconclusive(<span style="color: #006080">"Verify
the correctness of this test method."</span>);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 13:</span> }</pre>
          </div>
        </div>
        <p>
        </p>
        <p>
        </p>
        <p>
Damit können wir den Test bereits zum ersten mal ausführen und er geht wie erwartet
auf Rot. Aber Moment, wie funktioniert das. Wie kann der Test eine Methode auf einem
Interface aufrufen? Es gibt ja noch keine Implementierung des Interfaces und ein Interface
selbst lässt sich ja nicht instanziieren. Hier baut Visual Studio einen kleinen Workaround.
In Zeile 4 im obigen Code sieht man, dass eine Instanz des target-Objektes über die
Methode CreateIOrderCalculator() erstellt wird. Diese Methode wollen wir mal etwas
genauer anschauen.
</p>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 1:</span>
              <span style="color: #0000ff">internal</span>
              <span style="color: #0000ff">virtual</span> IOrderCalculator
CreateIOrderCalculator()</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 3:</span>
              <span style="color: #008000">//
TODO: Instantiate an appropriate concrete class.</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span> IOrderCalculator
target = <span style="color: #0000ff">null</span>;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 5:</span>
              <span style="color: #0000ff">return</span> target;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 6:</span> }</pre>
          </div>
        </div>
        <p>
        </p>
        <p>
Hier wird das Objekt einfach mit null initialisiert. Ein einfacher, aber wirkungsvoller
Workaround. Damit erreichen wir unser Ziel, dass der Test kompiliert aber fehlschlägt.
Nach der Implementierung ersetzen wir das null einfach durch die entsprechende Initialisierung.
Damit können wir nun unsere Testcases Implementieren.
</p>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 1:</span> [TestMethod()]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">void</span> CalculateShippinghCosts_Sum_Below_FreeShippingMin()</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 3:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span> IOrderCalculator
target = CreateIOrderCalculator();</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 5:</span> Decimal
sum = 1;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 6:</span> Decimal
freeShippingMin = 10;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 7:</span> Decimal
shippingCosts = 5;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 8:</span>
              <span style="color: #008000">//
We are below min, so we have to add shippingCosts</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 9:</span> Decimal
expected = 6;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 10:</span> Decimal
actual;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 11:</span> actual
= target.CalculateShippinghCosts(sum, freeShippingMin, shippingCosts);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 12:</span> Assert.AreEqual(expected,
actual);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 13:</span> }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 14:</span>  </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 15:</span> [TestMethod()]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 16:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">void</span> CalculateShippinghCosts_Sum_Above_FreeShippingMin()</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 17:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 18:</span> IOrderCalculator
target = CreateIOrderCalculator();</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 19:</span> Decimal
sum = 20;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 20:</span> Decimal
freeShippingMin = 10;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 21:</span> Decimal
shippingCosts = 5;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 22:</span>
              <span style="color: #008000">//
We are above min, so we don't add shippingCosts</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 23:</span> Decimal
expected = 20;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 24:</span> Decimal
actual;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 25:</span> actual
= target.CalculateShippinghCosts(sum, freeShippingMin, shippingCosts);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 26:</span> Assert.AreEqual(expected,
actual);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 27:</span> }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 28:</span>  </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 29:</span> [TestMethod()]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 30:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">void</span> CalculateShippinghCosts_Sum_Equal_FreeShippingMin()</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 31:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 32:</span> IOrderCalculator
target = CreateIOrderCalculator();</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 33:</span> Decimal
sum = 10;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 34:</span> Decimal
freeShippingMin = 10;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 35:</span> Decimal
shippingCosts = 5;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 36:</span>
              <span style="color: #008000">//
We are equal min, so we don't add shippingCosts</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 37:</span> Decimal
expected = 10;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 38:</span> Decimal
actual;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 39:</span> actual
= target.CalculateShippinghCosts(sum, freeShippingMin, shippingCosts);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 40:</span> Assert.AreEqual(expected,
actual);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 41:</span> }</pre>
          </div>
        </div>
        <p>
Damit haben wir unser Szenario ausreichend beschrieben. Wir können nun an die Implementierung
gehen.Dazu legen wir ein neues Projekt an in dem wir eine Klasse definieren die wir
von unserem Interface ableiten.
</p>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 1:</span>
              <span style="color: #0000ff">namespace</span> Components</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 3:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">class</span> cOrderCalculator
: IOrderCalculator</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 5:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">decimal</span> CalculateShippinghCosts(<span style="color: #0000ff">decimal</span> sum, <span style="color: #0000ff">decimal</span> freeShippingMin, <span style="color: #0000ff">decimal</span> shippingCosts)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 6:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 7:</span>
              <span style="color: #008000">//
If sum is greater than Min then don't add shipping costs</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 8:</span>
              <span style="color: #0000ff">if</span> (sum
&gt; freeShippingMin)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 9:</span>
              <span style="color: #0000ff">return</span> sum;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 10:</span>
              <span style="color: #0000ff">else</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 11:</span>
              <span style="color: #008000">//
else add shipping costs</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 12:</span>
              <span style="color: #0000ff">return</span> sum
+ shippingCosts;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 13:</span> }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 14:</span> }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 15:</span> }</pre>
          </div>
        </div>
        <p>
Nun müssen wir unbedingt noch daran denken, die Initialisierung des Testobjektes in
unserer Testmethode anzupassen.
</p>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 1:</span>
              <span style="color: #0000ff">internal</span>
              <span style="color: #0000ff">virtual</span> IOrderCalculator
CreateIOrderCalculator()</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 3:</span> IOrderCalculator
target = <span style="color: #0000ff">new</span> cOrderCalculator();</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span>
              <span style="color: #0000ff">return</span> target;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 5:</span> }</pre>
          </div>
        </div>
        <p>
Nun können wir die Tests ausführen.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TDDQuickstart_259/image_10.png">
            <img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="130" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TDDQuickstart_259/image_thumb_4.png" width="574" border="0" />
          </a>
        </p>
        <p>
Oh, ein Test schlägt fehl. Bei genauerer Betrachtung stellen wir fest, dass wir bei
der Implementierung den Fall dass die Summe gleich der Grenze ist nicht richtig berücksichtigt
haben. Also hat sich hier der TDD-Ansatz schon bewährt und wir können den Fehler beheben.
Damit sind alle Tests grün und wir können weiter fortfahren. Wir könnten nun z.B.
auf unserem Interface weitere Methoden definieren und dafür Tests anlegen. 
</p>
        <p>
Also eigentlich gar nicht so schwer das mit dem TDD, oder? Freue mich auf euer Feedback.
</p>
        <p>
Die Solution gibt es zum Download.
</p>
        <p>
Happy Testing!
</p>
        <div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:ff5bd5c7-cf5f-44fa-b8f6-de296f6342f9" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <p>
            <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TDDQuickstart_259/TDDQuickStart.zip" target="_blank">Download
Demo-Solution</a>
          </p>
        </div>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=2b142c6d-f285-4697-ad77-9914a8bd3cfe" />
      </body>
      <title>TDD Quickstart</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,2b142c6d-f285-4697-ad77-9914a8bd3cfe.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,2b142c6d-f285-4697-ad77-9914a8bd3cfe.aspx</link>
      <pubDate>Wed, 01 Apr 2009 00:10:53 GMT</pubDate>
      <description>&lt;p&gt;
Das Thema Test Driven Development oder auch Test First Developent gewinnt immer mehr
an Beachtung. Keine Konferenz, keine Zeitschrift, kein Sprecher der was auf sich hält
kommt um das Thema herum. Doch nach dem überzeugenden Vortrag sitzt man zu Hause im
Büro vor einem leeren Project und wie nun anfangen? Hier scheitern bereits die ersten,
weil entsprechende Publikationen oft zwar die Vorteile ausführlich schildern, aber
nicht den Einstieg darstellen. Deshalb möchte ich hier einen entsprechenden Einstieg
geben und mit einem wirklich leeren Projekt beginnen. 
&lt;/p&gt;
&lt;p&gt;
Die Theorie um TDD will ich hier einfach weglassen. Hierzu gibt es bereits Informationen
genug. Und wir werden verschiedene Vereinfachung vornehmen, über die Profis etwas
die Nase rümpfen werden, aber damit erhalten wir ein einfaches und praktikable Einstiegsszenario. 
&lt;/p&gt;
&lt;p&gt;
Zum Einsatz kommen hierbei die Testfunktionen von Visual Studio 2008 die ab der Professional
Edition enthalten sind. Wir beginnen mit einer komplett leeren Solution.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TDDQuickstart_259/image_2.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="245" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TDDQuickstart_259/image_thumb.png" width="359" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Die Frage, die nun im Raum steht, ist: Wie schreibe ich einen Test ohne eine Methode
zu haben. Ein Unit-Test besteht ja im Prinzip darin, dass wir eine Methode aufrufen
und den Rückgabewert mit einem Erwartungswert vergleichen. Der Test wird aber nicht
einmal kompilieren, solange die Methode nicht definiert ist. Der Workaround an dieser
Stelle sieht dann oft so aus, dass man von der Methode und ihrer Klasse erst einmal
einen Stub anlegt der im wesentlichen eine “ThrowNotImplemented”-Exception wirft.
Damit haben wir aber eigentlich schon mehr implementiert als nach dem TDD uns lieb
ist.
&lt;/p&gt;
&lt;p&gt;
Ein etwas eleganterer Ansatz geht über die Definition von Interfaces. Diese Vorgehensweise
eignet sich besonders gut bei einer komponentenorientierten Architektur mit einem
Contract First Ansatz. Dabei werden die Schnittstellen der einzelnen Komponenten erst
über Contracts (Interfaces) beschrieben bevor diese implementiert werden. Den TDD-Ablauf
Rot &amp;gt; Grün &amp;gt; Refactor erweitern wir ein wenig. Damit ergibt sich folgende Abfolge:
&lt;/p&gt;
&lt;p&gt;
Contract definieren &amp;gt; Test implementieren &amp;gt; Rot &amp;gt; Funktion implementieren
&amp;gt; Grün &amp;gt; Refactor
&lt;/p&gt;
&lt;p&gt;
D.h. wir erstellen in einem ersten Schritt einen Contract (genau genommen machen wir
damit kein TDD sondern ein Test First. Beim TDD ist der Test das erste was erstellt
werden muss, aber das ist in meinen Augen eher Haarspalterei, so funktioniert es einfach
in der Praxis). Wir erstellen ein neues ClassLibrary-Projekt und erstellen dort ein
Interface.
&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; Contracts&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;interface&lt;/span&gt; IOrderCalculator&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;decimal&lt;/span&gt; CalculateShippinghCosts(&lt;span style="color: #0000ff"&gt;decimal&lt;/span&gt; sum, &lt;span style="color: #0000ff"&gt;decimal&lt;/span&gt; freeShippingMin, &lt;span style="color: #0000ff"&gt;decimal&lt;/span&gt; shippingCosts);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 6:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 7:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Wir wollen hier ein überschaubares, aber auch nicht zu triviales Beispiel verwenden.
Die Methode CalculateShippingCosts soll zu einem gegebenen Rechnungsbetrag Versandkosten
hinzuaddieren, wenn ein bestimmter Mindestbetrag nicht erreicht ist. So damit haben
wir den Contract erstellt. Nun wollen wir einen Test dazu erstellen. Das geht am schnellsten
durch einen Rechts-Klick auf die Methode und dann “Create Unit-Tests”.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TDDQuickstart_259/image_8.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="187" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TDDQuickstart_259/image_thumb_3.png" width="385" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Hier wird standardmäßig ein neues Test-Projekt angelegt. Darin wird ein entsprechender
Unit-Test generiert.
&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; [TestMethod()]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; CalculateShippinghCostsTest()&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; IOrderCalculator
target = CreateIOrderCalculator(); &lt;span style="color: #008000"&gt;// TODO: Initialize
to an appropriate value&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; Decimal
sum = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Decimal(); &lt;span style="color: #008000"&gt;//
TODO: Initialize to an appropriate value&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 6:&lt;/span&gt; Decimal
freeShippingMin = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Decimal(); &lt;span style="color: #008000"&gt;//
TODO: Initialize to an appropriate value&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 7:&lt;/span&gt; Decimal
shippingCosts = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Decimal(); &lt;span style="color: #008000"&gt;//
TODO: Initialize to an appropriate value&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 8:&lt;/span&gt; Decimal
expected = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Decimal(); &lt;span style="color: #008000"&gt;//
TODO: Initialize to an appropriate value&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 9:&lt;/span&gt; Decimal
actual;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 10:&lt;/span&gt; actual
= target.CalculateShippinghCosts(sum, freeShippingMin, shippingCosts);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 11:&lt;/span&gt; Assert.AreEqual(expected,
actual);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 12:&lt;/span&gt; Assert.Inconclusive(&lt;span style="color: #006080"&gt;"Verify
the correctness of this test method."&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 13:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Damit können wir den Test bereits zum ersten mal ausführen und er geht wie erwartet
auf Rot. Aber Moment, wie funktioniert das. Wie kann der Test eine Methode auf einem
Interface aufrufen? Es gibt ja noch keine Implementierung des Interfaces und ein Interface
selbst lässt sich ja nicht instanziieren. Hier baut Visual Studio einen kleinen Workaround.
In Zeile 4 im obigen Code sieht man, dass eine Instanz des target-Objektes über die
Methode CreateIOrderCalculator() erstellt wird. Diese Methode wollen wir mal etwas
genauer anschauen.
&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;internal&lt;/span&gt; &lt;span style="color: #0000ff"&gt;virtual&lt;/span&gt; IOrderCalculator
CreateIOrderCalculator()&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; &lt;span style="color: #008000"&gt;//
TODO: Instantiate an appropriate concrete class.&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; IOrderCalculator
target = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; target;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 6:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Hier wird das Objekt einfach mit null initialisiert. Ein einfacher, aber wirkungsvoller
Workaround. Damit erreichen wir unser Ziel, dass der Test kompiliert aber fehlschlägt.
Nach der Implementierung ersetzen wir das null einfach durch die entsprechende Initialisierung.
Damit können wir nun unsere Testcases Implementieren.
&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; [TestMethod()]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; CalculateShippinghCosts_Sum_Below_FreeShippingMin()&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; IOrderCalculator
target = CreateIOrderCalculator();&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; Decimal
sum = 1;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 6:&lt;/span&gt; Decimal
freeShippingMin = 10;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 7:&lt;/span&gt; Decimal
shippingCosts = 5;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 8:&lt;/span&gt; &lt;span style="color: #008000"&gt;//
We are below min, so we have to add shippingCosts&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 9:&lt;/span&gt; Decimal
expected = 6;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 10:&lt;/span&gt; Decimal
actual;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 11:&lt;/span&gt; actual
= target.CalculateShippinghCosts(sum, freeShippingMin, shippingCosts);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 12:&lt;/span&gt; Assert.AreEqual(expected,
actual);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 13:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 14:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 15:&lt;/span&gt; [TestMethod()]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 16:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; CalculateShippinghCosts_Sum_Above_FreeShippingMin()&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 17:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 18:&lt;/span&gt; IOrderCalculator
target = CreateIOrderCalculator();&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 19:&lt;/span&gt; Decimal
sum = 20;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 20:&lt;/span&gt; Decimal
freeShippingMin = 10;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 21:&lt;/span&gt; Decimal
shippingCosts = 5;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 22:&lt;/span&gt; &lt;span style="color: #008000"&gt;//
We are above min, so we don't add shippingCosts&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 23:&lt;/span&gt; Decimal
expected = 20;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 24:&lt;/span&gt; Decimal
actual;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 25:&lt;/span&gt; actual
= target.CalculateShippinghCosts(sum, freeShippingMin, shippingCosts);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 26:&lt;/span&gt; Assert.AreEqual(expected,
actual);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 27:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 28:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 29:&lt;/span&gt; [TestMethod()]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 30:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; CalculateShippinghCosts_Sum_Equal_FreeShippingMin()&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 31:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 32:&lt;/span&gt; IOrderCalculator
target = CreateIOrderCalculator();&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 33:&lt;/span&gt; Decimal
sum = 10;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 34:&lt;/span&gt; Decimal
freeShippingMin = 10;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 35:&lt;/span&gt; Decimal
shippingCosts = 5;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 36:&lt;/span&gt; &lt;span style="color: #008000"&gt;//
We are equal min, so we don't add shippingCosts&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 37:&lt;/span&gt; Decimal
expected = 10;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 38:&lt;/span&gt; Decimal
actual;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 39:&lt;/span&gt; actual
= target.CalculateShippinghCosts(sum, freeShippingMin, shippingCosts);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 40:&lt;/span&gt; Assert.AreEqual(expected,
actual);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 41:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Damit haben wir unser Szenario ausreichend beschrieben. Wir können nun an die Implementierung
gehen.Dazu legen wir ein neues Projekt an in dem wir eine Klasse definieren die wir
von unserem Interface ableiten.
&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; Components&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; cOrderCalculator
: IOrderCalculator&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;decimal&lt;/span&gt; CalculateShippinghCosts(&lt;span style="color: #0000ff"&gt;decimal&lt;/span&gt; sum, &lt;span style="color: #0000ff"&gt;decimal&lt;/span&gt; freeShippingMin, &lt;span style="color: #0000ff"&gt;decimal&lt;/span&gt; shippingCosts)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 6:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 7:&lt;/span&gt; &lt;span style="color: #008000"&gt;//
If sum is greater than Min then don't add shipping costs&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (sum
&amp;gt; freeShippingMin)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; sum;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 11:&lt;/span&gt; &lt;span style="color: #008000"&gt;//
else add shipping costs&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 12:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; sum
+ shippingCosts;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 13:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 14:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 15:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Nun müssen wir unbedingt noch daran denken, die Initialisierung des Testobjektes in
unserer Testmethode anzupassen.
&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;internal&lt;/span&gt; &lt;span style="color: #0000ff"&gt;virtual&lt;/span&gt; IOrderCalculator
CreateIOrderCalculator()&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; IOrderCalculator
target = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; cOrderCalculator();&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; target;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Nun können wir die Tests ausführen.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TDDQuickstart_259/image_10.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="130" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TDDQuickstart_259/image_thumb_4.png" width="574" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Oh, ein Test schlägt fehl. Bei genauerer Betrachtung stellen wir fest, dass wir bei
der Implementierung den Fall dass die Summe gleich der Grenze ist nicht richtig berücksichtigt
haben. Also hat sich hier der TDD-Ansatz schon bewährt und wir können den Fehler beheben.
Damit sind alle Tests grün und wir können weiter fortfahren. Wir könnten nun z.B.
auf unserem Interface weitere Methoden definieren und dafür Tests anlegen. 
&lt;/p&gt;
&lt;p&gt;
Also eigentlich gar nicht so schwer das mit dem TDD, oder? Freue mich auf euer Feedback.
&lt;/p&gt;
&lt;p&gt;
Die Solution gibt es zum Download.
&lt;/p&gt;
&lt;p&gt;
Happy Testing!
&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:ff5bd5c7-cf5f-44fa-b8f6-de296f6342f9" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TDDQuickstart_259/TDDQuickStart.zip" target="_blank"&gt;Download
Demo-Solution&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=2b142c6d-f285-4697-ad77-9914a8bd3cfe" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,2b142c6d-f285-4697-ad77-9914a8bd3cfe.aspx</comments>
      <category>Eigene Tutorials;Qualitätsmanagement;Testing;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=be7b3523-38a8-442d-9af8-7f8337d8553c</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,be7b3523-38a8-442d-9af8-7f8337d8553c.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,be7b3523-38a8-442d-9af8-7f8337d8553c.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=be7b3523-38a8-442d-9af8-7f8337d8553c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/FlashoderSilverlighwasistbesser_7A45/image_2.png">
            <img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="83" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/FlashoderSilverlighwasistbesser_7A45/image_thumb.png" width="244" border="0" />
          </a>
        </p>
        <p>
Wie so oft lautet die Antwort es kommt darauf an. Un hier bietet die Seite ShineDraw
eine gute Vergleichsmöglichkeit. In der Gallery befinden sich zahlreiche Beispiele
die sowohl in Silverlight als auch in Flash implementiert sind. Da kann man nicht
nur das Ergebnis in beiden Varianten vergleichen sondern auch den Code der in der
jeweiligen Technologie erforderlich ist. Darüber hinaus kann man sich den einen oder
anderen effekt abschauen und sieht auch gleich wie der implementiert wird. Der Quellcode
ist unter der GNU General Public License, Version 3 bereitgestelt.
</p>
        <p>
          <a href="http://www.shinedraw.com/flash-vs-silverlight-gallery/">http://www.shinedraw.com/flash-vs-silverlight-gallery/</a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=be7b3523-38a8-442d-9af8-7f8337d8553c" />
      </body>
      <title>Flash oder Silverligh &amp;ndash; was ist besser?</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,be7b3523-38a8-442d-9af8-7f8337d8553c.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,be7b3523-38a8-442d-9af8-7f8337d8553c.aspx</link>
      <pubDate>Sun, 15 Mar 2009 06:41:00 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/FlashoderSilverlighwasistbesser_7A45/image_2.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="83" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/FlashoderSilverlighwasistbesser_7A45/image_thumb.png" width="244" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Wie so oft lautet die Antwort es kommt darauf an. Un hier bietet die Seite ShineDraw
eine gute Vergleichsmöglichkeit. In der Gallery befinden sich zahlreiche Beispiele
die sowohl in Silverlight als auch in Flash implementiert sind. Da kann man nicht
nur das Ergebnis in beiden Varianten vergleichen sondern auch den Code der in der
jeweiligen Technologie erforderlich ist. Darüber hinaus kann man sich den einen oder
anderen effekt abschauen und sieht auch gleich wie der implementiert wird. Der Quellcode
ist unter der GNU General Public License, Version 3 bereitgestelt.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.shinedraw.com/flash-vs-silverlight-gallery/"&gt;http://www.shinedraw.com/flash-vs-silverlight-gallery/&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=be7b3523-38a8-442d-9af8-7f8337d8553c" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,be7b3523-38a8-442d-9af8-7f8337d8553c.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=f84dc952-b410-4e7d-9357-2550025bde2a</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,f84dc952-b410-4e7d-9357-2550025bde2a.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,f84dc952-b410-4e7d-9357-2550025bde2a.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=f84dc952-b410-4e7d-9357-2550025bde2a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In manchen Fällen ist es wünschenswert, eine Liste mit den Tests aus einem Projekt
auszudrucken. Leider gibt es hierzu in Visual Studio keine direkte Funktion, aber
ein kleiner Trick hilft hier:
</p>
        <p>
1.) Im TestView die gewünschten Spalten einblenden
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/Testlistedrucken_E8B9/image_2.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="211" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/Testlistedrucken_E8B9/image_thumb.png" width="562" border="0" />
          </a>
        </p>
        <p>
2.) Gewünschte Tests markieren und dann im Kontext-Menü "Copy" auswählen
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/Testlistedrucken_E8B9/image_6.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/Testlistedrucken_E8B9/image_thumb_2.png" width="182" border="0" />
          </a>
        </p>
        <p>
3.) In Excel einfügen, fertig!
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/Testlistedrucken_E8B9/image_8.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="122" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/Testlistedrucken_E8B9/image_thumb_3.png" width="571" border="0" />
          </a>
        </p>
        <p>
Das selbe funktioniert übrigens auch aus den Test Results, leider ohne Icons :-( 
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/Testlistedrucken_E8B9/image_9.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="128" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/Testlistedrucken_E8B9/image_thumb_1.png" width="787" border="0" />
          </a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=f84dc952-b410-4e7d-9357-2550025bde2a" />
      </body>
      <title>Testliste drucken</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,f84dc952-b410-4e7d-9357-2550025bde2a.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,f84dc952-b410-4e7d-9357-2550025bde2a.aspx</link>
      <pubDate>Wed, 11 Feb 2009 15:38:50 GMT</pubDate>
      <description>&lt;p&gt;
In manchen Fällen ist es wünschenswert, eine Liste mit den Tests aus einem Projekt
auszudrucken. Leider gibt es hierzu in Visual Studio keine direkte Funktion, aber
ein kleiner Trick hilft hier:
&lt;/p&gt;
&lt;p&gt;
1.) Im TestView die gewünschten Spalten einblenden
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/Testlistedrucken_E8B9/image_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="211" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/Testlistedrucken_E8B9/image_thumb.png" width="562" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
2.) Gewünschte Tests markieren und dann im Kontext-Menü "Copy" auswählen
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/Testlistedrucken_E8B9/image_6.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/Testlistedrucken_E8B9/image_thumb_2.png" width="182" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
3.) In Excel einfügen, fertig!
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/Testlistedrucken_E8B9/image_8.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="122" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/Testlistedrucken_E8B9/image_thumb_3.png" width="571" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Das selbe funktioniert übrigens auch aus den Test Results, leider ohne Icons :-( 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/Testlistedrucken_E8B9/image_9.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="128" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/Testlistedrucken_E8B9/image_thumb_1.png" width="787" border="0"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=f84dc952-b410-4e7d-9357-2550025bde2a" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,f84dc952-b410-4e7d-9357-2550025bde2a.aspx</comments>
      <category>Tipps und Tricks;VS 2008</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=09a28b0c-7120-4456-92bc-2d9965dc046b</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,09a28b0c-7120-4456-92bc-2d9965dc046b.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,09a28b0c-7120-4456-92bc-2d9965dc046b.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=09a28b0c-7120-4456-92bc-2d9965dc046b</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Bisher war für mich das Pflegen meiner verschiedenen Signaturen im Outlook immer ein
Horror. Wenn ein neuer Rechner eingerichtet wurde, musstden die Signaturen wieder
mühsam angelegt werden und wenn es Änderungen gab, dann grauste es mich schon davor,
diese auf allen Instanzen anzupassen.
</p>
        <p>
Dank <a href="http://blog.lars-keller.net/">Lars</a> kenne ich nun aber einen einfacheren
Weg. Die Signaturen werden nämlich einfach im Filesystem abgelegt und zwar unter %UserProfile%\AppData\Roaming\Microsoft\Signatures.
Diese Files lassen sich einfach auf einen neuen Rechner kopieren (sogar bei laufendem
Outlook sind die Signaturen dann sofort verfüpgbar!) oder sie können zwischen mehreren
Rechnern einfach synchronisiert werden.
</p>
        <p>
Super cool. Vielen Dank Lars, du hast mir das Leben wirklich erleichtert!
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=09a28b0c-7120-4456-92bc-2d9965dc046b" />
      </body>
      <title>Signaturen in Outlook kopieren</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,09a28b0c-7120-4456-92bc-2d9965dc046b.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,09a28b0c-7120-4456-92bc-2d9965dc046b.aspx</link>
      <pubDate>Mon, 12 Jan 2009 08:38:45 GMT</pubDate>
      <description>&lt;p&gt;
Bisher war für mich das Pflegen meiner verschiedenen Signaturen im Outlook immer ein
Horror. Wenn ein neuer Rechner eingerichtet wurde, musstden die Signaturen wieder
mühsam angelegt werden und wenn es Änderungen gab, dann grauste es mich schon davor,
diese auf allen Instanzen anzupassen.
&lt;/p&gt;
&lt;p&gt;
Dank &lt;a href="http://blog.lars-keller.net/"&gt;Lars&lt;/a&gt; kenne ich nun aber einen einfacheren
Weg. Die Signaturen werden nämlich einfach im Filesystem abgelegt und zwar unter %UserProfile%\AppData\Roaming\Microsoft\Signatures.
Diese Files lassen sich einfach auf einen neuen Rechner kopieren (sogar bei laufendem
Outlook sind die Signaturen dann sofort verfüpgbar!) oder sie können zwischen mehreren
Rechnern einfach synchronisiert werden.
&lt;/p&gt;
&lt;p&gt;
Super cool. Vielen Dank Lars, du hast mir das Leben wirklich erleichtert!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=09a28b0c-7120-4456-92bc-2d9965dc046b" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,09a28b0c-7120-4456-92bc-2d9965dc046b.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=95206195-1338-4f62-aa25-42e6171ee89f</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,95206195-1338-4f62-aa25-42e6171ee89f.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,95206195-1338-4f62-aa25-42e6171ee89f.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=95206195-1338-4f62-aa25-42e6171ee89f</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Standardmäßig kann aus einer Hyper-V VM die WLAN-Verbindung des Host-Systems nicht
mit genutzt werden. Das ist allerdings gerade bei Notebooks eine Einschränkung. Es
gibt allerdings 3 verschiedene Wege, dieses Problem zu umgehen. 
</p>
        <p>
Ich selbst komme momentan mit <a href="http://blogs.msdn.com/virtual_pc_guy/archive/2008/01/09/using-hyper-v-with-a-wireless-network-adapter.aspx">dieser</a> Lösung
ganz gut zurecht. Einen ausführlichen Artikel mit den beiden anderen Lösungen gibt
es <a href="http://sqlblog.com/blogs/john_paul_cook/archive/2008/03/23/using-wireless-with-hyper-v.aspx">hier</a>.
</p>
        <p>
          <a href="http://sqlblog.com/blogs/john_paul_cook/archive/2008/03/23/using-wireless-with-hyper-v.aspx">http://sqlblog.com/blogs/john_paul_cook/archive/2008/03/23/using-wireless-with-hyper-v.aspx</a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=95206195-1338-4f62-aa25-42e6171ee89f" />
      </body>
      <title>WLAN aus Hyper-V VMs nutzen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,95206195-1338-4f62-aa25-42e6171ee89f.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,95206195-1338-4f62-aa25-42e6171ee89f.aspx</link>
      <pubDate>Fri, 09 Jan 2009 21:12:23 GMT</pubDate>
      <description>&lt;p&gt;
Standardmäßig kann aus einer Hyper-V VM die WLAN-Verbindung des Host-Systems nicht
mit genutzt werden. Das ist allerdings gerade bei Notebooks eine Einschränkung. Es
gibt allerdings 3 verschiedene Wege, dieses Problem zu umgehen. 
&lt;/p&gt;
&lt;p&gt;
Ich selbst komme momentan mit &lt;a href="http://blogs.msdn.com/virtual_pc_guy/archive/2008/01/09/using-hyper-v-with-a-wireless-network-adapter.aspx"&gt;dieser&lt;/a&gt; Lösung
ganz gut zurecht. Einen ausführlichen Artikel mit den beiden anderen Lösungen gibt
es &lt;a href="http://sqlblog.com/blogs/john_paul_cook/archive/2008/03/23/using-wireless-with-hyper-v.aspx"&gt;hier&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sqlblog.com/blogs/john_paul_cook/archive/2008/03/23/using-wireless-with-hyper-v.aspx"&gt;http://sqlblog.com/blogs/john_paul_cook/archive/2008/03/23/using-wireless-with-hyper-v.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=95206195-1338-4f62-aa25-42e6171ee89f" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,95206195-1338-4f62-aa25-42e6171ee89f.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=6f7aaabf-60a5-42a5-8396-51ea474bd080</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,6f7aaabf-60a5-42a5-8396-51ea474bd080.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,6f7aaabf-60a5-42a5-8396-51ea474bd080.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=6f7aaabf-60a5-42a5-8396-51ea474bd080</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Inzwischen gibt es eine verstärkte Diskussion, ob der Windows 2008 Server nicht die
bessere Workstation ist. Sicher hängt das vom jeweiligen Einsatzgebiet ab. Bei mir
war es so, dass ich für den Team Foundation Server einen Server als Betriebssystem
auf meinem Demo-Rechner benötigt habe. Dabei wollte ich aber nicht auf den Komfort
und das Design von Vista verzichten und auch Features wie z.B. den Sidebar nutzen.
Die erste gute Nachricht ist, dass man Win2008 so anpassen kann, dass es sich optisch
kaum von Vista unterscheiden lässt und die zweite gute Nachricht ist, dass es mit
Hilfe eines kleinen Tools ganz einfach ist und schnell geht. Selbst Aero ist damit
möglich.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/Windows2008ServerimVistaKleid_13347/Win2008Aero_2.jpg">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Win2008Aero" border="0" alt="Win2008Aero" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/Windows2008ServerimVistaKleid_13347/Win2008Aero_thumb.jpg" width="567" height="356" />
          </a>  
</p>
        <p>
          <a href="http://www.win2008workstation.com/wordpress/2008/07/17/windows-server-2008-workstation-converter/">http://www.win2008workstation.com/wordpress/2008/07/17/windows-server-2008-workstation-converter/</a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=6f7aaabf-60a5-42a5-8396-51ea474bd080" />
      </body>
      <title>Windows 2008 Server im Vista-Kleid</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,6f7aaabf-60a5-42a5-8396-51ea474bd080.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,6f7aaabf-60a5-42a5-8396-51ea474bd080.aspx</link>
      <pubDate>Fri, 09 Jan 2009 20:52:32 GMT</pubDate>
      <description>&lt;p&gt;
Inzwischen gibt es eine verstärkte Diskussion, ob der Windows 2008 Server nicht die
bessere Workstation ist. Sicher hängt das vom jeweiligen Einsatzgebiet ab. Bei mir
war es so, dass ich für den Team Foundation Server einen Server als Betriebssystem
auf meinem Demo-Rechner benötigt habe. Dabei wollte ich aber nicht auf den Komfort
und das Design von Vista verzichten und auch Features wie z.B. den Sidebar nutzen.
Die erste gute Nachricht ist, dass man Win2008 so anpassen kann, dass es sich optisch
kaum von Vista unterscheiden lässt und die zweite gute Nachricht ist, dass es mit
Hilfe eines kleinen Tools ganz einfach ist und schnell geht. Selbst Aero ist damit
möglich.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/Windows2008ServerimVistaKleid_13347/Win2008Aero_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Win2008Aero" border="0" alt="Win2008Aero" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/Windows2008ServerimVistaKleid_13347/Win2008Aero_thumb.jpg" width="567" height="356"&gt;&lt;/a&gt;&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.win2008workstation.com/wordpress/2008/07/17/windows-server-2008-workstation-converter/"&gt;http://www.win2008workstation.com/wordpress/2008/07/17/windows-server-2008-workstation-converter/&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=6f7aaabf-60a5-42a5-8396-51ea474bd080" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,6f7aaabf-60a5-42a5-8396-51ea474bd080.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=3bc7e8bd-5052-4be2-96db-e8e7d80cf9da</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,3bc7e8bd-5052-4be2-96db-e8e7d80cf9da.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,3bc7e8bd-5052-4be2-96db-e8e7d80cf9da.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=3bc7e8bd-5052-4be2-96db-e8e7d80cf9da</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Der <a href="http://www.alm-tools.de/">artiso Workitem Manager</a> ist ein Tool mit
dem sich Workitems hierarchisch organisieren lassen. Diese hierarchische Organisation
bietet verschiedene Vorteile. Neben einer besseren Strukturierung und einer erhöhten
Übersichtlichkeit vor allem auch eine visuelle Traceability. Damit ist gemein, dass
durch die Hierarchie sichtbar wird welche Tests und Implementierungsaufgaben einem
Feature zugeordnet sind. Die ist z.B. sehr hilfreich, wenn sich das Feature ändert
zu erkennen, welche Workitems auf mögliche Auswirkungen überprüft werden können. Wie
hierarchische Workitems in Projekten hilfreich eingesetzt werden, habe ich zusammen
mit <a href="http://blogs.msdn.com/cbinder">Christian Binder</a> in diesem <a href="http://www.artiso.com/ProBlog/PermaLink,guid,667a97e1-6d04-4744-935f-7b796f621643.aspx">MSDN-Webcast</a> erörtert.
</p>
        <p>
Leider bringt der TFS in der Version 2008 diese Hierarchie nicht von Haus aus mit.
Deshalb hat <a href="www.artiso.com">artiso</a> den Workitem Manager entwickelt. Diesen
gibt es nun auch als Open-Version. Die Open-Version ist kostenlos und wird auch als
Source-Code bereitgestellt. Wie sich der Workitem Manager Open zur Vollversion unterscheidet
kann man der unten stehenden Funktionsmatrix entnehmen. Weiter unten gibt's noch eine
Screenshot. 
</p>
        <p>
Den Donload für das Setup und den Source-Code findet man unter <a href="http://www.alm-tools.de">http://www.alm-tools.de</a>.
Gerne freue ich mich über euer Feedback zu dem Tool.
</p>
        <p>
          <img src="http://www.alm-tools.com/contentImages/WIM_FeatureComparison.jpg" />
        </p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/artisoWorkitemManagerOpenverffentlicht_1111/image_2.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="469" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/artisoWorkitemManagerOpenverffentlicht_1111/image_thumb.png" width="673" border="0" />
          </a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=3bc7e8bd-5052-4be2-96db-e8e7d80cf9da" />
      </body>
      <title>artiso Workitem Manager Open ver&amp;ouml;ffentlicht</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,3bc7e8bd-5052-4be2-96db-e8e7d80cf9da.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,3bc7e8bd-5052-4be2-96db-e8e7d80cf9da.aspx</link>
      <pubDate>Fri, 31 Oct 2008 00:14:31 GMT</pubDate>
      <description>&lt;p&gt;
Der &lt;a href="http://www.alm-tools.de/"&gt;artiso Workitem Manager&lt;/a&gt; ist ein Tool mit
dem sich Workitems hierarchisch organisieren lassen. Diese hierarchische Organisation
bietet verschiedene Vorteile. Neben einer besseren Strukturierung und einer erhöhten
Übersichtlichkeit vor allem auch eine visuelle Traceability. Damit ist gemein, dass
durch die Hierarchie sichtbar wird welche Tests und Implementierungsaufgaben einem
Feature zugeordnet sind. Die ist z.B. sehr hilfreich, wenn sich das Feature ändert
zu erkennen, welche Workitems auf mögliche Auswirkungen überprüft werden können. Wie
hierarchische Workitems in Projekten hilfreich eingesetzt werden, habe ich zusammen
mit &lt;a href="http://blogs.msdn.com/cbinder"&gt;Christian Binder&lt;/a&gt; in diesem &lt;a href="http://www.artiso.com/ProBlog/PermaLink,guid,667a97e1-6d04-4744-935f-7b796f621643.aspx"&gt;MSDN-Webcast&lt;/a&gt; erörtert.
&lt;/p&gt;
&lt;p&gt;
Leider bringt der TFS in der Version 2008 diese Hierarchie nicht von Haus aus mit.
Deshalb hat &lt;a href="www.artiso.com"&gt;artiso&lt;/a&gt; den Workitem Manager entwickelt. Diesen
gibt es nun auch als Open-Version. Die Open-Version ist kostenlos und wird auch als
Source-Code bereitgestellt. Wie sich der Workitem Manager Open zur Vollversion unterscheidet
kann man der unten stehenden Funktionsmatrix entnehmen. Weiter unten gibt's noch eine
Screenshot. 
&lt;/p&gt;
&lt;p&gt;
Den Donload für das Setup und den Source-Code findet man unter &lt;a href="http://www.alm-tools.de"&gt;http://www.alm-tools.de&lt;/a&gt;.
Gerne freue ich mich über euer Feedback zu dem Tool.
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.alm-tools.com/contentImages/WIM_FeatureComparison.jpg"&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/artisoWorkitemManagerOpenverffentlicht_1111/image_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="469" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/artisoWorkitemManagerOpenverffentlicht_1111/image_thumb.png" width="673" border="0"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=3bc7e8bd-5052-4be2-96db-e8e7d80cf9da" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,3bc7e8bd-5052-4be2-96db-e8e7d80cf9da.aspx</comments>
      <category>Team System Server;Tipps und Tricks;Tools</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=2ae36192-13b3-40f5-88dd-e6ed598dc848</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,2ae36192-13b3-40f5-88dd-e6ed598dc848.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,2ae36192-13b3-40f5-88dd-e6ed598dc848.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=2ae36192-13b3-40f5-88dd-e6ed598dc848</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Seit kurzem bin ich stolzer Besitzer einer Microsoft Wireless Notebook Presenter Mouse
8000 (was für ein Name!). Auf meinem Notebook hatte ich aber ständig das Problem dass
die Meldung "HDI data has stopped working" kam. Zwar funktionierte das System ohne
Probleme aber die Meldung war extrem nervig, vor allem bei Demos und Vorträgen. Nach
einigem suchen bin ich dann auf einen <a href="http://forums.techarena.in/vista-hardware-devices/1023595.htm">Forum-Thread</a> gestossen
der genau für dieses Problem eine Lösung beschreibt. Der entscheidende Post hier nochmals
kurz zitiert:
</p>
        <blockquote>
          <p>
I was having the same problem with my bluetooth microsoft wireless notebook presenter
mouse 8000. The problem is created by an application in the HP quick launch Buttons.
I removed the application from the launch buttons.<br /><br />
go to:<br /><br />
C:\Program Files\Hewlett-Packard\HP Quick Launch Buttons<br /><br />
move the following files to a backup folder on your computer:<br /><br />
HidActn.dll<br />
Hiddata<br />
PushHid.dll<br /><br />
Then restart you computer and you should not have the errors and the other things
on your laptop should still be available. 
</p>
        </blockquote>
        <p>
          <a href="http://forums.techarena.in/vista-hardware-devices/1023595.htm">"HID data
has stopped working" - bluetooth mouse error - Vista Hardware Devices</a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=2ae36192-13b3-40f5-88dd-e6ed598dc848" />
      </body>
      <title>&amp;quot;HID data has stopped working&amp;quot; - Problem mit HP Notebook und wireless Maus</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,2ae36192-13b3-40f5-88dd-e6ed598dc848.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,2ae36192-13b3-40f5-88dd-e6ed598dc848.aspx</link>
      <pubDate>Wed, 29 Oct 2008 09:08:31 GMT</pubDate>
      <description>&lt;p&gt;
Seit kurzem bin ich stolzer Besitzer einer Microsoft Wireless Notebook Presenter Mouse
8000 (was für ein Name!). Auf meinem Notebook hatte ich aber ständig das Problem dass
die Meldung "HDI data has stopped working" kam. Zwar funktionierte das System ohne
Probleme aber die Meldung war extrem nervig, vor allem bei Demos und Vorträgen. Nach
einigem suchen bin ich dann auf einen &lt;a href="http://forums.techarena.in/vista-hardware-devices/1023595.htm"&gt;Forum-Thread&lt;/a&gt; gestossen
der genau für dieses Problem eine Lösung beschreibt. Der entscheidende Post hier nochmals
kurz zitiert:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
I was having the same problem with my bluetooth microsoft wireless notebook presenter
mouse 8000. The problem is created by an application in the HP quick launch Buttons.
I removed the application from the launch buttons.&lt;br&gt;
&lt;br&gt;
go to:&lt;br&gt;
&lt;br&gt;
C:\Program Files\Hewlett-Packard\HP Quick Launch Buttons&lt;br&gt;
&lt;br&gt;
move the following files to a backup folder on your computer:&lt;br&gt;
&lt;br&gt;
HidActn.dll&lt;br&gt;
Hiddata&lt;br&gt;
PushHid.dll&lt;br&gt;
&lt;br&gt;
Then restart you computer and you should not have the errors and the other things
on your laptop should still be available. 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;a href="http://forums.techarena.in/vista-hardware-devices/1023595.htm"&gt;"HID data
has stopped working" - bluetooth mouse error - Vista Hardware Devices&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=2ae36192-13b3-40f5-88dd-e6ed598dc848" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,2ae36192-13b3-40f5-88dd-e6ed598dc848.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=7d3e3e4a-eb47-434a-acd5-bbb92a0fb88c</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,7d3e3e4a-eb47-434a-acd5-bbb92a0fb88c.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,7d3e3e4a-eb47-434a-acd5-bbb92a0fb88c.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=7d3e3e4a-eb47-434a-acd5-bbb92a0fb88c</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Microsoft Research hat vor kurzer Zeit <a href="http://research.microsoft.com/pex">PEX</a> zum
freien Download veröffentlicht. Hinter diesem unscheinbaren Kürzel verbirgt sich ein
Tool das absolut genial und beeindruckend ist und klar mach, warum Microsoft ein research
center unterhält. Das Tool verspricht nichts weniger als die automatische Generierung
von Unit-Tests und den dazugehörigen Testcases um eine möglichst hohe Code-Abdeckung
zu erzielen. Detaillierte Informationen bietet das <a href="http://research.microsoft.com/pex/articles/pextutorial.pdf">Whitepaper</a>,
wer sich auf die schnelle einen Einblick verschaffen möchte findet einen Überblick
im Folgenden (na ja, für einen Überblick ist der Post vielleicht doch ein wenig lang
geraden, aber ich konnte mich nicht bremsen vor Begeisterung):
</p>
        <p>
          <strong>Darf ich vorstellen - PEX</strong>
        </p>
        <p>
Gegeben sei folgende Methode die getestet werden soll:
</p>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 1:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">string</span> SimpleTest(<span style="color: #0000ff">int</span> x1, <span style="color: #0000ff">int</span> x2)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 3:</span>
              <span style="color: #0000ff">if</span> (x1
&gt; x2)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span>
              <span style="color: #0000ff">return</span>
              <span style="color: #006080">"x1
&gt; x2"</span>;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 5:</span>
              <span style="color: #0000ff">if</span> (x1
&lt; x2)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 6:</span>
              <span style="color: #0000ff">return</span>
              <span style="color: #006080">"x1
&lt; x2"</span>; </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 7:</span>
              <span style="color: #0000ff">else</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 8:</span>
              <span style="color: #0000ff">return</span>
              <span style="color: #006080">"x1
== x2"</span>;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 9:</span> }</pre>
          </div>
        </div>
        <p>
Für das versierte Auge eines Entwicklers ist sofort klar, da brauchen wir 3 Testcases
um eine vollständige Code-Abdeckung zu erzielen. Mal sehen, was PEX daraus macht.
Zunächst mal muss PEX heruntergeladen und installiert sein.  Dann kann man einfach
einen "Parameterized Unit Test Stub" erzeugen. Dazu in der Methode rechts klicken
und den Befehl aus dem Pex-Menü auswählen.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_2.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="161" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb.png" width="447" border="0" />
          </a>
        </p>
        <p>
Im folgenden Dialog können Sie verschiedene Parameter angeben. Das wichtigste hier
ist das Testprojekt in dem der Stub erzeugt werden soll.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_6.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_2.png" width="469" border="0" />
          </a>
        </p>
        <p>
Der erzeugte Stub sieht dann so aus:
</p>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 1:</span>
              <span style="color: #008000">///
&lt;summary&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span>
              <span style="color: #008000">///
This class contains parameterized unit tests for Calculation</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 3:</span>
              <span style="color: #008000">///
&lt;/summary&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span> [TestClass]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 5:</span> [PexClass(<span style="color: #0000ff">typeof</span>(Calculation))]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 6:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">partial</span>
              <span style="color: #0000ff">class</span> CalculationTest</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 7:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 8:</span> [PexMethod]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 9:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">string</span> SimpleTest(</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 10:</span> [PexAssumeUnderTest]Calculation
target,</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 11:</span>
              <span style="color: #0000ff">int</span> x1,</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 12:</span>
              <span style="color: #0000ff">int</span> x2</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 13:</span> )</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 14:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 15:</span>
              <span style="color: #0000ff">string</span> result
= target.SimpleTest(x1, x2);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 16:</span>
              <span style="color: #0000ff">return</span> result;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 17:</span>
              <span style="color: #008000">//
TODO: add assertions to method CalculationTest.SimpleTest(Calculation, Int32, Int32)</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 18:</span> }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 19:</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 20:</span> }</pre>
          </div>
        </div>
        <p>
Bei diesem Stub handelt es such um eine Vorlage für einen parameterisierten Unit-test.
Toll, und was lässt sich damit nun machen? Wir können eine "Exploration" starten.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_8.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="177" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_3.png" width="461" border="0" />
          </a>
        </p>
        <p>
Diese Exploration versucht nun Input-Parameter zu finden die zu einer möglichst 100%igen
Code-Abdeckung führen. Und hier beginnt nun die Magic von PEX. Ohne unser Zutun findet
PEX 3 Kombinationen von Input-Parametern die tatsächlich eine komplette Code-Abdeckung
erzielen- WOW! Dazu analysiert PEX wirklich den von uns erstellten Code und kann daraus
definieren, mit welchen Input-Parametern die einzelnen noch nicht abgedeckten Zweige
erreicht werden können.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_10.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_4.png" width="407" border="0" />
          </a>
        </p>
        <p>
Und das schönste, PEX baut uns automatisch 3 Unit-Tests die diese Testcases implementieren:
</p>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 1:</span> [TestMethod]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span> [PexGeneratedBy(<span style="color: #0000ff">typeof</span>(CalculationTest))]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 3:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">void</span> SimpleTest01()</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 5:</span>
              <span style="color: #0000ff">string</span> s;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 6:</span> Calculation
calculation = <span style="color: #0000ff">new</span> Calculation();</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 7:</span> s
= <span style="color: #0000ff">this</span>.SimpleTest(calculation, 1, 2);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 8:</span> Assert.AreEqual&lt;<span style="color: #0000ff">string</span>&gt;(<span style="color: #006080">"x1
&lt; x2"</span>, s);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 9:</span> }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 10:</span>  </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 11:</span> [TestMethod]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 12:</span> [PexGeneratedBy(<span style="color: #0000ff">typeof</span>(CalculationTest))]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 13:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">void</span> SimpleTest02()</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 14:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 15:</span>
              <span style="color: #0000ff">string</span> s;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 16:</span> Calculation
calculation = <span style="color: #0000ff">new</span> Calculation();</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 17:</span> s
= <span style="color: #0000ff">this</span>.SimpleTest(calculation, 1879212556, 1879212556);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 18:</span> Assert.AreEqual&lt;<span style="color: #0000ff">string</span>&gt;(<span style="color: #006080">"x1
== x2"</span>, s);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 19:</span> }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 20:</span>  </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 21:</span> [TestMethod]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 22:</span> [PexGeneratedBy(<span style="color: #0000ff">typeof</span>(CalculationTest))]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 23:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">void</span> SimpleTest03()</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 24:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 25:</span>
              <span style="color: #0000ff">string</span> s;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 26:</span> Calculation
calculation = <span style="color: #0000ff">new</span> Calculation();</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 27:</span> s
= <span style="color: #0000ff">this</span>.SimpleTest(calculation, 256, 254);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 28:</span> Assert.AreEqual&lt;<span style="color: #0000ff">string</span>&gt;(<span style="color: #006080">"x1
&gt; x2"</span>, s);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 29:</span> }</pre>
          </div>
        </div>
        <p>
Diese Unit-Tests können wir nun starten und sehen, dass diese wie erwartet alle erfolgreich
sind.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_12.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="150" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_5.png" width="244" border="0" />
          </a>
        </p>
        <p>
Damit haben wir einen Test automatisiert erstellt, der sicherstellen kann, dass diese
Methode ihr Verhalten nach Außen für die aktuell definierten Test-Cases nicht verändert.
Damit können ungewollte Änderungen an der Methode erkannt und beseitigt werden. Ob
die Methode allerdings ihre Aufgabe korrekt erledigt, kann PEX natürlich nicht testen.
Haben wir die Funktionsweise einer Methode allerdings einmal validiert, kann PEX nun
sehr einfach dieses Verhalten prüfen. Und natürlich eignet es sich auch sehr gut um
mögliche Test-Cases zu definieren. Es müssen in diesem Fall dann nur noch die einzelnen
Ergebnisse je Test validiert werden.
</p>
        <p>
Ändern wir die Methode ab, so dass sich ihr Verhalten ändert, dann alarmiert uns der
entsprechende Test.
</p>
        <p>
          <strong>Soweit sogut - Und was geht sonst noch?</strong>
        </p>
        <p>
Wenn wir nun ein gewünschte Änderung der Funktionalität implementieren, wie kann PEX
dann damit umgehen? Zunächst würden wir die vorhandenen Tests durchführen, damit wir
sicher sind, dass die aktuelle Funktionalität noch korrekt läuft. Dann erweitern wir
unsere Methode:
</p>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 1:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">string</span> SimpleTest(<span style="color: #0000ff">int</span> x1, <span style="color: #0000ff">int</span> x2)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 3:</span>
              <span style="color: #0000ff">if</span> (x1
&gt; x2 * 2)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span>
              <span style="color: #0000ff">return</span>
              <span style="color: #006080">"x1
&gt; x2 * 2"</span>;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 5:</span>
              <span style="color: #0000ff">if</span> (x1
&gt; x2)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 6:</span>
              <span style="color: #0000ff">return</span>
              <span style="color: #006080">"x1
&gt; x2"</span>;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 7:</span>
              <span style="color: #0000ff">if</span> (x1
&lt; x2)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 8:</span>
              <span style="color: #0000ff">return</span>
              <span style="color: #006080">"x1
&lt; x2"</span>; </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 9:</span>
              <span style="color: #0000ff">else</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 10:</span>
              <span style="color: #0000ff">return</span>
              <span style="color: #006080">"x1
== x2"</span>;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 11:</span> }</pre>
          </div>
        </div>
        <div>Zeile 3+4 haben wir neu hinzugefügt. Nun starten wir eine neue Exploration und
PEX ermittelt einen weiteren Test-Case um diese Funktion ebenfalls abzudecken.
</div>
        <div> 
</div>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_14.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="148" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_6.png" width="376" border="0" />
          </a>
        </p>
        <p>
          <strong>Schön - darf's noch ein bisschen mehr sein?</strong>
        </p>
        <p>
Dieses einfache Sample war ja schon sehr beeindruckend. Die Frage, die sich aber natürlich
direkt stellt, ist wie weit geht denn das? Wir wollen nun den Schwierigkeitsgrad für
PEX schrittweise steigern. Integer-Werte sind ja noch relativ einfach zu handhaben,
aber wie sieht's denn beispielsweise mit Strings aus? Hierzu zunächst wieder eine
Methode, die wir testen wollen:
</p>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 1:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">class</span> StringOperations</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 3:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">string</span> CheckString(<span style="color: #0000ff">string</span> Input)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 5:</span>
              <span style="color: #0000ff">if</span> (Input.StartsWith(<span style="color: #006080">"abc"</span>)
&amp;&amp; Input.Length &gt; 10)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 6:</span>
              <span style="color: #0000ff">return</span> Input
+ <span style="color: #006080">" Starts with 'abc' and length &gt; 10"</span>; </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 7:</span>
              <span style="color: #0000ff">if</span> (Input.StartsWith(<span style="color: #006080">"abc"</span>))</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 8:</span>
              <span style="color: #0000ff">return</span> Input
+ <span style="color: #006080">" Starts with 'abc'"</span>;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 9:</span>
              <span style="color: #0000ff">if</span> (Input.StartsWith(<span style="color: #006080">"ABC"</span>))</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 10:</span>
              <span style="color: #0000ff">return</span> Input
+ <span style="color: #006080">" Starts with 'ABC'"</span>;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 11:</span>
              <span style="color: #0000ff">return</span>
              <span style="color: #006080">"Unknown
pattern"</span>;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 12:</span> }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 13:</span> }</pre>
          </div>
        </div>
        <p>
Stubs erzeugen und Exploration starten. Ob PEX wohl solche Operationen wie "StartsWith"
und "Length" versteht?
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_16.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="172" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_7.png" width="433" border="0" />
          </a>
        </p>
        <p>
Es findet tatsächlich alle erforderlichen Input-Parameter und sogar noch mehr! PEX
stell fest, dass unsere Methode beim Übergeben einer NULL-Referenz eine Exception
wirft. Und damit nicht genug, PEX kann uns auch einen Vorschlag machen, wie wir unseren
Code verbessern können. Dazu im "Pex Exploration Results" - Fenster unter Views "Show
suggestions window" aufrufen. 
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_18.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="206" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_8.png" width="725" border="0" />
          </a>
        </p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_20.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="156" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_9.png" width="736" border="0" />
          </a>
        </p>
        <p>
Durch einen Doppelklick auf den Eintrag am unteren Rand des Bereichs öffnet sich ein
Fenster, das die vorgeschlagene Änderung direkt in unseren Code einfügen kann.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_22.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="432" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_10.png" width="536" border="0" />
          </a>
        </p>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 1:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">string</span> CheckString(<span style="color: #0000ff">string</span> Input)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 3:</span>
              <span style="color: #008000">//
&lt;pex&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span>
              <span style="color: #0000ff">if</span> (Input
== (<span style="color: #0000ff">string</span>)<span style="color: #0000ff">null</span>)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 5:</span>
              <span style="color: #0000ff">throw</span>
              <span style="color: #0000ff">new</span> ArgumentNullException(<span style="color: #006080">"Input"</span>);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 6:</span>
              <span style="color: #008000">//
&lt;/pex&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 7:</span>
              <span style="color: #0000ff">if</span> (Input.StartsWith(<span style="color: #006080">"abc"</span>)
&amp;&amp; Input.Length &gt; 10)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 8:</span>
              <span style="color: #0000ff">return</span> Input
+ <span style="color: #006080">" Starts with 'abc' and length &gt; 10"</span>; </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 9:</span>
              <span style="color: #0000ff">if</span> (Input.StartsWith(<span style="color: #006080">"abc"</span>))</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 10:</span>
              <span style="color: #0000ff">return</span> Input
+ <span style="color: #006080">" Starts with 'abc'"</span>;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 11:</span>
              <span style="color: #0000ff">if</span> (Input.StartsWith(<span style="color: #006080">"ABC"</span>))</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 12:</span>
              <span style="color: #0000ff">return</span> Input
+ <span style="color: #006080">" Starts with 'ABC'"</span>;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 13:</span>
              <span style="color: #0000ff">return</span>
              <span style="color: #006080">"Unknown
pattern"</span>;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 14:</span> }</pre>
          </div>
        </div>
        <p>
Die Zeilen 3-6 wurden von PEX erzeugt. Natürlich können wir das entsprechende Verhalten
im Code direkt ändern und an unsere Vorstellungen anpassen. Vielleicht ist es aber
gar keine schlechte Idee, in diesem Fall eine Exception zu werden. Dies ist das Standard-Verhalten
von PEX an dieser Stelle. Wird die erwartete Exception nicht mehr geworfen oder eine
andere Exception tritt auf, wird dies durch einen fehlgeschlagenen Test angezeigt.
</p>
        <p>
          <strong>Der nächste bitte!</strong>
        </p>
        <p>
So nun wollen wir noch einen Schritt weitergehen und sehen, wie PEX mit Listen umgehen
kann. Dazu habe ich folgende Testmethode erstellt (über den Sinn einer solchen Methode
wollen wir jetzt nicht nachdenken)
</p>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 1:</span>
              <span style="color: #0000ff">int</span> result
= 0;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span>
              <span style="color: #0000ff">if</span> (list.Count
&gt; 10)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 3:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span>
              <span style="color: #0000ff">foreach</span> (<span style="color: #0000ff">int</span> i <span style="color: #0000ff">in</span> list)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 5:</span> result
+= i;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 6:</span> }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 7:</span>
              <span style="color: #0000ff">else</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 8:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 9:</span>
              <span style="color: #0000ff">foreach</span> (<span style="color: #0000ff">int</span> i <span style="color: #0000ff">in</span> list)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 10:</span> result
*= i;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 11:</span> }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 12:</span>
              <span style="color: #0000ff">return</span> result;</pre>
          </div>
        </div>
        <p>
Die Methode bekommt eine Liste von Integer-Werten übergeben. Wenn es mehr als 10 Elemente
sind, werden diese addiert, sonst werden die Werte miteinander Multipliziert. Mal
sehen, wie PEX mit Listen umgeht.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_24.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="120" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_11.png" width="572" border="0" />
          </a>
        </p>
        <p>
PEX erkennt noch, dass unsere Methode mit Null-References nicht korrekt umgeht, aber
dann verließen sie ihn.  Aber freundlicherweise bekommen wir noch einen Hinweis
"2 Object Creations". klickt man darauf, dann bekommt man schon mehr Informationen. 
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_26.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="128" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_12.png" width="441" border="0" />
          </a>
        </p>
        <p>
Aha, PEX kann also eine List&lt;int&gt; nicht erzeugen. Also was tun? Klickt man den
unteren der beiden Einträge an, bietet PEX etwas weiter rechts die Möglichkeit eine
Factory zu definieren. Eine Factory ist ein Extensibility-Point mit dem PEX beigebracht
werden kann mit solchen Objekten umzugehen. Ein Beispiel für eine solche Factory kann
so aussehen:
</p>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 1:</span>
              <span style="color: #0000ff">namespace</span> System.Collections.Generic</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 3:</span> [PexFactoryClass]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">partial</span>
              <span style="color: #0000ff">class</span> ListFactory</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 5:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 6:</span> [PexFactoryMethod(<span style="color: #0000ff">typeof</span>(List&lt;<span style="color: #0000ff">int</span>&gt;))]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 7:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">static</span> List&lt;<span style="color: #0000ff">int</span>&gt;
Create(<span style="color: #0000ff">int</span> i)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 8:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 9:</span>
              <span style="color: #0000ff">if</span> (i
&gt; 100)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 10:</span> i
= 100;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 11:</span> List&lt;<span style="color: #0000ff">int</span>&gt;
l = <span style="color: #0000ff">new</span> List&lt;<span style="color: #0000ff">int</span>&gt;();</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 12:</span>
              <span style="color: #0000ff">for</span> (<span style="color: #0000ff">int</span> j
= 0; j &lt; i; j++)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 13:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 14:</span> l.Add(j
* 10);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 15:</span> }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 16:</span>
              <span style="color: #0000ff">return</span> l;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 17:</span> }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 18:</span> }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 19:</span> }</pre>
          </div>
        </div>
        <p>
Hier teilt man PEX nun mit, welche Elemente es damit erzeugen kann (Zeile 6). Anschließend
implementiert man eine Create-Methode die beliebige Parameter übernehmen kann. In
Abhängigkeit dieser Parameter wird nun eine Instanz des gewünschten Objektes erzeugt.
In unserem Beispiel übernehmen wir nur einen Parameter der die Länge der Liste angibt.
In den Zeilen 9/10 begrenzen wir die Länge der Lsite auf 100 Elemente. Die Liste selbst
befüllen wir mit einer Reihe von Zahlen. Hier ist es sicher keine gute Idee, z.B.
Zufallszahlen zu verwenden, da diese ja bei jedem Testdurchlauf andere Werte liefern
und deshalb der Assert nicht erfolgreich ausgeführt werden kann.
</p>
        <p>
Mit hilfe dieser Factory kannPEX nun unsere Testcases definieren. Dazu ermittelt es
einfach geeignete Parameter für die Create-Methode in unserer Factory statt das Objekt
selbst zu erzeugen.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_28.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="145" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_13.png" width="597" border="0" />
          </a>
        </p>
        <p>
Die erzeugten Tests sehen dann so aus:
</p>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 1:</span> [TestMethod]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span> [PexGeneratedBy(<span style="color: #0000ff">typeof</span>(ListCalculationTest))]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 3:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">void</span> SumList03()</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 5:</span> List&lt;<span style="color: #0000ff">int</span>&gt;
list;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 6:</span>
              <span style="color: #0000ff">int</span> i;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 7:</span> list
= ListFactory.Create(2);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 8:</span> ListCalculation
listCalculation = <span style="color: #0000ff">new</span> ListCalculation();</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 9:</span> i
= <span style="color: #0000ff">this</span>.SumList(listCalculation, list);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 10:</span> Assert.AreEqual&lt;<span style="color: #0000ff">int</span>&gt;(0,
i);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 11:</span> }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 12:</span>  </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 13:</span> [TestMethod]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 14:</span> [PexGeneratedBy(<span style="color: #0000ff">typeof</span>(ListCalculationTest))]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 15:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">void</span> SumList04()</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 16:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 17:</span> List&lt;<span style="color: #0000ff">int</span>&gt;
list;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 18:</span>
              <span style="color: #0000ff">int</span> i;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 19:</span> list
= ListFactory.Create(536870912);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 20:</span> ListCalculation
listCalculation = <span style="color: #0000ff">new</span> ListCalculation();</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 21:</span> i
= <span style="color: #0000ff">this</span>.SumList(listCalculation, list);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 22:</span> Assert.AreEqual&lt;<span style="color: #0000ff">int</span>&gt;(49500,
i);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 23:</span> }</pre>
          </div>
        </div>
        <p>
 
</p>
        <p>
          <strong>Nun folgt noch die Kür</strong>
        </p>
        <p>
Nach den Erfahrungen mit der Liste bereits etwas skeptischer geworden, wollen wir's
jetzt aber doch wissen. Wie sieht's mit eigenen Objekten aus? Wie weit kommt PEX damit?
Auch hier gibt es wieder eine einfache Methode die wir testen wollen:
</p>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 1:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">class</span> ComplexDataCalculation</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 3:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">string</span> DoComplexDataCalculation(cData
d)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 5:</span>
              <span style="color: #0000ff">if</span> (!d.IsValid)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 6:</span>
              <span style="color: #0000ff">return</span>
              <span style="color: #006080">"NotValid"</span>;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 7:</span>  </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 8:</span>
              <span style="color: #0000ff">if</span> (d.DataValues.x1
&gt; d.DataValues.x2)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 9:</span>
              <span style="color: #0000ff">return</span>
              <span style="color: #006080">"x1
&gt; x2"</span>;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 10:</span>
              <span style="color: #0000ff">if</span> (d.DataValues.x1
&lt; d.DataValues.x2)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 11:</span>
              <span style="color: #0000ff">return</span>
              <span style="color: #006080">"x1
&lt; x2"</span>; </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 12:</span>
              <span style="color: #0000ff">else</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 13:</span>
              <span style="color: #0000ff">return</span>
              <span style="color: #006080">"x1
== x2"</span>;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 14:</span>  </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 15:</span> }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 16:</span> }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 17:</span>  </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 18:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">class</span> cData</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 19:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 20:</span>
              <span style="color: #0000ff">public</span> cDataValues
DataValues { get; set; }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 21:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">string</span> ObsoleteParameter
{ get; set; }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 22:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">bool</span> IsValid
{ get; set; }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 23:</span> }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 24:</span>  </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 25:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">class</span> cDataValues</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 26:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 27:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">int</span> x1
{ get; set; }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 28:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">int</span> x2
{ get; set; }</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 29:</span> }</pre>
          </div>
        </div>
        <p>
Die Methode bekommt einen komplexen Datentyp übergeben. Und was macht PEX???
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_32.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="190" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_15.png" width="543" border="0" />
          </a>
        </p>
        <p>
PEX erkennt nicht nur, dass wir zwei Null-Exceptions abfangen sollten, sondern kann
auch unser Datenobjekt so initialisieren, dass wir wieder eine 100% Codeabdeckung
bekommen. Die Unit-Tests sehen ungefähr so aus:
</p>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 1:</span> [TestMethod]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span> [PexGeneratedBy(<span style="color: #0000ff">typeof</span>(ComplexDataCalculationTest))]</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 3:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">void</span> DoComplexDataCalculation04()</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 5:</span> cDataValues
cDataValues;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 6:</span> cData
cData;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 7:</span>
              <span style="color: #0000ff">string</span> s;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 8:</span> cDataValues
= <span style="color: #0000ff">new</span> cDataValues();</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 9:</span> cDataValues.x1
= 3;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 10:</span> cDataValues.x2
= 4;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 11:</span> cData
= <span style="color: #0000ff">new</span> cData();</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 12:</span> cData.DataValues
= cDataValues;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 13:</span> cData.ObsoleteParameter
= <span style="color: #006080">""</span>;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 14:</span> cData.IsValid
= <span style="color: #0000ff">true</span>;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 15:</span> ComplexDataCalculation
complexDataCalculation = <span style="color: #0000ff">new</span> ComplexDataCalculation();</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 16:</span> s
= <span style="color: #0000ff">this</span>.DoComplexDataCalculation(complexDataCalculation,
cData);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 17:</span> Assert.AreEqual&lt;<span style="color: #0000ff">string</span>&gt;(<span style="color: #006080">"x1
&lt; x2"</span>, s);</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 18:</span> }</pre>
          </div>
        </div>
        <p>
Das ist schon extrem beeindruckend, wie PEX tatsächlich eine entsprechende Instanz
unseres Datenobjektes erzeugt und initialisiert und das so, dass wir alle Testcases
abdecken. Wirklich beeindruckend.
</p>
        <p>
        </p>
        <div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:35094c03-c207-4962-9c04-0342f1082d8c" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <p>
            <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/PEX.zip" target="_blank">Die
Demos können hier heruntergeladen werden</a>
          </p>
        </div>
        <p>
        </p>
        <p>
Was haltet ihr davon? Würde mich über Feedback freuen.
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=7d3e3e4a-eb47-434a-acd5-bbb92a0fb88c" />
      </body>
      <title>PEX - Automatisches Generieren von Unit-Tests</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,7d3e3e4a-eb47-434a-acd5-bbb92a0fb88c.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,7d3e3e4a-eb47-434a-acd5-bbb92a0fb88c.aspx</link>
      <pubDate>Tue, 14 Oct 2008 12:10:10 GMT</pubDate>
      <description>&lt;p&gt;
Microsoft Research hat vor kurzer Zeit &lt;a href="http://research.microsoft.com/pex"&gt;PEX&lt;/a&gt; zum
freien Download veröffentlicht. Hinter diesem unscheinbaren Kürzel verbirgt sich ein
Tool das absolut genial und beeindruckend ist und klar mach, warum Microsoft ein research
center unterhält. Das Tool verspricht nichts weniger als die automatische Generierung
von Unit-Tests und den dazugehörigen Testcases um eine möglichst hohe Code-Abdeckung
zu erzielen. Detaillierte Informationen bietet das &lt;a href="http://research.microsoft.com/pex/articles/pextutorial.pdf"&gt;Whitepaper&lt;/a&gt;,
wer sich auf die schnelle einen Einblick verschaffen möchte findet einen Überblick
im Folgenden (na ja, für einen Überblick ist der Post vielleicht doch ein wenig lang
geraden, aber ich konnte mich nicht bremsen vor Begeisterung):
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Darf ich vorstellen - PEX&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Gegeben sei folgende Methode die getestet werden soll:
&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; SimpleTest(&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; x1, &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; x2)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (x1
&amp;gt; x2)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #006080"&gt;"x1
&amp;gt; x2"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (x1
&amp;lt; x2)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 6:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #006080"&gt;"x1
&amp;lt; x2"&lt;/span&gt;; &lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #006080"&gt;"x1
== x2"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 9:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Für das versierte Auge eines Entwicklers ist sofort klar, da brauchen wir 3 Testcases
um eine vollständige Code-Abdeckung zu erzielen. Mal sehen, was PEX daraus macht.
Zunächst mal muss PEX heruntergeladen und installiert sein.&amp;nbsp; Dann kann man einfach
einen "Parameterized Unit Test Stub" erzeugen. Dazu in der Methode rechts klicken
und den Befehl aus dem Pex-Menü auswählen.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="161" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb.png" width="447" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Im folgenden Dialog können Sie verschiedene Parameter angeben. Das wichtigste hier
ist das Testprojekt in dem der Stub erzeugt werden soll.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_6.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_2.png" width="469" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Der erzeugte Stub sieht dann so aus:
&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; &lt;span style="color: #008000"&gt;///
&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; &lt;span style="color: #008000"&gt;///
This class contains parameterized unit tests for Calculation&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; &lt;span style="color: #008000"&gt;///
&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; [TestClass]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; [PexClass(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(Calculation))]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 6:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;partial&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; CalculationTest&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 7:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 8:&lt;/span&gt; [PexMethod]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; SimpleTest(&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 10:&lt;/span&gt; [PexAssumeUnderTest]Calculation
target,&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 11:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; x1,&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 12:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; x2&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 13:&lt;/span&gt; )&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 14:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 15:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; result
= target.SimpleTest(x1, x2);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 16:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; result;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 17:&lt;/span&gt; &lt;span style="color: #008000"&gt;//
TODO: add assertions to method CalculationTest.SimpleTest(Calculation, Int32, Int32)&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 18:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 19:&lt;/span&gt; &lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 20:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Bei diesem Stub handelt es such um eine Vorlage für einen parameterisierten Unit-test.
Toll, und was lässt sich damit nun machen? Wir können eine "Exploration" starten.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_8.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="177" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_3.png" width="461" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Diese Exploration versucht nun Input-Parameter zu finden die zu einer möglichst 100%igen
Code-Abdeckung führen. Und hier beginnt nun die Magic von PEX. Ohne unser Zutun findet
PEX 3 Kombinationen von Input-Parametern die tatsächlich eine komplette Code-Abdeckung
erzielen- WOW! Dazu analysiert PEX wirklich den von uns erstellten Code und kann daraus
definieren, mit welchen Input-Parametern die einzelnen noch nicht abgedeckten Zweige
erreicht werden können.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_10.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_4.png" width="407" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Und das schönste, PEX baut uns automatisch 3 Unit-Tests die diese Testcases implementieren:
&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; [TestMethod]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; [PexGeneratedBy(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(CalculationTest))]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; SimpleTest01()&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; s;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 6:&lt;/span&gt; Calculation
calculation = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Calculation();&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 7:&lt;/span&gt; s
= &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.SimpleTest(calculation, 1, 2);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 8:&lt;/span&gt; Assert.AreEqual&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;(&lt;span style="color: #006080"&gt;"x1
&amp;lt; x2"&lt;/span&gt;, s);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 9:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 10:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 11:&lt;/span&gt; [TestMethod]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 12:&lt;/span&gt; [PexGeneratedBy(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(CalculationTest))]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 13:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; SimpleTest02()&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 14:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 15:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; s;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 16:&lt;/span&gt; Calculation
calculation = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Calculation();&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 17:&lt;/span&gt; s
= &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.SimpleTest(calculation, 1879212556, 1879212556);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 18:&lt;/span&gt; Assert.AreEqual&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;(&lt;span style="color: #006080"&gt;"x1
== x2"&lt;/span&gt;, s);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 19:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 20:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 21:&lt;/span&gt; [TestMethod]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 22:&lt;/span&gt; [PexGeneratedBy(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(CalculationTest))]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 23:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; SimpleTest03()&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 24:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 25:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; s;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 26:&lt;/span&gt; Calculation
calculation = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Calculation();&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 27:&lt;/span&gt; s
= &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.SimpleTest(calculation, 256, 254);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 28:&lt;/span&gt; Assert.AreEqual&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;(&lt;span style="color: #006080"&gt;"x1
&amp;gt; x2"&lt;/span&gt;, s);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 29:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Diese Unit-Tests können wir nun starten und sehen, dass diese wie erwartet alle erfolgreich
sind.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_12.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="150" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_5.png" width="244" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Damit haben wir einen Test automatisiert erstellt, der sicherstellen kann, dass diese
Methode ihr Verhalten nach Außen für die aktuell definierten Test-Cases nicht verändert.
Damit können ungewollte Änderungen an der Methode erkannt und beseitigt werden. Ob
die Methode allerdings ihre Aufgabe korrekt erledigt, kann PEX natürlich nicht testen.
Haben wir die Funktionsweise einer Methode allerdings einmal validiert, kann PEX nun
sehr einfach dieses Verhalten prüfen. Und natürlich eignet es sich auch sehr gut um
mögliche Test-Cases zu definieren. Es müssen in diesem Fall dann nur noch die einzelnen
Ergebnisse je Test validiert werden.
&lt;/p&gt;
&lt;p&gt;
Ändern wir die Methode ab, so dass sich ihr Verhalten ändert, dann alarmiert uns der
entsprechende Test.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Soweit sogut - Und was geht sonst noch?&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Wenn wir nun ein gewünschte Änderung der Funktionalität implementieren, wie kann PEX
dann damit umgehen? Zunächst würden wir die vorhandenen Tests durchführen, damit wir
sicher sind, dass die aktuelle Funktionalität noch korrekt läuft. Dann erweitern wir
unsere Methode:
&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; SimpleTest(&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; x1, &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; x2)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (x1
&amp;gt; x2 * 2)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #006080"&gt;"x1
&amp;gt; x2 * 2"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (x1
&amp;gt; x2)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 6:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #006080"&gt;"x1
&amp;gt; x2"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (x1
&amp;lt; x2)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #006080"&gt;"x1
&amp;lt; x2"&lt;/span&gt;; &lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #006080"&gt;"x1
== x2"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 11:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;Zeile 3+4 haben wir neu hinzugefügt. Nun starten wir eine neue Exploration und
PEX ermittelt einen weiteren Test-Case um diese Funktion ebenfalls abzudecken.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_14.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="148" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_6.png" width="376" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Schön - darf's noch ein bisschen mehr sein?&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Dieses einfache Sample war ja schon sehr beeindruckend. Die Frage, die sich aber natürlich
direkt stellt, ist wie weit geht denn das? Wir wollen nun den Schwierigkeitsgrad für
PEX schrittweise steigern. Integer-Werte sind ja noch relativ einfach zu handhaben,
aber wie sieht's denn beispielsweise mit Strings aus? Hierzu zunächst wieder eine
Methode, die wir testen wollen:
&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; StringOperations&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; CheckString(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Input)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (Input.StartsWith(&lt;span style="color: #006080"&gt;"abc"&lt;/span&gt;)
&amp;amp;&amp;amp; Input.Length &amp;gt; 10)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 6:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; Input
+ &lt;span style="color: #006080"&gt;" Starts with 'abc' and length &amp;gt; 10"&lt;/span&gt;; &lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (Input.StartsWith(&lt;span style="color: #006080"&gt;"abc"&lt;/span&gt;))&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; Input
+ &lt;span style="color: #006080"&gt;" Starts with 'abc'"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (Input.StartsWith(&lt;span style="color: #006080"&gt;"ABC"&lt;/span&gt;))&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; Input
+ &lt;span style="color: #006080"&gt;" Starts with 'ABC'"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 11:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #006080"&gt;"Unknown
pattern"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 12:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 13:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Stubs erzeugen und Exploration starten. Ob PEX wohl solche Operationen wie "StartsWith"
und "Length" versteht?
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_16.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="172" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_7.png" width="433" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Es findet tatsächlich alle erforderlichen Input-Parameter und sogar noch mehr! PEX
stell fest, dass unsere Methode beim Übergeben einer NULL-Referenz eine Exception
wirft. Und damit nicht genug, PEX kann uns auch einen Vorschlag machen, wie wir unseren
Code verbessern können. Dazu im "Pex Exploration Results" - Fenster unter Views "Show
suggestions window" aufrufen. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_18.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="206" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_8.png" width="725" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_20.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="156" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_9.png" width="736" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Durch einen Doppelklick auf den Eintrag am unteren Rand des Bereichs öffnet sich ein
Fenster, das die vorgeschlagene Änderung direkt in unseren Code einfügen kann.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_22.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="432" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_10.png" width="536" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; CheckString(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Input)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; &lt;span style="color: #008000"&gt;//
&amp;lt;pex&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (Input
== (&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;)&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;throw&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ArgumentNullException(&lt;span style="color: #006080"&gt;"Input"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 6:&lt;/span&gt; &lt;span style="color: #008000"&gt;//
&amp;lt;/pex&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (Input.StartsWith(&lt;span style="color: #006080"&gt;"abc"&lt;/span&gt;)
&amp;amp;&amp;amp; Input.Length &amp;gt; 10)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; Input
+ &lt;span style="color: #006080"&gt;" Starts with 'abc' and length &amp;gt; 10"&lt;/span&gt;; &lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (Input.StartsWith(&lt;span style="color: #006080"&gt;"abc"&lt;/span&gt;))&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; Input
+ &lt;span style="color: #006080"&gt;" Starts with 'abc'"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 11:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (Input.StartsWith(&lt;span style="color: #006080"&gt;"ABC"&lt;/span&gt;))&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 12:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; Input
+ &lt;span style="color: #006080"&gt;" Starts with 'ABC'"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 13:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #006080"&gt;"Unknown
pattern"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 14:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Die Zeilen 3-6 wurden von PEX erzeugt. Natürlich können wir das entsprechende Verhalten
im Code direkt ändern und an unsere Vorstellungen anpassen. Vielleicht ist es aber
gar keine schlechte Idee, in diesem Fall eine Exception zu werden. Dies ist das Standard-Verhalten
von PEX an dieser Stelle. Wird die erwartete Exception nicht mehr geworfen oder eine
andere Exception tritt auf, wird dies durch einen fehlgeschlagenen Test angezeigt.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Der nächste bitte!&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
So nun wollen wir noch einen Schritt weitergehen und sehen, wie PEX mit Listen umgehen
kann. Dazu habe ich folgende Testmethode erstellt (über den Sinn einer solchen Methode
wollen wir jetzt nicht nachdenken)
&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; result
= 0;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (list.Count
&amp;gt; 10)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; list)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; result
+= i;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 6:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 8:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; list)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 10:&lt;/span&gt; result
*= i;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 11:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 12:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; result;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Die Methode bekommt eine Liste von Integer-Werten übergeben. Wenn es mehr als 10 Elemente
sind, werden diese addiert, sonst werden die Werte miteinander Multipliziert. Mal
sehen, wie PEX mit Listen umgeht.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_24.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="120" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_11.png" width="572" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
PEX erkennt noch, dass unsere Methode mit Null-References nicht korrekt umgeht, aber
dann verließen sie ihn.&amp;nbsp; Aber freundlicherweise bekommen wir noch einen Hinweis
"2 Object Creations". klickt man darauf, dann bekommt man schon mehr Informationen. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_26.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="128" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_12.png" width="441" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Aha, PEX kann also eine List&amp;lt;int&amp;gt; nicht erzeugen. Also was tun? Klickt man den
unteren der beiden Einträge an, bietet PEX etwas weiter rechts die Möglichkeit eine
Factory zu definieren. Eine Factory ist ein Extensibility-Point mit dem PEX beigebracht
werden kann mit solchen Objekten umzugehen. Ein Beispiel für eine solche Factory kann
so aussehen:
&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; System.Collections.Generic&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; [PexFactoryClass]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;partial&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; ListFactory&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 6:&lt;/span&gt; [PexFactoryMethod(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(List&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt;))]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; List&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt;
Create(&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 8:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (i
&amp;gt; 100)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 10:&lt;/span&gt; i
= 100;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 11:&lt;/span&gt; List&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt;
l = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; List&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt;();&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 12:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; j
= 0; j &amp;lt; i; j++)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 13:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 14:&lt;/span&gt; l.Add(j
* 10);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 15:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 16:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; l;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 17:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 18:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 19:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Hier teilt man PEX nun mit, welche Elemente es damit erzeugen kann (Zeile 6). Anschließend
implementiert man eine Create-Methode die beliebige Parameter übernehmen kann. In
Abhängigkeit dieser Parameter wird nun eine Instanz des gewünschten Objektes erzeugt.
In unserem Beispiel übernehmen wir nur einen Parameter der die Länge der Liste angibt.
In den Zeilen 9/10 begrenzen wir die Länge der Lsite auf 100 Elemente. Die Liste selbst
befüllen wir mit einer Reihe von Zahlen. Hier ist es sicher keine gute Idee, z.B.
Zufallszahlen zu verwenden, da diese ja bei jedem Testdurchlauf andere Werte liefern
und deshalb der Assert nicht erfolgreich ausgeführt werden kann.
&lt;/p&gt;
&lt;p&gt;
Mit hilfe dieser Factory kannPEX nun unsere Testcases definieren. Dazu ermittelt es
einfach geeignete Parameter für die Create-Methode in unserer Factory statt das Objekt
selbst zu erzeugen.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_28.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="145" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_13.png" width="597" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Die erzeugten Tests sehen dann so aus:
&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; [TestMethod]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; [PexGeneratedBy(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(ListCalculationTest))]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; SumList03()&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; List&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt;
list;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 6:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 7:&lt;/span&gt; list
= ListFactory.Create(2);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 8:&lt;/span&gt; ListCalculation
listCalculation = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ListCalculation();&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 9:&lt;/span&gt; i
= &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.SumList(listCalculation, list);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 10:&lt;/span&gt; Assert.AreEqual&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt;(0,
i);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 11:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 12:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 13:&lt;/span&gt; [TestMethod]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 14:&lt;/span&gt; [PexGeneratedBy(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(ListCalculationTest))]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 15:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; SumList04()&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 16:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 17:&lt;/span&gt; List&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt;
list;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 18:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 19:&lt;/span&gt; list
= ListFactory.Create(536870912);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 20:&lt;/span&gt; ListCalculation
listCalculation = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ListCalculation();&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 21:&lt;/span&gt; i
= &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.SumList(listCalculation, list);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 22:&lt;/span&gt; Assert.AreEqual&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt;(49500,
i);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 23:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Nun folgt noch die Kür&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Nach den Erfahrungen mit der Liste bereits etwas skeptischer geworden, wollen wir's
jetzt aber doch wissen. Wie sieht's mit eigenen Objekten aus? Wie weit kommt PEX damit?
Auch hier gibt es wieder eine einfache Methode die wir testen wollen:
&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; ComplexDataCalculation&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; DoComplexDataCalculation(cData
d)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (!d.IsValid)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 6:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #006080"&gt;"NotValid"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 7:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (d.DataValues.x1
&amp;gt; d.DataValues.x2)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #006080"&gt;"x1
&amp;gt; x2"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (d.DataValues.x1
&amp;lt; d.DataValues.x2)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 11:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #006080"&gt;"x1
&amp;lt; x2"&lt;/span&gt;; &lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 12:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 13:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #006080"&gt;"x1
== x2"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 14:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 15:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 16:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 17:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 18:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; cData&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 19:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 20:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; cDataValues
DataValues { get; set; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 21:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; ObsoleteParameter
{ get; set; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 22:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsValid
{ get; set; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 23:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 24:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 25:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; cDataValues&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 26:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 27:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; x1
{ get; set; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 28:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; x2
{ get; set; }&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 29:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Die Methode bekommt einen komplexen Datentyp übergeben. Und was macht PEX???
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_32.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="190" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/image_thumb_15.png" width="543" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
PEX erkennt nicht nur, dass wir zwei Null-Exceptions abfangen sollten, sondern kann
auch unser Datenobjekt so initialisieren, dass wir wieder eine 100% Codeabdeckung
bekommen. Die Unit-Tests sehen ungefähr so aus:
&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; [TestMethod]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; [PexGeneratedBy(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(ComplexDataCalculationTest))]&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; DoComplexDataCalculation04()&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; cDataValues
cDataValues;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 6:&lt;/span&gt; cData
cData;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; s;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 8:&lt;/span&gt; cDataValues
= &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; cDataValues();&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 9:&lt;/span&gt; cDataValues.x1
= 3;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 10:&lt;/span&gt; cDataValues.x2
= 4;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 11:&lt;/span&gt; cData
= &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; cData();&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 12:&lt;/span&gt; cData.DataValues
= cDataValues;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 13:&lt;/span&gt; cData.ObsoleteParameter
= &lt;span style="color: #006080"&gt;""&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 14:&lt;/span&gt; cData.IsValid
= &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 15:&lt;/span&gt; ComplexDataCalculation
complexDataCalculation = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ComplexDataCalculation();&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 16:&lt;/span&gt; s
= &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.DoComplexDataCalculation(complexDataCalculation,
cData);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 17:&lt;/span&gt; Assert.AreEqual&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;(&lt;span style="color: #006080"&gt;"x1
&amp;lt; x2"&lt;/span&gt;, s);&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 18:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Das ist schon extrem beeindruckend, wie PEX tatsächlich eine entsprechende Instanz
unseres Datenobjektes erzeugt und initialisiert und das so, dass wir alle Testcases
abdecken. Wirklich beeindruckend.
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:35094c03-c207-4962-9c04-0342f1082d8c" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PEXAutomatischesGenerierenvonUnitTests_12C9A/PEX.zip" target="_blank"&gt;Die
Demos können hier heruntergeladen werden&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Was haltet ihr davon? Würde mich über Feedback freuen.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=7d3e3e4a-eb47-434a-acd5-bbb92a0fb88c" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,7d3e3e4a-eb47-434a-acd5-bbb92a0fb88c.aspx</comments>
      <category>Qualitätsmanagement;Tipps und Tricks;Tools;Vorträge</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=1185547e-ff12-4e16-b511-f295a47a8128</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,1185547e-ff12-4e16-b511-f295a47a8128.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,1185547e-ff12-4e16-b511-f295a47a8128.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=1185547e-ff12-4e16-b511-f295a47a8128</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Die Integration des TFS mit Visual Studio ist eine richtig schöne Sache. Eine Stelle
an der die Vorteile dieser Integration schön sichtbar werden ist die Erzeugung einen
Workitems direkt aus einem Test-Result heraus. Wenn also z.B. ein Test fehlgeschlagen
ist, kann daraus direkt ein Bug-Workitem erzeugt werden. Der Clou dabei ist, dass
das Test-Result automatisch auf dem TFS veröffentlicht und als Attachment an das Workitem
angehängt wird. Damit hat der Entwickler der den Bug beheben soll Zugriff auf den
durchgeführten Test und die Results. Dies funktioniert mit allen Testarten sofern
der Entwickler mit seiner Visual Studio Edition die entsprechenden Testarten ausführen
kann. Somit kann der Entwickler z.B. bei einem Unit-Test diesen verwenden um den Testcase
einfach zu debuggen. Und bei manuellen Tests stellt die Testspezifikation die Beschreibung
der Repro-Steps dar. Auf jeden Fall ein Zeitgewinn. Man kann aber beispielsweise damit
auch Aufgaben definieren, dass ein bestimmter Test noch mit zusätzlichen Test-Cases
angereichert werden soll etc.
</p>
        <p>
Dazu geht man einfach mit der rechten Maustaste auf den entsprechenden Eintrag im
Testresults-Fenster und wählt aus dem Kontext-Menü den entsprechenden Workitemtyp
aus.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TFSWorkitemsausTestResultsanlegen_11094/image_4.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="208" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TFSWorkitemsausTestResultsanlegen_11094/image_thumb_1.png" width="399" border="0" />
          </a>
        </p>
        <p>
Wird statt der Liste der Workitems "No Active Team Project" angezeigt, dann gibt es
hier eine einfache Lösung, die aber nicht ganz intuitiv ist.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TFSWorkitemsausTestResultsanlegen_11094/image_6.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="246" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TFSWorkitemsausTestResultsanlegen_11094/image_thumb_2.png" width="376" border="0" />
          </a>
        </p>
        <p>
1.) Sicherstellen dass im Team-Explorer das gewünschte Projekt angezeigt wird in dem
man das neue Workitem anlegen möchte.
</p>
        <p>
2.) Dieses Team-Projekt aktiv markieren (das Projekt wird fett dargestellt)
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TFSWorkitemsausTestResultsanlegen_11094/image_8.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="73" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TFSWorkitemsausTestResultsanlegen_11094/image_thumb_3.png" width="244" border="0" />
          </a>
        </p>
        <p>
Nun werden die WorkitemTypen die im ProcessTemplate dieses Projektes definiert sind
zur Auswahl angezeigt. Das Projekt selbst muss nicht unbedingt in der Quellcode-Verwaltung
des TFS abgelegt sein.
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=1185547e-ff12-4e16-b511-f295a47a8128" />
      </body>
      <title>TFS-Workitems aus Test Results anlegen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,1185547e-ff12-4e16-b511-f295a47a8128.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,1185547e-ff12-4e16-b511-f295a47a8128.aspx</link>
      <pubDate>Tue, 14 Oct 2008 12:02:36 GMT</pubDate>
      <description>&lt;p&gt;
Die Integration des TFS mit Visual Studio ist eine richtig schöne Sache. Eine Stelle
an der die Vorteile dieser Integration schön sichtbar werden ist die Erzeugung einen
Workitems direkt aus einem Test-Result heraus. Wenn also z.B. ein Test fehlgeschlagen
ist, kann daraus direkt ein Bug-Workitem erzeugt werden. Der Clou dabei ist, dass
das Test-Result automatisch auf dem TFS veröffentlicht und als Attachment an das Workitem
angehängt wird. Damit hat der Entwickler der den Bug beheben soll Zugriff auf den
durchgeführten Test und die Results. Dies funktioniert mit allen Testarten sofern
der Entwickler mit seiner Visual Studio Edition die entsprechenden Testarten ausführen
kann. Somit kann der Entwickler z.B. bei einem Unit-Test diesen verwenden um den Testcase
einfach zu debuggen. Und bei manuellen Tests stellt die Testspezifikation die Beschreibung
der Repro-Steps dar. Auf jeden Fall ein Zeitgewinn. Man kann aber beispielsweise damit
auch Aufgaben definieren, dass ein bestimmter Test noch mit zusätzlichen Test-Cases
angereichert werden soll etc.
&lt;/p&gt;
&lt;p&gt;
Dazu geht man einfach mit der rechten Maustaste auf den entsprechenden Eintrag im
Testresults-Fenster und wählt aus dem Kontext-Menü den entsprechenden Workitemtyp
aus.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TFSWorkitemsausTestResultsanlegen_11094/image_4.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="208" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TFSWorkitemsausTestResultsanlegen_11094/image_thumb_1.png" width="399" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Wird statt der Liste der Workitems "No Active Team Project" angezeigt, dann gibt es
hier eine einfache Lösung, die aber nicht ganz intuitiv ist.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TFSWorkitemsausTestResultsanlegen_11094/image_6.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="246" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TFSWorkitemsausTestResultsanlegen_11094/image_thumb_2.png" width="376" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
1.) Sicherstellen dass im Team-Explorer das gewünschte Projekt angezeigt wird in dem
man das neue Workitem anlegen möchte.
&lt;/p&gt;
&lt;p&gt;
2.) Dieses Team-Projekt aktiv markieren (das Projekt wird fett dargestellt)
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TFSWorkitemsausTestResultsanlegen_11094/image_8.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="73" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TFSWorkitemsausTestResultsanlegen_11094/image_thumb_3.png" width="244" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Nun werden die WorkitemTypen die im ProcessTemplate dieses Projektes definiert sind
zur Auswahl angezeigt. Das Projekt selbst muss nicht unbedingt in der Quellcode-Verwaltung
des TFS abgelegt sein.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=1185547e-ff12-4e16-b511-f295a47a8128" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,1185547e-ff12-4e16-b511-f295a47a8128.aspx</comments>
      <category>Team System Server;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=1e836876-aa59-4d6b-8302-a9dceb829e77</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,1e836876-aa59-4d6b-8302-a9dceb829e77.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,1e836876-aa59-4d6b-8302-a9dceb829e77.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=1e836876-aa59-4d6b-8302-a9dceb829e77</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Möchte man einen Event eines Controls per Code auslösen und somit alle registrierten
Delegates aufrufen, wie es beim eigentlichen Auslösen des Events passiert, dann kann
dieses Beispiel helfen. Jedes Control besitzt für seine einzelnen Events eine Methode
den event auszulösen, z.B. OnClick(EventArgs e). Die Methoden sind allerdings private
und können damit von außerhalb des Controls nicht so einfach aufgerufen werden. Bei
einem einfachen Control wie z.B. einem Button geht das einfach durch Ableitung:
</p>
        <div>
          <div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 1:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">partial</span>
              <span style="color: #0000ff">class</span> CustomButton
: Button </pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 2:</span> {</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 3:</span>
              <span style="color: #0000ff">public</span> CustomButton()</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 4:</span> {</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 5:</span> InitializeComponent();</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 6:</span> }</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 7:</span>  </pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 8:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">void</span> RaiseClickEvent(EventArgs
e)</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 9:</span> {</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 10:</span>
              <span style="color: #0000ff">base</span>.OnClick(e);</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 11:</span> }</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 12:</span> }</pre>
          </div>
        </div>
        <p>
Etwas schwieriger wird es bei komplexeren Controls, z.B. einem MenuStrip. Möchte man
den Click-Event eines ToolStripMenuItem aufrufen, müsste man ja das ToolStripMenuItem
ableiten, was aber zur Folge hätte, dass das komplette MenuStrip-Control umbauen muss.
Hier kann man mit Hilfe von Reflection eine bessere Lösung implementieren. Bei dieser
Lösung wird nur das MenuStrip abgeleitet und um eine RaiseClickEvent-Methode erweitert
der als Parameter ein ToolStripItem entgegen nimmt. Auf diesem wird dann per Reflection
die Private-Methode OnClick aufgerufen.
</p>
        <div>
          <div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 1:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">partial</span>
              <span style="color: #0000ff">class</span> CustomMenuStrip
: MenuStrip </pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 2:</span> {</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 3:</span>
              <span style="color: #0000ff">public</span> CustomMenuStrip()</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 4:</span> {</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 5:</span> }</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 6:</span>
            </pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 7:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">void</span> RaiseClickEvent(ToolStripItem
m)</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 8:</span> {</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 9:</span> Type
t = m.GetType();</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 10:</span>
              <span style="color: #0000ff">object</span>[]
para = <span style="color: #0000ff">new</span><span style="color: #0000ff">object</span>[1];</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 11:</span> para[0]
= <span style="color: #0000ff">null</span>;</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 12:</span> t.GetMethod(<span style="color: #006080">"OnClick"</span>,
BindingFlags.NonPublic | BindingFlags.Instance).Invoke(m, para);</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 13:</span> } </pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060"> 14:</span> }</pre>
          </div>
        </div>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=1e836876-aa59-4d6b-8302-a9dceb829e77" />
      </body>
      <title>Events von WinForms Controls von Au&amp;szlig;en aufrufen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,1e836876-aa59-4d6b-8302-a9dceb829e77.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,1e836876-aa59-4d6b-8302-a9dceb829e77.aspx</link>
      <pubDate>Tue, 07 Oct 2008 22:41:57 GMT</pubDate>
      <description>&lt;p&gt;
Möchte man einen Event eines Controls per Code auslösen und somit alle registrierten
Delegates aufrufen, wie es beim eigentlichen Auslösen des Events passiert, dann kann
dieses Beispiel helfen. Jedes Control besitzt für seine einzelnen Events eine Methode
den event auszulösen, z.B. OnClick(EventArgs e). Die Methoden sind allerdings private
und können damit von außerhalb des Controls nicht so einfach aufgerufen werden. Bei
einem einfachen Control wie z.B. einem Button geht das einfach durch Ableitung:
&lt;/p&gt;
&lt;div&gt;
&lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;partial&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; CustomButton
: Button &lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; CustomButton()&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; InitializeComponent();&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 6:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 7:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; RaiseClickEvent(EventArgs
e)&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 9:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;base&lt;/span&gt;.OnClick(e);&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 11:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 12:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Etwas schwieriger wird es bei komplexeren Controls, z.B. einem MenuStrip. Möchte man
den Click-Event eines ToolStripMenuItem aufrufen, müsste man ja das ToolStripMenuItem
ableiten, was aber zur Folge hätte, dass das komplette MenuStrip-Control umbauen muss.
Hier kann man mit Hilfe von Reflection eine bessere Lösung implementieren. Bei dieser
Lösung wird nur das MenuStrip abgeleitet und um eine RaiseClickEvent-Methode erweitert
der als Parameter ein ToolStripItem entgegen nimmt. Auf diesem wird dann per Reflection
die Private-Methode OnClick aufgerufen.
&lt;/p&gt;
&lt;div&gt;
&lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;partial&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; CustomMenuStrip
: MenuStrip &lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; CustomMenuStrip()&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 6:&lt;/span&gt; &lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; RaiseClickEvent(ToolStripItem
m)&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 8:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 9:&lt;/span&gt; Type
t = m.GetType();&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;object&lt;/span&gt;[]
para = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; &lt;span style="color: #0000ff"&gt;object&lt;/span&gt;[1];&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 11:&lt;/span&gt; para[0]
= &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 12:&lt;/span&gt; t.GetMethod(&lt;span style="color: #006080"&gt;"OnClick"&lt;/span&gt;,
BindingFlags.NonPublic | BindingFlags.Instance).Invoke(m, para);&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 13:&lt;/span&gt; } &lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt; 14:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=1e836876-aa59-4d6b-8302-a9dceb829e77" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,1e836876-aa59-4d6b-8302-a9dceb829e77.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=ec39921c-4624-4af4-a1f3-5d672634f059</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,ec39921c-4624-4af4-a1f3-5d672634f059.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,ec39921c-4624-4af4-a1f3-5d672634f059.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=ec39921c-4624-4af4-a1f3-5d672634f059</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
SharePoint veröffentlicht die Dokumentbibliotheken per WebDAV, d.h. man kann über
\\&lt;Servername&gt;\sites\&lt;ProjektName&gt; beispielsweise auf die Dokumente eines
TFS-Projektes zugreifen. Das funktioniert standardmäßig aber nicht von einem Windows
2003 Server aus. Hier muss der WebDAV Client zuerst aktiviert werden. Hierzu muss
der Dienst "WebClient" gestartet werden. 
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/AufWin2003ServerperWebDAVaufSharePointzu_C42/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" border="0" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/AufWin2003ServerperWebDAVaufSharePointzu_C42/image_thumb.png" width="603" height="74" />
          </a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=ec39921c-4624-4af4-a1f3-5d672634f059" />
      </body>
      <title>Auf Win2003 Server per WebDAV auf SharePoint zugreifen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,ec39921c-4624-4af4-a1f3-5d672634f059.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,ec39921c-4624-4af4-a1f3-5d672634f059.aspx</link>
      <pubDate>Tue, 30 Sep 2008 22:58:45 GMT</pubDate>
      <description>&lt;p&gt;
SharePoint veröffentlicht die Dokumentbibliotheken per WebDAV, d.h. man kann über
\\&amp;lt;Servername&amp;gt;\sites\&amp;lt;ProjektName&amp;gt; beispielsweise auf die Dokumente eines
TFS-Projektes zugreifen. Das funktioniert standardmäßig aber nicht von einem Windows
2003 Server aus. Hier muss der WebDAV Client zuerst aktiviert werden. Hierzu muss
der Dienst "WebClient" gestartet werden. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/AufWin2003ServerperWebDAVaufSharePointzu_C42/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" border="0" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/AufWin2003ServerperWebDAVaufSharePointzu_C42/image_thumb.png" width="603" height="74"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=ec39921c-4624-4af4-a1f3-5d672634f059" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,ec39921c-4624-4af4-a1f3-5d672634f059.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=9192c102-ee8e-44fc-bb5c-8a27300c2f41</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,9192c102-ee8e-44fc-bb5c-8a27300c2f41.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,9192c102-ee8e-44fc-bb5c-8a27300c2f41.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=9192c102-ee8e-44fc-bb5c-8a27300c2f41</wfw:commentRss>
      <title>ClickOnce und Prozessorarchitektur</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,9192c102-ee8e-44fc-bb5c-8a27300c2f41.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,9192c102-ee8e-44fc-bb5c-8a27300c2f41.aspx</link>
      <pubDate>Fri, 18 Jul 2008 11:57:09 GMT</pubDate>
      <description>&lt;p&gt;
Standardmäßig stellt Visual Studio die Prozessor-.Architektur für Anwendungen auf
"Any CPU". Vor allem mit Bibliotheken gibt es damit allerdings öfters Probleme auf
x64 Systemen, wenn die Bibliotheken unter 64Bit Betriebssystemen nicht sauber laufen.
Eine Möglichkeit ist, die Anwendung explizit für x86 zu kompilieren, dann wird diese
auch auf x64 Systemen im 32Bit Modus ausgeführt (&lt;a href="http://www.artiso.com/ProBlog/PermaLink,guid,7a7ed9ca-f830-449f-83bb-ff099dca590a.aspx"&gt;siehe
auch den Blogeintrag zur TFS-API unter x64&lt;/a&gt;).
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/ct.ashx?id=7a7ed9ca-f830-449f-83bb-ff099dca590a&amp;amp;url=http%3a%2f%2fwww.artiso.com%2fProBlog%2fcontent%2fbinary%2fWindowsLiveWriter%2fTFSAPImitx64_A334%2fimage_14.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="289" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TFSAPImitx64_A334/image_thumb_6.png" width="509" border="0"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Allerdings muss man hier mit ClickOnce ein wenig vorsichtig sein. Wenn man eine Anwendung
zunächst mit "Any CPU" über ClickOnce verteilt hat und anschließend auf x86 umstellt,
dann meldet ClickOnce 
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;span lang="EN-US" style="font-size: 11pt; color: #1f497d; font-family: 'Calibri','sans-serif'; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: en-us; mso-fareast-language: de; mso-bidi-language: ar-sa"&gt;„The
deployment identity does not match the subscription” bzw.&lt;br&gt;
&lt;span style="color: #1f497d"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;„Die
Bereitstellungsidentität stimmt nicht mit dem Abonnement überein.“&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&gt;&lt;/blockquote&gt; 
&lt;p&gt;
Verschiedene Einträge im Internet verweisen zunächst darauf, dass das Zertifikat das
Problem sein könnte. Da wir in der Zwischenzeit bei uns eine Domänen-Umstellung hatte,
war diese Erklärung zunächst auch sehr plausibel. Dann stellte sich allerdings heraus,
dass dieses Problem durch die Prozessor-Architektur verursacht wird. ClickOnce verwendet
diese wohl als sog. "subscription identity" und behauptet einfach, dass es sich dabei
um eine andere Anwendung handelt. Um das Problem zu umgehen sollte man also bereits
beim ersten Demployment sehr gut überlegen, ob man die Anwendung nicht unter dem x86-Modus
kompiliert.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=9192c102-ee8e-44fc-bb5c-8a27300c2f41" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,9192c102-ee8e-44fc-bb5c-8a27300c2f41.aspx</comments>
      <category>Know-How;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=442e27de-28f9-4f44-a6c5-14fdd432e09d</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,442e27de-28f9-4f44-a6c5-14fdd432e09d.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,442e27de-28f9-4f44-a6c5-14fdd432e09d.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=442e27de-28f9-4f44-a6c5-14fdd432e09d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Für eine ASP.Net Anwendung möchte ich gerne die Versionen meiner Anwendung und aller
referenzierten Assemblies ausgeben. Bei Winforms kann ich für die Anwendung mit Application.ProductVersion
die Version meiner Anwendung abfragen, die ich in der AssemblyInfo.cs eingestellt
habe. Das geht bei ASP.Net nicht. Hier die Lösung, wie man das im Web macht, gleich
mit Sortierung:
</p>
        <div>
          <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();

<span style="color: #0000ff">if</span> (assembly
!= <span style="color: #0000ff">null</span>) { lblProductVersion.Text = assembly.GetName().Name
+ <span style="color: #006080">" - "</span> + assembly.GetName().Version.ToString();
var referenceAssemblies = from a <span style="color: #0000ff">in</span> assembly.GetReferencedAssemblies()
orderby a.Name select a; <span style="color: #0000ff">foreach</span> (AssemblyName
referenceAssemblyName <span style="color: #0000ff">in</span> referenceAssemblies)
{ lblProductVersion.Text += <span style="color: #006080">"&lt;br&gt;"</span> + referenceAssemblyName.Name
+ <span style="color: #006080">" - "</span> + referenceAssemblyName.Version; } }</pre>
        </div>
        <p>
 
</p>
        <p>
Die Ausgabe sieht dann ungefähr so aus:
</p>
        <p>
          <span id="ctl00_ContentPlaceHolder1_ucSysInfo1_lblProductVersion">MyApplication -
1.0.3058.30144<br />
AjaxControlToolkit - 1.0.10618.0<br />
ArtisoAssertLib - 1.0.0.0<br />
CommonComponents - 1.0.3056.28557<br />
CommonContracts - 1.0.3056.28555<br />
CrystalDecisions.CrystalReports.Engine - 11.5.3700.0<br />
CrystalDecisions.ReportSource - 11.5.3700.0<br />
CrystalDecisions.Shared - 11.5.3700.0<br />
cTextBox - 1.0.3058.27781<br />
DataContracts - 1.0.0.0<br />
Infragistics35.WebUI.Misc.v8.1 - 8.1.20081.1000<br />
Infragistics35.WebUI.Shared.v8.1 - 8.1.20081.1000<br />
Infragistics35.WebUI.UltraWebChart.v8.1 - 8.1.20081.1000<br />
Infragistics35.WebUI.UltraWebGrid.v8.1 - 8.1.20081.1000<br />
Infragistics35.WebUI.UltraWebNavigator.v8.1 - 8.1.20081.1000<br />
Infragistics35.WebUI.UltraWebTab.v8.1 - 8.1.20081.1000<br />
Infragistics35.WebUI.UltraWebToolbar.v8.1 - 8.1.20081.1000<br />
Infragistics35.WebUI.WebDataInput.v8.1 - 8.1.20081.1000<br />
Infragistics35.WebUI.WebDateChooser.v8.1 - 8.1.20081.1000<br />
ListValuesComponents - 1.0.3057.30147<br />
ListValuesContracts - 1.0.3057.30146<br />
LoginManagerComponents - 1.0.3033.29632<br />
LoginManagerContracts - 1.0.0.0<br />
mscorlib - 2.0.0.0<br />
NavigationComponents - 1.0.3058.27781<br />
NavigationContracts - 1.0.3058.27780<br />
PCMAreaComponents - 1.0.3058.27781<br />
PCMAreaContracts - 1.0.3058.27779<br />
ProductsAreaComponents - 1.0.3058.27779<br />
ProjectsAreaComponents - 1.0.3058.27780<br />
ProjectsAreaContracts - 1.0.3058.27778<br />
ReportingComponents - 1.0.3058.27781<br />
ReportingContracts - 1.0.3058.27780<br />
SearchComponents - 1.0.3058.27779<br />
SearchContracts - 1.0.3058.27779<br />
System - 2.0.0.0<br />
System.Configuration - 2.0.0.0<br />
System.Core - 3.5.0.0<br />
System.Data - 2.0.0.0<br />
System.Data.DataSetExtensions - 3.5.0.0<br />
System.Data.Linq - 3.5.0.0<br />
System.Drawing - 2.0.0.0<br />
System.Web - 2.0.0.0<br />
System.Web.Extensions - 3.5.0.0<br />
System.Web.Services - 2.0.0.0<br />
System.Xml - 2.0.0.0<br />
TaskListComponent - 1.0.3056.28564<br />
TaskListContract - 1.0.3056.28560<br />
TypesComponents - 1.0.3057.30147<br />
TypesContracts - 1.0.3057.30147<br />
UserManagementContracts - 1.0.0.0<br />
Validators - 1.0.0.0<br />
wwDataBinder - 1.0.2908.21817</span>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=442e27de-28f9-4f44-a6c5-14fdd432e09d" />
      </body>
      <title>Assembly versionen bei Web-Anwendungen ausgeben</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,442e27de-28f9-4f44-a6c5-14fdd432e09d.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,442e27de-28f9-4f44-a6c5-14fdd432e09d.aspx</link>
      <pubDate>Fri, 16 May 2008 15:50:11 GMT</pubDate>
      <description>&lt;p&gt;
Für eine ASP.Net Anwendung möchte ich gerne die Versionen meiner Anwendung und aller
referenzierten Assemblies ausgeben. Bei Winforms kann ich für die Anwendung mit Application.ProductVersion
die Version meiner Anwendung abfragen, die ich in der AssemblyInfo.cs eingestellt
habe. Das geht bei ASP.Net nicht. Hier die Lösung, wie man das im Web macht, gleich
mit Sortierung:
&lt;/p&gt;
&lt;div&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();

&lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (assembly
!= &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;) { lblProductVersion.Text = assembly.GetName().Name
+ &lt;span style="color: #006080"&gt;" - "&lt;/span&gt; + assembly.GetName().Version.ToString();
var referenceAssemblies = from a &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; assembly.GetReferencedAssemblies()
orderby a.Name select a; &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (AssemblyName
referenceAssemblyName &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; referenceAssemblies)
{ lblProductVersion.Text += &lt;span style="color: #006080"&gt;"&amp;lt;br&amp;gt;"&lt;/span&gt; + referenceAssemblyName.Name
+ &lt;span style="color: #006080"&gt;" - "&lt;/span&gt; + referenceAssemblyName.Version; } }&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Die Ausgabe sieht dann ungefähr so aus:
&lt;/p&gt;
&lt;p&gt;
&lt;span id="ctl00_ContentPlaceHolder1_ucSysInfo1_lblProductVersion"&gt;MyApplication -
1.0.3058.30144&lt;br&gt;
AjaxControlToolkit - 1.0.10618.0&lt;br&gt;
ArtisoAssertLib - 1.0.0.0&lt;br&gt;
CommonComponents - 1.0.3056.28557&lt;br&gt;
CommonContracts - 1.0.3056.28555&lt;br&gt;
CrystalDecisions.CrystalReports.Engine - 11.5.3700.0&lt;br&gt;
CrystalDecisions.ReportSource - 11.5.3700.0&lt;br&gt;
CrystalDecisions.Shared - 11.5.3700.0&lt;br&gt;
cTextBox - 1.0.3058.27781&lt;br&gt;
DataContracts - 1.0.0.0&lt;br&gt;
Infragistics35.WebUI.Misc.v8.1 - 8.1.20081.1000&lt;br&gt;
Infragistics35.WebUI.Shared.v8.1 - 8.1.20081.1000&lt;br&gt;
Infragistics35.WebUI.UltraWebChart.v8.1 - 8.1.20081.1000&lt;br&gt;
Infragistics35.WebUI.UltraWebGrid.v8.1 - 8.1.20081.1000&lt;br&gt;
Infragistics35.WebUI.UltraWebNavigator.v8.1 - 8.1.20081.1000&lt;br&gt;
Infragistics35.WebUI.UltraWebTab.v8.1 - 8.1.20081.1000&lt;br&gt;
Infragistics35.WebUI.UltraWebToolbar.v8.1 - 8.1.20081.1000&lt;br&gt;
Infragistics35.WebUI.WebDataInput.v8.1 - 8.1.20081.1000&lt;br&gt;
Infragistics35.WebUI.WebDateChooser.v8.1 - 8.1.20081.1000&lt;br&gt;
ListValuesComponents - 1.0.3057.30147&lt;br&gt;
ListValuesContracts - 1.0.3057.30146&lt;br&gt;
LoginManagerComponents - 1.0.3033.29632&lt;br&gt;
LoginManagerContracts - 1.0.0.0&lt;br&gt;
mscorlib - 2.0.0.0&lt;br&gt;
NavigationComponents - 1.0.3058.27781&lt;br&gt;
NavigationContracts - 1.0.3058.27780&lt;br&gt;
PCMAreaComponents - 1.0.3058.27781&lt;br&gt;
PCMAreaContracts - 1.0.3058.27779&lt;br&gt;
ProductsAreaComponents - 1.0.3058.27779&lt;br&gt;
ProjectsAreaComponents - 1.0.3058.27780&lt;br&gt;
ProjectsAreaContracts - 1.0.3058.27778&lt;br&gt;
ReportingComponents - 1.0.3058.27781&lt;br&gt;
ReportingContracts - 1.0.3058.27780&lt;br&gt;
SearchComponents - 1.0.3058.27779&lt;br&gt;
SearchContracts - 1.0.3058.27779&lt;br&gt;
System - 2.0.0.0&lt;br&gt;
System.Configuration - 2.0.0.0&lt;br&gt;
System.Core - 3.5.0.0&lt;br&gt;
System.Data - 2.0.0.0&lt;br&gt;
System.Data.DataSetExtensions - 3.5.0.0&lt;br&gt;
System.Data.Linq - 3.5.0.0&lt;br&gt;
System.Drawing - 2.0.0.0&lt;br&gt;
System.Web - 2.0.0.0&lt;br&gt;
System.Web.Extensions - 3.5.0.0&lt;br&gt;
System.Web.Services - 2.0.0.0&lt;br&gt;
System.Xml - 2.0.0.0&lt;br&gt;
TaskListComponent - 1.0.3056.28564&lt;br&gt;
TaskListContract - 1.0.3056.28560&lt;br&gt;
TypesComponents - 1.0.3057.30147&lt;br&gt;
TypesContracts - 1.0.3057.30147&lt;br&gt;
UserManagementContracts - 1.0.0.0&lt;br&gt;
Validators - 1.0.0.0&lt;br&gt;
wwDataBinder - 1.0.2908.21817&lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=442e27de-28f9-4f44-a6c5-14fdd432e09d" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,442e27de-28f9-4f44-a6c5-14fdd432e09d.aspx</comments>
      <category>ASP.Net;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=05873727-e0af-4e9e-9702-8f12d3300e59</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,05873727-e0af-4e9e-9702-8f12d3300e59.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,05873727-e0af-4e9e-9702-8f12d3300e59.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=05873727-e0af-4e9e-9702-8f12d3300e59</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Ich wollte aus Excel auf einen Webservice zugreifen. Also kurz gegoogelt (oder gelived
;-)), eigentlich gar nicht so schwer...
</p>
        <p>
Aber wie so oft liegt der Teufel im Detail und es waren doch ein paar Kleinigkeiten
zu beachten, deshalb hier nochmals der komplette Lösungsweg:
</p>
        <p>
Zunächst habe ich einen WebService erstellt, zum Testen was ganz triviales, eigentlich
das Webservice Template nur noch um den Parameter Name erweitert:
</p>
        <div>
          <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <span style="color: #0000ff">using</span> System; <span style="color: #0000ff">using</span> System.Web; <span style="color: #0000ff">using</span> System.Web.Services; <span style="color: #0000ff">using</span> System.Web.Services.Protocols;
[WebService(Namespace = <span style="color: #006080">"http://tempuri.org/"</span>)]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] <span style="color: #0000ff">public</span><span style="color: #0000ff">class</span> Service
: System.Web.Services.WebService { <span style="color: #0000ff">public</span> Service
() { } [WebMethod] <span style="color: #0000ff">public</span><span style="color: #0000ff">string</span> HelloWorld(<span style="color: #0000ff">string</span> Name)
{ <span style="color: #0000ff">return</span><span style="color: #006080">"Hello World
"</span> + Name; } }</pre>
        </div>
        <p>
 
</p>
        <p>
Die URL um auf den Webservice mit ausgefülltem Parameter zuzugreifen lautet <a href="http://localhost:49408/WebSite2/Service.asmx/HelloWorld?Name=Test">http://localhost:49408/WebSite2/Service.asmx/HelloWorld?Name=Test</a>,
jedoch funktioniert das standardmäßig noch nicht. Wir müssen erst noch in der web.config
folgenden Eintrag hinzufügen:
</p>
        <div>
          <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <span style="color: #0000ff">&lt;</span>
            <span style="color: #800000">webServices</span>
            <span style="color: #0000ff">&gt;</span>
            <span style="color: #0000ff">&lt;</span>
            <span style="color: #800000">protocols</span>
            <span style="color: #0000ff">&gt;</span>
            <span style="color: #0000ff">&lt;</span>
            <span style="color: #800000">add</span>
            <span style="color: #ff0000">name</span>
            <span style="color: #0000ff">="HttpGet"</span>
            <span style="color: #0000ff">/&gt;</span>
            <span style="color: #0000ff">&lt;</span>
            <span style="color: #800000">add</span>
            <span style="color: #ff0000">name</span>
            <span style="color: #0000ff">="HttpPost"</span>
            <span style="color: #0000ff">/&gt;</span>
            <span style="color: #0000ff">&lt;/</span>
            <span style="color: #800000">protocols</span>
            <span style="color: #0000ff">&gt;</span>
            <span style="color: #0000ff">&lt;/</span>
            <span style="color: #800000">webServices</span>
            <span style="color: #0000ff">&gt;</span>
          </pre>
        </div>
        <p>
Nun bekommen wir mit diesem Aufruf den XML-Response des Webservices direkt zurückgegeben.
Nun wollen wir den Webservice aus VBA aufrufen. 
</p>
        <div>
          <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <span style="color: #0000ff">Sub</span> CallWebService() <span style="color: #0000ff">Dim</span> MSXML <span style="color: #0000ff">As</span><span style="color: #0000ff">New</span> MSXML2.DOMDocument <span style="color: #0000ff">Dim</span> strAnfrage <span style="color: #0000ff">As</span><span style="color: #0000ff">String</span> strAnfrage
= <span style="color: #006080">"http://localhost:49408/WebSite2/Service.asmx/HelloWorld?Name=Test"</span><span style="color: #0000ff">With</span> MSXML
.async = <span style="color: #0000ff">False</span> .preserveWhiteSpace = <span style="color: #0000ff">False</span> .validateOnParse
= <span style="color: #0000ff">True</span> .resolveExternals = <span style="color: #0000ff">False</span><span style="color: #0000ff">End</span><span style="color: #0000ff">With</span><span style="color: #0000ff">If</span> MSXML.Load(strAnfrage)
= <span style="color: #0000ff">True</span><span style="color: #0000ff">Then</span> Response
= MSXML.DocumentElement.Text <span style="color: #0000ff">Else</span> Response = <span style="color: #006080">"Fehler"</span><span style="color: #0000ff">End</span><span style="color: #0000ff">If</span><span style="color: #0000ff">End</span> Sub</pre>
        </div>
        <div> 
</div>
        <div>Damit das funktioniert müssen wir noch die Bibliothek "Microsoft XML, vx.0" einfügen.
Wir werten im Moment das XML-Dokument sehr einfach aus, da wir davon ausgehen, dass
der Rückgabewert einfach als Textim XML-Dokument zurückgegeben wird. Damit können
wir einfach mit MSXML.DocumentElement.Text den gewünschten Wert auslesen. Natürlich
können auf diese Weise auch komplexer Rückgabewerte ausgewertet werden, aber das wollen
wir hier nicht näher beleuchten.
</div>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=05873727-e0af-4e9e-9702-8f12d3300e59" />
      </body>
      <title>Per VBA auf Webservices zugreifen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,05873727-e0af-4e9e-9702-8f12d3300e59.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,05873727-e0af-4e9e-9702-8f12d3300e59.aspx</link>
      <pubDate>Sun, 11 May 2008 19:54:13 GMT</pubDate>
      <description>&lt;p&gt;
Ich wollte aus Excel auf einen Webservice zugreifen. Also kurz gegoogelt (oder gelived
;-)), eigentlich gar nicht so schwer...
&lt;/p&gt;
&lt;p&gt;
Aber wie so oft liegt der Teufel im Detail und es waren doch ein paar Kleinigkeiten
zu beachten, deshalb hier nochmals der komplette Lösungsweg:
&lt;/p&gt;
&lt;p&gt;
Zunächst habe ich einen WebService erstellt, zum Testen was ganz triviales, eigentlich
das Webservice Template nur noch um den Parameter Name erweitert:
&lt;/p&gt;
&lt;div&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.Services; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.Services.Protocols;
[WebService(Namespace = &lt;span style="color: #006080"&gt;"http://tempuri.org/"&lt;/span&gt;)]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Service
: System.Web.Services.WebService { &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Service
() { } [WebMethod] &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; HelloWorld(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Name)
{ &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #006080"&gt;"Hello World
"&lt;/span&gt; + Name; } }&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Die URL um auf den Webservice mit ausgefülltem Parameter zuzugreifen lautet &lt;a href="http://localhost:49408/WebSite2/Service.asmx/HelloWorld?Name=Test"&gt;http://localhost:49408/WebSite2/Service.asmx/HelloWorld?Name=Test&lt;/a&gt;,
jedoch funktioniert das standardmäßig noch nicht. Wir müssen erst noch in der web.config
folgenden Eintrag hinzufügen:
&lt;/p&gt;
&lt;div&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;webServices&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;protocols&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;add&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="HttpGet"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;add&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="HttpPost"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;protocols&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;webServices&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
Nun bekommen wir mit diesem Aufruf den XML-Response des Webservices direkt zurückgegeben.
Nun wollen wir den Webservice aus VBA aufrufen. 
&lt;/p&gt;
&lt;div&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;Sub&lt;/span&gt; CallWebService() &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; MSXML &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;New&lt;/span&gt; MSXML2.DOMDocument &lt;span style="color: #0000ff"&gt;Dim&lt;/span&gt; strAnfrage &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; &lt;span style="color: #0000ff"&gt;String&lt;/span&gt; strAnfrage
= &lt;span style="color: #006080"&gt;"http://localhost:49408/WebSite2/Service.asmx/HelloWorld?Name=Test"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;With&lt;/span&gt; MSXML
.async = &lt;span style="color: #0000ff"&gt;False&lt;/span&gt; .preserveWhiteSpace = &lt;span style="color: #0000ff"&gt;False&lt;/span&gt; .validateOnParse
= &lt;span style="color: #0000ff"&gt;True&lt;/span&gt; .resolveExternals = &lt;span style="color: #0000ff"&gt;False&lt;/span&gt; &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;With&lt;/span&gt; &lt;span style="color: #0000ff"&gt;If&lt;/span&gt; MSXML.Load(strAnfrage)
= &lt;span style="color: #0000ff"&gt;True&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Then&lt;/span&gt; Response
= MSXML.DocumentElement.Text &lt;span style="color: #0000ff"&gt;Else&lt;/span&gt; Response = &lt;span style="color: #006080"&gt;"Fehler"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; &lt;span style="color: #0000ff"&gt;If&lt;/span&gt; &lt;span style="color: #0000ff"&gt;End&lt;/span&gt; Sub&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;Damit das funktioniert müssen wir noch die Bibliothek "Microsoft XML, vx.0" einfügen.
Wir werten im Moment das XML-Dokument sehr einfach aus, da wir davon ausgehen, dass
der Rückgabewert einfach als Textim XML-Dokument zurückgegeben wird. Damit können
wir einfach mit MSXML.DocumentElement.Text den gewünschten Wert auslesen. Natürlich
können auf diese Weise auch komplexer Rückgabewerte ausgewertet werden, aber das wollen
wir hier nicht näher beleuchten.
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=05873727-e0af-4e9e-9702-8f12d3300e59" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,05873727-e0af-4e9e-9702-8f12d3300e59.aspx</comments>
      <category>Excel;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=108b2c8d-3b7a-4030-b404-32d5107dac4c</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,108b2c8d-3b7a-4030-b404-32d5107dac4c.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,108b2c8d-3b7a-4030-b404-32d5107dac4c.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=108b2c8d-3b7a-4030-b404-32d5107dac4c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Verwendet man ein DataSet mit DateTime-Werten in unterschiedlichen Zeitzonen, wird
man zu seiner Überraschung feststellen, dass das DataSet eine Umrechnung der Zeiten
vornimmt. Bei uns war das Problem konkret, dass ein DataSet per WCF zu einem Service
übertragen wurde. Der Service war aber in einer anderen Zeitzone als der Client. In
einem DateTime-Feld wurde ein Datumswert abgelegt, also z.B. 08.05.2008. Die automtische
Umrechnung hat davon jedoch eine Stunde abgezogen, so dass am Service 07.05.2008 23:00
ankam. Damit war das Datum immer um einen Tag verschoben.
</p>
        <p>
Das Problem kann aber behoben werden, indem man auf dem Client und auf dem Service
den DateTime-Wert vor bzw. nach der Serialisierung konvertiert.
</p>
        <p>
Auf dem Client sieht das dann z.B. so aus:
</p>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 1:</span>
              <span style="color: #0000ff">foreach</span> (DataSet1.DataTable1Row
dr <span style="color: #0000ff">in</span> ds.DataTable1.Rows)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 3:</span> dr.Date
= dr.Date.ToLocalTime();</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span> }</pre>
          </div>
        </div>
        <p>
Und dann auf dem Service das Gegenstück:
</p>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 1:</span>
              <span style="color: #0000ff">foreach</span> (DataSet1.DataTable1Row
dr <span style="color: #0000ff">in</span> ds.DataTable1.Rows)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #606060"> 3:</span> dr.Date
= dr.Date.ToUniversalTime();</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span> }</pre>
          </div>
        </div>
        <p>
Damit kommt genau der Wert, der im Client eingetragen wurde auch im Service an. Zwar
gibt es wohl auch eine Möglichkeit, die Datumskonvertierung zu unterdrücken, aber
das hat bei mir nicht sauber funktioniert. Wenn also jemand eine elegantere Lösung
kenn, nur her damit ;-)
</p>
        <p>
          <strong>Update:</strong>
        </p>
        <p>
Wir habe doch noch eine elegantere Lösung gefunden. Auf dem DataSet kann man auf der
DateTime Column das Property DateTimeMode auf Unspecified umstellen. Dann wird die
Zeitzonen-Konvertierung nicht durchgeführt. Danke an Luke für den Tipp.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ZeitzoneninDataSets_76BC/image_2.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="511" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ZeitzoneninDataSets_76BC/image_thumb.png" width="247" border="0" />
          </a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=108b2c8d-3b7a-4030-b404-32d5107dac4c" />
      </body>
      <title>Zeitzonen in DataSets</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,108b2c8d-3b7a-4030-b404-32d5107dac4c.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,108b2c8d-3b7a-4030-b404-32d5107dac4c.aspx</link>
      <pubDate>Thu, 08 May 2008 06:36:13 GMT</pubDate>
      <description>&lt;p&gt;
Verwendet man ein DataSet mit DateTime-Werten in unterschiedlichen Zeitzonen, wird
man zu seiner Überraschung feststellen, dass das DataSet eine Umrechnung der Zeiten
vornimmt. Bei uns war das Problem konkret, dass ein DataSet per WCF zu einem Service
übertragen wurde. Der Service war aber in einer anderen Zeitzone als der Client. In
einem DateTime-Feld wurde ein Datumswert abgelegt, also z.B. 08.05.2008. Die automtische
Umrechnung hat davon jedoch eine Stunde abgezogen, so dass am Service 07.05.2008 23:00
ankam. Damit war das Datum immer um einen Tag verschoben.
&lt;/p&gt;
&lt;p&gt;
Das Problem kann aber behoben werden, indem man auf dem Client und auf dem Service
den DateTime-Wert vor bzw. nach der Serialisierung konvertiert.
&lt;/p&gt;
&lt;p&gt;
Auf dem Client sieht das dann z.B. so aus:
&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (DataSet1.DataTable1Row
dr &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; ds.DataTable1.Rows)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; dr.Date
= dr.Date.ToLocalTime();&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Und dann auf dem Service das Gegenstück:
&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (DataSet1.DataTable1Row
dr &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; ds.DataTable1.Rows)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; dr.Date
= dr.Date.ToUniversalTime();&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Damit kommt genau der Wert, der im Client eingetragen wurde auch im Service an. Zwar
gibt es wohl auch eine Möglichkeit, die Datumskonvertierung zu unterdrücken, aber
das hat bei mir nicht sauber funktioniert. Wenn also jemand eine elegantere Lösung
kenn, nur her damit ;-)
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Update:&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Wir habe doch noch eine elegantere Lösung gefunden. Auf dem DataSet kann man auf der
DateTime Column das Property DateTimeMode auf Unspecified umstellen. Dann wird die
Zeitzonen-Konvertierung nicht durchgeführt. Danke an Luke für den Tipp.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ZeitzoneninDataSets_76BC/image_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="511" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ZeitzoneninDataSets_76BC/image_thumb.png" width="247" border="0"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=108b2c8d-3b7a-4030-b404-32d5107dac4c" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,108b2c8d-3b7a-4030-b404-32d5107dac4c.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=ac50af5a-73d1-4363-b253-c1d8d2aab6d7</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,ac50af5a-73d1-4363-b253-c1d8d2aab6d7.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,ac50af5a-73d1-4363-b253-c1d8d2aab6d7.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=ac50af5a-73d1-4363-b253-c1d8d2aab6d7</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Oft hat man einen bestimmten Ordner, auf den man of zugreifen muss. Hier ist mir nun
ein Feature von Vista aufgefallen (gab es wohl auch schon in früheren Windows-Versionen,
aber da habe ich das gar nicht bemerkt). Man kann Toolbars einrichten und diese einfach
oben, rechts oder links am Desktop andocken. Mit der AutoHide-Funktion benötigen die
Toolbars auch keinen unnötigen Platz. Ein nettes Feature, das ich bei meinen Vorträgen
gut gebrauchen kann.
</p>
        <p>
Das Video zeigt, wie's gemacht wird.
</p>
        <object codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" type="application/x-oleobject" height="545" standby="Loading Microsoft Windows Media Player components..." width="640" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" name="Video">
          <param name="URL" value="http://content.screencast.com/?parameters=13468270-6754-4344-9ff3-f146231886ff_12328d41-dda7-4a1d-bd38-17794493e326_static_1048576_video/x-ms-wmv_DockingToolbar_media/DockingToolbar.wmv" />
          <param name="rate" value="1" />
          <param name="balance" value="0" />
          <param name="currentPosition" value="0" />
          <param name="defaultFrame" value="" />
          <param name="playCount" value="1" />
          <param name="autoStart" value="0" />
          <param name="currentMarker" value="0" />
          <param name="invokeURLs" value="-1" />
          <param name="baseURL" value="" />
          <param name="volume" value="50" />
          <param name="mute" value="0" />
          <param name="uiMode" value="full" />
          <param name="stretchToFit" value="0" />
          <param name="windowlessVideo" value="0" />
          <param name="enabled" value="-1" />
          <param name="enableContextMenu" value="-1" />
          <param name="fullScreen" value="0" />
          <param name="SAMIStyle" value="" />
          <param name="SAMILang" value="" />
          <param name="SAMIFilename" value="" />
          <param name="captioningID" value="" />
          <param name="enableErrorDialogs" value="0" />
          <param name="_cx" value="16933" />
          <param name="_cy" value="14420" />
          <embed name="Video" type="application/x-mplayer2" src="http://content.screencast.com/?parameters=13468270-6754-4344-9ff3-f146231886ff_12328d41-dda7-4a1d-bd38-17794493e326_static_1048576_video/x-ms-wmv_DockingToolbar_media/DockingToolbar.wmv" autostart="0" showcontrols="1" uimode="full" playcount="1" currentposition="0" width="640" height="545">
          </embed>
        </object>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=ac50af5a-73d1-4363-b253-c1d8d2aab6d7" />
      </body>
      <title>Toolbars unter Vista am Desktop docken</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,ac50af5a-73d1-4363-b253-c1d8d2aab6d7.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,ac50af5a-73d1-4363-b253-c1d8d2aab6d7.aspx</link>
      <pubDate>Wed, 30 Apr 2008 06:58:27 GMT</pubDate>
      <description>&lt;p&gt;
Oft hat man einen bestimmten Ordner, auf den man of zugreifen muss. Hier ist mir nun
ein Feature von Vista aufgefallen (gab es wohl auch schon in früheren Windows-Versionen,
aber da habe ich das gar nicht bemerkt). Man kann Toolbars einrichten und diese einfach
oben, rechts oder links am Desktop andocken. Mit der AutoHide-Funktion benötigen die
Toolbars auch keinen unnötigen Platz. Ein nettes Feature, das ich bei meinen Vorträgen
gut gebrauchen kann.
&lt;/p&gt;
&lt;p&gt;
Das Video zeigt, wie's gemacht wird.
&lt;/p&gt;
&lt;object codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" type="application/x-oleobject" height="545" standby="Loading Microsoft Windows Media Player components..." width="640" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" name="Video"&gt;
&lt;param name="URL" value="http://content.screencast.com/?parameters=13468270-6754-4344-9ff3-f146231886ff_12328d41-dda7-4a1d-bd38-17794493e326_static_1048576_video/x-ms-wmv_DockingToolbar_media/DockingToolbar.wmv"&gt;
&lt;param name="rate" value="1"&gt;
&lt;param name="balance" value="0"&gt;
&lt;param name="currentPosition" value="0"&gt;
&lt;param name="defaultFrame" value=""&gt;
&lt;param name="playCount" value="1"&gt;
&lt;param name="autoStart" value="0"&gt;
&lt;param name="currentMarker" value="0"&gt;
&lt;param name="invokeURLs" value="-1"&gt;
&lt;param name="baseURL" value=""&gt;
&lt;param name="volume" value="50"&gt;
&lt;param name="mute" value="0"&gt;
&lt;param name="uiMode" value="full"&gt;
&lt;param name="stretchToFit" value="0"&gt;
&lt;param name="windowlessVideo" value="0"&gt;
&lt;param name="enabled" value="-1"&gt;
&lt;param name="enableContextMenu" value="-1"&gt;
&lt;param name="fullScreen" value="0"&gt;
&lt;param name="SAMIStyle" value=""&gt;
&lt;param name="SAMILang" value=""&gt;
&lt;param name="SAMIFilename" value=""&gt;
&lt;param name="captioningID" value=""&gt;
&lt;param name="enableErrorDialogs" value="0"&gt;
&lt;param name="_cx" value="16933"&gt;
&lt;param name="_cy" value="14420"&gt;
&lt;embed name="Video" type="application/x-mplayer2" src="http://content.screencast.com/?parameters=13468270-6754-4344-9ff3-f146231886ff_12328d41-dda7-4a1d-bd38-17794493e326_static_1048576_video/x-ms-wmv_DockingToolbar_media/DockingToolbar.wmv" autostart="0" showcontrols="1" uimode="full" playcount="1" currentposition="0" width="640" height="545"&gt;&lt;/embed&gt; 
&lt;/object&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=ac50af5a-73d1-4363-b253-c1d8d2aab6d7" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,ac50af5a-73d1-4363-b253-c1d8d2aab6d7.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=3f35b34a-ab39-4d93-8425-ddd69f34df98</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,3f35b34a-ab39-4d93-8425-ddd69f34df98.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,3f35b34a-ab39-4d93-8425-ddd69f34df98.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=3f35b34a-ab39-4d93-8425-ddd69f34df98</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Gerade hatte ich eine vermeintlich Fragestellung. ich wollte einfach nur wissen, wieviel
Platz auf einem Laufwerk im Netzwerk noch frei ist. Das hat sich aber als problematischer
herausgestellt als gedacht, da ich nur eine Freigabe auf dem Laufwerk hatte. Das ist
wohl gar nicht so einfach, damit herauszufinden, wieviel Platz auf der entsprechenden
Platte noch frei ist. Erst über die gute alte Command-Shell und den dir-Befehl hat
das geklappt. Damit wird der freie Plattenplatz problemlos angezeigt. 
</p>
        <p>
Na ja, es scheint manchmal wirklich so, dass früher einiges besser war ;-)
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/FreierPlattenplatzberFreigabeabfragen_8715/image_4.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="295" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/FreierPlattenplatzberFreigabeabfragen_8715/image_thumb_1.png" width="581" border="0" />
          </a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=3f35b34a-ab39-4d93-8425-ddd69f34df98" />
      </body>
      <title>Freier Plattenplatz &amp;uuml;ber Freigabe abfragen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,3f35b34a-ab39-4d93-8425-ddd69f34df98.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,3f35b34a-ab39-4d93-8425-ddd69f34df98.aspx</link>
      <pubDate>Mon, 21 Apr 2008 07:45:50 GMT</pubDate>
      <description>&lt;p&gt;
Gerade hatte ich eine vermeintlich Fragestellung. ich wollte einfach nur wissen, wieviel
Platz auf einem Laufwerk im Netzwerk noch frei ist. Das hat sich aber als problematischer
herausgestellt als gedacht, da ich nur eine Freigabe auf dem Laufwerk hatte. Das ist
wohl gar nicht so einfach, damit herauszufinden, wieviel Platz auf der entsprechenden
Platte noch frei ist. Erst über die gute alte Command-Shell und den dir-Befehl hat
das geklappt. Damit wird der freie Plattenplatz problemlos angezeigt. 
&lt;/p&gt;
&lt;p&gt;
Na ja, es scheint manchmal wirklich so, dass früher einiges besser war ;-)
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/FreierPlattenplatzberFreigabeabfragen_8715/image_4.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="295" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/FreierPlattenplatzberFreigabeabfragen_8715/image_thumb_1.png" width="581" border="0"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=3f35b34a-ab39-4d93-8425-ddd69f34df98" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,3f35b34a-ab39-4d93-8425-ddd69f34df98.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=19c7d7c6-c1e3-4636-ab91-11ddb63ed5fe</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,19c7d7c6-c1e3-4636-ab91-11ddb63ed5fe.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,19c7d7c6-c1e3-4636-ab91-11ddb63ed5fe.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=19c7d7c6-c1e3-4636-ab91-11ddb63ed5fe</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Möchte man aus Anwendungen wie z.B. Word auf Dokumente auf einem SharePoint Portal
zugreifen. kann man dies sowohl über einen UNC-Pfad (\\ServerName\sites\SiteName)
oder über eine URL (<a href="http://ServerName/sites/SiteName">http://ServerName/sites/SiteName</a>)
zugrifen. Nöch schöner wäre allerdings, wenn man eine direkte Verknüpfung hätte, die
auch im Browse-Fenster der Anwendungen genutzt werden kann. Wie man eine solche Verknüpfung
einrichtet, zeige ich im folgenden Video:
</p>
        <p>
          <object codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" type="application/x-oleobject" height="545" standby="Loading Microsoft Windows Media Player components..." width="640" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" name="Video">
            <param name="URL" value="http://content.screencast.com/media/3d588af4-c393-4f52-ad55-b73a2a947efe_12328d41-dda7-4a1d-bd38-17794493e326_static_0_0_Untitled.wmv" />
            <param name="rate" value="1" />
            <param name="balance" value="0" />
            <param name="currentPosition" value="0" />
            <param name="defaultFrame" value="" />
            <param name="playCount" value="1" />
            <param name="autoStart" value="0" />
            <param name="currentMarker" value="0" />
            <param name="invokeURLs" value="-1" />
            <param name="baseURL" value="" />
            <param name="volume" value="50" />
            <param name="mute" value="0" />
            <param name="uiMode" value="full" />
            <param name="stretchToFit" value="0" />
            <param name="windowlessVideo" value="0" />
            <param name="enabled" value="-1" />
            <param name="enableContextMenu" value="-1" />
            <param name="fullScreen" value="0" />
            <param name="SAMIStyle" value="" />
            <param name="SAMILang" value="" />
            <param name="SAMIFilename" value="" />
            <param name="captioningID" value="" />
            <param name="enableErrorDialogs" value="0" />
            <param name="_cx" value="16933" />
            <param name="_cy" value="14420" />
            <embed name="Video" type="application/x-mplayer2" src="http://content.screencast.com/media/3d588af4-c393-4f52-ad55-b73a2a947efe_12328d41-dda7-4a1d-bd38-17794493e326_static_0_0_Untitled.wmv" autostart="0" showcontrols="1" uimode="full" playcount="1" currentposition="0" width="640" height="545">
            </embed>
          </object>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=19c7d7c6-c1e3-4636-ab91-11ddb63ed5fe" />
      </body>
      <title>Verkn&amp;uuml;pfung zum Sharepoint einrichten</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,19c7d7c6-c1e3-4636-ab91-11ddb63ed5fe.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,19c7d7c6-c1e3-4636-ab91-11ddb63ed5fe.aspx</link>
      <pubDate>Thu, 17 Apr 2008 20:48:02 GMT</pubDate>
      <description>&lt;p&gt;
Möchte man aus Anwendungen wie z.B. Word auf Dokumente auf einem SharePoint Portal
zugreifen. kann man dies sowohl über einen UNC-Pfad (\\ServerName\sites\SiteName)
oder über eine URL (&lt;a href="http://ServerName/sites/SiteName"&gt;http://ServerName/sites/SiteName&lt;/a&gt;)
zugrifen. Nöch schöner wäre allerdings, wenn man eine direkte Verknüpfung hätte, die
auch im Browse-Fenster der Anwendungen genutzt werden kann. Wie man eine solche Verknüpfung
einrichtet, zeige ich im folgenden Video:
&lt;/p&gt;
&lt;p&gt;
&lt;object codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" type="application/x-oleobject" height="545" standby="Loading Microsoft Windows Media Player components..." width="640" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" name="Video"&gt;
&lt;param name="URL" value="http://content.screencast.com/media/3d588af4-c393-4f52-ad55-b73a2a947efe_12328d41-dda7-4a1d-bd38-17794493e326_static_0_0_Untitled.wmv"&gt;
&lt;param name="rate" value="1"&gt;
&lt;param name="balance" value="0"&gt;
&lt;param name="currentPosition" value="0"&gt;
&lt;param name="defaultFrame" value=""&gt;
&lt;param name="playCount" value="1"&gt;
&lt;param name="autoStart" value="0"&gt;
&lt;param name="currentMarker" value="0"&gt;
&lt;param name="invokeURLs" value="-1"&gt;
&lt;param name="baseURL" value=""&gt;
&lt;param name="volume" value="50"&gt;
&lt;param name="mute" value="0"&gt;
&lt;param name="uiMode" value="full"&gt;
&lt;param name="stretchToFit" value="0"&gt;
&lt;param name="windowlessVideo" value="0"&gt;
&lt;param name="enabled" value="-1"&gt;
&lt;param name="enableContextMenu" value="-1"&gt;
&lt;param name="fullScreen" value="0"&gt;
&lt;param name="SAMIStyle" value=""&gt;
&lt;param name="SAMILang" value=""&gt;
&lt;param name="SAMIFilename" value=""&gt;
&lt;param name="captioningID" value=""&gt;
&lt;param name="enableErrorDialogs" value="0"&gt;
&lt;param name="_cx" value="16933"&gt;
&lt;param name="_cy" value="14420"&gt;
&lt;embed name="Video" type="application/x-mplayer2" src="http://content.screencast.com/media/3d588af4-c393-4f52-ad55-b73a2a947efe_12328d41-dda7-4a1d-bd38-17794493e326_static_0_0_Untitled.wmv" autostart="0" showcontrols="1" uimode="full" playcount="1" currentposition="0" width="640" height="545"&gt;&lt;/embed&gt; 
&lt;/object&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=19c7d7c6-c1e3-4636-ab91-11ddb63ed5fe" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,19c7d7c6-c1e3-4636-ab91-11ddb63ed5fe.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=3dbc8064-f5dd-4e49-b962-99d095ea3403</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,3dbc8064-f5dd-4e49-b962-99d095ea3403.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,3dbc8064-f5dd-4e49-b962-99d095ea3403.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=3dbc8064-f5dd-4e49-b962-99d095ea3403</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Jens Häupel beschreibt in einem Blog-Eintrag, wie man per ClickOnce Setup DateiTypen
mit seiner Anwendung verknüpfen kann. Klasse, dass das nun endlich funktioniert. Danke
für den Artikel Jens. 
</p>
        <p>
          <a href="http://blogs.msdn.com/jensha/archive/2008/04/10/file-extension-per-clickonce-mit-anwendung-assoziieren.aspx">File
Extension per ClickOnce mit Anwendung assoziieren</a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=3dbc8064-f5dd-4e49-b962-99d095ea3403" />
      </body>
      <title>File Extension per ClickOnce mit Anwendung assoziieren</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,3dbc8064-f5dd-4e49-b962-99d095ea3403.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,3dbc8064-f5dd-4e49-b962-99d095ea3403.aspx</link>
      <pubDate>Sun, 13 Apr 2008 22:16:09 GMT</pubDate>
      <description>&lt;p&gt;
Jens Häupel beschreibt in einem Blog-Eintrag, wie man per ClickOnce Setup DateiTypen
mit seiner Anwendung verknüpfen kann. Klasse, dass das nun endlich funktioniert. Danke
für den Artikel Jens. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.msdn.com/jensha/archive/2008/04/10/file-extension-per-clickonce-mit-anwendung-assoziieren.aspx"&gt;File
Extension per ClickOnce mit Anwendung assoziieren&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=3dbc8064-f5dd-4e49-b962-99d095ea3403" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,3dbc8064-f5dd-4e49-b962-99d095ea3403.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=8351a1a4-48fa-4be6-b549-3f09db9eaafc</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,8351a1a4-48fa-4be6-b549-3f09db9eaafc.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,8351a1a4-48fa-4be6-b549-3f09db9eaafc.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=8351a1a4-48fa-4be6-b549-3f09db9eaafc</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Über das PropertyGrid-Control habe ich ja mehrmals gebloggt (z.B. <a href="http://www.artiso.com/ProBlog/PermaLink,guid,3603f922-4a46-470a-a6f2-d3e4acf16d50.aspx" target="_blank">hier</a>).
Dieses Control verwendie ich recht häufig um z.B. den Inhalt eigene Konfigurations-Klassen
zu editieren. Zusammen mit der XML-Serialisierung lassen sich so sehr flexible Konfigurationsmöglichkeiten
schaffen.
</p>
        <p>
Nun hatte ich die Anforderung eine dynamische Datenstruktur an ein PropertyGrid zu
binden. Da stand ich zunächst vor einem Problem. Bisher habe ich nur Objekte mit Properties
unterschiedlicher Typen an das PropertyGrid gebunden. Nun habe ich eine Liste von
Objekten, die die Elemente im PropertyGrid beschreiben. Wie aber diese an das PropertyGrid
binden?
</p>
        <p>
Das schöne ist, das das PropertyGrid sich hier als sehr flexibel erweist. Man muss
folgende Schritte durchführen:
</p>
        <ol>
          <li>
Man brauch eine Klasse für ein einzelnes Property<br /></li>
          <li>
Dann brauchen wir eine Collection für diese Properties. Diese leiten wir von CollectionBase
und ICustomTypeDescriptor ab und implementieren die Interfaces. Entscheidend ist hier
die Methode GetProperties. Hier werden nun ine PropertyDescriptionCollection aus unseren
Properties aufgebaut. Diese Methode ruft das PropertyGrid auf um sich dieProperties
zu besorgen, die es rendern soll. Hier können wir nun also von einer belibigen Datenstruktur
die benötigten 
<br />
Informationen für das PropertyGrid aufbauen.<br /></li>
          <li>
Dafür brauch wir jetzt noch einen cCustomPropertyDescriptor. Diesen leiten wir von
PropertyDescriptor ab und implementieren es.<br /></li>
          <li>
Nun können wir unsere Properties aufbauen und an das PropertyGrid binden. Ich habe
das CustomPropertyGrid als eigenes Control angelegt. Der Code ist nun sehr simpel:</li>
        </ol>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 1:</span>
              <span style="color: #0000ff">private</span>
              <span style="color: #0000ff">void</span> Form1_Load(<span style="color: #0000ff">object</span> sender,
EventArgs e)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 3:</span> cPropertyCollection
props = <span style="color: #0000ff">new</span> cPropertyCollection();</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span> props.Add(<span style="color: #0000ff">new</span> cPropertyItem(<span style="color: #006080">"BoolValue"</span>, <span style="color: #006080">"This
is a boolean value"</span>, <span style="color: #0000ff">false</span>, <span style="color: #0000ff">true</span>, <span style="color: #006080">"Properties"</span>));</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 5:</span> props.Add(<span style="color: #0000ff">new</span> cPropertyItem(<span style="color: #006080">"StringValue"</span>, <span style="color: #006080">"This
is a string value"</span>, <span style="color: #0000ff">false</span>, <span style="color: #006080">"Test123"</span>, <span style="color: #006080">"Properties"</span>));</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 6:</span> props.Add(<span style="color: #0000ff">new</span> cPropertyItem(<span style="color: #006080">"Folder"</span>, <span style="color: #006080">"Path
for folder"</span>, <span style="color: #0000ff">false</span>, <span style="color: #006080">""</span>, <span style="color: #006080">"Path"</span>));</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 7:</span>  </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 8:</span>
              <span style="color: #0000ff">this</span>.artisoPropertyGrid1.SelectedObject
= props;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 9:</span> }</pre>
          </div>
        </div>
        <p>
          <br />
Damit erhält man folgendes Ergebnis. Man sieht die dynamisch angelegten Properties
mit ihrem Name, in die Kategorien untergliedert und mit der Beschreibung. Das PropertyGrid
wählt automatisch die gewohnten Controls abhängig vom Datentyp aus.<br /><br /><a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PropertyGridmitdynamischenDatenobjektenv_14077/image_2.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="267" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PropertyGridmitdynamischenDatenobjektenv_14077/image_thumb.png" width="494" border="0" /></a></p>
        <p>
Dis ist schon ganz nett. Ich möchte aber für das Folder-Property einen entsprechenden
Editor angeben können. Bei statischen Klassen vrwendet man einfach Attribute, aber
bei dynamischen? Dazu wird die verfügbare Dokumentation sehr, sehr dünn. Hierzu haben
wir auf der Property-Klasse eine Attribute-Arary. Diese Attribute können wir nun in
der GetProperties-Klasse an den cCostomPropertyDescriptor übergeben. Der Aufbau der
Properties sieht dann so aus:
</p>
        <div>
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 1:</span>
              <span style="color: #0000ff">private</span>
              <span style="color: #0000ff">void</span> Form1_Load(<span style="color: #0000ff">object</span> sender,
EventArgs e)</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 2:</span> {</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 3:</span> cPropertyCollection
props = <span style="color: #0000ff">new</span> cPropertyCollection();</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 4:</span> props.Add(<span style="color: #0000ff">new</span> cPropertyItem(<span style="color: #006080">"BoolValue"</span>, <span style="color: #006080">"This
is a boolean value"</span>, <span style="color: #0000ff">false</span>, <span style="color: #0000ff">true</span>, <span style="color: #006080">"Properties"</span>));</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 5:</span> props.Add(<span style="color: #0000ff">new</span> cPropertyItem(<span style="color: #006080">"StringValue"</span>, <span style="color: #006080">"This
is a string value"</span>, <span style="color: #0000ff">false</span>, <span style="color: #006080">"Test123"</span>, <span style="color: #006080">"Properties"</span>));</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 6:</span> props.Add(<span style="color: #0000ff">new</span> cPropertyItem(<span style="color: #006080">"Folder"</span>, <span style="color: #006080">"Path
for folder"</span>, <span style="color: #0000ff">false</span>, <span style="color: #006080">""</span>, <span style="color: #006080">"Path"</span>,</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 7:</span>
              <span style="color: #0000ff">new</span> TypeConverterAttribute(),</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 8:</span>
              <span style="color: #0000ff">new</span> EditorAttribute(<span style="color: #0000ff">typeof</span>(System.Windows.Forms.Design.FolderNameEditor), <span style="color: #0000ff">typeof</span>(System.Drawing.Design.UITypeEditor))));</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 9:</span>  </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 10:</span>
              <span style="color: #0000ff">this</span>.artisoPropertyGrid1.SelectedObject
= props;</pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #606060"> 11:</span> }</pre>
          </div>
        </div>
        <p>
 
</p>
        <p>
Nun kann man im Feld für den Wert für das Property "Folder" auf einen Button klicken
und erhält einen Dialog zur Auswahl eines Verzeichnisses.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PropertyGridmitdynamischenDatenobjektenv_14077/image_4.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="524" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PropertyGridmitdynamischenDatenobjektenv_14077/image_thumb_1.png" width="498" border="0" />
          </a>
        </p>
        <div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:5828e483-7af9-4557-a1cd-91be4bf5d8e8" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <p>
            <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PropertyGridmitdynamischenDatenobjektenv_14077/CustomPropertyGrid.zip" target="_blank">Den
kompletten Quellcode kann man hier herunterladen.</a>
          </p>
        </div>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=8351a1a4-48fa-4be6-b549-3f09db9eaafc" />
      </body>
      <title>PropertyGrid mit dynamischen Datenobjekten verbinden</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,8351a1a4-48fa-4be6-b549-3f09db9eaafc.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,8351a1a4-48fa-4be6-b549-3f09db9eaafc.aspx</link>
      <pubDate>Fri, 04 Apr 2008 22:17:09 GMT</pubDate>
      <description>&lt;p&gt;
Über das PropertyGrid-Control habe ich ja mehrmals gebloggt (z.B. &lt;a href="http://www.artiso.com/ProBlog/PermaLink,guid,3603f922-4a46-470a-a6f2-d3e4acf16d50.aspx" target="_blank"&gt;hier&lt;/a&gt;).
Dieses Control verwendie ich recht häufig um z.B. den Inhalt eigene Konfigurations-Klassen
zu editieren. Zusammen mit der XML-Serialisierung lassen sich so sehr flexible Konfigurationsmöglichkeiten
schaffen.
&lt;/p&gt;
&lt;p&gt;
Nun hatte ich die Anforderung eine dynamische Datenstruktur an ein PropertyGrid zu
binden. Da stand ich zunächst vor einem Problem. Bisher habe ich nur Objekte mit Properties
unterschiedlicher Typen an das PropertyGrid gebunden. Nun habe ich eine Liste von
Objekten, die die Elemente im PropertyGrid beschreiben. Wie aber diese an das PropertyGrid
binden?
&lt;/p&gt;
&lt;p&gt;
Das schöne ist, das das PropertyGrid sich hier als sehr flexibel erweist. Man muss
folgende Schritte durchführen:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Man brauch eine Klasse für ein einzelnes Property&lt;br&gt;
&lt;li&gt;
Dann brauchen wir eine Collection für diese Properties. Diese leiten wir von CollectionBase
und ICustomTypeDescriptor ab und implementieren die Interfaces. Entscheidend ist hier
die Methode GetProperties. Hier werden nun ine PropertyDescriptionCollection aus unseren
Properties aufgebaut. Diese Methode ruft das PropertyGrid auf um sich dieProperties
zu besorgen, die es rendern soll. Hier können wir nun also von einer belibigen Datenstruktur
die benötigten 
&lt;br&gt;
Informationen für das PropertyGrid aufbauen.&lt;br&gt;
&lt;li&gt;
Dafür brauch wir jetzt noch einen cCustomPropertyDescriptor. Diesen leiten wir von
PropertyDescriptor ab und implementieren es.&lt;br&gt;
&lt;li&gt;
Nun können wir unsere Properties aufbauen und an das PropertyGrid binden. Ich habe
das CustomPropertyGrid als eigenes Control angelegt. Der Code ist nun sehr simpel:&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Form1_Load(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender,
EventArgs e)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; cPropertyCollection
props = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; cPropertyCollection();&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; props.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; cPropertyItem(&lt;span style="color: #006080"&gt;"BoolValue"&lt;/span&gt;, &lt;span style="color: #006080"&gt;"This
is a boolean value"&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;, &lt;span style="color: #006080"&gt;"Properties"&lt;/span&gt;));&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; props.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; cPropertyItem(&lt;span style="color: #006080"&gt;"StringValue"&lt;/span&gt;, &lt;span style="color: #006080"&gt;"This
is a string value"&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;, &lt;span style="color: #006080"&gt;"Test123"&lt;/span&gt;, &lt;span style="color: #006080"&gt;"Properties"&lt;/span&gt;));&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 6:&lt;/span&gt; props.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; cPropertyItem(&lt;span style="color: #006080"&gt;"Folder"&lt;/span&gt;, &lt;span style="color: #006080"&gt;"Path
for folder"&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;, &lt;span style="color: #006080"&gt;""&lt;/span&gt;, &lt;span style="color: #006080"&gt;"Path"&lt;/span&gt;));&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 7:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.artisoPropertyGrid1.SelectedObject
= props;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 9:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;br&gt;
Damit erhält man folgendes Ergebnis. Man sieht die dynamisch angelegten Properties
mit ihrem Name, in die Kategorien untergliedert und mit der Beschreibung. Das PropertyGrid
wählt automatisch die gewohnten Controls abhängig vom Datentyp aus.&lt;br&gt;
&lt;br&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PropertyGridmitdynamischenDatenobjektenv_14077/image_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="267" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PropertyGridmitdynamischenDatenobjektenv_14077/image_thumb.png" width="494" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Dis ist schon ganz nett. Ich möchte aber für das Folder-Property einen entsprechenden
Editor angeben können. Bei statischen Klassen vrwendet man einfach Attribute, aber
bei dynamischen? Dazu wird die verfügbare Dokumentation sehr, sehr dünn. Hierzu haben
wir auf der Property-Klasse eine Attribute-Arary. Diese Attribute können wir nun in
der GetProperties-Klasse an den cCostomPropertyDescriptor übergeben. Der Aufbau der
Properties sieht dann so aus:
&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Form1_Load(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender,
EventArgs e)&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 3:&lt;/span&gt; cPropertyCollection
props = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; cPropertyCollection();&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 4:&lt;/span&gt; props.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; cPropertyItem(&lt;span style="color: #006080"&gt;"BoolValue"&lt;/span&gt;, &lt;span style="color: #006080"&gt;"This
is a boolean value"&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;, &lt;span style="color: #006080"&gt;"Properties"&lt;/span&gt;));&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 5:&lt;/span&gt; props.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; cPropertyItem(&lt;span style="color: #006080"&gt;"StringValue"&lt;/span&gt;, &lt;span style="color: #006080"&gt;"This
is a string value"&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;, &lt;span style="color: #006080"&gt;"Test123"&lt;/span&gt;, &lt;span style="color: #006080"&gt;"Properties"&lt;/span&gt;));&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 6:&lt;/span&gt; props.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; cPropertyItem(&lt;span style="color: #006080"&gt;"Folder"&lt;/span&gt;, &lt;span style="color: #006080"&gt;"Path
for folder"&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;, &lt;span style="color: #006080"&gt;""&lt;/span&gt;, &lt;span style="color: #006080"&gt;"Path"&lt;/span&gt;,&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; TypeConverterAttribute(),&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; EditorAttribute(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(System.Windows.Forms.Design.FolderNameEditor), &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(System.Drawing.Design.UITypeEditor))));&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 9:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.artisoPropertyGrid1.SelectedObject
= props;&lt;/pre&gt;
&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt; 11:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Nun kann man im Feld für den Wert für das Property "Folder" auf einen Button klicken
und erhält einen Dialog zur Auswahl eines Verzeichnisses.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PropertyGridmitdynamischenDatenobjektenv_14077/image_4.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="524" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PropertyGridmitdynamischenDatenobjektenv_14077/image_thumb_1.png" width="498" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:5828e483-7af9-4557-a1cd-91be4bf5d8e8" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/PropertyGridmitdynamischenDatenobjektenv_14077/CustomPropertyGrid.zip" target="_blank"&gt;Den
kompletten Quellcode kann man hier herunterladen.&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=8351a1a4-48fa-4be6-b549-3f09db9eaafc" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,8351a1a4-48fa-4be6-b549-3f09db9eaafc.aspx</comments>
      <category>Know-How;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=4ff872c4-a15f-4270-a9e1-a1cbd54c29a9</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,4ff872c4-a15f-4270-a9e1-a1cbd54c29a9.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,4ff872c4-a15f-4270-a9e1-a1cbd54c29a9.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=4ff872c4-a15f-4270-a9e1-a1cbd54c29a9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Weitgehend unbemerkt von der breiten Masse der Entwickler bringt das .net Framework
3.0 auch eine Bibliothek zum Erstellen von automatisierten UI-Tests mit. Unter %PROGRAMFILES%\Reference
Assemblies\Microsoft\Framework\v3.0 finden sich folgen sich die benötigten DLLs. Damit
kann man UI-Tests selbst programmieren und auch in Unit-Tests integrieren. Das entspricht
zwar nicht der weit verbreiteten Erwartungshaltung, die eher von einer "Record &amp;
Play" Methode ausgehen, bietet aber verschiedene Vorteile in Bezug auf Wartbarkeit
und Stabilität.
</p>
        <p>
Ich habe hier mal ein kleines Beispiel gebaut, das den Einsatz demonstriert:
</p>
        <p>
        </p>
        <div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:2e5a1c0d-0efb-4d18-9edd-94b3100b7f2f" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <p>
            <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/AutomatisierteUITests_9F5/UITests.zip" target="_blank">Beispielanwendung</a>
          </p>
        </div>
        <p>
Ich werde in Kürze weitere Details bloggen und verschiedene Einsatzgebiete, Erweiterungen
und auch Grenzen aufzeigen. Auch ein Webcast ist zu dem Thema geplant. Bis dahin erst
mal ein paar weiterführende Dokumente. Leider ist da im Moment noch nicht sehr viel
publiziert worden. 
</p>
        <p>
          <a href="http://msdn2.microsoft.com/en-us/magazine/cc163288.aspx">http://msdn2.microsoft.com/en-us/magazine/cc163288.aspx</a>
          <br />
          <a href="http://msdn2.microsoft.com/en-us/accessibility/bb892133.aspx">http://msdn2.microsoft.com/en-us/accessibility/bb892133.aspx</a>
        </p>
        <p>
Das Tool ist auf jeden Fall interessant und da es kostenlos mit dem .net Framework
mitkommt, sollte jeder der sich mit Software-Tests beschäftigt mal einen Blick drauf
werfen.
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=4ff872c4-a15f-4270-a9e1-a1cbd54c29a9" />
      </body>
      <title>Automatisierte UI-Tests</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,4ff872c4-a15f-4270-a9e1-a1cbd54c29a9.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,4ff872c4-a15f-4270-a9e1-a1cbd54c29a9.aspx</link>
      <pubDate>Wed, 19 Mar 2008 23:45:12 GMT</pubDate>
      <description>&lt;p&gt;
Weitgehend unbemerkt von der breiten Masse der Entwickler bringt das .net Framework
3.0 auch eine Bibliothek zum Erstellen von automatisierten UI-Tests mit. Unter %PROGRAMFILES%\Reference
Assemblies\Microsoft\Framework\v3.0 finden sich folgen sich die benötigten DLLs. Damit
kann man UI-Tests selbst programmieren und auch in Unit-Tests integrieren. Das entspricht
zwar nicht der weit verbreiteten Erwartungshaltung, die eher von einer "Record &amp;amp;
Play" Methode ausgehen, bietet aber verschiedene Vorteile in Bezug auf Wartbarkeit
und Stabilität.
&lt;/p&gt;
&lt;p&gt;
Ich habe hier mal ein kleines Beispiel gebaut, das den Einsatz demonstriert:
&lt;/p&gt;
&lt;p&gt;
&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:2e5a1c0d-0efb-4d18-9edd-94b3100b7f2f" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/AutomatisierteUITests_9F5/UITests.zip" target="_blank"&gt;Beispielanwendung&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&gt;
&lt;p&gt;
Ich werde in Kürze weitere Details bloggen und verschiedene Einsatzgebiete, Erweiterungen
und auch Grenzen aufzeigen. Auch ein Webcast ist zu dem Thema geplant. Bis dahin erst
mal ein paar weiterführende Dokumente. Leider ist da im Moment noch nicht sehr viel
publiziert worden. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://msdn2.microsoft.com/en-us/magazine/cc163288.aspx"&gt;http://msdn2.microsoft.com/en-us/magazine/cc163288.aspx&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://msdn2.microsoft.com/en-us/accessibility/bb892133.aspx"&gt;http://msdn2.microsoft.com/en-us/accessibility/bb892133.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Das Tool ist auf jeden Fall interessant und da es kostenlos mit dem .net Framework
mitkommt, sollte jeder der sich mit Software-Tests beschäftigt mal einen Blick drauf
werfen.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=4ff872c4-a15f-4270-a9e1-a1cbd54c29a9" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,4ff872c4-a15f-4270-a9e1-a1cbd54c29a9.aspx</comments>
      <category>.Net 3.0;Qualitätsmanagement;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=bcd53432-101e-4eb8-9060-5fe05240abdd</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,bcd53432-101e-4eb8-9060-5fe05240abdd.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,bcd53432-101e-4eb8-9060-5fe05240abdd.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=bcd53432-101e-4eb8-9060-5fe05240abdd</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Habe gerade einen guten Tipp gefunden. Über eine entsprechende Optionseinstellung
kann man im Management-Studio beim Copy &amp; Paste die Spaltenüberschriften der Results
mit kopieren.
</p>
        <p>
          <a href="http://blog.schelian.de/CommentView,guid,C480B26D-8AB7-42D9-AEDE-19E77E542A1B.aspx#ac7520ed-c6b1-4ec9-84a7-005b85506027">HP's
Blog - Microsoft SQL Server Management Studio - Spaltenüberschriften fehlen beim kopieren
der Abfrageergebnisse</a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=bcd53432-101e-4eb8-9060-5fe05240abdd" />
      </body>
      <title>Microsoft SQL Server Management Studio - Spalten&amp;uuml;berschriften fehlen beim kopieren der Abfrageergebnisse</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,bcd53432-101e-4eb8-9060-5fe05240abdd.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,bcd53432-101e-4eb8-9060-5fe05240abdd.aspx</link>
      <pubDate>Thu, 14 Feb 2008 22:17:21 GMT</pubDate>
      <description>&lt;p&gt;
Habe gerade einen guten Tipp gefunden. Über eine entsprechende Optionseinstellung
kann man im Management-Studio beim Copy &amp;amp; Paste die Spaltenüberschriften der Results
mit kopieren.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.schelian.de/CommentView,guid,C480B26D-8AB7-42D9-AEDE-19E77E542A1B.aspx#ac7520ed-c6b1-4ec9-84a7-005b85506027"&gt;HP's
Blog - Microsoft SQL Server Management Studio - Spaltenüberschriften fehlen beim kopieren
der Abfrageergebnisse&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=bcd53432-101e-4eb8-9060-5fe05240abdd" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,bcd53432-101e-4eb8-9060-5fe05240abdd.aspx</comments>
      <category>SQL;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=65fb82f5-8c3b-4269-86a3-2af33fb0c457</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,65fb82f5-8c3b-4269-86a3-2af33fb0c457.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,65fb82f5-8c3b-4269-86a3-2af33fb0c457.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=65fb82f5-8c3b-4269-86a3-2af33fb0c457</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Ich war am 13.02 und 14.02 auf der VSOne und habe dort insgesamt 4 Sessions gehalten.
Für mich war es eine tolle Veranstaltung, die Resonanz auf meine Vorträge war sehr
positiv und ich konnte viele interessante Diskussionen mit Teilnehmern und Sprecherkollegen
führen. 
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MeineVortrgeaufderVSOne_128BE/P1000618_2.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="P1000618" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MeineVortrgeaufderVSOne_128BE/P1000618_thumb.png" width="220" border="0" />
          </a>
        </p>
        <p>
Hier nun meine Slides und den Code zum Download:
</p>
        <p>
          <strong>Session Requirement Management mit Team Foundation Server<br /></strong>Bei dieser Session habe ich vorgestellt, wie wir bei uns im Hause mit Hilfe
des Team Foundation Servers Requirements verwalten. Hierbei kommt auch der <a href="http://www.artiso.com/Default.aspx?Page=90" target="_blank">artiso
Workitem-Manager</a> zum Einsatz um Workitems hierarchisch zu strukturieren.<br /></p>
        <div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:e0c29361-8026-4eed-a2ae-1fe3094a4822" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <p>
            <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MeineVortrgeaufderVSOne_128BE/RequirementManagement_1.pptx" target="_blank">Slides</a>
          </p>
        </div>
        <p>
          <strong>Spezifikationsdokumente Verwalten</strong>
          <br />
Spezifikationsdokumente werden oft als monolithische Worddokumente verwaltet Daraus
ergeben sich eine Reihe von Problemen, die wir mit unserem Ansatz lösen, die Spezifikation
in kleine Dokumente aufzuteilen und so jede einzelne Funktion zu Spezifizieren. Hierzu
nutzen wir ein Word-AddIn das Bestandteil des <a href="http://www.artiso.com/Default.aspx?Page=90" target="_blank">artiso
Workitem-Managers</a> ist.<br /></p>
        <div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:a5ebb2c8-bc0a-4243-bc85-6f965c107f2b" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <p>
            <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MeineVortrgeaufderVSOne_128BE/Spezifikationsdokumente.pptx" target="_blank">Slides</a>
          </p>
        </div>
        <p>
          <strong>Mit 3 Schichten zum Erfolg</strong>
          <br />
Das war der Titel meiner Architektur-Session. Hier habe ich zunächst den Aufbau und
die Vorteile einer 3-Schicht-Architektur beschrieben. Anschließend erläuterte ich
Komponentenorientierung. An einem kleinen Demo-Projekt zeigte ich die Planung und
den Aufbau eines Projektes vom Architekturdesign bis zur Implementierung und demonstrierte
dabei einige Best Practices aus unseren Projekten. Am Ende beschrieb ich noch die
Auswirkungen für verteilte Systeme. Interessant für mich war, dass der Meister der
Komponentenorientierung <a href="http://www.ralfw.de/default.html" target="_blank">Ralf
Westphal</a> der Session beiwohnte uund den Vortrag mit interessanten Fragen bereicherte.<br /></p>
        <div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:424d0140-6ba1-4f8c-a80b-b44735c1fc8b" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <p>
            <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MeineVortrgeaufderVSOne_128BE/3-Schicht-Architektur.pptx" target="_blank">Slides</a>
          </p>
        </div>
               
<div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:c61e5a72-24e0-4693-b61d-46bc2000ba35" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"><p><a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MeineVortrgeaufderVSOne_128BE/3-Schicht-Architektur.zip" target="_blank">Codesample</a></p></div>
     
<p><strong>XML-Serialisierung zur Persistierung von Objekten</strong><br />
XML-Serialisierung ist eine Technologie, mit der Objekte schnell und einfach in ein
XML-Format überführt und auch wieder zurück konvertiert werden kann. Dies Technik
ist nicht neu und viele Entwickler kennen und nutzen sie. Ich habe in der Session
verschiedene Möglichkeiten aufgezeigt, wie sich XML-Serialisierung nutzen lässt, von
der Persistierung von kompletten Datenobjekten über Konfigurationsdateien bis hin
zur Optimierung der Speicherung von Listenobjekten in der Datenbank. 
</p><div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:d3c9c239-81b7-4725-8069-ee8479c186d7" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"><p><a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MeineVortrgeaufderVSOne_128BE/XML-Serialisierung.pptx" target="_blank">Slides</a></p></div>
               
<div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:1076fe80-7662-46a5-a25e-7e92b87e2fb0" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"><p><a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MeineVortrgeaufderVSOne_128BE/XML-Serialisierung.zip" target="_blank">Codesample</a></p></div><p>
Nächste Woche bin ich dann auf dem Launch Event als ATE. Das wird sicher interessant
bei diesem Mega-Event (6.500 Teilnehmer!).
</p><img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=65fb82f5-8c3b-4269-86a3-2af33fb0c457" /></body>
      <title>Meine Vortr&amp;auml;ge auf der VSOne</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,65fb82f5-8c3b-4269-86a3-2af33fb0c457.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,65fb82f5-8c3b-4269-86a3-2af33fb0c457.aspx</link>
      <pubDate>Thu, 14 Feb 2008 20:46:01 GMT</pubDate>
      <description>&lt;p&gt;
Ich war am 13.02 und 14.02 auf der VSOne und habe dort insgesamt 4 Sessions gehalten.
Für mich war es eine tolle Veranstaltung, die Resonanz auf meine Vorträge war sehr
positiv und ich konnte viele interessante Diskussionen mit Teilnehmern und Sprecherkollegen
führen. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MeineVortrgeaufderVSOne_128BE/P1000618_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="P1000618" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MeineVortrgeaufderVSOne_128BE/P1000618_thumb.png" width="220" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Hier nun meine Slides und den Code zum Download:
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Session Requirement Management mit Team Foundation Server&lt;br&gt;
&lt;/strong&gt;Bei dieser Session habe ich vorgestellt, wie wir bei uns im Hause mit Hilfe
des Team Foundation Servers Requirements verwalten. Hierbei kommt auch der &lt;a href="http://www.artiso.com/Default.aspx?Page=90" target="_blank"&gt;artiso
Workitem-Manager&lt;/a&gt; zum Einsatz um Workitems hierarchisch zu strukturieren.&lt;br&gt;
&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:e0c29361-8026-4eed-a2ae-1fe3094a4822" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MeineVortrgeaufderVSOne_128BE/RequirementManagement_1.pptx" target="_blank"&gt;Slides&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&gt;
&lt;p&gt;
&lt;strong&gt;Spezifikationsdokumente Verwalten&lt;/strong&gt;
&lt;br&gt;
Spezifikationsdokumente werden oft als monolithische Worddokumente verwaltet Daraus
ergeben sich eine Reihe von Problemen, die wir mit unserem Ansatz lösen, die Spezifikation
in kleine Dokumente aufzuteilen und so jede einzelne Funktion zu Spezifizieren. Hierzu
nutzen wir ein Word-AddIn das Bestandteil des &lt;a href="http://www.artiso.com/Default.aspx?Page=90" target="_blank"&gt;artiso
Workitem-Managers&lt;/a&gt; ist.&lt;br&gt;
&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:a5ebb2c8-bc0a-4243-bc85-6f965c107f2b" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MeineVortrgeaufderVSOne_128BE/Spezifikationsdokumente.pptx" target="_blank"&gt;Slides&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&gt;
&lt;p&gt;
&lt;strong&gt;Mit 3 Schichten zum Erfolg&lt;/strong&gt;
&lt;br&gt;
Das war der Titel meiner Architektur-Session. Hier habe ich zunächst den Aufbau und
die Vorteile einer 3-Schicht-Architektur beschrieben. Anschließend erläuterte ich
Komponentenorientierung. An einem kleinen Demo-Projekt zeigte ich die Planung und
den Aufbau eines Projektes vom Architekturdesign bis zur Implementierung und demonstrierte
dabei einige Best Practices aus unseren Projekten. Am Ende beschrieb ich noch die
Auswirkungen für verteilte Systeme. Interessant für mich war, dass der Meister der
Komponentenorientierung &lt;a href="http://www.ralfw.de/default.html" target="_blank"&gt;Ralf
Westphal&lt;/a&gt; der Session beiwohnte uund den Vortrag mit interessanten Fragen bereicherte.&lt;br&gt;
&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:424d0140-6ba1-4f8c-a80b-b44735c1fc8b" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MeineVortrgeaufderVSOne_128BE/3-Schicht-Architektur.pptx" target="_blank"&gt;Slides&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:c61e5a72-24e0-4693-b61d-46bc2000ba35" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MeineVortrgeaufderVSOne_128BE/3-Schicht-Architektur.zip" target="_blank"&gt;Codesample&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &gt;
&lt;p&gt;
&lt;strong&gt;XML-Serialisierung zur Persistierung von Objekten&lt;/strong&gt;
&lt;br&gt;
XML-Serialisierung ist eine Technologie, mit der Objekte schnell und einfach in ein
XML-Format überführt und auch wieder zurück konvertiert werden kann. Dies Technik
ist nicht neu und viele Entwickler kennen und nutzen sie. Ich habe in der Session
verschiedene Möglichkeiten aufgezeigt, wie sich XML-Serialisierung nutzen lässt, von
der Persistierung von kompletten Datenobjekten über Konfigurationsdateien bis hin
zur Optimierung der Speicherung von Listenobjekten in der Datenbank. 
&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:d3c9c239-81b7-4725-8069-ee8479c186d7" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MeineVortrgeaufderVSOne_128BE/XML-Serialisierung.pptx" target="_blank"&gt;Slides&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:1076fe80-7662-46a5-a25e-7e92b87e2fb0" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MeineVortrgeaufderVSOne_128BE/XML-Serialisierung.zip" target="_blank"&gt;Codesample&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&gt;
&lt;p&gt;
Nächste Woche bin ich dann auf dem Launch Event als ATE. Das wird sicher interessant
bei diesem Mega-Event (6.500 Teilnehmer!).
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=65fb82f5-8c3b-4269-86a3-2af33fb0c457" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,65fb82f5-8c3b-4269-86a3-2af33fb0c457.aspx</comments>
      <category>Eigene Tutorials;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=7f71481b-20c2-448c-ac90-d7bfa7e6eb9f</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,7f71481b-20c2-448c-ac90-d7bfa7e6eb9f.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,7f71481b-20c2-448c-ac90-d7bfa7e6eb9f.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=7f71481b-20c2-448c-ac90-d7bfa7e6eb9f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Unter Access 2003 gabe es Access-Datenbankprojekte (*.adp) mit denen man wunderbar
auf bestehende SQL-Datenbanken zugreifen konnten. Sind diese mit Access 2007 verloren
gegangen? Das nicht, aber sie sind jetzt gut versteckt. Um ein Datenbankprojekt mit
Access 2007 anzulegen geht man wie folgt vor:
</p>
        <ol>
          <li>
Access ganz normal starten</li>
          <li>
Access fragt nun nach einer Vorlage für eine neue Datei. Hier das Icon "Blank Database"
auswählen.</li>
          <li>
Im rechten Bereich kann man nun den Dateiname angeben. Hier den File-Dialog öffnen.</li>
          <li>
In diesem Dialog kann man nun als Dateityp "Microsoft Office Access Projects" auswählen.<br /><br />
 <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ZugriffaufSQLServermitAccess2007_100E4/image_4.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="391" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ZugriffaufSQLServermitAccess2007_100E4/image_thumb_1.png" width="496" border="0" /></a><br /></li>
          <li>
Wenn mann dann auf den "Create"-Button klickt kann man noch auswählen, ob man sich
zu einer bestehenden Datenbank verbinden möchte oder eine neue anlegen will. Der Rest
dürfte dann wieder vertraut erscheinen.</li>
        </ol>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=7f71481b-20c2-448c-ac90-d7bfa7e6eb9f" />
      </body>
      <title>Zugriff auf SQL-Server mit Access 2007</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,7f71481b-20c2-448c-ac90-d7bfa7e6eb9f.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,7f71481b-20c2-448c-ac90-d7bfa7e6eb9f.aspx</link>
      <pubDate>Mon, 07 Jan 2008 17:16:04 GMT</pubDate>
      <description>&lt;p&gt;
Unter Access 2003 gabe es Access-Datenbankprojekte (*.adp) mit denen man wunderbar
auf bestehende SQL-Datenbanken zugreifen konnten. Sind diese mit Access 2007 verloren
gegangen? Das nicht, aber sie sind jetzt gut versteckt. Um ein Datenbankprojekt mit
Access 2007 anzulegen geht man wie folgt vor:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Access ganz normal starten&lt;/li&gt;
&lt;li&gt;
Access fragt nun nach einer Vorlage für eine neue Datei. Hier das Icon "Blank Database"
auswählen.&lt;/li&gt;
&lt;li&gt;
Im rechten Bereich kann man nun den Dateiname angeben. Hier den File-Dialog öffnen.&lt;/li&gt;
&lt;li&gt;
In diesem Dialog kann man nun als Dateityp "Microsoft Office Access Projects" auswählen.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ZugriffaufSQLServermitAccess2007_100E4/image_4.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="391" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/ZugriffaufSQLServermitAccess2007_100E4/image_thumb_1.png" width="496" border="0"&gt;&lt;/a&gt; 
&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
Wenn mann dann auf den "Create"-Button klickt kann man noch auswählen, ob man sich
zu einer bestehenden Datenbank verbinden möchte oder eine neue anlegen will. Der Rest
dürfte dann wieder vertraut erscheinen.&lt;/li&gt;
&lt;/ol&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=7f71481b-20c2-448c-ac90-d7bfa7e6eb9f" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,7f71481b-20c2-448c-ac90-d7bfa7e6eb9f.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=f206f95b-9031-4c09-9777-c81dd256e96d</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,f206f95b-9031-4c09-9777-c81dd256e96d.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,f206f95b-9031-4c09-9777-c81dd256e96d.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=f206f95b-9031-4c09-9777-c81dd256e96d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Schick ist es, wenn man in der Anwendung demBenutzer die verfügbaren SQL-Server als
Auswahl anzeigt. Die kann man mit folgendem Code bewerkstelligen:
</p>
        <div>
          <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <span style="color: #0000ff">using</span> System; <span style="color: #0000ff">using</span> System.Collections.Generic; <span style="color: #0000ff">using</span> System.ComponentModel; <span style="color: #0000ff">using</span> System.Data; <span style="color: #0000ff">using</span> System.Drawing; <span style="color: #0000ff">using</span> System.Text; <span style="color: #0000ff">using</span> System.Windows.Forms; <span style="color: #0000ff">namespace</span> SQLInstances
{ <span style="color: #0000ff">public</span><span style="color: #0000ff">partial</span><span style="color: #0000ff">class</span> Form1
: Form { <span style="color: #0000ff">public</span> Form1() { InitializeComponent();
} <span style="color: #0000ff">private</span><span style="color: #0000ff">void</span> Form1_Load(<span style="color: #0000ff">object</span> sender,
EventArgs e) { DataTable dataTable = System.Data.Sql.SqlDataSourceEnumerator.Instance.GetDataSources(); <span style="color: #0000ff">foreach</span> (DataRow
datarow <span style="color: #0000ff">in</span> dataTable.Rows) { <span style="color: #0000ff">string</span> datasource
= datarow[<span style="color: #006080">"ServerName"</span>].ToString(); <span style="color: #0000ff">if</span> (datarow[<span style="color: #006080">"InstanceName"</span>]
!= DBNull.Value) { datasource += String.Format(<span style="color: #006080">"\\{0}"</span>,
datarow[<span style="color: #006080">"InstanceName"</span>]); ComboBox1.Items.Add(datasource);
} DataGridView1.DataSource = dataTable; } } } }</pre>
        </div>
        <p>
 
</p>
        <p>
Das Beispiel gibt die verfügbaren SQL-Server in einem GridVie aus.
</p>
        <p>
Um auch Zuisatzinformationen wie Version etc. zu erhalten, muss auf dem SQL-Server
der SQL-Browser laufen:
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/VerfgbareSQLServerimNetzabfragen_12C00/clip_image001_2.jpg">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="229" alt="clip_image001" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/VerfgbareSQLServerimNetzabfragen_12C00/clip_image001_thumb.jpg" width="612" border="0" />
          </a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=f206f95b-9031-4c09-9777-c81dd256e96d" />
      </body>
      <title>Verf&amp;uuml;gbare SQL-Server im Netz abfragen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,f206f95b-9031-4c09-9777-c81dd256e96d.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,f206f95b-9031-4c09-9777-c81dd256e96d.aspx</link>
      <pubDate>Sun, 30 Dec 2007 20:20:27 GMT</pubDate>
      <description>&lt;p&gt;
Schick ist es, wenn man in der Anwendung demBenutzer die verfügbaren SQL-Server als
Auswahl anzeigt. Die kann man mit folgendem Code bewerkstelligen:
&lt;/p&gt;
&lt;div&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Collections.Generic; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.ComponentModel; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Data; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Drawing; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Text; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Forms; &lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; SQLInstances
{ &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;partial&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Form1
: Form { &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Form1() { InitializeComponent();
} &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Form1_Load(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender,
EventArgs e) { DataTable dataTable = System.Data.Sql.SqlDataSourceEnumerator.Instance.GetDataSources(); &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (DataRow
datarow &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; dataTable.Rows) { &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; datasource
= datarow[&lt;span style="color: #006080"&gt;"ServerName"&lt;/span&gt;].ToString(); &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (datarow[&lt;span style="color: #006080"&gt;"InstanceName"&lt;/span&gt;]
!= DBNull.Value) { datasource += String.Format(&lt;span style="color: #006080"&gt;"\\{0}"&lt;/span&gt;,
datarow[&lt;span style="color: #006080"&gt;"InstanceName"&lt;/span&gt;]); ComboBox1.Items.Add(datasource);
} DataGridView1.DataSource = dataTable; } } } }&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Das Beispiel gibt die verfügbaren SQL-Server in einem GridVie aus.
&lt;/p&gt;
&lt;p&gt;
Um auch Zuisatzinformationen wie Version etc. zu erhalten, muss auf dem SQL-Server
der SQL-Browser laufen:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/VerfgbareSQLServerimNetzabfragen_12C00/clip_image001_2.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="229" alt="clip_image001" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/VerfgbareSQLServerimNetzabfragen_12C00/clip_image001_thumb.jpg" width="612" border="0"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=f206f95b-9031-4c09-9777-c81dd256e96d" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,f206f95b-9031-4c09-9777-c81dd256e96d.aspx</comments>
      <category>SQL;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=9b9dcc0f-6e0d-41b0-bffc-c925823f8d64</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,9b9dcc0f-6e0d-41b0-bffc-c925823f8d64.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,9b9dcc0f-6e0d-41b0-bffc-c925823f8d64.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=9b9dcc0f-6e0d-41b0-bffc-c925823f8d64</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Durch Zufall habe ich gerade herausgefunden, dass man im IE auch mehrere Startseiten
eintragen kann. Einfach in der Liste mehrere zeilen mit den verschiedenen URLs eingeben.
Die werden dann beim Start alle geöffnet.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MehrereStartseitenimIE_94DE/image_2.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="404" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MehrereStartseitenimIE_94DE/image_thumb.png" width="327" border="0" />
          </a>
        </p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MehrereStartseitenimIE_94DE/image_4.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="268" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MehrereStartseitenimIE_94DE/image_thumb_1.png" width="337" border="0" />
          </a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=9b9dcc0f-6e0d-41b0-bffc-c925823f8d64" />
      </body>
      <title>Mehrere Startseiten im IE</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,9b9dcc0f-6e0d-41b0-bffc-c925823f8d64.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,9b9dcc0f-6e0d-41b0-bffc-c925823f8d64.aspx</link>
      <pubDate>Tue, 04 Dec 2007 09:35:10 GMT</pubDate>
      <description>&lt;p&gt;
Durch Zufall habe ich gerade herausgefunden, dass man im IE auch mehrere Startseiten
eintragen kann. Einfach in der Liste mehrere zeilen mit den verschiedenen URLs eingeben.
Die werden dann beim Start alle geöffnet.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MehrereStartseitenimIE_94DE/image_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="404" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MehrereStartseitenimIE_94DE/image_thumb.png" width="327" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MehrereStartseitenimIE_94DE/image_4.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="268" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MehrereStartseitenimIE_94DE/image_thumb_1.png" width="337" border="0"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=9b9dcc0f-6e0d-41b0-bffc-c925823f8d64" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,9b9dcc0f-6e0d-41b0-bffc-c925823f8d64.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=8effdb59-712b-468a-9e5d-f4064e4ebffc</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,8effdb59-712b-468a-9e5d-f4064e4ebffc.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,8effdb59-712b-468a-9e5d-f4064e4ebffc.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=8effdb59-712b-468a-9e5d-f4064e4ebffc</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Das Problem:
</p>
        <p>
Ich habe in C# ein Objekt vom Typ System.Drawing.Color. Dieses möchte ich in einen
String-Konvertieren, den ich im HTML verwenden kann. Das funktioniert gut bei benannten
Farben wie z.B. "red". Dort kann man Color.Name verwenden. Aber bei nicht benannten
Farben liefert dies einen ARGB-Wert mit dem HTML nichts anfangen kann. Dehalb habe
ich diese kleine Mthode geschrieben:
</p>
        <div>
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="COLOR: #0000ff">private</span>
            <span style="COLOR: #0000ff">string</span> GetColorString(Color
color) { <span style="COLOR: #0000ff">if</span> (color.ToKnownColor() != 0) <span style="COLOR: #0000ff">return</span> color.Name; <span style="COLOR: #0000ff">else</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #006080">"#"</span> +
color.Name.Substring(2); }</pre>
        </div>
        <p>
 
</p>
        <p>
Wenn jemand eine einfachere Lösung weiss, einfach her damit!
</p>
        <p>
Update:
</p>
        <p>
Jürgen hat noch eine viel einfacher Lösung (siehe Kommentar) mit<br />
string htmlcolor = ColorTranslator.ToHtml(Color.Bisque)<br />
Kannte ich bisher noch nicht, aber man lernt ja nie aus!
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=8effdb59-712b-468a-9e5d-f4064e4ebffc" />
      </body>
      <title>C#-Farben in HTML-Farben umwandeln</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,8effdb59-712b-468a-9e5d-f4064e4ebffc.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,8effdb59-712b-468a-9e5d-f4064e4ebffc.aspx</link>
      <pubDate>Wed, 21 Nov 2007 11:31:43 GMT</pubDate>
      <description>&lt;p&gt;
Das Problem:
&lt;/p&gt;
&lt;p&gt;
Ich habe in C# ein Objekt vom Typ System.Drawing.Color. Dieses möchte ich in einen
String-Konvertieren, den ich im HTML verwenden kann. Das funktioniert gut bei benannten
Farben wie z.B. "red". Dort kann man Color.Name verwenden. Aber bei nicht benannten
Farben liefert dies einen ARGB-Wert mit dem HTML nichts anfangen kann. Dehalb habe
ich diese kleine Mthode geschrieben:
&lt;/p&gt;
&lt;div&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;private&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;string&lt;/span&gt; GetColorString(Color
color) { &lt;span style="COLOR: #0000ff"&gt;if&lt;/span&gt; (color.ToKnownColor() != 0) &lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt; color.Name; &lt;span style="COLOR: #0000ff"&gt;else&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt; &lt;span style="COLOR: #006080"&gt;"#"&lt;/span&gt; +
color.Name.Substring(2); }&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Wenn jemand eine einfachere Lösung weiss, einfach her damit!
&lt;/p&gt;
&lt;p&gt;
Update:
&lt;/p&gt;
&lt;p&gt;
Jürgen hat noch eine viel einfacher Lösung (siehe Kommentar) mit&lt;br&gt;
string htmlcolor = ColorTranslator.ToHtml(Color.Bisque)&lt;br&gt;
Kannte ich bisher noch nicht, aber man lernt ja nie aus!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=8effdb59-712b-468a-9e5d-f4064e4ebffc" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,8effdb59-712b-468a-9e5d-f4064e4ebffc.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=b0f0c75a-656c-421d-9798-0cb8276c560c</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,b0f0c75a-656c-421d-9798-0cb8276c560c.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,b0f0c75a-656c-421d-9798-0cb8276c560c.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=b0f0c75a-656c-421d-9798-0cb8276c560c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Damit Ich habe ein Web User Control bei dem ich eine TextBox als Property nach außen
geben möchte, damit man die Eigenschaften der Textbox editieren kann. Das kann man
durch ein paar Attribute erreichen.
</p>
        <div>
          <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">[Browsable(<span style="color: #0000ff">true</span>),
NotifyParentProperty(<span style="color: #0000ff">true</span>), PersistenceMode(PersistenceMode.InnerProperty),
DesignerSerializationVisibility(DesignerSerializationVisibility.Content), RefreshProperties(RefreshProperties.Repaint)] <span style="color: #0000ff">public</span> TextBox
DropDownTextbox { get { <span style="color: #0000ff">return</span><span style="color: #0000ff">this</span>.TextBox1;
} set { <span style="color: #0000ff">this</span>.TextBox1 = <span style="color: #0000ff">value</span>;
} }</pre>
        </div>
        <div> 
</div>
        <div>Damit werden auf dem UserControls zusätzliche Properties angelegt und zwar alle
Properties einer Textbox mit dem Prefix "DropDownTexbox" also dem Namen des Properties
auf dem Control.
</div>
        <div> 
</div>
        <div>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/UntercontrolsbeiWebUserControlsnachaueng_FB9B/image_2.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="218" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/UntercontrolsbeiWebUserControlsnachaueng_FB9B/image_thumb.png" width="245" border="0" />
          </a>
        </div>
        <div> 
</div>
        <div>Im Markup werden die Properties ganz normal als Attribute eingefügt. Was mich
allerdings etwas gewundert hat war, dass ich im Markup über Intellisense die Textbox
allerdings auch als separates Tag angeben kann und darauf meine Attribute definiere.
Allerding wird das denn im Designer nicht mehr sauber gerendert.
</div>
        <div>
          <font size="2">
            <p>
            </p>
          </font>
          <font color="#0000ff" size="2">
          </font> 
<p><font color="#0000ff" size="2">&lt;</font><font color="#a31515" size="2">uc1</font><font color="#0000ff" size="2">:</font><font color="#a31515" size="2">WebUserControl1</font><font size="2"></font><font color="#ff0000" size="2">ID</font><font color="#0000ff" size="2">="WebUserControl11"</font><font size="2"></font><font color="#ff0000" size="2">runat</font><font color="#0000ff" size="2">="server"</font><font size="2"></font><font color="#ff0000" size="2">DropDownTextBox-BackColor</font><font color="#0000ff" size="2">="#FFCC00"&gt;</font><font size="2"><br /></font><font color="#0000ff" size="2">    &lt;</font><font color="#a31515" size="2">DropDownTextbox</font><font size="2"></font><font color="#ff0000" size="2">BackColor</font><font color="#0000ff" size="2">="red"&gt;&lt;/</font><font color="#a31515" size="2">DropDownTextbox</font><font color="#0000ff" size="2">&gt;</font><font size="2"><br /></font><font color="#0000ff" size="2">&lt;/</font><font color="#a31515" size="2">uc1</font><font color="#0000ff" size="2">:</font><font color="#a31515" size="2">WebUserControl1</font><font color="#0000ff" size="2">&gt;
</font></p></div>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=b0f0c75a-656c-421d-9798-0cb8276c560c" />
      </body>
      <title>Untercontrols bei Web User Controls nach au&amp;szlig;en geben</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,b0f0c75a-656c-421d-9798-0cb8276c560c.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,b0f0c75a-656c-421d-9798-0cb8276c560c.aspx</link>
      <pubDate>Tue, 13 Nov 2007 16:53:32 GMT</pubDate>
      <description>&lt;p&gt;
Damit Ich habe ein Web User Control bei dem ich eine TextBox als Property nach außen
geben möchte, damit man die Eigenschaften der Textbox editieren kann. Das kann man
durch ein paar Attribute erreichen.
&lt;/p&gt;
&lt;div&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;[Browsable(&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;),
NotifyParentProperty(&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;), PersistenceMode(PersistenceMode.InnerProperty),
DesignerSerializationVisibility(DesignerSerializationVisibility.Content), RefreshProperties(RefreshProperties.Repaint)] &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; TextBox
DropDownTextbox { get { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.TextBox1;
} set { &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.TextBox1 = &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;;
} }&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;Damit werden auf dem UserControls zusätzliche Properties angelegt und zwar alle
Properties einer Textbox mit dem Prefix "DropDownTexbox" also dem Namen des Properties
auf dem Control.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/UntercontrolsbeiWebUserControlsnachaueng_FB9B/image_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="218" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/UntercontrolsbeiWebUserControlsnachaueng_FB9B/image_thumb.png" width="245" border="0"&gt;&lt;/a&gt; 
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;Im Markup werden die Properties ganz normal als Attribute eingefügt. Was mich
allerdings etwas gewundert hat war, dass ich im Markup über Intellisense die Textbox
allerdings auch als separates Tag angeben kann und darauf meine Attribute definiere.
Allerding wird das denn im Designer nicht mehr sauber gerendert.
&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt; 
&lt;p&gt;
&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/font&gt;&amp;nbsp;&gt;
&lt;p&gt;
&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;uc1&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;WebUserControl1&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;ID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="WebUserControl11"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="server"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;DropDownTextBox-BackColor&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="#FFCC00"&amp;gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;br&gt;
&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;DropDownTextbox&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;BackColor&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="red"&amp;gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;DropDownTextbox&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;br&gt;
&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;uc1&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;WebUserControl1&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;
&lt;/p&gt;
&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=b0f0c75a-656c-421d-9798-0cb8276c560c" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,b0f0c75a-656c-421d-9798-0cb8276c560c.aspx</comments>
      <category>ASP.Net;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=bba742dd-65dd-4e38-836f-6237a929a8ce</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,bba742dd-65dd-4e38-836f-6237a929a8ce.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,bba742dd-65dd-4e38-836f-6237a929a8ce.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=bba742dd-65dd-4e38-836f-6237a929a8ce</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Ich hatte gerade ein Aha-Erlebnis der etwas anderen Art. Im Infragistics-Chart gibt
es eine Zoom-Funktion für die Achsen. Bei einem Composite-Chart scheint das aber nicht
zu funktionieren. Ich habe folgendes im Code stehen:
</p>
        <p>
ChartObj.CompositeChart.ChartAreas[0].Axes[0].
</p>
        <p>
Aber mein Intellisense zeigt kein passendes Property an. Im Forum steht auch die Aussage
von einem Infragistics-Mitarbeiter, dass das nicht geht. Wenn ich dann "blind" das
vervollständige zu 
</p>
        <div>
          <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <p>
ChartObj.CompositeChart.ChartAreas[0].Axes[0].ScrollScale.Visible = true;
</p>
          </pre>
        </div>
        <p>
          <br />
funktioniert der Code wunderbar! Mal abgesehen davon, dass ich gar nicht wüsste, wie
man Properties im Intellisense versteckt aber dennoch verfügbar macht, warum um alles
in der Welt haben die Jungs dieses Property nicht öffentlich zugänglich gemacht?
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=bba742dd-65dd-4e38-836f-6237a929a8ce" />
      </body>
      <title>Infragistics Chart - Zoom bei Composite Charts</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,bba742dd-65dd-4e38-836f-6237a929a8ce.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,bba742dd-65dd-4e38-836f-6237a929a8ce.aspx</link>
      <pubDate>Wed, 07 Nov 2007 18:51:22 GMT</pubDate>
      <description>&lt;p&gt;
Ich hatte gerade ein Aha-Erlebnis der etwas anderen Art. Im Infragistics-Chart gibt
es eine Zoom-Funktion für die Achsen. Bei einem Composite-Chart scheint das aber nicht
zu funktionieren. Ich habe folgendes im Code stehen:
&lt;/p&gt;
&lt;p&gt;
ChartObj.CompositeChart.ChartAreas[0].Axes[0].
&lt;/p&gt;
&lt;p&gt;
Aber mein Intellisense zeigt kein passendes Property an. Im Forum steht auch die Aussage
von einem Infragistics-Mitarbeiter, dass das nicht geht. Wenn ich dann "blind" das
vervollständige zu 
&lt;/p&gt;
&lt;div&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
&lt;p&gt;
ChartObj.CompositeChart.ChartAreas[0].Axes[0].ScrollScale.Visible = true;
&lt;/p&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;br&gt;
funktioniert der Code wunderbar! Mal abgesehen davon, dass ich gar nicht wüsste, wie
man Properties im Intellisense versteckt aber dennoch verfügbar macht, warum um alles
in der Welt haben die Jungs dieses Property nicht öffentlich zugänglich gemacht?
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=bba742dd-65dd-4e38-836f-6237a929a8ce" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,bba742dd-65dd-4e38-836f-6237a929a8ce.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=1ae529a0-a374-4554-ab31-66b356f083d4</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,1ae529a0-a374-4554-ab31-66b356f083d4.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,1ae529a0-a374-4554-ab31-66b356f083d4.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=1ae529a0-a374-4554-ab31-66b356f083d4</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Wenn man eine Datei löscht, die in der Quellcode-Verwaltung eingecheckt war, kann
man diese leicht aus der Quellcode-Verwaltung wiederherstellen. Dazu muss man aber
zuerst eine kleine Einstellung vornehmen. Unter Tools / Options / Source Control /
Visual Studio Team Foundation Server kann man die Option "Show deleted items in the
Source Control Explorer" aktivieren. 
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/UndeletemitTFSSourceControl_FF4D/image_2.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="306" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/UndeletemitTFSSourceControl_FF4D/image_thumb.png" width="526" border="0" />
          </a>
        </p>
        <p>
Dann werden im Source Control Explorer gelöschte Elemente angezeugt, die man einfach
"undeleten" kann.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/UndeletemitTFSSourceControl_FF4D/image_4.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="359" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/UndeletemitTFSSourceControl_FF4D/image_thumb_1.png" width="389" border="0" />
          </a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=1ae529a0-a374-4554-ab31-66b356f083d4" />
      </body>
      <title>Undelete mit TFS Source Control</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,1ae529a0-a374-4554-ab31-66b356f083d4.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,1ae529a0-a374-4554-ab31-66b356f083d4.aspx</link>
      <pubDate>Thu, 25 Oct 2007 16:09:17 GMT</pubDate>
      <description>&lt;p&gt;
Wenn man eine Datei löscht, die in der Quellcode-Verwaltung eingecheckt war, kann
man diese leicht aus der Quellcode-Verwaltung wiederherstellen. Dazu muss man aber
zuerst eine kleine Einstellung vornehmen. Unter Tools / Options / Source Control /
Visual Studio Team Foundation Server kann man die Option "Show deleted items in the
Source Control Explorer" aktivieren. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/UndeletemitTFSSourceControl_FF4D/image_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="306" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/UndeletemitTFSSourceControl_FF4D/image_thumb.png" width="526" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Dann werden im Source Control Explorer gelöschte Elemente angezeugt, die man einfach
"undeleten" kann.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/UndeletemitTFSSourceControl_FF4D/image_4.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="359" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/UndeletemitTFSSourceControl_FF4D/image_thumb_1.png" width="389" border="0"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=1ae529a0-a374-4554-ab31-66b356f083d4" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,1ae529a0-a374-4554-ab31-66b356f083d4.aspx</comments>
      <category>Team System Server;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=c66e4eed-a923-4c39-8424-69d0b8072b53</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,c66e4eed-a923-4c39-8424-69d0b8072b53.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,c66e4eed-a923-4c39-8424-69d0b8072b53.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=c66e4eed-a923-4c39-8424-69d0b8072b53</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Ich hatte gerade ein kleines Problem mit der Object Test Bench. Die Object Test Bench
ermöglicht es, im Visual Studio Instanzen von Objekten zu erzeugen, auf denen man
dann direkt Methoden aufrufen kann, ohne die Anwendung zu starten. Dazu geht man in
den Class View oder den Class Designer, klickt die entsprechende Klasse mit der rechten
Maustaste an und ruft dann aus dem Kontext-Menü den Befehl "Create Instance" auf ...
Tja, wenn der Befehl denn da wäre. Bei mir war da nichts zu sehen. Nach einigem Versuchen
habe ich dann rausgefunden, dass dies wohl nur auf dem Projekt funktioniert, das als
Startprojekt ausgewählt wurde. Also habe ich meine Library als Startprojekt gekennzeichnet
und siehe da, es funktioniert.
</p>
        <p>
Schade ist allerdings, dass Methoden, die generische Datentypen zurückliefern nicht
von der OTB unterstützt werden.
</p>
        <p>
Weiterführende Informationen findet man hier: <a href="http://blogs.msdn.com/parthopdas/archive/2005/05/04/414704.aspx">http://blogs.msdn.com/parthopdas/archive/2005/05/04/414704.aspx</a></p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=c66e4eed-a923-4c39-8424-69d0b8072b53" />
      </body>
      <title>Object Test Bench im Visual Studio</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,c66e4eed-a923-4c39-8424-69d0b8072b53.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,c66e4eed-a923-4c39-8424-69d0b8072b53.aspx</link>
      <pubDate>Mon, 08 Oct 2007 12:23:09 GMT</pubDate>
      <description>&lt;p&gt;
Ich hatte gerade ein kleines Problem mit der Object Test Bench. Die Object Test Bench
ermöglicht es, im Visual Studio Instanzen von Objekten zu erzeugen, auf denen man
dann direkt Methoden aufrufen kann, ohne die Anwendung zu starten. Dazu geht man in
den Class View oder den Class Designer, klickt die entsprechende Klasse mit der rechten
Maustaste an und ruft dann aus dem Kontext-Menü den Befehl "Create Instance" auf ...
Tja, wenn der Befehl denn da wäre. Bei mir war da nichts zu sehen. Nach einigem Versuchen
habe ich dann rausgefunden, dass dies wohl nur auf dem Projekt funktioniert, das als
Startprojekt ausgewählt wurde. Also habe ich meine Library als Startprojekt gekennzeichnet
und siehe da, es funktioniert.
&lt;/p&gt;
&lt;p&gt;
Schade ist allerdings, dass Methoden, die generische Datentypen zurückliefern nicht
von der OTB unterstützt werden.
&lt;/p&gt;
&lt;p&gt;
Weiterführende Informationen findet man hier: &lt;a href="http://blogs.msdn.com/parthopdas/archive/2005/05/04/414704.aspx"&gt;http://blogs.msdn.com/parthopdas/archive/2005/05/04/414704.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=c66e4eed-a923-4c39-8424-69d0b8072b53" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,c66e4eed-a923-4c39-8424-69d0b8072b53.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=ecb77b1a-d6b9-425c-96dc-ad6c8cb65de7</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,ecb77b1a-d6b9-425c-96dc-ad6c8cb65de7.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,ecb77b1a-d6b9-425c-96dc-ad6c8cb65de7.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=ecb77b1a-d6b9-425c-96dc-ad6c8cb65de7</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Ich habe gerade eben eine Seite, die ich mit VS 2008 und dem Framework 3.5 erstellt
habe, auf einen Test-Server deployed. Alles hat wunderbar funktioniert, aber bei einer
Seite bekam ich die Meldung, dass die Ressource nicht gefunden werden kann.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/FehlermeldungfrASPSeitenmitFr.5versteckt_12269/image.png" atomicselection="true">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="328" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/FehlermeldungfrASPSeitenmitFr.5versteckt_12269/image_thumb.png" width="323" border="0" />
          </a>
        </p>
        <p>
Das konnte aber nicht sein, die Seite war da. Nach einigen Versuchen und einigem Wundern
bin ich zufällig auf die Idee gekommen, mir mal den Source der Seite anzuzeigen. Und
siehe da, hier steht nun endlich ein brauchbarar Hinweis. Im Source-Code war als Kommentar
die Fehlermeldung versteckt. Der Grund war, dass eine Komponente auf ein verzeichnis
zugreifen möchte, das auf dem Server nicht existiert.
</p>
        <p>
Ich habe versucht, den Fehler mit einer Test-Seite zu reproduzieren, aber erfolglos.
Hat jemand eine Idee, woran das liegt und wie man das abstellen kann? Na jedenfalls
wenn mal jemand ein ähnliches Problem hat, kennt er jetzt den Workaround. Nicht schön,
aber es funktioniert.
</p>
        <p>
&lt;html&gt;<br />
    &lt;head&gt;<br />
        &lt;title&gt;Die Ressource kann nicht gefunden
werden.&lt;/title&gt;<br />
        &lt;style&gt;<br />
...<br />
        &lt;/style&gt;<br />
    &lt;/head&gt;
</p>
        <p>
    &lt;body bgcolor="white"&gt;
</p>
        <p>
            &lt;span&gt;&lt;H1&gt;Serverfehler
in der Anwendung /ValuePlanner_2008.&lt;hr width=100% size=1 color=silver&gt;&lt;/H1&gt;
</p>
        <p>
            &lt;h2&gt; &lt;i&gt;Die
Ressource kann nicht gefunden werden.&lt;/i&gt; &lt;/h2&gt;&lt;/span&gt;
</p>
        <p>
...
</p>
        <p>
    &lt;/body&gt;<br />
&lt;/html&gt;<br />
&lt;!-- 
<br />
[DirectoryNotFoundException]: Ein Teil des Pfades c:\temp\text.txt konnte nicht gefunden
werden.<br />
   bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)<br />
   bei System.IO.File.Delete(String path)<br />
   ...
</p>
        <p>
--&gt;&lt;!-- 
<br />
Diese Seite enthält möglicherweise vertrauliche Informationen, weil ASP.NET für die
Anzeige ausführlicher Fehlermeldungen mit &amp;lt;customErrors mode="Off"/&amp;gt;
konfiguriert ist. In Produktionsumgebungen sollten Sie &amp;lt;customErrors mode="On"/&amp;gt;
oder &amp;lt;customErrors mode="RemoteOnly"/&amp;gt; verwenden.--&gt;
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=ecb77b1a-d6b9-425c-96dc-ad6c8cb65de7" />
      </body>
      <title>Fehlermeldung f&amp;uuml;r ASP-Seiten mit Framework 3.5 versteckt?</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,ecb77b1a-d6b9-425c-96dc-ad6c8cb65de7.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,ecb77b1a-d6b9-425c-96dc-ad6c8cb65de7.aspx</link>
      <pubDate>Fri, 07 Sep 2007 16:05:02 GMT</pubDate>
      <description>&lt;p&gt;
Ich habe gerade eben eine Seite, die ich mit VS 2008 und dem Framework 3.5 erstellt
habe, auf einen Test-Server deployed. Alles hat wunderbar funktioniert, aber bei einer
Seite bekam ich die Meldung, dass die Ressource nicht gefunden werden kann.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/FehlermeldungfrASPSeitenmitFr.5versteckt_12269/image.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="328" alt="image" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/FehlermeldungfrASPSeitenmitFr.5versteckt_12269/image_thumb.png" width="323" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Das konnte aber nicht sein, die Seite war da. Nach einigen Versuchen und einigem Wundern
bin ich zufällig auf die Idee gekommen, mir mal den Source der Seite anzuzeigen. Und
siehe da, hier steht nun endlich ein brauchbarar Hinweis. Im Source-Code war als Kommentar
die Fehlermeldung versteckt. Der Grund war, dass eine Komponente auf ein verzeichnis
zugreifen möchte, das auf dem Server nicht existiert.
&lt;/p&gt;
&lt;p&gt;
Ich habe versucht, den Fehler mit einer Test-Seite zu reproduzieren, aber erfolglos.
Hat jemand eine Idee, woran das liegt und wie man das abstellen kann? Na jedenfalls
wenn mal jemand ein ähnliches Problem hat, kennt er jetzt den Workaround. Nicht schön,
aber es funktioniert.
&lt;/p&gt;
&lt;p&gt;
&amp;lt;html&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;head&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;Die Ressource kann nicht gefunden
werden.&amp;lt;/title&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;style&amp;gt;&lt;br&gt;
...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/style&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/head&amp;gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;body bgcolor="white"&amp;gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;span&amp;gt;&amp;lt;H1&amp;gt;Serverfehler
in der Anwendung /ValuePlanner_2008.&amp;lt;hr width=100% size=1 color=silver&amp;gt;&amp;lt;/H1&amp;gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;h2&amp;gt; &amp;lt;i&amp;gt;Die
Ressource kann nicht gefunden werden.&amp;lt;/i&amp;gt; &amp;lt;/h2&amp;gt;&amp;lt;/span&amp;gt;
&lt;/p&gt;
&lt;p&gt;
...
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/body&amp;gt;&lt;br&gt;
&amp;lt;/html&amp;gt;&lt;br&gt;
&amp;lt;!-- 
&lt;br&gt;
[DirectoryNotFoundException]: Ein Teil des Pfades c:\temp\text.txt konnte nicht gefunden
werden.&lt;br&gt;
&amp;nbsp;&amp;nbsp; bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)&lt;br&gt;
&amp;nbsp;&amp;nbsp; bei System.IO.File.Delete(String path)&lt;br&gt;
&amp;nbsp;&amp;nbsp; ...
&lt;/p&gt;
&lt;p&gt;
--&amp;gt;&amp;lt;!-- 
&lt;br&gt;
Diese Seite enthält möglicherweise vertrauliche Informationen, weil ASP.NET für die
Anzeige ausführlicher Fehlermeldungen mit &amp;amp;lt;customErrors mode="Off"/&amp;amp;gt;
konfiguriert ist. In Produktionsumgebungen sollten Sie &amp;amp;lt;customErrors mode="On"/&amp;amp;gt;
oder &amp;amp;lt;customErrors mode="RemoteOnly"/&amp;amp;gt; verwenden.--&amp;gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=ecb77b1a-d6b9-425c-96dc-ad6c8cb65de7" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,ecb77b1a-d6b9-425c-96dc-ad6c8cb65de7.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=20a1762c-1a4d-453d-9f33-c203ea110419</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,20a1762c-1a4d-453d-9f33-c203ea110419.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,20a1762c-1a4d-453d-9f33-c203ea110419.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=20a1762c-1a4d-453d-9f33-c203ea110419</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Folgende Aufgabenstellung: In einem Infragistics WinGrid soll eine DataTable angezeigt
werden. Am Ende des Grids soll eine TemplateAddRow, also eine leere Zeile zum Anlegen
einer neuen Row angezeigt werden. Das Infragistics WinGrid unterstützt diese Funktion
von Haus aus so, dass man in diese leere Zeile klicken kann und sobald man beginnt
hier Werte einzutragen, dann wird in der DataSource tatsächlich eine neue Row angelegt
und in dieser die Werte abgelegt. Gleichzeitig wird eine neue TemplateAddRow angelegt,
mit der man wieder eine neue Zeile anlegen kann. Was aber nun, wenn man die Werte
nicht im Grid selbst eingeben möchte, sondern in separaten Eingabefeldern?
</p>
        <p>
Dann geht man folgendermaßen vor:
</p>
        <p>
1.) Zuerst erstellt man eine Form mit einer Bindingsource, einem Grid und diversen
Eingabefeldern. Das Grid und die Eingabefelder werden an die BindingSource gebunden.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TemplateAddRowimIngragisticsWinGrid_D0F7/image%7B0%7D%5B2%5D.png" atomicselection="true">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="422" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TemplateAddRowimIngragisticsWinGrid_D0F7/image%7B0%7D_thumb.png" width="466" border="0" />
          </a>
        </p>
        <p>
2.) Dann stellt man das Grid so ein, dass die TemplateAddRow angezeigt wird.
</p>
        <font color="#0000ff" size="2">
          <p>
this
</p>
        </font>
        <font size="2">.ultraGrid1.DisplayLayout.Override.AllowAddNew = Infragistics.Win.UltraWinGrid.</font>
        <font color="#2b91af" size="2">AllowAddNew</font>
        <font size="2">.TemplateOnBottom;</font>
        <p>
          <font size="2">2.) Damit nach dem neu Anlegen einer Zeile das Databinding auf den
Eingabefeldern funktioniert muss nun manuell eine neue Zeile angelegt werden. Das
Grid erzeugt diese Row in der DataSource erst wenn Werte eingegeben werden, das ist
für unseren Fall zu spät. Deshalb nutzen wir das BeforeRowIndert Event.</font>
        </p>
        <font size="2">
          <font size="2">
            <p>
            </p>
          </font>
          <font color="#0000ff" size="2">private</font>
          <font size="2">
          </font>
          <font color="#0000ff" size="2">void</font>
          <font size="2"> ultraGrid1_BeforeRowInsert(</font>
          <font color="#0000ff" size="2">object</font>
          <font size="2"> sender,
Infragistics.Win.UltraWinGrid.</font>
          <font color="#2b91af" size="2">BeforeRowInsertEventArgs</font>
          <font size="2"> e)<br />
{<br />
    </font>
          <font color="#0000ff" size="2">this</font>
          <font size="2">.myBindingSource.AddNew();<br /></font>
          <font color="#0000ff" size="2">    this</font>
          <font size="2">.myBindingSource.Position++;<br />
    e.Cancel = </font>
          <font color="#0000ff" size="2">true</font>
          <font size="2">;<br />
}</font>
          <p>
            <font size="2">3.) Jetzt funktioniert bereits das erste Einfügen. Allerdings erscheint
danach keine neue TemplateAddRow mehr. Hier muss man einen kleinen Trick anwenden:
Man setzt die ActiveRow auf die TemplateAddRow. Dadurch wird eigentlich die TemplateAddRow
nun in eine "echte Row" umgewandelt (was wir bereits ja zuvor manuell gemacht haben.
Danach erstellt das Grid eine neue TemplateAddRow (das ist genau das was wir brauchen).
Etwas unschön ist nun, dass die neue TemplateAddRow automatisch selektiert wird und
wir damit schon wieder einen neuen Datensatz anlegen. Schöner wäre, wenn der gerade
erzeugte Datensatz aktiv bleibt. Dazu merkt man sich einfach die aktive Row und setzt
die danach wieder. Das Ganze habe ich auf einen Button gelegt, mit dem der Anwender
die Eingabe abschließt. Alternativ kann natürlich auch ein anderes Event dafür verwendet
werden. Sinnvoll ist hier sicher auch das BeforeSelectChange-Event des Grids entsprechend
einzubinden.</font>
          </p>
          <font size="2">
            <font size="2">
              <p>
              </p>
            </font>
            <font color="#0000ff" size="2">private</font>
            <font size="2">
            </font>
            <font color="#0000ff" size="2">void</font>
            <font size="2"> button1_Click(</font>
            <font color="#0000ff" size="2">object</font>
            <font size="2"> sender, </font>
            <font color="#2b91af" size="2">EventArgs</font>
            <font size="2"> e)<br />
{<br />
    </font>
            <font color="#0000ff" size="2">this</font>
            <font size="2">.myBindingSource.EndEdit();<br />
    </font>
            <font color="#2b91af" size="2">UltraGridRow</font>
            <font size="2"> temp
= </font>
            <font color="#0000ff" size="2">this</font>
            <font size="2">.ultraGrid1.ActiveRow;<br />
    </font>
            <font color="#0000ff" size="2">this</font>
            <font size="2">.ultraGrid1.ActiveRow
= </font>
            <font color="#0000ff" size="2">this</font>
            <font size="2">.ultraGrid1.Rows.TemplateAddRow;<br />
    </font>
            <font color="#0000ff" size="2">this</font>
            <font size="2">.ultraGrid1.ActiveRow
= temp;<br />
}
</font>
          </font>
        </font>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=20a1762c-1a4d-453d-9f33-c203ea110419" />
      </body>
      <title>TemplateAddRow im Infragistics WinGrid</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,20a1762c-1a4d-453d-9f33-c203ea110419.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,20a1762c-1a4d-453d-9f33-c203ea110419.aspx</link>
      <pubDate>Wed, 05 Sep 2007 12:51:36 GMT</pubDate>
      <description>&lt;p&gt;
Folgende Aufgabenstellung: In einem Infragistics WinGrid soll eine DataTable angezeigt
werden. Am Ende des Grids soll eine TemplateAddRow, also eine leere Zeile zum Anlegen
einer neuen Row angezeigt werden. Das Infragistics WinGrid unterstützt diese Funktion
von Haus aus so, dass man in diese leere Zeile klicken kann und sobald man beginnt
hier Werte einzutragen, dann wird in der DataSource tatsächlich eine neue Row angelegt
und in dieser die Werte abgelegt. Gleichzeitig wird eine neue TemplateAddRow angelegt,
mit der man wieder eine neue Zeile anlegen kann. Was aber nun, wenn man die Werte
nicht im Grid selbst eingeben möchte, sondern in separaten Eingabefeldern?
&lt;/p&gt;
&lt;p&gt;
Dann geht man folgendermaßen vor:
&lt;/p&gt;
&lt;p&gt;
1.)&amp;nbsp;Zuerst erstellt man eine Form mit einer Bindingsource, einem Grid und diversen
Eingabefeldern. Das Grid und die Eingabefelder werden an die BindingSource gebunden.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TemplateAddRowimIngragisticsWinGrid_D0F7/image%7B0%7D%5B2%5D.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="422" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/TemplateAddRowimIngragisticsWinGrid_D0F7/image%7B0%7D_thumb.png" width="466" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
2.) Dann stellt man das Grid so ein, dass die TemplateAddRow angezeigt wird.
&lt;/p&gt;
&lt;font color="#0000ff" size="2"&gt; 
&lt;p&gt;
this
&lt;/font&gt;&lt;font size="2"&gt;.ultraGrid1.DisplayLayout.Override.AllowAddNew = Infragistics.Win.UltraWinGrid.&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;AllowAddNew&lt;/font&gt;&lt;font size="2"&gt;.TemplateOnBottom;&lt;/font&gt;&gt;
&lt;p&gt;
&lt;font size="2"&gt;2.) Damit nach dem neu Anlegen einer Zeile das Databinding auf den
Eingabefeldern funktioniert muss nun manuell eine neue Zeile angelegt werden. Das
Grid erzeugt diese Row in der DataSource erst wenn Werte eingegeben werden, das ist
für unseren Fall zu spät. Deshalb nutzen wir das BeforeRowIndert Event.&lt;/font&gt;
&lt;/p&gt;
&lt;font size="2"&gt;&lt;font size="2"&gt; 
&lt;p&gt;
&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;private&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;font size="2"&gt; ultraGrid1_BeforeRowInsert(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;object&lt;/font&gt;&lt;font size="2"&gt; sender,
Infragistics.Win.UltraWinGrid.&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;BeforeRowInsertEventArgs&lt;/font&gt;&lt;font size="2"&gt; e)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.myBindingSource.AddNew();&lt;br&gt;
&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; this&lt;/font&gt;&lt;font size="2"&gt;.myBindingSource.Position++;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; e.Cancel = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;true&lt;/font&gt;&lt;font size="2"&gt;;&lt;br&gt;
}&lt;/font&gt;&gt;
&lt;p&gt;
&lt;font size="2"&gt;3.) Jetzt funktioniert bereits das erste Einfügen. Allerdings erscheint
danach keine neue TemplateAddRow mehr. Hier muss man einen kleinen Trick anwenden:
Man setzt die ActiveRow auf die TemplateAddRow. Dadurch wird eigentlich die TemplateAddRow
nun in eine "echte Row" umgewandelt (was wir bereits ja zuvor manuell gemacht haben.
Danach erstellt das Grid eine neue TemplateAddRow (das ist genau das was wir brauchen).
Etwas unschön ist nun, dass die neue TemplateAddRow automatisch selektiert wird und
wir damit schon wieder einen neuen Datensatz anlegen. Schöner wäre, wenn der gerade
erzeugte Datensatz aktiv bleibt. Dazu merkt man sich einfach die aktive Row und setzt
die danach wieder. Das Ganze habe ich auf einen Button gelegt, mit dem der Anwender
die Eingabe abschließt. Alternativ kann natürlich auch ein anderes Event dafür verwendet
werden. Sinnvoll ist hier sicher auch das BeforeSelectChange-Event des Grids entsprechend
einzubinden.&lt;/font&gt;
&lt;/p&gt;
&lt;font size="2"&gt;&lt;font size="2"&gt; 
&lt;p&gt;
&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;private&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;font size="2"&gt; button1_Click(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;object&lt;/font&gt;&lt;font size="2"&gt; sender, &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;EventArgs&lt;/font&gt;&lt;font size="2"&gt; e)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.myBindingSource.EndEdit();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;UltraGridRow&lt;/font&gt;&lt;font size="2"&gt; temp
= &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.ultraGrid1.ActiveRow;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.ultraGrid1.ActiveRow
= &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.ultraGrid1.Rows.TemplateAddRow;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.ultraGrid1.ActiveRow
= temp;&lt;br&gt;
}&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=20a1762c-1a4d-453d-9f33-c203ea110419" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,20a1762c-1a4d-453d-9f33-c203ea110419.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=4edad4c4-b938-486d-bd0e-d9799ca4345e</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,4edad4c4-b938-486d-bd0e-d9799ca4345e.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,4edad4c4-b938-486d-bd0e-d9799ca4345e.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=4edad4c4-b938-486d-bd0e-d9799ca4345e</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Ist eine ASP.Net Seite scrollbar, gibt es den unschönen Effekt, dass die Seite
nach dem Postback wieder ganz oben steht. Ich habe mal eine kleine Beispiel-Seite,
die diesen Effekt demonstriert:
</p>
        <span style="COLOR: #0000ff">
          <p>
&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="ValuePlanner_2008.Web.INN_ProjectArea.WebForm2"
%&gt;
</p>
        </span>
        <br />
        <span style="BACKGROUND-COLOR: #ffff00">&lt;%@ Register Assembly="cTextBox" Namespace="artiso_lib.UserControls"
TagPrefix="cc1" %&gt;</span>
        <br />
        <span style="COLOR: #0000ff">&lt;!</span>
        <span style="COLOR: #800000">DOCTYPE</span>
        <span style="COLOR: #ff0000">html</span>
        <span style="COLOR: #ff0000">PUBLIC</span>
        <span style="COLOR: #0000ff">"-//W3C//DTD
XHTML 1.0 Transitional//EN"</span>
        <span style="COLOR: #0000ff">"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</span>
        <span style="COLOR: #0000ff">&gt;</span>
        <br />
        <span style="COLOR: #0000ff">&lt;</span>
        <span style="COLOR: #800000">html</span>
        <span style="COLOR: #ff0000">xmlns</span>
        <span style="COLOR: #0000ff">="http://www.w3.org/1999/xhtml"</span>
        <span style="COLOR: #0000ff">&gt;<br /></span> <span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">head</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;<br />
 </span> <span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">title</span><span style="COLOR: #0000ff">&gt;</span>Untitled
Page<span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">title</span><span style="COLOR: #0000ff">&gt;<br /></span> <span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">head</span><span style="COLOR: #0000ff">&gt;<br /></span> <span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">body</span><span style="COLOR: #0000ff">&gt;<br />
 </span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">form</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="form1"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;<br />
  </span> <span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">div</span><span style="COLOR: #0000ff">&gt;</span> <br /><span style="BACKGROUND-COLOR: #ffff00">    &lt;%</span><pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: white; BORDER-BOTTOM-STYLE: none"><span style="COLOR: #606060"> 1:</span><span style="COLOR: #0000ff">for</span> (<span style="COLOR: #0000ff">int</span> i
= 0; i &lt; 50; i++)</pre><pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"><span style="COLOR: #606060"> 2:</span> {</pre><pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: white; BORDER-BOTTOM-STYLE: none"><span style="COLOR: #606060"> 3:</span> Response.Write(i
+ <span style="COLOR: #006080">"&lt;br&gt;"</span>);</pre><pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"><span style="COLOR: #606060"> 4:</span> } </pre><pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: white; BORDER-BOTTOM-STYLE: none"><span style="COLOR: #606060"> 5:</span></pre><span style="BACKGROUND-COLOR: #ffff00">    %&gt;</span> <br />
   <span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">div</span><span style="COLOR: #0000ff">&gt;</span><br />
  <span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">form</span><span style="COLOR: #0000ff">&gt;</span><br />
 <span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">body</span><span style="COLOR: #0000ff">&gt;</span><br /><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">html</span><span style="COLOR: #0000ff">&gt;</span><p><br /><font color="#000000">Dieses Problem kann man ganz einfach umgehen, indem man in der
Page-Direktive das Attribut MaintainScrollPositionOnPostback="true" einfügt, also:</font></p><p><span style="BACKGROUND-COLOR: #ffff00">&lt;%@ Page Language="C#" AutoEventWireup="true"
CodeBehind="WebForm2.aspx.cs" Inherits="ValuePlanner_2008.Web.INN_ProjectArea.WebForm2"
MaintainScrollPositionOnPostback="true"  %&gt;</span></p><img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=4edad4c4-b938-486d-bd0e-d9799ca4345e" /></body>
      <title>Scroll-Position nach PostBack beibehalten</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,4edad4c4-b938-486d-bd0e-d9799ca4345e.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,4edad4c4-b938-486d-bd0e-d9799ca4345e.aspx</link>
      <pubDate>Mon, 20 Aug 2007 09:58:20 GMT</pubDate>
      <description>&lt;p&gt;
Ist eine&amp;nbsp;ASP.Net Seite scrollbar, gibt es den unschönen Effekt, dass die Seite
nach dem Postback wieder ganz oben steht. Ich habe mal eine kleine Beispiel-Seite,
die diesen Effekt demonstriert:
&lt;/p&gt;
&lt;span style="COLOR: #0000ff"&gt; 
&lt;p&gt;
&amp;lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="ValuePlanner_2008.Web.INN_ProjectArea.WebForm2"
%&amp;gt;
&lt;/span&gt; 
&lt;br&gt;
&lt;span style="BACKGROUND-COLOR: #ffff00"&gt;&amp;lt;%@ Register Assembly="cTextBox" Namespace="artiso_lib.UserControls"
TagPrefix="cc1" %&amp;gt;&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #0000ff"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;DOCTYPE&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;html&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;PUBLIC&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;"-//W3C//DTD
XHTML 1.0 Transitional//EN"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;html&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="http://www.w3.org/1999/xhtml"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;br&gt;
&lt;/span&gt;&amp;nbsp;&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;head&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;br&gt;
&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;title&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;Untitled
Page&lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;title&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;br&gt;
&lt;/span&gt;&amp;nbsp;&lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;head&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;br&gt;
&lt;/span&gt;&amp;nbsp;&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;body&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;br&gt;
&amp;nbsp;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;form&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="form1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;br&gt;
&amp;nbsp; &lt;/span&gt;&amp;nbsp;&lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;div&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;br&gt;
&lt;span style="BACKGROUND-COLOR: #ffff00"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;%&lt;/span&gt;&gt;
&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: white; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #606060"&gt; 1:&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;for&lt;/span&gt; (&lt;span style="COLOR: #0000ff"&gt;int&lt;/span&gt; i
= 0; i &amp;lt; 50; i++)&lt;/pre&gt;
&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #606060"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: white; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #606060"&gt; 3:&lt;/span&gt; Response.Write(i
+ &lt;span style="COLOR: #006080"&gt;"&amp;lt;br&amp;gt;"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #606060"&gt; 4:&lt;/span&gt; } &lt;/pre&gt;
&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: white; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #606060"&gt; 5:&lt;/span&gt; &lt;/pre&gt;
&lt;span style="BACKGROUND-COLOR: #ffff00"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;div&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br&gt;
&amp;nbsp; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;form&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br&gt;
&amp;nbsp;&lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;body&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;br&gt;
&lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;html&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;p&gt;
&lt;br&gt;
&lt;font color=#000000&gt;Dieses Problem kann man ganz einfach umgehen, indem man in der
Page-Direktive das Attribut MaintainScrollPositionOnPostback="true" einfügt, also:&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="BACKGROUND-COLOR: #ffff00"&gt;&amp;lt;%@ Page Language="C#" AutoEventWireup="true"
CodeBehind="WebForm2.aspx.cs" Inherits="ValuePlanner_2008.Web.INN_ProjectArea.WebForm2"
MaintainScrollPositionOnPostback="true"&amp;nbsp; %&amp;gt;&lt;/span&gt;
&lt;/p&gt;
&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=4edad4c4-b938-486d-bd0e-d9799ca4345e" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,4edad4c4-b938-486d-bd0e-d9799ca4345e.aspx</comments>
      <category>ASP.Net;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=c41734ef-1227-4783-bbfb-5edb0ee509a2</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,c41734ef-1227-4783-bbfb-5edb0ee509a2.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,c41734ef-1227-4783-bbfb-5edb0ee509a2.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=c41734ef-1227-4783-bbfb-5edb0ee509a2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Im ASP.Net AJAX Toolkit findet man ein ModalPopup, das sehr gute Dienste leistet,
will man Meldungen etwas eleganter ausgeben als mit einem schlichten alert(). Die
Handhabung ist relativ einfach. Man nehme ein beliebiges Serverseitiges Control und
weise diesem den ModalPopupExtender zu. Dann gibt man noch mindestens die ID des Controls
an, das den Inhalt des Popups repräsentieren soll und fertig. Will man das Popup allerdings
client-seitig per Java-Script aufrufen, muss man ein wenig in die Trickkiste greifen.
Das Problem dabei ist, dass der ModalPopupExtender immer ein TargetControl braucht.
Ich habe dafür einfach ein unsichtbares DIV erzeugt, das mit runat="server" auch auf
dem Server sichtbar gemacht wurde. Dann kann man mit $Find('&lt;ID des ModalPopupExtenders&gt;').show()
das Popup aufrufen.
</p>
        <p>
Neu war an diesem Beispiel für mich auch der Style filter: alpha(opacity = 70) mit
dem man eine Transparenz erzeugen kann.
</p>
        <p>
        </p>
        <div>
          <pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none">
            <span style="BACKGROUND-COLOR: #ffff00">&lt;%@
Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ValuePlanner_2008.Web.INN_ProjectArea.WebForm1"
%&gt;</span>
            <span style="BACKGROUND-COLOR: #ffff00">&lt;%@ Register Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit" TagPrefix="cc1" %&gt;</span>
            <span style="COLOR: #0000ff">&lt;!</span>
            <span style="COLOR: #800000">DOCTYPE</span>
            <span style="COLOR: #ff0000">html</span>
            <span style="COLOR: #ff0000">PUBLIC</span>
            <span style="COLOR: #0000ff">"-//W3C//DTD
XHTML 1.0 Transitional//EN"</span>
            <span style="COLOR: #0000ff">"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">html</span>
            <span style="COLOR: #ff0000">xmlns</span>
            <span style="COLOR: #0000ff">="http://www.w3.org/1999/xhtml"</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">head</span>
            <span style="COLOR: #ff0000">runat</span>
            <span style="COLOR: #0000ff">="server"</span>
            <span style="COLOR: #0000ff">&gt;</span>
            <span style="COLOR: #0000ff">&lt;</span>
            <span style="COLOR: #800000">title</span>
            <span style="COLOR: #0000ff">&gt;</span>Untitled
Page<span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">title</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">style</span><span style="COLOR: #ff0000">type</span><span style="COLOR: #0000ff">="text/css"</span><span style="COLOR: #0000ff">&gt;</span> .modalBackground
{ filter: alpha(opacity = 70); background-color: #CCCCCC; } .ErrorMessage { background-color:
#800000; color: #FFFFFF; } <span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">style</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">head</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">script</span><span style="COLOR: #ff0000">language</span><span style="COLOR: #0000ff">="javascript"</span><span style="COLOR: #ff0000">type</span><span style="COLOR: #0000ff">="text/javascript"</span><span style="COLOR: #0000ff">&gt;</span><pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: white; BORDER-BOTTOM-STYLE: none"><span style="COLOR: #606060"> 1:</span>  </pre><pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"><span style="COLOR: #606060"> 2:</span><span style="COLOR: #0000ff">function</span> okScript()</pre><pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: white; BORDER-BOTTOM-STYLE: none"><span style="COLOR: #606060"> 3:</span> {</pre><pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"><span style="COLOR: #606060"> 4:</span> alert
(<span style="COLOR: #006080">"OK-Button wurde gedrückt"</span>);</pre><pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: white; BORDER-BOTTOM-STYLE: none"><span style="COLOR: #606060"> 5:</span> }</pre><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">script</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">body</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">form</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="form1"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">div</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="PopupPseudoPanel"</span><span style="COLOR: #ff0000">style</span><span style="COLOR: #0000ff">="display:
none"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">div</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">cc1:ToolkitScriptManager</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="ToolkitScriptManager1"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">cc1:ToolkitScriptManager</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">cc1:ModalPopupExtender</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="ModalPopupExtender"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">PopupControlID</span><span style="COLOR: #0000ff">="Panel1"</span><span style="COLOR: #ff0000">DynamicServicePath</span><span style="COLOR: #0000ff">=""</span><span style="COLOR: #ff0000">Enabled</span><span style="COLOR: #0000ff">="True"</span><span style="COLOR: #ff0000">TargetControlID</span><span style="COLOR: #0000ff">="PopupPseudoPanel"</span><span style="COLOR: #ff0000">BackgroundCssClass</span><span style="COLOR: #0000ff">="modalBackground"</span><span style="COLOR: #ff0000">OkControlID</span><span style="COLOR: #0000ff">="OkButton"</span><span style="COLOR: #ff0000">CancelControlID</span><span style="COLOR: #0000ff">="CancelButton"</span><span style="COLOR: #ff0000">OnOkScript</span><span style="COLOR: #0000ff">="okScript();"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">cc1:ModalPopupExtender</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">br</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">br</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">input</span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="Button2"</span><span style="COLOR: #ff0000">type</span><span style="COLOR: #0000ff">="button"</span><span style="COLOR: #ff0000">value</span><span style="COLOR: #0000ff">="button"</span><span style="COLOR: #ff0000">onclick</span><span style="COLOR: #0000ff">="$find('ModalPopupExtender').show();"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:Panel</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="Panel1"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">CssClass</span><span style="COLOR: #0000ff">="ErrorMessage"</span><span style="COLOR: #ff0000">style</span><span style="COLOR: #0000ff">="display:none"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">h1</span><span style="COLOR: #0000ff">&gt;</span> Popup<span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">h1</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">p</span><span style="COLOR: #0000ff">&gt;</span> Das
ist ein Popup!<span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">p</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">center</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:Button</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="OkButton"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">Text</span><span style="COLOR: #0000ff">="OK"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">asp:Button</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:Button</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="CancelButton"</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">Text</span><span style="COLOR: #0000ff">="Cancel"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">asp:Button</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">center</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">asp:Panel</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">form</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">body</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">html</span><span style="COLOR: #0000ff">&gt;</span></pre>
        </div>
        <span style="COLOR: #0000ff">
          <div>
          </div>
          <p>
          </p>
          <p>
 
</p>
        </span>
        <div>
        </div>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=c41734ef-1227-4783-bbfb-5edb0ee509a2" />
      </body>
      <title>AJAX Toolkit ModalPopup per Javascript aufrufen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,c41734ef-1227-4783-bbfb-5edb0ee509a2.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,c41734ef-1227-4783-bbfb-5edb0ee509a2.aspx</link>
      <pubDate>Sat, 18 Aug 2007 11:57:57 GMT</pubDate>
      <description>&lt;p&gt;
Im ASP.Net AJAX Toolkit findet man ein ModalPopup, das sehr gute Dienste leistet,
will man Meldungen etwas eleganter ausgeben als mit einem schlichten alert(). Die
Handhabung ist relativ einfach. Man nehme ein beliebiges Serverseitiges Control und
weise diesem den ModalPopupExtender zu. Dann gibt man noch mindestens die ID des Controls
an, das den Inhalt des Popups repräsentieren soll und fertig. Will man das Popup allerdings
client-seitig per Java-Script aufrufen, muss man ein wenig in die Trickkiste greifen.
Das Problem dabei ist, dass der ModalPopupExtender immer ein TargetControl braucht.
Ich habe dafür einfach ein unsichtbares DIV erzeugt, das mit runat="server" auch auf
dem Server sichtbar gemacht wurde. Dann kann man mit $Find('&amp;lt;ID des ModalPopupExtenders&amp;gt;').show()
das Popup aufrufen.
&lt;/p&gt;
&lt;p&gt;
Neu war an diesem Beispiel für mich auch der Style filter: alpha(opacity = 70) mit
dem man eine Transparenz erzeugen kann.
&lt;/p&gt;
&lt;p&gt;
&lt;div&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="BACKGROUND-COLOR: #ffff00"&gt;&amp;lt;%@
Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ValuePlanner_2008.Web.INN_ProjectArea.WebForm1"
%&amp;gt;&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: #ffff00"&gt;&amp;lt;%@ Register Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit" TagPrefix="cc1" %&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;DOCTYPE&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;html&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;PUBLIC&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;"-//W3C//DTD
XHTML 1.0 Transitional//EN"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;html&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="http://www.w3.org/1999/xhtml"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;head&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;title&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;Untitled
Page&lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;title&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;style&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;type&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="text/css"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; .modalBackground
{ filter: alpha(opacity = 70); background-color: #CCCCCC; } .ErrorMessage { background-color:
#800000; color: #FFFFFF; } &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;style&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;head&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;script&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;language&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="javascript"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;type&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="text/javascript"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: white; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #606060"&gt; 1:&lt;/span&gt; &amp;nbsp;&lt;/pre&gt;
&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #606060"&gt; 2:&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;function&lt;/span&gt; okScript()&lt;/pre&gt;
&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: white; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #606060"&gt; 3:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #606060"&gt; 4:&lt;/span&gt; alert
(&lt;span style="COLOR: #006080"&gt;"OK-Button wurde gedrückt"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: white; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #606060"&gt; 5:&lt;/span&gt; }&lt;/pre&gt;
&lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;script&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;body&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;form&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="form1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;div&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PopupPseudoPanel"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;style&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="display:
none"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;div&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;cc1:ToolkitScriptManager&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ToolkitScriptManager1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;cc1:ToolkitScriptManager&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;cc1:ModalPopupExtender&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ModalPopupExtender"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;PopupControlID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Panel1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;DynamicServicePath&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;=""&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Enabled&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="True"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;TargetControlID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="PopupPseudoPanel"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;BackgroundCssClass&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="modalBackground"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;OkControlID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="OkButton"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;CancelControlID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CancelButton"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;OnOkScript&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="okScript();"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;cc1:ModalPopupExtender&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;br&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;br&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;input&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;id&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Button2"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;type&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="button"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;value&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="button"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;onclick&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="$find('ModalPopupExtender').show();"&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:Panel&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Panel1"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;CssClass&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="ErrorMessage"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;style&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="display:none"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;h1&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; Popup&lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;h1&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;p&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; Das
ist ein Popup!&lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;p&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;center&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:Button&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="OkButton"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="OK"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:Button&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:Button&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="CancelButton"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;="Cancel"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:Button&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;center&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;asp:Panel&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;form&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;body&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;html&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;span style="COLOR: #0000ff"&gt; 
&lt;div&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;/span&gt; 
&lt;div&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=c41734ef-1227-4783-bbfb-5edb0ee509a2" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,c41734ef-1227-4783-bbfb-5edb0ee509a2.aspx</comments>
      <category>ASP.Net;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=a35571ea-f476-4f69-97fd-e236bf6f9f48</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,a35571ea-f476-4f69-97fd-e236bf6f9f48.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,a35571ea-f476-4f69-97fd-e236bf6f9f48.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=a35571ea-f476-4f69-97fd-e236bf6f9f48</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Will man in einem Infragistics WebGrid ein Control in einer Zelle einer TemplatedColumn
ansprechen, dann ist das gar nicht so einfach wie zunächst vermutet. Man muss ein
paar Umwege einlegen. So funktionierts aber dann:
</p>
        <font size="2">
          <p>
          </p>
        </font>
        <font color="#0000ff" size="2">protected</font>
        <font size="2">
        </font>
        <font color="#0000ff" size="2">void</font>
        <font size="2"> UltraWebGrid1_InitializeRow(</font>
        <font color="#0000ff" size="2">object</font>
        <font size="2"> sender,
Infragistics.WebUI.UltraWebGrid.</font>
        <font color="#2b91af" size="2">RowEventArgs</font>
        <font size="2"> e)<br />
{<br />
    </font>
        <font color="#2b91af" size="2">DropDownList</font>
        <font size="2"> ddlUnit
= ((</font>
        <font color="#2b91af" size="2">DropDownList</font>
        <font size="2">)((</font>
        <font color="#2b91af" size="2">CellItem</font>
        <font size="2">)((</font>
        <font color="#2b91af" size="2">TemplatedColumn</font>
        <font size="2">)e.Row.Cells.FromKey(</font>
        <font color="#a31515" size="2">"Unit"</font>
        <font size="2">).Column).CellItems[e.Row.Index]).Controls[1]);<br />
    ....<br />
}
</font>
        <p>
Statt dem Controls[1] könnte man auch noch ein FindControl() nutzen, das wäre noch
etwas eleganter.
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=a35571ea-f476-4f69-97fd-e236bf6f9f48" />
      </body>
      <title>Infragistics WebGrid Control in einer Zelle ansprechen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,a35571ea-f476-4f69-97fd-e236bf6f9f48.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,a35571ea-f476-4f69-97fd-e236bf6f9f48.aspx</link>
      <pubDate>Wed, 08 Aug 2007 09:05:43 GMT</pubDate>
      <description>&lt;p&gt;
Will man in einem Infragistics WebGrid ein Control in einer Zelle einer TemplatedColumn
ansprechen, dann ist das gar nicht so einfach wie zunächst vermutet. Man muss ein
paar Umwege einlegen. So funktionierts aber dann:
&lt;/p&gt;
&lt;font size="2"&gt; 
&lt;p&gt;
&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;protected&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;font size="2"&gt; UltraWebGrid1_InitializeRow(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;object&lt;/font&gt;&lt;font size="2"&gt; sender,
Infragistics.WebUI.UltraWebGrid.&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;RowEventArgs&lt;/font&gt;&lt;font size="2"&gt; e)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;DropDownList&lt;/font&gt;&lt;font size="2"&gt; ddlUnit
= ((&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;DropDownList&lt;/font&gt;&lt;font size="2"&gt;)((&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;CellItem&lt;/font&gt;&lt;font size="2"&gt;)((&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;TemplatedColumn&lt;/font&gt;&lt;font size="2"&gt;)e.Row.Cells.FromKey(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;"Unit"&lt;/font&gt;&lt;font size="2"&gt;).Column).CellItems[e.Row.Index]).Controls[1]);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;br&gt;
}&gt;
&lt;/font&gt; 
&lt;p&gt;
Statt dem Controls[1] könnte man auch noch ein FindControl() nutzen, das wäre noch
etwas eleganter.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=a35571ea-f476-4f69-97fd-e236bf6f9f48" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,a35571ea-f476-4f69-97fd-e236bf6f9f48.aspx</comments>
      <category>Komponenten und Bibliotheken;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=8c0f402f-5186-4b31-aaa1-778f57082fb9</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,8c0f402f-5186-4b31-aaa1-778f57082fb9.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,8c0f402f-5186-4b31-aaa1-778f57082fb9.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=8c0f402f-5186-4b31-aaa1-778f57082fb9</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <span style="COLOR: blue">
        </span>
        <p style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: courier new">
          <font face="Trebuchet MS">Gerade hatte ich mal mit den Settings für Winform-Anwendungen
etwas rumgespielt und bin dabei darauf gestoßen dass man auch für Klassenbibliotheken
eine Settings-Datei anlegen und darin Werte erfassen kann. Die Frage war nun,
wie kann ich diese Werte einstellen, wenn ich die Klassenbibliothek in eine Anwendung
integriere? Nach einigem Googeln und Testen hier nun meine Ergebnisse:</font>
        </p>
        <div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: courier new">
          <ol>
            <li>
              <font face="Trebuchet MS">Die Konfiguration der Anwendung inkl. aller Klassenbibliotheken
werden über eine zentrale konfigurationsdatei (app.config bzw. &lt;Anwendungsname&gt;.exe.config)
vorgenommen.</font>
            </li>
            <li>
              <font face="Trebuchet MS">Die Konfigurationsparameter der Klassenbibliothek werden
in diese zentrale Konfigurationsdatei leider nicht automatisch übertragen.</font>
            </li>
            <li>
              <font face="Trebuchet MS">Werden keine Konfigurationsparameter für die Klassenbibliothek
angegeben, behält diese ihre Default-Werte (das sind die, die beim Kompilieren in
der app.config der Klassenbibliothek standen). Diese Default-Werte sind in der Settings.Designer.cs
hinterlegt und werden in die DLL reinkompiliert.</font>
            </li>
            <li>
              <font face="Trebuchet MS">Man kann diese Default-Werte übersteuern, indem man in der
app.config der Anwendung einen zusätzlichen Settings-Block einfügt (im unteren Beispiel
der Bereich ClassLibrary1.Properties.Settings). Diesen kopiert man am besten aus der
app.config der Klassenbibliothek. Wichtig ist, dass dieser neue Block noch registriert
wird. Dies passiert im Bereich &lt;configSections&gt; mit der Zeile.<br /><br /></font>
              <font face="Courier New">
                <font color="#0000ff">&lt;</font>
                <span style="COLOR: #a31515">section</span>
                <span style="COLOR: blue">
                </span>
                <span style="COLOR: red">name</span>
                <span style="COLOR: blue">=</span>"<span style="COLOR: blue">ClassLibrary1.Properties.Settings</span>"<span style="COLOR: blue"></span><span style="COLOR: red">type</span><span style="COLOR: blue">=</span>"<span style="COLOR: blue">System.Configuration.ClientSettingsSection,
System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</span>"<span style="COLOR: blue"></span><span style="COLOR: red">requirePermission</span><span style="COLOR: blue">=</span>"<span style="COLOR: blue">false</span>"<span style="COLOR: blue"> /&gt;<br /><br /><font face="Trebuchet MS" color="#000000">Sonst erhält man eine Exception, dass die
Configuration ungültig ist. </font></span></font>
            </li>
          </ol>
        </div>
        <p>
          <font face="Courier New">
            <span style="COLOR: blue">
              <font face="Trebuchet MS" color="#000000">Nun
kann man aus der Anwendung heraus auch die Parameter der Klassenbibliothek einstellen.
Ich habe das z.B. verwendet um mir die Übergabe von Konfigurationsparametern an die
Klassenbibliothek zu ersparen.</font>
            </span>
          </font>
        </p>
        <p>
          <font face="Courier New">
            <span style="COLOR: blue">
              <font face="Trebuchet MS" color="#000000">Was
mir allerdings nicht besonders gut gefällt, ist die Tatsache, dass ich beim hinzufügen
von neuen Config-Parametern für die Klassenbibliothek immer daran denken muss, auch
in der Anwendung diese hinzuzufügen. Vergesse ich das, erhalte ich zwar keinen Fehler
aber es wird einfach mit dem Default-Wert gearbeitet. Das kann manchmal durchaus erwünscht
sein, in anderen Fällen ist das aber eher problematisch.</font>
              <br />
            </span>
          </font>
        </p>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">&lt;?</span>
          <span style="COLOR: #a31515">xml</span>
          <span style="COLOR: blue">
          </span>
          <span style="COLOR: red">version</span>
          <span style="COLOR: blue">=</span>"<span style="COLOR: blue">1.0</span>"<span style="COLOR: blue"></span><span style="COLOR: red">encoding</span><span style="COLOR: blue">=</span>"<span style="COLOR: blue">utf-8</span>"<span style="COLOR: blue"> ?&gt;</span></pre>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">&lt;</span>
          <span style="COLOR: #a31515">configuration</span>
          <span style="COLOR: blue">&gt;</span>
        </pre>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">    &lt;</span>
          <span style="COLOR: #a31515">configSections</span>
          <span style="COLOR: blue">&gt;</span>
        </pre>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">       
&lt;</span>
          <span style="COLOR: #a31515">sectionGroup</span>
          <span style="COLOR: blue">
          </span>
          <span style="COLOR: red">name</span>
          <span style="COLOR: blue">=</span>"<span style="COLOR: blue">applicationSettings</span>"<span style="COLOR: blue"></span><span style="COLOR: red">type</span><span style="COLOR: blue">=</span>"<span style="COLOR: blue">System.Configuration.ApplicationSettingsGroup, 
<br />
               System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</span>"<span style="COLOR: blue"> &gt;</span></pre>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">       
    &lt;</span>
          <span style="COLOR: #a31515">section</span>
          <span style="COLOR: blue">
          </span>
          <span style="COLOR: red">name</span>
          <span style="COLOR: blue">=</span>"<span style="COLOR: blue">WindowsApplication1.Properties.Settings</span>"<span style="COLOR: blue"></span><span style="COLOR: red">type</span><span style="COLOR: blue">=</span>"<span style="COLOR: blue">System.Configuration.ClientSettingsSection, 
<br />
               System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</span>"<span style="COLOR: blue"></span><span style="COLOR: red">requirePermission</span><span style="COLOR: blue">=</span>"<span style="COLOR: blue">false</span>"<span style="COLOR: blue"> /&gt;</span></pre>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">       
    &lt;</span>
          <span style="COLOR: #a31515">section</span>
          <span style="COLOR: blue">
          </span>
          <span style="COLOR: red">name</span>
          <span style="COLOR: blue">=</span>"<span style="COLOR: blue">ClassLibrary1.Properties.Settings</span>"<span style="COLOR: blue"></span><span style="COLOR: red">type</span><span style="COLOR: blue">=</span>"<span style="COLOR: blue">System.Configuration.ClientSettingsSection, 
<br />
               System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</span>"<span style="COLOR: blue"></span><span style="COLOR: red">requirePermission</span><span style="COLOR: blue">=</span>"<span style="COLOR: blue">false</span>"<span style="COLOR: blue"> /&gt;</span></pre>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">       
&lt;/</span>
          <span style="COLOR: #a31515">sectionGroup</span>
          <span style="COLOR: blue">&gt;</span>
        </pre>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">    &lt;/</span>
          <span style="COLOR: #a31515">configSections</span>
          <span style="COLOR: blue">&gt;</span>
        </pre>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">    &lt;</span>
          <span style="COLOR: #a31515">applicationSettings</span>
          <span style="COLOR: blue">&gt;</span>
        </pre>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">       
&lt;</span>
          <span style="COLOR: #a31515">WindowsApplication1.Properties.Settings</span>
          <span style="COLOR: blue">&gt;</span>
        </pre>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">       
    &lt;</span>
          <span style="COLOR: #a31515">setting</span>
          <span style="COLOR: blue">
          </span>
          <span style="COLOR: red">name</span>
          <span style="COLOR: blue">=</span>"<span style="COLOR: blue">Setting</span>"<span style="COLOR: blue"></span><span style="COLOR: red">serializeAs</span><span style="COLOR: blue">=</span>"<span style="COLOR: blue">String</span>"<span style="COLOR: blue">&gt;</span></pre>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">       
        &lt;</span>
          <span style="COLOR: #a31515">value</span>
          <span style="COLOR: blue">&gt;</span>abc<span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">value</span><span style="COLOR: blue">&gt;</span></pre>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">       
    &lt;/</span>
          <span style="COLOR: #a31515">setting</span>
          <span style="COLOR: blue">&gt;</span>
        </pre>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">       
&lt;/</span>
          <span style="COLOR: #a31515">WindowsApplication1.Properties.Settings</span>
          <span style="COLOR: blue">&gt;</span>
        </pre>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">       
&lt;</span>
          <span style="COLOR: #a31515">ClassLibrary1.Properties.Settings</span>
          <span style="COLOR: blue">&gt;</span>
        </pre>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">       
    &lt;</span>
          <span style="COLOR: #a31515">setting</span>
          <span style="COLOR: blue">
          </span>
          <span style="COLOR: red">name</span>
          <span style="COLOR: blue">=</span>"<span style="COLOR: blue">Setting</span>"<span style="COLOR: blue"></span><span style="COLOR: red">serializeAs</span><span style="COLOR: blue">=</span>"<span style="COLOR: blue">String</span>"<span style="COLOR: blue">&gt;</span></pre>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">       
        &lt;</span>
          <span style="COLOR: #a31515">value</span>
          <span style="COLOR: blue">&gt;</span>zzzz<span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">value</span><span style="COLOR: blue">&gt;</span></pre>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">       
    &lt;/</span>
          <span style="COLOR: #a31515">setting</span>
          <span style="COLOR: blue">&gt;</span>
        </pre>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">       
&lt;/</span>
          <span style="COLOR: #a31515">ClassLibrary1.Properties.Settings</span>
          <span style="COLOR: blue">&gt;</span>
        </pre>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">    &lt;/</span>
          <span style="COLOR: #a31515">applicationSettings</span>
          <span style="COLOR: blue">&gt;</span>
        </pre>
        <pre style="MARGIN: 0px">
          <span style="COLOR: blue">&lt;/</span>
          <span style="COLOR: #a31515">configuration</span>
          <span style="COLOR: blue">&gt;</span>
        </pre>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=8c0f402f-5186-4b31-aaa1-778f57082fb9" />
      </body>
      <title>Konfigurationsdateien in Klassenbibliotheken</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,8c0f402f-5186-4b31-aaa1-778f57082fb9.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,8c0f402f-5186-4b31-aaa1-778f57082fb9.aspx</link>
      <pubDate>Tue, 05 Jun 2007 09:10:06 GMT</pubDate>
      <description>&lt;p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;span style="COLOR: blue"&gt;&lt;/span&gt; 
&lt;p style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: courier new"&gt;
&lt;font face="Trebuchet MS"&gt;Gerade hatte ich mal mit den Settings für Winform-Anwendungen
etwas rumgespielt und bin dabei darauf gestoßen dass man auch für Klassenbibliotheken
eine Settings-Datei anlegen und&amp;nbsp;darin Werte erfassen kann. Die Frage war nun,
wie kann ich diese Werte einstellen, wenn ich die Klassenbibliothek in eine Anwendung
integriere? Nach einigem Googeln und Testen hier nun meine Ergebnisse:&lt;/font&gt;
&lt;/p&gt;
&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: courier new"&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;font face="Trebuchet MS"&gt;Die Konfiguration der Anwendung inkl. aller Klassenbibliotheken
werden über eine zentrale konfigurationsdatei (app.config bzw. &amp;lt;Anwendungsname&amp;gt;.exe.config)
vorgenommen.&lt;/font&gt; 
&lt;li&gt;
&lt;font face="Trebuchet MS"&gt;Die Konfigurationsparameter der Klassenbibliothek werden
in diese zentrale Konfigurationsdatei leider nicht automatisch übertragen.&lt;/font&gt; 
&lt;li&gt;
&lt;font face="Trebuchet MS"&gt;Werden keine Konfigurationsparameter für die Klassenbibliothek
angegeben, behält diese ihre Default-Werte (das sind die, die beim Kompilieren in
der app.config der Klassenbibliothek standen). Diese Default-Werte sind in der Settings.Designer.cs
hinterlegt und werden in die DLL reinkompiliert.&lt;/font&gt; 
&lt;li&gt;
&lt;font face="Trebuchet MS"&gt;Man kann diese Default-Werte übersteuern, indem man in der
app.config der Anwendung einen zusätzlichen Settings-Block einfügt (im unteren Beispiel
der Bereich ClassLibrary1.Properties.Settings). Diesen kopiert man am besten aus der
app.config der Klassenbibliothek. Wichtig ist, dass dieser neue Block noch registriert
wird. Dies passiert im Bereich &amp;lt;configSections&amp;gt; mit der Zeile.&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color=#0000ff&gt;&amp;lt;&lt;/font&gt;&lt;span style="COLOR: #a31515"&gt;section&lt;/span&gt;&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;name&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;ClassLibrary1.Properties.Settings&lt;/span&gt;"&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;type&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;System.Configuration.ClientSettingsSection,
System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&lt;/span&gt;"&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;requirePermission&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;false&lt;/span&gt;"&lt;span style="COLOR: blue"&gt; /&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;font face="Trebuchet MS" color=#000000&gt;Sonst erhält man eine Exception, dass die
Configuration ungültig ist. &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&lt;span style="COLOR: blue"&gt;&lt;font face="Trebuchet MS" color=#000000&gt;Nun
kann man aus der Anwendung heraus auch die Parameter der Klassenbibliothek einstellen.
Ich habe das z.B. verwendet um mir die Übergabe von Konfigurationsparametern an die
Klassenbibliothek zu ersparen.&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&lt;span style="COLOR: blue"&gt;&lt;font face="Trebuchet MS" color=#000000&gt;Was
mir allerdings nicht besonders gut gefällt, ist die Tatsache, dass ich beim hinzufügen
von neuen Config-Parametern für die Klassenbibliothek immer daran denken muss, auch
in der Anwendung diese hinzuzufügen. Vergesse ich das, erhalte ich zwar keinen Fehler
aber es wird einfach mit dem Default-Wert gearbeitet. Das kann manchmal durchaus erwünscht
sein, in anderen Fällen ist das aber eher problematisch.&lt;/font&gt;
&lt;br&gt;
&lt;/p&gt;
&gt;&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;xml&lt;/span&gt;&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;version&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;1.0&lt;/span&gt;"&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;encoding&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;utf-8&lt;/span&gt;"&lt;span style="COLOR: blue"&gt; ?&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;configuration&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;configSections&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;sectionGroup&lt;/span&gt;&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;name&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;applicationSettings&lt;/span&gt;"&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;type&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;System.Configuration.ApplicationSettingsGroup, 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&lt;/span&gt;"&lt;span style="COLOR: blue"&gt; &amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;section&lt;/span&gt;&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;name&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;WindowsApplication1.Properties.Settings&lt;/span&gt;"&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;type&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;System.Configuration.ClientSettingsSection, 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&lt;/span&gt;"&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;requirePermission&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;false&lt;/span&gt;"&lt;span style="COLOR: blue"&gt; /&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;section&lt;/span&gt;&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;name&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;ClassLibrary1.Properties.Settings&lt;/span&gt;"&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;type&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;System.Configuration.ClientSettingsSection, 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&lt;/span&gt;"&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;requirePermission&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;false&lt;/span&gt;"&lt;span style="COLOR: blue"&gt; /&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;sectionGroup&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;configSections&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;applicationSettings&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;WindowsApplication1.Properties.Settings&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;setting&lt;/span&gt;&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;name&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;Setting&lt;/span&gt;"&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;serializeAs&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;String&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;value&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;abc&lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;value&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;setting&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;WindowsApplication1.Properties.Settings&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;ClassLibrary1.Properties.Settings&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;setting&lt;/span&gt;&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;name&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;Setting&lt;/span&gt;"&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;serializeAs&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;String&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;value&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;zzzz&lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;value&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;setting&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;ClassLibrary1.Properties.Settings&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;applicationSettings&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="MARGIN: 0px"&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;configuration&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=8c0f402f-5186-4b31-aaa1-778f57082fb9" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,8c0f402f-5186-4b31-aaa1-778f57082fb9.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=ccbe1144-edae-44d3-9407-df06640a16d2</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,ccbe1144-edae-44d3-9407-df06640a16d2.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,ccbe1144-edae-44d3-9407-df06640a16d2.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=ccbe1144-edae-44d3-9407-df06640a16d2</wfw:commentRss>
      <title>Einstellungen f&amp;uuml;r die statische Codeanalyse in VS verteilen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,ccbe1144-edae-44d3-9407-df06640a16d2.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,ccbe1144-edae-44d3-9407-df06640a16d2.aspx</link>
      <pubDate>Thu, 10 May 2007 14:25:26 GMT</pubDate>
      <description>&lt;p&gt;
Mit der statischen Codeanalyse in VS kann der Quellcode nach verschiedenen Regeln
analysiert werden. Es lassen sich auch eigene Regeln erstellen. Beginnt man damit
zu arbeiten, ergibt sich die Frage, wie kann man die benutzerdefinierten Regeln und
die Einstellung, welche Regeln verwendet werden sollen auf mehrere Projekte und für
mehrere Entwickler anwenden.
&lt;/p&gt;
&lt;p&gt;
Dazu ein paar Überlegungen:
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN-LEFT: 36pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1"&gt;
&lt;font face=Arial size=2&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: arial"&gt;&lt;span style="mso-list: ignore"&gt;1.)&lt;font face="Times New Roman" size=1&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face=Arial size=2&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: arial"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;Benutzerdefinierte
Regeln können durch Kopieren der entsprechenden DLL-Dateien auf die einzelnen Rechner
verteilt werden. Dies kann z.B. über das Login-Script erledigt werden.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN-LEFT: 36pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1"&gt;
&lt;font face=Arial size=2&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: arial"&gt;&lt;span style="mso-list: ignore"&gt;2.)&lt;font face="Times New Roman" size=1&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face=Arial size=2&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: arial"&gt;Die
Einstellungen welche Regeln aktiviert sind, sind im Projekt hinterlegt. Über die Quellcodeverwaltung
nutzen somit alle Entwickler, die das Projekt bearbeiten, die gleiche Einstellung.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN-LEFT: 36pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1"&gt;
&lt;font face=Arial size=2&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: arial"&gt;&lt;span style="mso-list: ignore"&gt;3.)&lt;font face="Times New Roman" size=1&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face=Arial size=2&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: arial"&gt;Um
die Einstellungen für neue Projekte zu übernehmen bietet sich die Erstellung einer
entsprechenden Projektvorlage an, in der die entsprechenden Einstellungen vorgenommen
werden. Wird ein neues Projekt auf dieser Vorlage erstellt, so erbt dieses die Einstellungen
aus der Vorlage.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=ccbe1144-edae-44d3-9407-df06640a16d2" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,ccbe1144-edae-44d3-9407-df06640a16d2.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=9cceae37-c52c-470b-b44a-7d0029027fdb</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,9cceae37-c52c-470b-b44a-7d0029027fdb.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,9cceae37-c52c-470b-b44a-7d0029027fdb.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=9cceae37-c52c-470b-b44a-7d0029027fdb</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
 Lars Keller verweist in seinem Blog-Eintrag auf eine <a href="http://www.drp.co.za/Media/Posters/PostersPDF/tabid/62/Default.aspx">Seite</a>,
auf der man verschiedene Poster zu Entwicklerthemen rund um VSTS, WF, ASP.Net und
mehr findet. Die Poster können kostenlos als PDF heruntergeladen werden. Als registrierter
Benutzer kann man auch auf hochaufgelöste JPEGs und auf Beta-Posters zugreifen. 
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/InteressanteEntwicklerposterVSTSWFASP.N_8F2E/image%7B0%7D%5B2%5D.png" atomicselection="true">
            <img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="225" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/InteressanteEntwicklerposterVSTSWFASP.N_8F2E/image%7B0%7D_thumb.png" width="374" border="0" />
          </a>
        </p>
        <p>
          <a href="http://blogs.dotnet-braunschweig.de/Lars/PermaLink,guid,08a9e3bf-2185-45ee-b082-1545287a3505.aspx">Link
to Lars Keller ...inspired by .NET - Interessante Entwicklerposter: VSTS, WF, ASP.NET,..</a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=9cceae37-c52c-470b-b44a-7d0029027fdb" />
      </body>
      <title>Interessante Entwicklerposter: VSTS, WF, ASP.NET,..</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,9cceae37-c52c-470b-b44a-7d0029027fdb.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,9cceae37-c52c-470b-b44a-7d0029027fdb.aspx</link>
      <pubDate>Sat, 28 Apr 2007 08:10:55 GMT</pubDate>
      <description>&lt;p&gt;
&amp;nbsp;Lars Keller verweist in seinem Blog-Eintrag auf eine &lt;a href="http://www.drp.co.za/Media/Posters/PostersPDF/tabid/62/Default.aspx"&gt;Seite&lt;/a&gt;,
auf der man verschiedene Poster zu Entwicklerthemen rund um VSTS, WF, ASP.Net und
mehr findet. Die Poster können kostenlos als PDF heruntergeladen werden. Als registrierter
Benutzer kann man auch auf hochaufgelöste JPEGs und auf Beta-Posters zugreifen.&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/InteressanteEntwicklerposterVSTSWFASP.N_8F2E/image%7B0%7D%5B2%5D.png" atomicselection="true"&gt;&lt;img style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=225 src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/InteressanteEntwicklerposterVSTSWFASP.N_8F2E/image%7B0%7D_thumb.png" width=374 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.dotnet-braunschweig.de/Lars/PermaLink,guid,08a9e3bf-2185-45ee-b082-1545287a3505.aspx"&gt;Link
to Lars Keller ...inspired by .NET - Interessante Entwicklerposter: VSTS, WF, ASP.NET,..&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=9cceae37-c52c-470b-b44a-7d0029027fdb" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,9cceae37-c52c-470b-b44a-7d0029027fdb.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=b4a818ff-c167-4f48-bbc6-9be71edc5c4a</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,b4a818ff-c167-4f48-bbc6-9be71edc5c4a.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,b4a818ff-c167-4f48-bbc6-9be71edc5c4a.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=b4a818ff-c167-4f48-bbc6-9be71edc5c4a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
 Vor allem wenn man mit Services programmiert, hat man oft die Anforderung, dass
beim Debuggen mehrere Projekte innerhalb der Solution gestartet werden müssen, z.B.
ein Service und ein entsprechender Client. Der manuelle Weg war hier, dass man den
Service als Startup-Projekt eingertragen hat, das debuggen startet und dann auf den
Client im Solution Explorer mit der rechten Maustaste klickt und dann hier Debug /
Start new Instance auswählt. 
</p>
        <p>
          <br />
Es gibt aber auch noch eine elegantere Möglichkeit. Auf der Eigenschaftsseite der
Solution (rechte Maustaste / Properties) kann man unter Startup Project auch die Option
Multiple startup projects wählen. Hier kann man nun bei mehreren Projekten die Action
auf Start bzw. Start without debugging einstellen. Sogar die Startreihenfolge der
einzlnen Projekte lässt sich definieren. Damit starten nun die eingestellten Anwendungen
auf einmal.
</p>
        <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MehrereProjekteeinerSolutionstarten_85FD/image%7B0%7D%5B5%5D.png" atomicselection="true">
          <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="359" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MehrereProjekteeinerSolutionstarten_85FD/image%7B0%7D_thumb%5B3%5D.png" width="579" border="0" />
        </a>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=b4a818ff-c167-4f48-bbc6-9be71edc5c4a" />
      </body>
      <title>Mehrere Projekte einer Solution starten</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,b4a818ff-c167-4f48-bbc6-9be71edc5c4a.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,b4a818ff-c167-4f48-bbc6-9be71edc5c4a.aspx</link>
      <pubDate>Sat, 28 Apr 2007 07:32:27 GMT</pubDate>
      <description>&lt;p&gt;
&amp;nbsp;Vor allem wenn man mit Services programmiert, hat man oft die Anforderung, dass
beim Debuggen mehrere Projekte innerhalb der Solution gestartet werden müssen, z.B.
ein Service und ein entsprechender Client. Der manuelle Weg war hier, dass man den
Service als Startup-Projekt eingertragen hat, das debuggen startet und dann auf den
Client im Solution Explorer mit der rechten Maustaste klickt und dann hier Debug /
Start new Instance auswählt. 
&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;
Es gibt aber auch noch eine elegantere Möglichkeit. Auf der Eigenschaftsseite der
Solution (rechte Maustaste / Properties) kann man unter Startup Project auch die Option
Multiple startup projects wählen. Hier kann man nun bei mehreren Projekten die Action
auf Start bzw. Start without debugging einstellen. Sogar die Startreihenfolge der
einzlnen Projekte lässt sich definieren. Damit starten nun die eingestellten Anwendungen
auf einmal.
&lt;/p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MehrereProjekteeinerSolutionstarten_85FD/image%7B0%7D%5B5%5D.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="359" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/MehrereProjekteeinerSolutionstarten_85FD/image%7B0%7D_thumb%5B3%5D.png" width="579" border="0"&gt;&lt;/a&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=b4a818ff-c167-4f48-bbc6-9be71edc5c4a" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,b4a818ff-c167-4f48-bbc6-9be71edc5c4a.aspx</comments>
      <category>Tipps und Tricks;VS 2005</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=02aee2cd-15f1-4e6e-9e0f-a56645d1f5c8</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,02aee2cd-15f1-4e6e-9e0f-a56645d1f5c8.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,02aee2cd-15f1-4e6e-9e0f-a56645d1f5c8.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=02aee2cd-15f1-4e6e-9e0f-a56645d1f5c8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font size="2">Will man die Kalenderwoche zu einem Datum herausfinden, dann kann man
die Funktion GetWeekOfYear nutzen. </font>
        </p>
        <p>
          <font face="Courier New" size="2">CalendarRow.Week = <font color="#2b91af">Application</font>.CurrentCulture.Calendar.GetWeekOfYear(CurrentDate,
System.Globalization.<font color="#2b91af">CalendarWeekRule</font>.FirstFourDayWeek, <font color="#2b91af">DayOfWeek</font>.Monday);</font>
        </p>
        <p>
          <font size="2">Diese Funktion hat allerdings einen kleinen Bug. So wird beispielsweise
für den 31.12.2007 KW 53 zurückgegeben. Der darauffolgende Tag, ein Dienstag, ist
dann allerdings in KW 1. Eigentlich müssten die Tage einer Woche aber immer in der
selben KW sein. Abhilfe schafft hier eine kleine Korrektur. Wir haben ja eingestellt,
dass unsere Woche am Montag beginnen soll (<font color="#2b91af">DayOfWeek</font>.Monday)
und dass die Woche immer dann als KW 1 betrachtet werden soll, wenn wenigstens 4 Tage
davon im neuen Jahr liegen (System.Globalization.<font color="#2b91af">CalendarWeekRule</font>.FirstFourDayWeek).
Der Trick ist nun, dass man einfach immer 3 Tage hinzuzählt, wenn das gesuchte Datum
zwischen Montag und Mittwoch liegt. Damit wird aus dem Montag Donnerstag, aus Dienstag
der Freitag und aus dem Mittwoch ein Samstag. Da der Donnerstag der Tag ist, von dem
abhängt, ob die Woche im neuen oder im alten Jahr liegt, haben wir Montag bis Mittwoch
einfach nach hinten geschoben, so dass diese auf jeden Fall im neuen Jahr liegen und
damit auch korrekterweise die KW 1 ergeben.</font>
        </p>
        <p>
          <font face="Courier New" size="2">CalendarRow.Week = <font color="#2b91af">Application</font>.CurrentCulture.Calendar.GetWeekOfYear(CurrentDate.DayOfWeek
&gt;= <font color="#2b91af">DayOfWeek</font>.Monday &amp;&amp; CurrentDate.DayOfWeek
&lt;= <font color="#2b91af">DayOfWeek</font>.Wednesday?CurrentDate.Add(<font color="#0000ff">new</font><font color="#2b91af">TimeSpan</font>(3,0,0,0)):CurrentDate,
System.Globalization.<font color="#2b91af">CalendarWeekRule</font>.FirstFourDayWeek, <font color="#2b91af">DayOfWeek</font>.Monday);</font>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=02aee2cd-15f1-4e6e-9e0f-a56645d1f5c8" />
      </body>
      <title>Problem mit GetWeekOfYear</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,02aee2cd-15f1-4e6e-9e0f-a56645d1f5c8.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,02aee2cd-15f1-4e6e-9e0f-a56645d1f5c8.aspx</link>
      <pubDate>Tue, 10 Apr 2007 13:11:59 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font size=2&gt;Will man die Kalenderwoche zu einem Datum herausfinden, dann kann man
die Funktion GetWeekOfYear nutzen. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New" size=2&gt;CalendarRow.Week = &lt;font color=#2b91af&gt;Application&lt;/font&gt;.CurrentCulture.Calendar.GetWeekOfYear(CurrentDate,
System.Globalization.&lt;font color=#2b91af&gt;CalendarWeekRule&lt;/font&gt;.FirstFourDayWeek, &lt;font color=#2b91af&gt;DayOfWeek&lt;/font&gt;.Monday);&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=2&gt;Diese Funktion hat allerdings einen kleinen Bug. So wird beispielsweise
für den 31.12.2007 KW 53 zurückgegeben. Der darauffolgende Tag, ein Dienstag, ist
dann allerdings in KW 1. Eigentlich müssten die Tage einer Woche aber immer in der
selben KW sein. Abhilfe schafft hier eine kleine Korrektur. Wir haben ja eingestellt,
dass unsere Woche am Montag beginnen soll (&lt;font color=#2b91af&gt;DayOfWeek&lt;/font&gt;.Monday)
und dass die Woche immer dann als KW 1 betrachtet werden soll, wenn wenigstens 4 Tage
davon im neuen Jahr liegen (System.Globalization.&lt;font color=#2b91af&gt;CalendarWeekRule&lt;/font&gt;.FirstFourDayWeek).
Der Trick ist nun, dass man einfach immer 3 Tage hinzuzählt, wenn das gesuchte Datum
zwischen Montag und Mittwoch liegt. Damit wird aus dem Montag Donnerstag, aus Dienstag
der Freitag und aus dem Mittwoch ein Samstag. Da der Donnerstag der Tag ist, von dem
abhängt, ob die Woche im neuen oder im alten Jahr liegt, haben wir Montag bis Mittwoch
einfach nach hinten geschoben, so dass diese auf jeden Fall im neuen Jahr liegen und
damit auch korrekterweise die KW 1 ergeben.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New" size=2&gt;CalendarRow.Week = &lt;font color=#2b91af&gt;Application&lt;/font&gt;.CurrentCulture.Calendar.GetWeekOfYear(CurrentDate.DayOfWeek
&amp;gt;= &lt;font color=#2b91af&gt;DayOfWeek&lt;/font&gt;.Monday &amp;amp;&amp;amp; CurrentDate.DayOfWeek
&amp;lt;= &lt;font color=#2b91af&gt;DayOfWeek&lt;/font&gt;.Wednesday?CurrentDate.Add(&lt;font color=#0000ff&gt;new&lt;/font&gt; &lt;font color=#2b91af&gt;TimeSpan&lt;/font&gt;(3,0,0,0)):CurrentDate,
System.Globalization.&lt;font color=#2b91af&gt;CalendarWeekRule&lt;/font&gt;.FirstFourDayWeek, &lt;font color=#2b91af&gt;DayOfWeek&lt;/font&gt;.Monday);&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=02aee2cd-15f1-4e6e-9e0f-a56645d1f5c8" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,02aee2cd-15f1-4e6e-9e0f-a56645d1f5c8.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=83017c12-6d74-4e8d-b178-43302b8b87de</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,83017c12-6d74-4e8d-b178-43302b8b87de.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,83017c12-6d74-4e8d-b178-43302b8b87de.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=83017c12-6d74-4e8d-b178-43302b8b87de</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In VS 2005 gibt es eine Vielzahl von nützlichen und hilfreichen Tastenkombinationen,
mit denen sich das Arbeiten beschleunigen lässt. Aber wer kennt die schon alle
auswendig? Hier gibt es ein Poster, auf dem diese abgebildet sind. 
</p>
        <p>
          <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c15d210d-a926-46a8-a586-31f8a2e576fe&amp;DisplayLang=en">Visual
C# 2005 Keyboard Shortcut Reference Poster</a>
        </p>
        <p>
          <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=6bb41456-9378-4746-b502-b4c5f7182203&amp;DisplayLang=en">Visual
Basic 2005 Keyboard Shortcut Reference Poster</a>
        </p>
        <p>
          <a href="http://www.microsoft.com/downloads/details.aspx?familyid=BCCF84F4-4136-48B2-B4EC-83EAA484DA20&amp;displaylang=en">Visual
C++ 2005 Keyboard Shortcut Reference Poster</a>
        </p>
        <p>
Außerdem gibt es hier einen Code-Snipsel, mit dem man sich die Tastaturkombinationen
auch ausgeben lassen kann.
</p>
        <p>
          <a href="http://www.microsoft.com/germany/msdn/library/visualtools/visualstudio2005/TippsUndTricksFuerDieVisualStudio2005IDE.mspx#EAB">
            <font color="#0000ff">Die
Hände auf der Tastatur behalten</font>
          </a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=83017c12-6d74-4e8d-b178-43302b8b87de" />
      </body>
      <title>Visual C# 2005 Poster mit Tastaturk&amp;uuml;rzel</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,83017c12-6d74-4e8d-b178-43302b8b87de.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,83017c12-6d74-4e8d-b178-43302b8b87de.aspx</link>
      <pubDate>Wed, 14 Mar 2007 07:09:21 GMT</pubDate>
      <description>&lt;p&gt;
In VS 2005 gibt es eine Vielzahl von nützlichen und hilfreichen Tastenkombinationen,
mit denen sich das Arbeiten beschleunigen lässt.&amp;nbsp;Aber wer kennt die schon alle
auswendig? Hier gibt es ein Poster, auf dem diese&amp;nbsp;abgebildet sind.&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c15d210d-a926-46a8-a586-31f8a2e576fe&amp;amp;DisplayLang=en"&gt;Visual
C# 2005 Keyboard Shortcut Reference Poster&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=6bb41456-9378-4746-b502-b4c5f7182203&amp;amp;DisplayLang=en"&gt;Visual
Basic 2005 Keyboard Shortcut Reference Poster&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=BCCF84F4-4136-48B2-B4EC-83EAA484DA20&amp;amp;displaylang=en"&gt;Visual
C++ 2005 Keyboard Shortcut Reference Poster&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Außerdem gibt es hier einen Code-Snipsel, mit dem man sich die Tastaturkombinationen
auch ausgeben lassen kann.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.microsoft.com/germany/msdn/library/visualtools/visualstudio2005/TippsUndTricksFuerDieVisualStudio2005IDE.mspx#EAB"&gt;&lt;font color=#0000ff&gt;Die
Hände auf der Tastatur behalten&lt;/font&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=83017c12-6d74-4e8d-b178-43302b8b87de" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,83017c12-6d74-4e8d-b178-43302b8b87de.aspx</comments>
      <category>Tipps und Tricks;VS 2005</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=4e838122-4e90-490b-9619-28568afa5d90</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,4e838122-4e90-490b-9619-28568afa5d90.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,4e838122-4e90-490b-9619-28568afa5d90.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=4e838122-4e90-490b-9619-28568afa5d90</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a style="cursor: pointer" href="http://www.syncfusion.com/faq/windowsforms/Default.aspx">
            <img height="100" alt="George Shepherd's Windows Forms FAQ" src="http://www.syncfusion.com/images/FAQ/winfaq_header.gif" width="800" border="0" />
          </a>
        </p>
        <p>
George Shepherd hat eine Vielzahl von wirklich guten Tipps &amp; Tricks zur Windows-
und Web-Programmierung in zwei FAQ-Listen zusammengetragen. Wirklich ein Quell
von Anregungen, Problemlösern und Tipps &amp; Tricks. Nicht nur zum Nachschlagen,
sondern auch mal zum durchlesen empfohlen. 
</p>
        <p>
          <a href="http://www.syncfusion.com/faq/windowsforms/">Link zu Windows Forms FAQ</a>
        </p>
        <p>
          <a href="http://www.syncfusion.com/faq/aspnet/default.aspx">Link zu ASP.NET FAQ</a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=4e838122-4e90-490b-9619-28568afa5d90" />
      </body>
      <title>Windows Forms FAQ / ASP.Net FAQ</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,4e838122-4e90-490b-9619-28568afa5d90.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,4e838122-4e90-490b-9619-28568afa5d90.aspx</link>
      <pubDate>Tue, 06 Mar 2007 13:08:15 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a style="cursor: pointer" href="http://www.syncfusion.com/faq/windowsforms/Default.aspx"&gt;&lt;img height="100" alt="George Shepherd's Windows Forms FAQ" src="http://www.syncfusion.com/images/FAQ/winfaq_header.gif" width="800" border="0"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
George Shepherd hat&amp;nbsp;eine Vielzahl von wirklich guten Tipps &amp;amp; Tricks zur Windows-
und Web-Programmierung&amp;nbsp;in zwei FAQ-Listen zusammengetragen. Wirklich ein&amp;nbsp;Quell
von Anregungen, Problemlösern und Tipps &amp;amp; Tricks. Nicht nur zum Nachschlagen,
sondern auch mal zum durchlesen empfohlen.&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.syncfusion.com/faq/windowsforms/"&gt;Link&amp;nbsp;zu Windows Forms FAQ&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.syncfusion.com/faq/aspnet/default.aspx"&gt;Link zu ASP.NET FAQ&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=4e838122-4e90-490b-9619-28568afa5d90" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,4e838122-4e90-490b-9619-28568afa5d90.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=4b5ede96-64e9-46aa-80a9-3f64ab9e61a1</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,4b5ede96-64e9-46aa-80a9-3f64ab9e61a1.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,4b5ede96-64e9-46aa-80a9-3f64ab9e61a1.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=4b5ede96-64e9-46aa-80a9-3f64ab9e61a1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Um den Inhalt einer DataRow in eine andere DataRow zu kopieren kann einfach folgende
Anweisung verwendet werden:
</p>
        <font size="2">
          <p>
newRow.ItemArray = (
</p>
        </font>
        <font color="#0000ff" size="2">object</font>
        <font size="2">[])copyRow.ItemArray.Clone();
</font>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=4b5ede96-64e9-46aa-80a9-3f64ab9e61a1" />
      </body>
      <title>Spalten einer DataRow kopieren</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,4b5ede96-64e9-46aa-80a9-3f64ab9e61a1.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,4b5ede96-64e9-46aa-80a9-3f64ab9e61a1.aspx</link>
      <pubDate>Sat, 24 Feb 2007 13:52:35 GMT</pubDate>
      <description>&lt;p&gt;
Um den Inhalt einer DataRow in eine andere DataRow zu kopieren kann einfach folgende
Anweisung verwendet werden:
&lt;/p&gt;
&lt;font size=2&gt; 
&lt;p&gt;
newRow.ItemArray = (
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;object&lt;/font&gt;&lt;font size=2&gt;[])copyRow.ItemArray.Clone();&gt;
&lt;/font&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=4b5ede96-64e9-46aa-80a9-3f64ab9e61a1" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,4b5ede96-64e9-46aa-80a9-3f64ab9e61a1.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=a65d4d1d-ea08-4b55-be7f-84c124b10651</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,a65d4d1d-ea08-4b55-be7f-84c124b10651.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,a65d4d1d-ea08-4b55-be7f-84c124b10651.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=a65d4d1d-ea08-4b55-be7f-84c124b10651</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Das PropertyGrid ist ein sehr hilfreiches Control, mit dem man einfach die Inhalte
der Properties einer Klasse an der Oberfläche anzeigen und bearbeiten kann. Ich hatte
hierzu schon zwei Posts : <a class="TitleLinkStyle" href="http://www.artiso.com/ProBlog/PermaLink,guid,f4dc7313-3997-4241-abf8-4a872ed2fec2.aspx" rel="bookmark"><font color="#008000">Verwendung
des Property-Grids</font></a><font color="#008000">, </font><a class="TitleLinkStyle" href="http://www.artiso.com/ProBlog/PermaLink,guid,c39fecd1-823d-4cf4-bb81-6356514f5a0a.aspx" rel="bookmark"><font color="#008000">Dateien
und Ordner im Property-Grid auswählen</font></a></p>
        <p>
Das Property-Grid stößt allerdings an seine Grenzen, wenn man damit mehrsprachige
Umgebungen unterstützen möchte. Die Anzeige im PropertyGrid ist immer direkt vom Namen
der Properties abgeleitet und die Description etc. wird über Attribute angegeben,
die nicht über Ressource-Files lokalisiert werden können. 
</p>
        <p>
Auf Code-Project habe ich ein erweitertes Property-Grid gefunden, das genau dieses
Problem beseitigt. 
</p>
        <p>
          <img height="376" src="http://www.codeproject.com/KB/cs/wdzpropertygridutils/PropertyGridUtilsTest-nl.png" width="464" />
        </p>
        <p>
          <a href="http://www.codeproject.com/csharp/wdzpropertygridutils.asp">Link to PropertyGrid
utilities - The Code Project - C# Programming</a>
        </p>
        <p>
Danke an Chris für den Link!
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=a65d4d1d-ea08-4b55-be7f-84c124b10651" />
      </body>
      <title>PropertyGrid mit Sprachunterst&amp;uuml;tzung</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,a65d4d1d-ea08-4b55-be7f-84c124b10651.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,a65d4d1d-ea08-4b55-be7f-84c124b10651.aspx</link>
      <pubDate>Wed, 21 Feb 2007 09:45:04 GMT</pubDate>
      <description>&lt;p&gt;
Das PropertyGrid ist ein sehr hilfreiches Control, mit dem man einfach die Inhalte
der Properties einer Klasse an der Oberfläche anzeigen und bearbeiten kann. Ich hatte
hierzu schon zwei Posts : &lt;a class=TitleLinkStyle href="http://www.artiso.com/ProBlog/PermaLink,guid,f4dc7313-3997-4241-abf8-4a872ed2fec2.aspx" rel=bookmark&gt;&lt;font color=#008000&gt;Verwendung
des Property-Grids&lt;/font&gt;&lt;/a&gt;&lt;font color=#008000&gt;, &lt;/font&gt;&lt;a class=TitleLinkStyle href="http://www.artiso.com/ProBlog/PermaLink,guid,c39fecd1-823d-4cf4-bb81-6356514f5a0a.aspx" rel=bookmark&gt;&lt;font color=#008000&gt;Dateien
und Ordner im Property-Grid auswählen&lt;/font&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Das Property-Grid stößt allerdings an seine Grenzen, wenn man damit mehrsprachige
Umgebungen unterstützen möchte. Die Anzeige im PropertyGrid ist immer direkt vom Namen
der Properties abgeleitet und die Description etc. wird über Attribute angegeben,
die nicht über Ressource-Files lokalisiert werden können. 
&lt;/p&gt;
&lt;p&gt;
Auf Code-Project habe ich ein erweitertes Property-Grid gefunden, das genau dieses
Problem beseitigt. 
&lt;/p&gt;
&lt;p&gt;
&lt;img height=376 src="http://www.codeproject.com/KB/cs/wdzpropertygridutils/PropertyGridUtilsTest-nl.png" width=464&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codeproject.com/csharp/wdzpropertygridutils.asp"&gt;Link to PropertyGrid
utilities - The Code Project - C# Programming&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Danke an Chris für den Link!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=a65d4d1d-ea08-4b55-be7f-84c124b10651" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,a65d4d1d-ea08-4b55-be7f-84c124b10651.aspx</comments>
      <category>Komponenten und Bibliotheken;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=b6003080-1a6f-4e6f-a3b4-31edfe96abfc</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,b6003080-1a6f-4e6f-a3b4-31edfe96abfc.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,b6003080-1a6f-4e6f-a3b4-31edfe96abfc.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=b6003080-1a6f-4e6f-a3b4-31edfe96abfc</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <font size="2">
          <p>
In dem folgenden Beispiel wird aus einer Auflistung der Typ der Elemente ermittelt
und anschließend eine neue Instanz dieses Typs angelegt. Dann werden die Properties
die über DisplayMember und ValueMember übergeben wurden mit Werten befüllt. Damit
kann die Liste ergänzt werden, ohne Zugriff auf den Datentyp zu haben. Einzige Voraussetzung
ist, dass in der DataSource bereits Elemente vorhanden sind.
</p>
        </font>
        <font color="#008080" size="2">
          <font size="2">
            <p>
            </p>
          </font>
          <font color="#0000ff" size="2">foreach</font>
          <font size="2"> (</font>
          <font color="#008080" size="2">cListEntry</font>
          <font size="2"> item </font>
          <font color="#0000ff" size="2">in</font>
          <font size="2"> Items)<br />
{<br /></font>Type</font>
        <font size="2"> t = ((</font>
        <font color="#008080" size="2">IList</font>
        <font size="2">)dataSource)[0].GetType();<br /></font>
        <font color="#0000ff" size="2">object</font>
        <font size="2"> o = </font>
        <font color="#008080" size="2">Activator</font>
        <font size="2">.CreateInstance(t);<br /><font color="#0000ff">if</font><font size="2"> (</font><font color="#0000ff" size="2">this</font><font size="2">.DisplayMember!= </font><font color="#0000ff" size="2">null</font><font size="2"> &amp;&amp; </font><font color="#0000ff" size="2">this</font><font size="2">.DisplayMember!= </font><font color="#800000" size="2">""</font><font size="2">)<br />
    </font>t.GetProperty(</font>
        <font color="#0000ff" size="2">this</font>
        <font size="2">.DisplayMember).SetValue(o,
item.Text, </font>
        <font color="#0000ff" size="2">null</font>
        <font size="2">);<br /></font>
        <font color="#0000ff" size="2">if</font>
        <font size="2"> (</font>
        <font color="#0000ff" size="2">this</font>
        <font size="2">.ValueMember!= </font>
        <font color="#0000ff" size="2">null</font>
        <font size="2"> &amp;&amp; </font>
        <font color="#0000ff" size="2">this</font>
        <font size="2">.ValueMember!= </font>
        <font color="#800000" size="2">""</font>
        <font size="2">)<br />
    t.GetProperty(</font>
        <font color="#0000ff" size="2">this</font>
        <font size="2">.ValueMember).SetValue(o,
item.Value, </font>
        <font color="#0000ff" size="2">null</font>
        <font size="2">);<br /></font>
        <font size="2">}</font>
        <p>
          <font size="2">
          </font> 
</p>
        <p>
          <font size="2">Nachtrag:</font>
        </p>
        <p>
          <font size="2">Wenn der Typ, von dem eine neue Instanz erzeugt werden soll, keinen
parameterlosen Konstruktor hat, funktioniert das obige Beispiel nicht. Abhilfe kann
man hier schaffen, indem man einen parameterlosen Konstruktor anlegt und diesen als
private deklariert. Dadurch kann ich beim Instanzieren weiterhin sicherstellen, dass
Pflichtangaben gemacht werden, weil der parameterlose Konstruktor ja nicht sichtbar
ist.</font>
        </p>
        <p>
          <font size="2">Mit <font color="#0000ff" size="2">object</font><font size="2"> o
= </font><font color="#008080" size="2">Activator</font><font size="2">.CreateInstance(t, </font><font color="#0000ff" size="2">true</font><font size="2">); </font><font size="2">kann
nun in obigem Beispiel eine Instanz des Objektes durch Aufruf des privaten parameterlosen
Konstruktors erzeugt werden. Hier muss man natürlich jetzt sicherstellen, dass die
Pflichtobjekte entsprechend befüllt werden.
</font></font>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=b6003080-1a6f-4e6f-a3b4-31edfe96abfc" />
      </body>
      <title>Dynamische Instanz eines Typs erzeugen und bef&amp;uuml;llen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,b6003080-1a6f-4e6f-a3b4-31edfe96abfc.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,b6003080-1a6f-4e6f-a3b4-31edfe96abfc.aspx</link>
      <pubDate>Mon, 19 Feb 2007 23:09:50 GMT</pubDate>
      <description>&lt;font size=2&gt; 
&lt;p&gt;
In dem folgenden Beispiel wird aus einer Auflistung der Typ der Elemente ermittelt
und anschließend eine neue Instanz dieses Typs angelegt. Dann werden die Properties
die über DisplayMember und ValueMember übergeben wurden mit&amp;nbsp;Werten befüllt. Damit
kann die Liste ergänzt werden, ohne Zugriff auf den Datentyp zu haben. Einzige Voraussetzung
ist, dass in der DataSource bereits Elemente vorhanden sind.
&lt;/font&gt;&gt;
&lt;font color=#008080 size=2&gt;&lt;font size=2&gt; 
&lt;p&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;foreach&lt;/font&gt;&lt;font size=2&gt; (&lt;/font&gt;&lt;font color=#008080 size=2&gt;cListEntry&lt;/font&gt;&lt;font size=2&gt; item &lt;/font&gt;&lt;font color=#0000ff size=2&gt;in&lt;/font&gt;&lt;font size=2&gt; Items)&lt;br&gt;
{&lt;br&gt;
&lt;/font&gt;Type&lt;/font&gt;&lt;font size=2&gt; t = ((&lt;/font&gt;&lt;font color=#008080 size=2&gt;IList&lt;/font&gt;&lt;font size=2&gt;)dataSource)[0].GetType();&lt;br&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;object&lt;/font&gt;&lt;font size=2&gt; o = &lt;/font&gt;&lt;font color=#008080 size=2&gt;Activator&lt;/font&gt;&lt;font size=2&gt;.CreateInstance(t);&lt;br&gt;
&lt;font color=#0000ff&gt;if&lt;/font&gt;&lt;font size=2&gt; (&lt;/font&gt;&lt;font color=#0000ff size=2&gt;this&lt;/font&gt;&lt;font size=2&gt;.DisplayMember!= &lt;/font&gt;&lt;font color=#0000ff size=2&gt;null&lt;/font&gt;&lt;font size=2&gt; &amp;amp;&amp;amp; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;this&lt;/font&gt;&lt;font size=2&gt;.DisplayMember!= &lt;/font&gt;&lt;font color=#800000 size=2&gt;""&lt;/font&gt;&lt;font size=2&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;t.GetProperty(&lt;/font&gt;&lt;font color=#0000ff size=2&gt;this&lt;/font&gt;&lt;font size=2&gt;.DisplayMember).SetValue(o,
item.Text, &lt;/font&gt;&lt;font color=#0000ff size=2&gt;null&lt;/font&gt;&lt;font size=2&gt;);&lt;br&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;if&lt;/font&gt;&lt;font size=2&gt; (&lt;/font&gt;&lt;font color=#0000ff size=2&gt;this&lt;/font&gt;&lt;font size=2&gt;.ValueMember!= &lt;/font&gt;&lt;font color=#0000ff size=2&gt;null&lt;/font&gt;&lt;font size=2&gt; &amp;amp;&amp;amp; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;this&lt;/font&gt;&lt;font size=2&gt;.ValueMember!= &lt;/font&gt;&lt;font color=#800000 size=2&gt;""&lt;/font&gt;&lt;font size=2&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; t.GetProperty(&lt;/font&gt;&lt;font color=#0000ff size=2&gt;this&lt;/font&gt;&lt;font size=2&gt;.ValueMember).SetValue(o,
item.Value, &lt;/font&gt;&lt;font color=#0000ff size=2&gt;null&lt;/font&gt;&lt;font size=2&gt;);&lt;br&gt;
&lt;/font&gt;&lt;font size=2&gt;}&lt;/font&gt;&gt;
&lt;p&gt;
&lt;font size=2&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=2&gt;Nachtrag:&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=2&gt;Wenn der Typ, von dem eine neue Instanz erzeugt werden soll, keinen parameterlosen
Konstruktor hat, funktioniert das obige Beispiel nicht. Abhilfe kann man hier schaffen,
indem man einen parameterlosen Konstruktor anlegt und diesen als private deklariert.
Dadurch kann ich beim Instanzieren weiterhin sicherstellen, dass Pflichtangaben gemacht
werden, weil der parameterlose Konstruktor ja nicht sichtbar ist.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=2&gt;Mit&amp;nbsp;&lt;font color=#0000ff size=2&gt;object&lt;/font&gt;&lt;font size=2&gt; o = &lt;/font&gt;&lt;font color=#008080 size=2&gt;Activator&lt;/font&gt;&lt;font size=2&gt;.CreateInstance(t, &lt;/font&gt;&lt;font color=#0000ff size=2&gt;true&lt;/font&gt;&lt;font size=2&gt;); &lt;/font&gt;&lt;font size=2&gt;kann
nun in obigem Beispiel eine Instanz des Objektes durch Aufruf des privaten parameterlosen
Konstruktors erzeugt werden. Hier muss man natürlich jetzt sicherstellen, dass die
Pflichtobjekte entsprechend befüllt werden.
&lt;/p&gt;
&gt;&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=b6003080-1a6f-4e6f-a3b4-31edfe96abfc" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,b6003080-1a6f-4e6f-a3b4-31edfe96abfc.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=170aaa88-6dd0-4d33-b1a3-819240aed675</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,170aaa88-6dd0-4d33-b1a3-819240aed675.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,170aaa88-6dd0-4d33-b1a3-819240aed675.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=170aaa88-6dd0-4d33-b1a3-819240aed675</wfw:commentRss>
      <title>Web-Anwendungen mit IIS7 auf Vista unter VS 2005 entwickeln</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,170aaa88-6dd0-4d33-b1a3-819240aed675.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,170aaa88-6dd0-4d33-b1a3-819240aed675.aspx</link>
      <pubDate>Thu, 08 Feb 2007 17:44:08 GMT</pubDate>
      <description>&lt;p&gt;
Wenn man unter Vista den IIS7 installiert hat und dann versucht, von VS 2005 aus auf
den lokalen IIS7 zuzugreifen, dann quitiert das VS zunächst mit einem Fehler. 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-size: 11pt; line-height: 115%; font-family: calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: de; mso-fareast-language: de; mso-bidi-language: ar-sa; mso-no-proof: yes"&gt;&lt;?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /&gt;
&lt;v:shapetype id="_x0000_t75" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"&gt;
&lt;img height="481" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/WebAnwendungenmitIIS7aufVistaunterVS2005_10777/clip_image002.jpg" width="598"&gt;
&lt;/v:shapetype&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-size: 11pt; line-height: 115%; font-family: calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: de; mso-fareast-language: de; mso-bidi-language: ar-sa; mso-no-proof: yes"&gt;
&lt;v:shapetype stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"&gt;&lt;/v:shapetype&gt;
&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-size: 11pt; line-height: 115%; font-family: calibri; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: de; mso-fareast-language: de; mso-bidi-language: ar-sa; mso-no-proof: yes"&gt;
&lt;v:shapetype stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"&gt;Wie man den IIS7 konfigurieren kann, damit man aus VS 2005 darauf zugreifen kann ist in folgendem Blog-Beitrag beschrieben:&lt;/v:shapetype&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.msdn.com/webdevtools/archive/2006/09/18/761206.aspx"&gt;Link to
Your Websites, Our Passion! : Developing Web Applications on Windows Vista with Visual
Studio 2005&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=170aaa88-6dd0-4d33-b1a3-819240aed675" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,170aaa88-6dd0-4d33-b1a3-819240aed675.aspx</comments>
      <category>Tipps und Tricks;VS 2005</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=be972cf4-3f7b-4753-b9f7-e6f2cfe76f95</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,be972cf4-3f7b-4753-b9f7-e6f2cfe76f95.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,be972cf4-3f7b-4753-b9f7-e6f2cfe76f95.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=be972cf4-3f7b-4753-b9f7-e6f2cfe76f95</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Mit OleDB lassen sich sehr einfach Excel-Dateien lesen. Man macht sich einen Connectionstring
der ungefähr so aussieht:
</p>
        <font color="#0000ff">
          <p>
            <font face="Courier New" size="2">Dim</font>
          </p>
        </font>
        <font size="2">
          <font face="Courier New"> connectionString <font color="#0000ff">As</font><font color="#0000ff">String</font> = <font color="#800000">"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source="</font> &amp; ExcelFileName &amp; <font color="#800000">";Extended Properties='Excel
8.0;HDR=No;"</font></font>
        </font>
        <p>
          <font color="#800000" size="2">
            <font color="#000000">Nun kann man eine ganz normale
Connection öffnen und wie gewohnt z.B. über ein Select-Statement ein DataSet befüllen.</font>
          </font>
        </p>
        <font color="#800000">
          <font color="#000000">
            <p>
              <font size="2">
                <font face="Courier New">
                  <font color="#0000ff">Dim</font> conn <font color="#0000ff">As</font> OleDbConnection
= <font color="#0000ff">New</font> OleDbConnection(connectionString)<br />
conn.Open()<br /><font color="#0000ff">Dim</font> dt <font color="#0000ff">As</font> DataTable = <font color="#0000ff">New</font> DataTable()<br /><font color="#0000ff">Dim</font> oleDbDataAdapter <font color="#0000ff">As</font> OleDbDataAdapter
= <font color="#0000ff">New</font> OleDbDataAdapter(<font color="#800000">"SELECT
* FROM [Tabelle1]"</font>, conn)<br />
oleDbDataAdapter.Fill(dt)<br />
oleDbDataAdapter.Dispose()<br />
oleDbDataAdapter = </font>
              </font>
              <font size="2">
                <font face="Courier New">
                  <font color="#0000ff">Nothing<br /></font>conn.Close()</font>
              </font>
            </p>
            <p>
              <font size="2">Das Problem ist dabei, wenn in Excel z.B. Integer und Textwerte in
einer Spalte gemischt stehen und die Integerwerte dabei überwiegen, wird diese Spalte
als Integer angelegt und die Textwerte stehen im Dataset dann als NULL. Das kann man
umgehen, wenn man am Connectionstring den Parameter IMEX=1 anhängt. Damit wird ein
"ImportMixedTypes"-Mode aktiviert, der gemischte Spalten immer als Text interpretiert.</font>
            </p>
          </font>
        </font>
        <font color="#800000">
          <font color="#0000ff">
            <p>
              <font face="Courier New" size="2">Dim</font>
            </p>
          </font>
          <font size="2">
            <font face="Courier New">
              <font color="#000000"> connectionString </font>
              <font color="#0000ff">As</font>
              <font color="#000000">
              </font>
              <font color="#0000ff">String</font>
              <font color="#000000"> = </font>
              <font color="#800000">"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source="</font>
              <font color="#000000"> &amp; </font>
              <font color="#0000ff">Me</font>
              <font color="#000000">.tbImportdatei.Text
&amp; </font>
              <font color="#800000">";Extended Properties='Excel 8.0;HDR=No;IMEX=1'"</font>
            </font>
          </font>
          <p>
            <font size="2">
              <font face="Courier New">
                <font color="#800000">
                  <font face="Trebuchet MS" color="#000000">Das
Problem bei der ganzen Sache ist nur, dass nun standardmäßig die ersten 8 Zeilen geprüft
werden. Sind diese alle Integers, wird die Saplte auch als Integer definiert, auch
wenn weiter unten noch Textwerte kommen. Man findet hier an verschiedenen Stellen
den Hinweis auf einen weiteren Parameter MaxScanRows. Dieser scheint aber nicht zu
funktionieren, wie man auch aus diesem <a href="http://support.microsoft.com/kb/257819/en-us">MSDN-Artikel</a> ersehen
kann. Statt dessen muss man die Einstellung in der Registry vornehmen, wenn man eine
andere Anzahl prüfen möchte. Hierzu passt man im Zweig</font>
                </font>
              </font>
            </font>
          </p>
          <div class="indent">
            <strong class="uiterm">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Excel</strong>
          </div>
          <p>
            <font size="2">
              <font face="Courier New">
                <font color="#800000">
                  <font face="Trebuchet MS" color="#000000">
                  </font>
                </font>
              </font>
            </font> 
</p>
          <p>
            <font size="2">
              <font face="Courier New">
                <font color="#800000">
                  <font face="Trebuchet MS" color="#000000">den
Parameter TypeGuessRows an. Dieser Wert kann auf 1-16 Zeilen eingestellt werden.
Ein Wert von 0 bedeutet dass die ersten 16384 Zeilen geprüft werden, um festzustellen,
ob der mixed Mode verwendet werden muss oder ob der Datentyp eindeutig bestimmt werden
kann. Dass das eigentlich keine saubere Lösung ist, ist klar. Wer will schon seinen
Kunden zumuten, in der Registry rumzupfuschen? Aber es scheint im Moment keine bessere
Lösung zu geben.</font>
                </font>
              </font>
            </font>
          </p>
          <p>
            <font size="2">
              <font face="Courier New">
                <font color="#800000">
                  <font face="Trebuchet MS" color="#000000">HDR=No
bedeutet im obigen Fall übrigens, dass die Excel-Datei keine Header-Zeile hat.</font>
                </font>
              </font>
            </font>
          </p>
        </font>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=be972cf4-3f7b-4753-b9f7-e6f2cfe76f95" />
      </body>
      <title>Import von gemischten Excel-Spalten &amp;uuml;ber OLEDB</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,be972cf4-3f7b-4753-b9f7-e6f2cfe76f95.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,be972cf4-3f7b-4753-b9f7-e6f2cfe76f95.aspx</link>
      <pubDate>Sun, 14 Jan 2007 15:23:55 GMT</pubDate>
      <description>&lt;p&gt;
Mit OleDB lassen sich sehr einfach Excel-Dateien lesen. Man macht sich einen Connectionstring
der ungefähr so aussieht:
&lt;/p&gt;
&lt;font color=#0000ff&gt; 
&lt;p&gt;
&lt;font face="Courier New" size=2&gt;Dim&lt;/font&gt;
&lt;/font&gt;&lt;font size=2&gt;&lt;font face="Courier New"&gt; connectionString &lt;font color=#0000ff&gt;As&lt;/font&gt; &lt;font color=#0000ff&gt;String&lt;/font&gt; = &lt;font color=#800000&gt;"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source="&lt;/font&gt; &amp;amp;&amp;nbsp;ExcelFileName &amp;amp; &lt;font color=#800000&gt;";Extended Properties='Excel
8.0;HDR=No;"&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&gt;
&lt;p&gt;
&lt;font color=#800000 size=2&gt;&lt;font color=#000000&gt;Nun kann man eine ganz normale Connection
öffnen und wie gewohnt z.B. über ein Select-Statement ein DataSet befüllen.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;font color=#800000&gt;&lt;font color=#000000&gt; 
&lt;p&gt;
&lt;font size=2&gt;&lt;font face="Courier New"&gt;&lt;font color=#0000ff&gt;Dim&lt;/font&gt; conn &lt;font color=#0000ff&gt;As&lt;/font&gt; OleDbConnection
= &lt;font color=#0000ff&gt;New&lt;/font&gt; OleDbConnection(connectionString)&lt;br&gt;
conn.Open()&lt;br&gt;
&lt;font color=#0000ff&gt;Dim&lt;/font&gt; dt &lt;font color=#0000ff&gt;As&lt;/font&gt; DataTable = &lt;font color=#0000ff&gt;New&lt;/font&gt; DataTable()&lt;br&gt;
&lt;font color=#0000ff&gt;Dim&lt;/font&gt; oleDbDataAdapter &lt;font color=#0000ff&gt;As&lt;/font&gt; OleDbDataAdapter
= &lt;font color=#0000ff&gt;New&lt;/font&gt; OleDbDataAdapter(&lt;font color=#800000&gt;"SELECT * FROM
[Tabelle1]"&lt;/font&gt;, conn)&lt;br&gt;
oleDbDataAdapter.Fill(dt)&lt;br&gt;
oleDbDataAdapter.Dispose()&lt;br&gt;
oleDbDataAdapter = &lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font face="Courier New"&gt;&lt;font color=#0000ff&gt;Nothing&lt;br&gt;
&lt;/font&gt;conn.Close()&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=2&gt;Das Problem ist dabei, wenn in Excel z.B. Integer und Textwerte in einer
Spalte gemischt stehen und die Integerwerte dabei überwiegen, wird diese Spalte als
Integer angelegt und die Textwerte stehen im Dataset dann als NULL. Das kann man umgehen,
wenn man am Connectionstring den Parameter IMEX=1 anhängt. Damit wird ein "ImportMixedTypes"-Mode
aktiviert, der gemischte Spalten immer als Text interpretiert.&lt;/font&gt;
&lt;/p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color=#800000&gt;&lt;font color=#0000ff&gt; 
&lt;p&gt;
&lt;font face="Courier New" size=2&gt;Dim&lt;/font&gt;
&lt;/font&gt;&lt;font size=2&gt;&lt;font face="Courier New"&gt;&lt;font color=#000000&gt; connectionString &lt;/font&gt;&lt;font color=#0000ff&gt;As&lt;/font&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;font color=#0000ff&gt;String&lt;/font&gt;&lt;font color=#000000&gt; = &lt;/font&gt;&lt;font color=#800000&gt;"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source="&lt;/font&gt;&lt;font color=#000000&gt; &amp;amp; &lt;/font&gt;&lt;font color=#0000ff&gt;Me&lt;/font&gt;&lt;font color=#000000&gt;.tbImportdatei.Text
&amp;amp; &lt;/font&gt;&lt;font color=#800000&gt;";Extended Properties='Excel 8.0;HDR=No;IMEX=1'"&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&gt;
&lt;p&gt;
&lt;font size=2&gt;&lt;font face="Courier New"&gt;&lt;font color=#800000&gt;&lt;font face="Trebuchet MS" color=#000000&gt;Das
Problem bei der ganzen Sache ist nur, dass nun standardmäßig die ersten 8 Zeilen geprüft
werden. Sind diese alle Integers, wird die Saplte auch als Integer definiert, auch
wenn weiter unten noch Textwerte kommen. Man findet hier an verschiedenen Stellen
den Hinweis auf einen weiteren Parameter MaxScanRows. Dieser scheint aber nicht zu
funktionieren, wie man auch aus diesem &lt;a href="http://support.microsoft.com/kb/257819/en-us"&gt;MSDN-Artikel&lt;/a&gt; ersehen
kann. Statt dessen muss man die Einstellung in der Registry vornehmen, wenn man eine
andere Anzahl prüfen möchte. Hierzu passt man im Zweig&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;div class=indent&gt;&lt;strong class=uiterm&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Excel&lt;/strong&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;font size=2&gt;&lt;font face="Courier New"&gt;&lt;font color=#800000&gt;&lt;font face="Trebuchet MS" color=#000000&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=2&gt;&lt;font face="Courier New"&gt;&lt;font color=#800000&gt;&lt;font face="Trebuchet MS" color=#000000&gt;den
Parameter TypeGuessRows an. Dieser Wert kann&amp;nbsp;auf 1-16 Zeilen eingestellt werden.
Ein Wert von 0 bedeutet dass die ersten 16384 Zeilen geprüft werden, um festzustellen,
ob der mixed Mode verwendet werden muss oder ob der Datentyp eindeutig bestimmt werden
kann. Dass das eigentlich keine saubere Lösung ist, ist klar. Wer will schon seinen
Kunden zumuten, in der Registry rumzupfuschen? Aber es scheint im Moment keine bessere
Lösung zu geben.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=2&gt;&lt;font face="Courier New"&gt;&lt;font color=#800000&gt;&lt;font face="Trebuchet MS" color=#000000&gt;HDR=No
bedeutet im&amp;nbsp;obigen Fall übrigens, dass die Excel-Datei keine Header-Zeile hat.&lt;/font&gt;
&lt;/p&gt;
&lt;/font&gt;&gt;&gt;&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=be972cf4-3f7b-4753-b9f7-e6f2cfe76f95" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,be972cf4-3f7b-4753-b9f7-e6f2cfe76f95.aspx</comments>
      <category>Excel;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=44277902-b4a6-4d17-a258-df0e04876812</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,44277902-b4a6-4d17-a258-df0e04876812.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,44277902-b4a6-4d17-a258-df0e04876812.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=44277902-b4a6-4d17-a258-df0e04876812</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Um einen Label auf einer WinForm per Code einfach fett zu machen, funktioniert leider
folgende Methode nicht:
</p>
        <p>
          <font face="Courier New">
            <font size="2">TitleLbl</font>.Font.Bold = true;</font>
        </p>
        <p>
Statt dessen kann man aber folgenden Code verwenden:
</p>
        <p>
          <font face="Courier New" size="2">TitleLbl.Font = <font color="#0000ff">new</font> Font(TitleLbl.Font,
FontStyle.Bold);</font>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=44277902-b4a6-4d17-a258-df0e04876812" />
      </body>
      <title>Label in WinForm auf bold setzen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,44277902-b4a6-4d17-a258-df0e04876812.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,44277902-b4a6-4d17-a258-df0e04876812.aspx</link>
      <pubDate>Fri, 05 Jan 2007 09:17:40 GMT</pubDate>
      <description>&lt;p&gt;
Um einen Label auf einer WinForm per Code einfach fett zu machen, funktioniert leider
folgende Methode nicht:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&lt;font size=2&gt;TitleLbl&lt;/font&gt;.Font.Bold = true;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Statt dessen kann man aber folgenden Code verwenden:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New" size=2&gt;TitleLbl.Font = &lt;font color=#0000ff&gt;new&lt;/font&gt; Font(TitleLbl.Font,
FontStyle.Bold);&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=44277902-b4a6-4d17-a258-df0e04876812" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,44277902-b4a6-4d17-a258-df0e04876812.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=ea9fba13-9828-43cc-8ac3-bdb48d1b5d43</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,ea9fba13-9828-43cc-8ac3-bdb48d1b5d43.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,ea9fba13-9828-43cc-8ac3-bdb48d1b5d43.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=ea9fba13-9828-43cc-8ac3-bdb48d1b5d43</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Möchte man einen enum-Wert an eine ComboBox binden, dann muss man hier einen kleinen
Trick anwenden. Ich habe das mal am Beispiel mit dem UltraComboEditor aus der Infragistics-Bibliothek
realisiert. Man braucht zunächst einen Parse_Event auf dem Binding:
</p>
        <font size="2">
          <font color="#000000">
            <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">this</span>.ultraComboEditor1.DataBindings[0].Parse
+= <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> ConvertEventHandler(ValueInputEnum_Parse);<br /><br /></span>
            </p>
            <p>
Dann kann man in dem Eventhandler den Wert in den Enum konvertieren:
</p>
          </font>
        </font>
        <font size="2">
          <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">void</span> ValueInputEnum_Parse(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
ConvertEventArgs e)<br />
{<br />
   e.Value <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> Enum.Parse(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">typeof</span>(ePeriodInterval),
e.Value.ToString());<br />
}<br /></span>
          </p>
          <p>
            <font size="2"> 
</font>
          </p>
        </font>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=ea9fba13-9828-43cc-8ac3-bdb48d1b5d43" />
      </body>
      <title>Enum-Werte per Databinding an ComboBoxen binden</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,ea9fba13-9828-43cc-8ac3-bdb48d1b5d43.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,ea9fba13-9828-43cc-8ac3-bdb48d1b5d43.aspx</link>
      <pubDate>Tue, 02 Jan 2007 15:09:01 GMT</pubDate>
      <description>&lt;p&gt;
Möchte man einen enum-Wert an eine ComboBox binden, dann muss man hier einen kleinen
Trick anwenden. Ich habe das mal am Beispiel mit dem UltraComboEditor aus der Infragistics-Bibliothek
realisiert. Man braucht zunächst einen Parse_Event auf dem Binding:
&lt;/p&gt;
&lt;font size=2&gt;&lt;font color=#000000&gt; 
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;this&lt;/span&gt;.ultraComboEditor1.DataBindings[0].Parse
+= &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; ConvertEventHandler(ValueInputEnum_Parse);&lt;br&gt;
&lt;br&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
Dann kann man in dem Eventhandler den Wert in den Enum konvertieren:
&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; ValueInputEnum_Parse(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;object&lt;/span&gt; sender,
ConvertEventArgs e)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;e.Value &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; Enum.Parse(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;typeof&lt;/span&gt;(ePeriodInterval),
e.Value.ToString());&lt;br&gt;
}&lt;br&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=2&gt;&amp;nbsp;
&lt;/p&gt;
&lt;/font&gt;&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=ea9fba13-9828-43cc-8ac3-bdb48d1b5d43" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,ea9fba13-9828-43cc-8ac3-bdb48d1b5d43.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=6d8ab784-9d43-4c11-a8da-ce4f5a2ff8f4</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,6d8ab784-9d43-4c11-a8da-ce4f5a2ff8f4.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,6d8ab784-9d43-4c11-a8da-ce4f5a2ff8f4.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=6d8ab784-9d43-4c11-a8da-ce4f5a2ff8f4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Unter .net 1.1 hat man das Problem, dass Panels und andere scrollbaren Controls keinen
Event liefern, wenn das Control gescrollt wird. Wie man das beheben kann, beschreibt
Rick Brewster hier: <a href="http://blogs.msdn.com/rickbrew/archive/2004/06/24/165493.aspx">http://blogs.msdn.com/rickbrew/archive/2004/06/24/165493.aspx</a></p>
        <p>
Bei .net 2.0 besteht das Problem übrigens nicht mehr, hier bringen die Controls den
Event auch Eigenschaften über die horizontale und vertikale Bildlaufleiste mit.
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=6d8ab784-9d43-4c11-a8da-ce4f5a2ff8f4" />
      </body>
      <title>Scroll-Event für Panels unter .net 1.1</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,6d8ab784-9d43-4c11-a8da-ce4f5a2ff8f4.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,6d8ab784-9d43-4c11-a8da-ce4f5a2ff8f4.aspx</link>
      <pubDate>Fri, 29 Dec 2006 17:04:41 GMT</pubDate>
      <description>&lt;p&gt;
Unter .net 1.1 hat man das Problem, dass Panels und andere scrollbaren Controls keinen
Event liefern, wenn das Control gescrollt wird. Wie man das beheben kann, beschreibt
Rick Brewster hier: &lt;a href="http://blogs.msdn.com/rickbrew/archive/2004/06/24/165493.aspx"&gt;http://blogs.msdn.com/rickbrew/archive/2004/06/24/165493.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Bei .net 2.0 besteht das Problem übrigens nicht mehr, hier bringen die Controls den
Event auch Eigenschaften über die horizontale und vertikale Bildlaufleiste mit.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=6d8ab784-9d43-4c11-a8da-ce4f5a2ff8f4" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,6d8ab784-9d43-4c11-a8da-ce4f5a2ff8f4.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=1b50e6a7-d1c9-45c0-a663-3c75227e2543</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,1b50e6a7-d1c9-45c0-a663-3c75227e2543.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,1b50e6a7-d1c9-45c0-a663-3c75227e2543.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=1b50e6a7-d1c9-45c0-a663-3c75227e2543</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Will man in einem Web-Service Sessions nutzen, so muss der Client Cookies handeln
können. Ist der Client eine Web-Applikation, so ist das kein Problem. Bei WinForms
muss man da zu einem kleinen Kniff greifen.
</p>
        <p>
Man muss für den Service einen CookieContainer erstellen. Dazu kann man
im Client folgenden Code verwenden:
</p>
        <p>
          <font face="Courier New" size="2">WebService.MyService ws = new WebService.MyService();<br /></font>
          <font face="Courier New" size="2">ws.CookieContainer = new CookieContainer();</font>
        </p>
        <p>
Damit kann dann auch der Windows-Client Cookies handeln.
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=1b50e6a7-d1c9-45c0-a663-3c75227e2543" />
      </body>
      <title>Webservices in WinForms mit Cookies</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,1b50e6a7-d1c9-45c0-a663-3c75227e2543.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,1b50e6a7-d1c9-45c0-a663-3c75227e2543.aspx</link>
      <pubDate>Tue, 28 Nov 2006 07:19:30 GMT</pubDate>
      <description>&lt;p&gt;
Will man in einem Web-Service Sessions nutzen, so muss der Client Cookies handeln
können. Ist der Client eine Web-Applikation, so ist das kein Problem. Bei WinForms
muss man da zu einem kleinen Kniff greifen.
&lt;/p&gt;
&lt;p&gt;
Man muss&amp;nbsp;für den&amp;nbsp;Service einen CookieContainer erstellen. Dazu kann man
im Client folgenden Code verwenden:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New" size=2&gt;WebService.MyService ws = new WebService.MyService();&lt;br&gt;
&lt;/font&gt;&lt;font face="Courier New" size=2&gt;ws.CookieContainer = new CookieContainer();&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Damit kann dann auch der Windows-Client Cookies handeln.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=1b50e6a7-d1c9-45c0-a663-3c75227e2543" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,1b50e6a7-d1c9-45c0-a663-3c75227e2543.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=28e79f89-f121-4002-889b-72148f4dd7c4</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,28e79f89-f121-4002-889b-72148f4dd7c4.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,28e79f89-f121-4002-889b-72148f4dd7c4.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=28e79f89-f121-4002-889b-72148f4dd7c4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Es gibt ein Control mit dem Namen DSOFramer, das es erlaubt, Office-Anwendungen in
eine eigene WinForms-Anwendung zu integrieren. Das Control hat allerdings einen Schönheitsfehler,
es funktioniert nicht auf MDIChild-Forms. Versucht man innerhalb eines MDIChilds per
Code eine Datei im DSOFramer zu laden, erhält man eine nichtssagende Fehlermeldung.
Über einen kleinen Trick lässt sich das Problem allerdings beseitigen. Man baut sich
einfach ein Usercontrol, in das man den DSOFramer steckt. danach funktioniert das
Control auch in MDIChilds.
</p>
        <p>
Infos und Download des DSOFramer_Controls unter <a href="http://support.microsoft.com/kb/311765">http://support.microsoft.com/kb/311765</a></p>
        <p>
Dank an Christopher für den Tipp.
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=28e79f89-f121-4002-889b-72148f4dd7c4" />
      </body>
      <title>DSOFramer in MDI Fenster</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,28e79f89-f121-4002-889b-72148f4dd7c4.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,28e79f89-f121-4002-889b-72148f4dd7c4.aspx</link>
      <pubDate>Wed, 08 Nov 2006 08:53:15 GMT</pubDate>
      <description>&lt;p&gt;
Es gibt ein Control mit dem Namen DSOFramer, das es erlaubt, Office-Anwendungen in
eine eigene WinForms-Anwendung zu integrieren. Das Control hat allerdings einen Schönheitsfehler,
es funktioniert nicht auf MDIChild-Forms. Versucht man innerhalb eines MDIChilds per
Code eine Datei im DSOFramer zu laden, erhält man eine nichtssagende Fehlermeldung.
Über einen kleinen Trick lässt sich das Problem allerdings beseitigen. Man baut sich
einfach ein Usercontrol, in das man den DSOFramer steckt. danach funktioniert das
Control auch in MDIChilds.
&lt;/p&gt;
&lt;p&gt;
Infos und Download des DSOFramer_Controls unter &lt;a href="http://support.microsoft.com/kb/311765"&gt;http://support.microsoft.com/kb/311765&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Dank an Christopher für den Tipp.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=28e79f89-f121-4002-889b-72148f4dd7c4" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,28e79f89-f121-4002-889b-72148f4dd7c4.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=2a671905-768e-4363-9188-354834ec08d4</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,2a671905-768e-4363-9188-354834ec08d4.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,2a671905-768e-4363-9188-354834ec08d4.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=2a671905-768e-4363-9188-354834ec08d4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Um den aktuell angemeldeten Windows-User zu ermitteln gibt es zwei Möglichkeiten:
</p>
        <p>
1.) <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">string</span> userName <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> Environment.UserName<br /><font face="Verdana" size="2">Diese Variante liest aus der Systemumgebung die entsprechende
Einstellung aus. 
<br />
Nachteil: Diese Einstellung kann leicht manipuliert werden, z.B. in der Eingabeaufforderung mit
Set USERNAME = Administrator</font></span></p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <font face="Verdana" size="2">2.) <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">string</span> userName <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> System.Security.Principal.WindowsIdentity.GetCurrent().Name;<br /></span></font>
          </span>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <font face="Verdana" size="2">Diese
Variante fragt den User direkt im Windows Sicherheitsystem ab und kann deshalb nicht
manipuliert werden. 
<br /></font>
            <br />
          </span>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=2a671905-768e-4363-9188-354834ec08d4" />
      </body>
      <title>Aktuellen Windows-User ermitteln</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,2a671905-768e-4363-9188-354834ec08d4.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,2a671905-768e-4363-9188-354834ec08d4.aspx</link>
      <pubDate>Wed, 01 Nov 2006 08:54:43 GMT</pubDate>
      <description>&lt;p&gt;
Um den aktuell angemeldeten Windows-User zu ermitteln gibt es zwei Möglichkeiten:
&lt;/p&gt;
&lt;p&gt;
1.) &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; userName &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; Environment.UserName&lt;br&gt;
&lt;font face=Verdana size=2&gt;Diese Variante liest aus der Systemumgebung die entsprechende
Einstellung aus. 
&lt;br&gt;
Nachteil: Diese Einstellung kann leicht manipuliert werden, z.B. in der&amp;nbsp;Eingabeaufforderung&amp;nbsp;mit
Set&amp;nbsp;USERNAME = Administrator&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana size=2&gt;2.) &lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; userName &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; System.Security.Principal.WindowsIdentity.GetCurrent().Name;&lt;br&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana size=2&gt;Diese
Variante fragt den User direkt im Windows Sicherheitsystem ab und kann deshalb nicht
manipuliert werden. 
&lt;br&gt;
&lt;/font&gt;
&lt;br&gt;
&lt;/p&gt;
&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=2a671905-768e-4363-9188-354834ec08d4" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,2a671905-768e-4363-9188-354834ec08d4.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=0a03a180-0000-453c-bf08-9ba0fa697f98</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,0a03a180-0000-453c-bf08-9ba0fa697f98.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,0a03a180-0000-453c-bf08-9ba0fa697f98.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=0a03a180-0000-453c-bf08-9ba0fa697f98</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Es gibt eine Möglichkeit, in eine Anwendung COM-Komponenten zu integrieren und diese
dann ohne Registrierung dieser Komponente einfach per XCopy oder per Click-Once-Deployment
zu verteilen.
</p>
        <p>
          <a href="http://msdn.microsoft.com/msdnmag/issues/05/04/RegFreeCOM/default.aspx">http://msdn.microsoft.com/msdnmag/issues/05/04/RegFreeCOM/default.aspx</a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=0a03a180-0000-453c-bf08-9ba0fa697f98" />
      </body>
      <title>Einfachere Verteilung von Anwendungen die COM-Komponenten nutzen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,0a03a180-0000-453c-bf08-9ba0fa697f98.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,0a03a180-0000-453c-bf08-9ba0fa697f98.aspx</link>
      <pubDate>Mon, 30 Oct 2006 18:11:05 GMT</pubDate>
      <description>&lt;p&gt;
Es gibt eine Möglichkeit, in eine Anwendung COM-Komponenten zu integrieren und diese
dann ohne Registrierung dieser Komponente einfach per XCopy oder per Click-Once-Deployment
zu verteilen.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://msdn.microsoft.com/msdnmag/issues/05/04/RegFreeCOM/default.aspx"&gt;http://msdn.microsoft.com/msdnmag/issues/05/04/RegFreeCOM/default.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=0a03a180-0000-453c-bf08-9ba0fa697f98" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,0a03a180-0000-453c-bf08-9ba0fa697f98.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=01964d12-33b2-4ce5-b7ca-2d7ea354f994</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,01964d12-33b2-4ce5-b7ca-2d7ea354f994.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,01964d12-33b2-4ce5-b7ca-2d7ea354f994.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=01964d12-33b2-4ce5-b7ca-2d7ea354f994</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Will man eine Liste mit allen Werten eines enums befüllen, z.B. zur Ausgabe in einer
DropDown-List, kann man folgenden Code verwenden:
</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">foreach</span> (<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span> Entry <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> Enum.GetValues(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">typeof</span>(DataLayer.LogDataLayer.LogDataLayer.LogEntryTypes)))<br />
{<br />
   vl.ValueListItems.Add(Entry, ((DataLayer.LogDataLayer.LogDataLayer.LogEntryTypes)Entry).ToString());<br />
}<br /><br /></span>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=01964d12-33b2-4ce5-b7ca-2d7ea354f994" />
      </body>
      <title>Schleife über Elemente eines enums</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,01964d12-33b2-4ce5-b7ca-2d7ea354f994.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,01964d12-33b2-4ce5-b7ca-2d7ea354f994.aspx</link>
      <pubDate>Mon, 16 Oct 2006 10:10:56 GMT</pubDate>
      <description>&lt;p&gt;
Will man eine Liste mit allen Werten eines enums befüllen, z.B. zur Ausgabe in einer
DropDown-List, kann man folgenden Code verwenden:
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;foreach&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;int&lt;/span&gt; Entry &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;in&lt;/span&gt; Enum.GetValues(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;typeof&lt;/span&gt;(DataLayer.LogDataLayer.LogDataLayer.LogEntryTypes)))&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;vl.ValueListItems.Add(Entry, ((DataLayer.LogDataLayer.LogDataLayer.LogEntryTypes)Entry).ToString());&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=01964d12-33b2-4ce5-b7ca-2d7ea354f994" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,01964d12-33b2-4ce5-b7ca-2d7ea354f994.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=c39fecd1-823d-4cf4-bb81-6356514f5a0a</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,c39fecd1-823d-4cf4-bb81-6356514f5a0a.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,c39fecd1-823d-4cf4-bb81-6356514f5a0a.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=c39fecd1-823d-4cf4-bb81-6356514f5a0a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Dieser Artikel beschreibt, wie man im Property-Grid entsprechende Dialoge einbauen
kann um Dateien und Verzeichnise auszuwählen.
</p>
        <p>
          <a href="http://www.schlechte-doku-hasser.de/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=140&amp;mode=thread&amp;order=0&amp;thold=0&amp;POSTNUKESID=92c38293a5ea7c80d8cf15115f17512b">http://www.schlechte-doku-hasser.de/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=140&amp;mode=thread&amp;order=0&amp;thold=0&amp;POSTNUKESID=92c38293a5ea7c80d8cf15115f17512b</a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=c39fecd1-823d-4cf4-bb81-6356514f5a0a" />
      </body>
      <title>Dateien und Ordner im Property-Grid auswählen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,c39fecd1-823d-4cf4-bb81-6356514f5a0a.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,c39fecd1-823d-4cf4-bb81-6356514f5a0a.aspx</link>
      <pubDate>Mon, 16 Oct 2006 09:20:13 GMT</pubDate>
      <description>&lt;p&gt;
Dieser Artikel beschreibt, wie man im Property-Grid entsprechende Dialoge einbauen
kann um Dateien und Verzeichnise auszuwählen.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.schlechte-doku-hasser.de/modules.php?op=modload&amp;amp;name=News&amp;amp;file=article&amp;amp;sid=140&amp;amp;mode=thread&amp;amp;order=0&amp;amp;thold=0&amp;amp;POSTNUKESID=92c38293a5ea7c80d8cf15115f17512b"&gt;http://www.schlechte-doku-hasser.de/modules.php?op=modload&amp;amp;name=News&amp;amp;file=article&amp;amp;sid=140&amp;amp;mode=thread&amp;amp;order=0&amp;amp;thold=0&amp;amp;POSTNUKESID=92c38293a5ea7c80d8cf15115f17512b&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=c39fecd1-823d-4cf4-bb81-6356514f5a0a" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,c39fecd1-823d-4cf4-bb81-6356514f5a0a.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=f4dc7313-3997-4241-abf8-4a872ed2fec2</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,f4dc7313-3997-4241-abf8-4a872ed2fec2.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,f4dc7313-3997-4241-abf8-4a872ed2fec2.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=f4dc7313-3997-4241-abf8-4a872ed2fec2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Mit Hilfe des Property-Grids lassen sich die Eigenschaften eines Objektes ohne viel
Aufwand bearbeiten. Das Handling entspricht dem Eigenschaften-Fenster im VS. Wie's
gemacht wird, beschreibt folgender Artikel:
</p>
        <p>
          <a href="http://www.c-sharpcorner.com/Code/2004/June/PropertyGridInCSharp.asp">http://www.c-sharpcorner.com/Code/2004/June/PropertyGridInCSharp.asp</a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=f4dc7313-3997-4241-abf8-4a872ed2fec2" />
      </body>
      <title>Verwendung des Property-Grids</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,f4dc7313-3997-4241-abf8-4a872ed2fec2.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,f4dc7313-3997-4241-abf8-4a872ed2fec2.aspx</link>
      <pubDate>Thu, 12 Oct 2006 09:19:17 GMT</pubDate>
      <description>&lt;p&gt;
Mit Hilfe des Property-Grids lassen sich die Eigenschaften eines Objektes ohne viel
Aufwand bearbeiten. Das Handling entspricht dem Eigenschaften-Fenster im VS. Wie's
gemacht wird, beschreibt folgender Artikel:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.c-sharpcorner.com/Code/2004/June/PropertyGridInCSharp.asp"&gt;http://www.c-sharpcorner.com/Code/2004/June/PropertyGridInCSharp.asp&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=f4dc7313-3997-4241-abf8-4a872ed2fec2" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,f4dc7313-3997-4241-abf8-4a872ed2fec2.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=35e801eb-7230-4605-bc88-94d3d7ee1b85</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,35e801eb-7230-4605-bc88-94d3d7ee1b85.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,35e801eb-7230-4605-bc88-94d3d7ee1b85.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=35e801eb-7230-4605-bc88-94d3d7ee1b85</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Ich erstelle gerade eine Anwendung, die verschiedene Berechnungen durchführt. Um möglichst
flexibel zu sein, habe ich jede Berechnungsmethode in eine eigene DLL gepackt. Diese
DLLs sollten nun nicht zur Compile-Zeit eingebunden werden sondern erst zu Laufzeit.
Dadurch kann man jederzeit zusätzliche Berechnungsmethoden erstellen und diese dann
einfach in das Anwendungsverzeichnis kopieren ohne die gesamte Anwendung neu compilieren
zu müssen. Das Ganze funktioniert sogar zur Laufzeit, d.h. die Anwendung muss nicht
neu gestartet werden, wenn eine neue DLL hinzukommt.
</p>
        <p>
Das Ganze funktioniert so:
</p>
        <ol>
          <li>
Ich habe ein Interface erstellt, das als Schnittstelle für alle Berechnungsmethoden
dient. <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">interface</span> IBaseEngine<br />
{<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> StartCalculation();<br />
}</span></p></li>
          <li>
Dann habe ich ein Berechnungsmodul erstellt, das die Schnittstelle implementiert.
Berechnungsmodul und Interface sind im gleichen Namespace:<br /><br /><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> cCapaPlanerEngine
: IBaseEngine<br />
{<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span> cCapaPlanerEngine()<br />
{<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">void</span> StartCalculation()<br />
{<br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//
Hier kommt die Berechnung</span><br />
}<br />
}<br /><br /></span></li>
          <li>
Nach dem Compilieren wird die DLL des Berechnungsmoduls in das Anwendungsverzeichnis
kopiert. 
</li>
          <li>
Nun kann das Berechnungsmodul instanziiert werden:<br /><br /><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">IBaseEngine
calculationEngine <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> (IBaseEngine)Activator.CreateInstanceFrom(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"CalculationEngines\\"</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> _CalculationEngineName <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">".dll"</span>, <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"ScenarioGenerator.CalculationEngines.c"</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> _CalculationEngineName).Unwrap();<br /><font face="Verdana"><br />
Da sind noch ein paar statische Sachen drin, die besser in die config ausgelagert
bzw. automatisch ermittelt werden, aber so ist es momentan etwas verständlicher. Wichtig
ist das Unwrap() am Ende, da sonst der Typecast nicht funktioniert. 
<br />
Eine optimierte Version könnte etwa so aussehen, wobei hier in derm Berechnungsmodul
nur eine Klasse stehen sollte:<br /><br /><p><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Assembly
calculationEngineAssembly <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> Assembly.LoadFrom(Properties.Settings.Default.CalculationEnginesPath <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"\\"</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> _CalculationEngineName <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">".dll"</span>);<br />
calculationEngine <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> (IBaseEngine)Activator.CreateInstance(calculationEngineAssembly.GetTypes()[0]);<br /></span></p><br /></font></span></span></li>
          <li>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
              <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                <font face="Verdana">Nun
kann die Berechnungsmethode einfach aufgerufen werden:<br /><p><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">calculationEngine.StartCalculation();</span></p></font>
              </span>
            </span>
          </li>
        </ol>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <font face="Verdana">Weitere
Berechnungsmodule lassen sich nun einfach erstellen indem sie die selbe Schnittstelle
implementieren und dann einfach in das Anwendungsverzeichnis kopiert werden.</font>
            <br />
          </span>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=35e801eb-7230-4605-bc88-94d3d7ee1b85" />
      </body>
      <title>Funktionen in dynamisch geladene DLLs auslagern</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,35e801eb-7230-4605-bc88-94d3d7ee1b85.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,35e801eb-7230-4605-bc88-94d3d7ee1b85.aspx</link>
      <pubDate>Thu, 12 Oct 2006 08:02:44 GMT</pubDate>
      <description>&lt;p&gt;
Ich erstelle gerade eine Anwendung, die verschiedene Berechnungen durchführt. Um möglichst
flexibel zu sein, habe ich jede Berechnungsmethode in eine eigene DLL gepackt. Diese
DLLs sollten nun nicht zur Compile-Zeit eingebunden werden sondern erst zu Laufzeit.
Dadurch kann man jederzeit zusätzliche Berechnungsmethoden erstellen und diese dann
einfach in das Anwendungsverzeichnis kopieren ohne die gesamte Anwendung neu compilieren
zu müssen. Das Ganze funktioniert sogar zur Laufzeit, d.h. die Anwendung muss nicht
neu gestartet werden, wenn eine neue DLL hinzukommt.
&lt;/p&gt;
&lt;p&gt;
Das Ganze funktioniert so:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Ich habe ein Interface erstellt, das als Schnittstelle für alle Berechnungsmethoden
dient.&amp;nbsp;&lt;br&gt;
&lt;br&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;interface&lt;/span&gt; IBaseEngine&lt;br&gt;
{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; StartCalculation();&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;li&gt;
Dann habe ich ein Berechnungsmodul erstellt, das die Schnittstelle implementiert.
Berechnungsmodul und Interface sind im gleichen Namespace:&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;class&lt;/span&gt; cCapaPlanerEngine
:&amp;nbsp;IBaseEngine&lt;br&gt;
{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; cCapaPlanerEngine()&lt;br&gt;
{&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; StartCalculation()&lt;br&gt;
{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;//
Hier kommt die Berechnung&lt;/span&gt;
&lt;br&gt;
}&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
&lt;/span&gt; 
&lt;li&gt;
Nach dem Compilieren wird die DLL des Berechnungsmoduls in das Anwendungsverzeichnis
kopiert. 
&lt;li&gt;
Nun kann das Berechnungsmodul instanziiert werden:&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;IBaseEngine
calculationEngine &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; (IBaseEngine)Activator.CreateInstanceFrom(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"CalculationEngines\\"&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; _CalculationEngineName &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;".dll"&lt;/span&gt;, &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"ScenarioGenerator.CalculationEngines.c"&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; _CalculationEngineName).Unwrap();&lt;br&gt;
&lt;font face=Verdana&gt;
&lt;br&gt;
Da sind noch ein paar statische Sachen drin, die besser in die config ausgelagert
bzw. automatisch ermittelt werden, aber so ist es momentan etwas verständlicher. Wichtig
ist das Unwrap() am Ende, da sonst der Typecast nicht funktioniert. 
&lt;br&gt;
Eine optimierte Version könnte etwa so aussehen, wobei hier in derm Berechnungsmodul
nur eine Klasse stehen sollte:&lt;br&gt;
&lt;br&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Assembly
calculationEngineAssembly &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; Assembly.LoadFrom(Properties.Settings.Default.CalculationEnginesPath &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"\\"&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; _CalculationEngineName &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;".dll"&lt;/span&gt;);&lt;br&gt;
calculationEngine &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; (IBaseEngine)Activator.CreateInstance(calculationEngineAssembly.GetTypes()[0]);&lt;br&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;br&gt;
&lt;/font&gt;&lt;/span&gt;&lt;/span&gt; 
&lt;li&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana&gt;Nun
kann die Berechnungsmethode einfach aufgerufen werden:&lt;br&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;calculationEngine.StartCalculation();&lt;/span&gt;
&lt;/p&gt;
&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana&gt;Weitere
Berechnungsmodule lassen sich nun einfach erstellen indem sie die selbe Schnittstelle
implementieren und dann einfach in das Anwendungsverzeichnis kopiert werden.&lt;/font&gt;
&lt;br&gt;
&lt;/p&gt;
&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=35e801eb-7230-4605-bc88-94d3d7ee1b85" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,35e801eb-7230-4605-bc88-94d3d7ee1b85.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=be9d6a44-062c-4578-8003-82b840bd016d</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,be9d6a44-062c-4578-8003-82b840bd016d.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,be9d6a44-062c-4578-8003-82b840bd016d.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=be9d6a44-062c-4578-8003-82b840bd016d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
 Man kann eigene enums in den Settings einer Anwendung avblegen. Dazu muss zunächst
der enum definiert werden. Anschließend öffnet man die Settings-Datei des Projektes
(liegt unter Properties). Im Feld Type kann man hier nun Browse... auswählen.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/EnuminSettingsspeichern_26/image%7B0%7D%5B12%5D.png" atomicselection="true">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="357" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/EnuminSettingsspeichern_26/image%7B0%7D_thumb%5B8%5D.png" width="600" border="0" />
          </a>
        </p>
        <p>
Dann gibt man bei SelectedType den vollqualifizierten Namen inkl. Namespace ein.
</p>
        <p>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/EnuminSettingsspeichern_26/image%7B0%7D%5B20%5D.png" atomicselection="true">
          </a>
          <a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/EnuminSettingsspeichern_26/image%7B0%7D%5B24%5D.png" atomicselection="true">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="260" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/EnuminSettingsspeichern_26/image%7B0%7D_thumb%5B16%5D.png" width="366" border="0" />
          </a>
        </p>
        <font size="2">
          <p>
Nun kann man in der Spalte Value über eine DropDownList den gewünschten Wert für die
Konfiguration auswählen. In der app.config sieht das dann so aus:
</p>
          <font color="#0000ff" size="2">
            <p>
&lt;
</p>
          </font>
          <font color="#a31515" size="2">CalculationUnitApplication.Properties.Settings</font>
          <font color="#0000ff" size="2">&gt;<br />
    &lt;</font>
          <font color="#a31515" size="2">setting</font>
          <font color="#0000ff" size="2">
          </font>
          <font color="#ff0000" size="2">name</font>
          <font color="#0000ff" size="2">=</font>
          <font size="2">"</font>
          <font color="#0000ff" size="2">Setting</font>
          <font size="2">"</font>
          <font color="#0000ff" size="2">
          </font>
          <font color="#ff0000" size="2">serializeAs</font>
          <font color="#0000ff" size="2">=</font>
          <font size="2">"</font>
          <font color="#0000ff" size="2">String</font>
          <font size="2">"</font>
          <font color="#0000ff" size="2">&gt;<br />
        &lt;</font>
          <font color="#a31515" size="2">value</font>
          <font color="#0000ff" size="2">&gt;</font>
          <font size="2">CapaPlaner</font>
          <font color="#0000ff" size="2">&lt;/</font>
          <font color="#a31515" size="2">value</font>
          <font color="#0000ff" size="2">&gt;<br />
    &lt;/</font>
          <font color="#a31515" size="2">setting</font>
          <font color="#0000ff" size="2">&gt;<br />
&lt;/</font>
          <font color="#a31515" size="2">CalculationUnitApplication.Properties.Settings</font>
          <font color="#0000ff" size="2">&gt;</font>
          <p>
            <font color="#0000ff" size="2">
              <font color="#000000">Auf den Eintrag kann man dann
aus dem Code so zugreifen:</font>
            </font>
          </p>
          <font color="#0000ff" size="2">
            <font size="2">
              <p>
Properties.
</p>
            </font>
            <font color="#2b91af" size="2">Settings</font>
            <font size="2">.Default.mySetting</font>
            <p>
              <font size="2">
                <font color="#000000">wobei mySetting der Name ist, der dem Eintrag
in der Settings-Einstellung im Feld Name vergeben wurde. Das Ganze ist jetzt typsicher,
d.h. wenn jemand die Config-Datei bearbeitet und gibt einen Wert ein, der nicht im
enum vorkommt, wird eine Exception geworfen.</font>
              </font>
            </p>
          </font>
        </font>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=be9d6a44-062c-4578-8003-82b840bd016d" />
      </body>
      <title>Enum in Settings speichern</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,be9d6a44-062c-4578-8003-82b840bd016d.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,be9d6a44-062c-4578-8003-82b840bd016d.aspx</link>
      <pubDate>Wed, 11 Oct 2006 22:00:42 GMT</pubDate>
      <description>&lt;p&gt;
&amp;nbsp;Man kann eigene enums in den Settings einer Anwendung avblegen. Dazu muss zunächst
der enum definiert werden. Anschließend öffnet man die Settings-Datei des Projektes
(liegt unter Properties). Im Feld Type kann man hier nun Browse... auswählen.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/EnuminSettingsspeichern_26/image%7B0%7D%5B12%5D.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="357" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/EnuminSettingsspeichern_26/image%7B0%7D_thumb%5B8%5D.png" width="600" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Dann gibt man bei SelectedType den vollqualifizierten Namen inkl. Namespace ein.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/EnuminSettingsspeichern_26/image%7B0%7D%5B20%5D.png" atomicselection="true"&gt;&lt;/a&gt;&lt;a href="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/EnuminSettingsspeichern_26/image%7B0%7D%5B24%5D.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="260" src="http://www.artiso.com/ProBlog/content/binary/WindowsLiveWriter/EnuminSettingsspeichern_26/image%7B0%7D_thumb%5B16%5D.png" width="366" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;font size="2"&gt; 
&lt;p&gt;
Nun kann man in der Spalte Value über eine DropDownList den gewünschten Wert für die
Konfiguration auswählen. In der app.config sieht das dann so aus:
&lt;/p&gt;
&lt;font color="#0000ff" size="2"&gt; 
&lt;p&gt;
&amp;lt;
&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;CalculationUnitApplication.Properties.Settings&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;setting&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;name&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;"&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Setting&lt;/font&gt;&lt;font size="2"&gt;"&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;serializeAs&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;"&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;font size="2"&gt;"&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;value&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font size="2"&gt;CapaPlaner&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;value&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;setting&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br&gt;
&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;CalculationUnitApplication.Properties.Settings&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&gt;
&lt;p&gt;
&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;Auf den Eintrag kann man dann
aus dem Code so zugreifen:&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;font color="#0000ff" size="2"&gt;&lt;font size="2"&gt; 
&lt;p&gt;
Properties.
&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Settings&lt;/font&gt;&lt;font size="2"&gt;.Default.mySetting&lt;/font&gt;&gt;
&lt;p&gt;
&lt;font size="2"&gt;&lt;font color="#000000"&gt;wobei mySetting der Name ist, der dem Eintrag
in der Settings-Einstellung im Feld Name vergeben wurde. Das Ganze ist jetzt typsicher,
d.h. wenn jemand die Config-Datei bearbeitet und gibt einen Wert ein, der nicht im
enum vorkommt, wird eine Exception geworfen.&lt;/font&gt;
&lt;/p&gt;
&lt;/font&gt;&lt;/font&gt;&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=be9d6a44-062c-4578-8003-82b840bd016d" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,be9d6a44-062c-4578-8003-82b840bd016d.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=df2259f6-f761-45f2-8597-9e5fe9f80387</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,df2259f6-f761-45f2-8597-9e5fe9f80387.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,df2259f6-f761-45f2-8597-9e5fe9f80387.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=df2259f6-f761-45f2-8597-9e5fe9f80387</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Wenn auf einer DataTable ein ColumnChanged-Event eingesetzt wird um bei Änderungen
eines Wertes in der DataTable andere Werte in der selben table neu zu berechnen, ergibt
sich das Problem, dass das zurückschreiben der neuberechneten Werte wieder zu einem
ColumnChanged führt, was den Evbenthandler erneut aufruft und so in einer Endlosschleife
endet, die mit einem StackOverflow endet. 
</p>
        <p>
Hier gibt es eine recht simple Abhilfe. Man deregistriert den EventHandler bevor die
geänderten Werte geschrieben werden und registriert ihn danach einfach wieder. Das
kann dann z.B. so aussehen:
</p>
        <font size="2">
          <p>
          </p>
        </font>
        <font color="#0000ff" size="2">
          <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">void</span> myTable_ColumnChanged(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
DataColumnChangeEventArgs e)<br />
{<br />
   myDataSet.myTable.ColumnChanged -= <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataColumnChangeEventHandler(myTable_ColumnChanged);<br />
   RecalculateValues();<br />
   myDataSet.myTable.ColumnChanged += <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataColumnChangeEventHandler(myTable_ColumnChanged);<br />
}</span>
          </p>
          <p>
          </p>
        </font>
        <font size="2">
        </font>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=df2259f6-f761-45f2-8597-9e5fe9f80387" />
      </body>
      <title>ColumnChanged-Event Stackoverflow vermeiden</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,df2259f6-f761-45f2-8597-9e5fe9f80387.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,df2259f6-f761-45f2-8597-9e5fe9f80387.aspx</link>
      <pubDate>Wed, 11 Oct 2006 19:59:55 GMT</pubDate>
      <description>&lt;p&gt;
Wenn auf einer DataTable ein ColumnChanged-Event eingesetzt wird um bei Änderungen
eines Wertes in der DataTable andere Werte in der selben table neu zu berechnen, ergibt
sich das Problem, dass das zurückschreiben der neuberechneten Werte wieder zu einem
ColumnChanged führt, was den Evbenthandler erneut aufruft und so in einer Endlosschleife
endet, die mit einem StackOverflow endet. 
&lt;/p&gt;
&lt;p&gt;
Hier gibt es eine recht simple Abhilfe. Man deregistriert den EventHandler bevor die
geänderten Werte geschrieben werden und registriert ihn danach einfach wieder. Das
kann dann z.B. so aussehen:
&lt;/p&gt;
&lt;font size=2&gt; 
&lt;p&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; myTable_ColumnChanged(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;object&lt;/span&gt; sender,
DataColumnChangeEventArgs e)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;myDataSet.myTable.ColumnChanged -= &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; DataColumnChangeEventHandler(myTable_ColumnChanged);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;RecalculateValues();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;myDataSet.myTable.ColumnChanged += &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; DataColumnChangeEventHandler(myTable_ColumnChanged);&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/font&gt;&lt;font size=2&gt;&gt;
&lt;/font&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=df2259f6-f761-45f2-8597-9e5fe9f80387" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,df2259f6-f761-45f2-8597-9e5fe9f80387.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=9f403bc1-4529-47c3-add9-f35310a3f2e4</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,9f403bc1-4529-47c3-add9-f35310a3f2e4.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,9f403bc1-4529-47c3-add9-f35310a3f2e4.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=9f403bc1-4529-47c3-add9-f35310a3f2e4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <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="Verdana" color="#000000">Folgender
Code zeigt, wie man in eine Zelle im Infragistics-Grid Prozentwerte aus- und eingeben
kann. Zu beachten ist hierbei, dass beim BeforeExitEditMode auf die Text-Eigenschaft
zugegriffen werden muss, da der Value zu diesem Zeitpunkt noch nicht gesetzt ist.</font>
            </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">private</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> ugShiftDetails_BeforeEnterEditMode(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
CancelEventArgs e)<br />
{<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   if</span> (<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>.ugShiftDetails.ActiveCell.Column.Key
== <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"PercentColumn"</span>)<br />
   {<br />
      UltraGridCell c <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>.ugShiftDetails.ActiveCell;<br />
      c.Value <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">double</span>)c.Value) <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> 100;<br />
   }<br />
}<br /><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">void</span> ugShiftDetails_BeforeExitEditMode(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
Infragistics.Win.UltraWinGrid.BeforeExitEditModeEventArgs e)<br />
{<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   if</span> (<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>.ugShiftDetails.ActiveCell.Column.Key
== <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"PercentColumn"</span>)<br /></span>   {<br />
      UltraGridCell c <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>.ugShiftDetails.ActiveCell;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">      try</span><br />
      {<br />
         c.Value <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> Double.Parse(c.Text) <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">/</span> 100;<br />
      }<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">      catch</span><br />
      {<br />
         MessageBox.Show(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Invalid
Input"</span>);<br />
      }<br />
   }<br />
}</span>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=9f403bc1-4529-47c3-add9-f35310a3f2e4" />
      </body>
      <title>Infragistics Grid für Aus- und Eingabe von Prozentwerten konfigurieren</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,9f403bc1-4529-47c3-add9-f35310a3f2e4.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,9f403bc1-4529-47c3-add9-f35310a3f2e4.aspx</link>
      <pubDate>Mon, 09 Oct 2006 14:39:22 GMT</pubDate>
      <description>&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana color=#000000&gt;Folgender
Code zeigt, wie man in eine Zelle im Infragistics-Grid Prozentwerte aus- und eingeben
kann. Zu beachten ist hierbei, dass beim BeforeExitEditMode auf die Text-Eigenschaft
zugegriffen werden muss, da der Value zu diesem Zeitpunkt noch nicht gesetzt ist.&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;private&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; ugShiftDetails_BeforeEnterEditMode(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;object&lt;/span&gt; sender,
CancelEventArgs e)&lt;br&gt;
{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;this&lt;/span&gt;.ugShiftDetails.ActiveCell.Column.Key
== &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"PercentColumn"&lt;/span&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UltraGridCell c &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;this&lt;/span&gt;.ugShiftDetails.ActiveCell;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;c.Value &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; ((&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;double&lt;/span&gt;)c.Value) &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;*&lt;/span&gt; 100;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;private&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; ugShiftDetails_BeforeExitEditMode(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;object&lt;/span&gt; sender,
Infragistics.Win.UltraWinGrid.BeforeExitEditModeEventArgs e)&lt;br&gt;
{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;this&lt;/span&gt;.ugShiftDetails.ActiveCell.Column.Key
== &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"PercentColumn"&lt;/span&gt;)&lt;br&gt;
&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UltraGridCell c &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;this&lt;/span&gt;.ugShiftDetails.ActiveCell;&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;try&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;c.Value &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; Double.Parse(c.Text) &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;/&lt;/span&gt; 100;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;catch&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MessageBox.Show(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Invalid
Input"&lt;/span&gt;);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=9f403bc1-4529-47c3-add9-f35310a3f2e4" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,9f403bc1-4529-47c3-add9-f35310a3f2e4.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=004ecdf4-86f2-4462-83d5-dbed85de11cf</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,004ecdf4-86f2-4462-83d5-dbed85de11cf.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,004ecdf4-86f2-4462-83d5-dbed85de11cf.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=004ecdf4-86f2-4462-83d5-dbed85de11cf</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Beim Databinding möchte man oft Einfluss auf die Darstellung der Werte auf der Oberfläche
nehmen. Ein typischer Fall hierzu ist z.B. das Databinding mit Prozentwerten. Hier
hat man z.B. einen Wert 0,5 der als 50% angezeigt werden soll. Wenn der Benutzer dann
40% eingibt, soll dieser Wert in 0,4 konvertiert werden. Hierzu kann man die Format-
und Parse-Events des Databindings verwenden.
</p>
        <p>
Zuerst müssen die Events definiert werden. Dabei gehen wir in dem Fall davon aus,
dass es sich um das erste Databinding auf dem Control handelt.
</p>
        <font size="2">
          <p>
          </p>
        </font>
        <font color="#0000ff" size="2">this</font>
        <font size="2">.txtValue.DataBindings[0].Format
+= </font>
        <font color="#0000ff" size="2">new</font>
        <font size="2">
        </font>
        <font color="#008080" size="2">ConvertEventHandler</font>
        <font size="2">(ValueInputPercent_Format);<br /></font>
        <font color="#0000ff" size="2">this</font>
        <font size="2">.txtValue.DataBindings[0].Parse
+= </font>
        <font color="#0000ff" size="2">new</font>
        <font size="2">
        </font>
        <font color="#008080" size="2">ConvertEventHandler</font>
        <font size="2">(ValueInputPercent_Parse);
</font>
        <p>
Dann können in den Eventhandlern die entsprechenden Formatierungen vorgenommen werden.
Dies können natürlich auch noch mit entsprechenden Fehlerprüfungen versehen werden.
</p>
        <font size="2">
          <p>
          </p>
        </font>
        <font color="#0000ff" size="2">void</font>
        <font size="2"> ValueInputPercent_Parse(</font>
        <font color="#0000ff" size="2">object</font>
        <font size="2"> sender, </font>
        <font color="#008080" size="2">ConvertEventArgs</font>
        <font size="2"> e)<br />
{<br />
  e.Value = </font>
        <font color="#008080" size="2">Double</font>
        <font size="2">.Parse(e.Value.ToString().TrimEnd(</font>
        <font color="#800000" size="2">'%'</font>
        <font size="2">))
/ 100;<br />
}
<p></p></font>
        <font color="#0000ff" size="2">void</font>
        <font size="2"> ValueInputPercent_Format(</font>
        <font color="#0000ff" size="2">object</font>
        <font size="2"> sender, </font>
        <font color="#008080" size="2">ConvertEventArgs</font>
        <font size="2"> e)<br /></font>
        <font size="2">{<br />
  e.Value = ((</font>
        <font color="#0000ff" size="2">double</font>
        <font size="2">)e.Value)
* 100 + </font>
        <font color="#800000" size="2">"%"</font>
        <font size="2">;<br />
}
</font>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=004ecdf4-86f2-4462-83d5-dbed85de11cf" />
      </body>
      <title>Databinding mit Prozentwerten</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,004ecdf4-86f2-4462-83d5-dbed85de11cf.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,004ecdf4-86f2-4462-83d5-dbed85de11cf.aspx</link>
      <pubDate>Tue, 26 Sep 2006 10:01:11 GMT</pubDate>
      <description>&lt;p&gt;
Beim Databinding möchte man oft Einfluss auf die Darstellung der Werte auf der Oberfläche
nehmen. Ein typischer Fall hierzu ist z.B. das Databinding mit Prozentwerten. Hier
hat man z.B. einen Wert 0,5 der als 50% angezeigt werden soll. Wenn der Benutzer dann
40% eingibt, soll dieser Wert in 0,4 konvertiert werden. Hierzu kann man die Format-
und Parse-Events des Databindings verwenden.
&lt;/p&gt;
&lt;p&gt;
Zuerst müssen die Events definiert werden. Dabei gehen wir in dem Fall davon aus,
dass es sich um das erste Databinding auf dem Control handelt.
&lt;/p&gt;
&lt;font size=2&gt; 
&lt;p&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;this&lt;/font&gt;&lt;font size=2&gt;.txtValue.DataBindings[0].Format
+= &lt;/font&gt;&lt;font color=#0000ff size=2&gt;new&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#008080 size=2&gt;ConvertEventHandler&lt;/font&gt;&lt;font size=2&gt;(ValueInputPercent_Format);&lt;br&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;this&lt;/font&gt;&lt;font size=2&gt;.txtValue.DataBindings[0].Parse
+= &lt;/font&gt;&lt;font color=#0000ff size=2&gt;new&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#008080 size=2&gt;ConvertEventHandler&lt;/font&gt;&lt;font size=2&gt;(ValueInputPercent_Parse);&gt;
&lt;/font&gt; 
&lt;p&gt;
Dann können in den Eventhandlern die entsprechenden Formatierungen vorgenommen werden.
Dies können natürlich auch noch mit entsprechenden Fehlerprüfungen versehen werden.
&lt;/p&gt;
&lt;font size=2&gt; 
&lt;p&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;void&lt;/font&gt;&lt;font size=2&gt; ValueInputPercent_Parse(&lt;/font&gt;&lt;font color=#0000ff size=2&gt;object&lt;/font&gt;&lt;font size=2&gt; sender, &lt;/font&gt;&lt;font color=#008080 size=2&gt;ConvertEventArgs&lt;/font&gt;&lt;font size=2&gt; e)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; e.Value = &lt;/font&gt;&lt;font color=#008080 size=2&gt;Double&lt;/font&gt;&lt;font size=2&gt;.Parse(e.Value.ToString().TrimEnd(&lt;/font&gt;&lt;font color=#800000 size=2&gt;'%'&lt;/font&gt;&lt;font size=2&gt;))
/ 100;&lt;br&gt;
}&gt;
&lt;p&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;void&lt;/font&gt;&lt;font size=2&gt; ValueInputPercent_Format(&lt;/font&gt;&lt;font color=#0000ff size=2&gt;object&lt;/font&gt;&lt;font size=2&gt; sender, &lt;/font&gt;&lt;font color=#008080 size=2&gt;ConvertEventArgs&lt;/font&gt;&lt;font size=2&gt; e)&lt;br&gt;
&lt;/font&gt;&lt;font size=2&gt;{&lt;br&gt;
&amp;nbsp; e.Value = ((&lt;/font&gt;&lt;font color=#0000ff size=2&gt;double&lt;/font&gt;&lt;font size=2&gt;)e.Value)
* 100 + &lt;/font&gt;&lt;font color=#800000 size=2&gt;"%"&lt;/font&gt;&lt;font size=2&gt;;&lt;br&gt;
}&gt;
&lt;/font&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=004ecdf4-86f2-4462-83d5-dbed85de11cf" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,004ecdf4-86f2-4462-83d5-dbed85de11cf.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=f29406c2-52e2-4311-8385-36e1aa46b08a</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,f29406c2-52e2-4311-8385-36e1aa46b08a.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,f29406c2-52e2-4311-8385-36e1aa46b08a.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=f29406c2-52e2-4311-8385-36e1aa46b08a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
User-Controls werden im Designer von Visual Studio  genauso instanziert wie zur
Laufzeit. Um hier unterscheiden zu können, kann man mit der Variable DesignMode abfragen,
in welchem Modus die Komponente momentan initialisiert wird. Die ist z.B. sinnvoll,
wenn man beim instanzieren auf Objekte zugreift, die im DesignMode gar nicht zur Verfügung
stehen. Hier ein kleines Beispiel:
</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">public</span> MyControl()<br />
{<br />
  InitializeComponent();<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> 
if</span> (!DesignMode)<br />
  {<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   
try</span><br />
    {<br />
      shiftConfiguration.ReadXml(ConfigurationManager.AppSettings[<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"ShiftConfigFile"</span>]);<br />
    }<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   
catch</span> (Exception ex)<br />
    {<br />
      MessageBox.Show(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Error
reading Shift Configuration File\n\nError : "</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> ex.Message);<br />
    }<br />
  }<br />
}</span>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=f29406c2-52e2-4311-8385-36e1aa46b08a" />
      </body>
      <title>Abfragen, ob Control im Designer angezeigt wird oder in der Applikation</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,f29406c2-52e2-4311-8385-36e1aa46b08a.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,f29406c2-52e2-4311-8385-36e1aa46b08a.aspx</link>
      <pubDate>Tue, 26 Sep 2006 09:56:22 GMT</pubDate>
      <description>&lt;p&gt;
User-Controls werden im Designer von Visual Studio &amp;nbsp;genauso instanziert wie zur
Laufzeit. Um hier unterscheiden zu können, kann man mit der Variable DesignMode abfragen,
in welchem Modus die Komponente momentan initialisiert wird. Die ist z.B. sinnvoll,
wenn man beim instanzieren auf Objekte zugreift, die im DesignMode gar nicht zur Verfügung
stehen. Hier ein kleines Beispiel:
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; MyControl()&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; InitializeComponent();&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;
if&lt;/span&gt; (!DesignMode)&lt;br&gt;
&amp;nbsp; {&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
try&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shiftConfiguration.ReadXml(ConfigurationManager.AppSettings[&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"ShiftConfigFile"&lt;/span&gt;]);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
catch&lt;/span&gt; (Exception ex)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Error
reading Shift Configuration File\n\nError : "&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; ex.Message);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp; }&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=f29406c2-52e2-4311-8385-36e1aa46b08a" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,f29406c2-52e2-4311-8385-36e1aa46b08a.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=29a317d4-7e3b-4503-a3e3-2e68fe0f8d74</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,29a317d4-7e3b-4503-a3e3-2e68fe0f8d74.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,29a317d4-7e3b-4503-a3e3-2e68fe0f8d74.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=29a317d4-7e3b-4503-a3e3-2e68fe0f8d74</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Als Erweiterung zu meinem Beitrag zum Übernehmen von Excel-Daten über die Zwischenablage <a href="http://www.artiso.com/ProBlog/PermaLink,guid,2017b61d-19f4-4e4a-a033-cbf820d2b18e.aspx">(http://www.artiso.com/ProBlog/PermaLink,guid,2017b61d-19f4-4e4a-a033-cbf820d2b18e.aspx</a>)
hier nun das Gegenstück, Daten über die Zwischenablage an Excel übergeben:
</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">string</span> Data <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"1,1;2,7;3,1;4,8;5,9"</span>;<br />
Byte[] ClipboardData <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> Encoding.UTF8.GetBytes(Data);<br />
MemoryStream ClipboardStream <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> MemoryStream(ClipboardData);<br />
DataObject DataObj <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> DataObject(DataFormats.CommaSeparatedValue,
ClipboardStream);<br />
Clipboard.SetDataObject(DataObj, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">true</span>);<br /></span>
        </p>
        <p>
Daten über mehrere Zeilen werden übrigens mit Environment.NewLine getrennt.
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=29a317d4-7e3b-4503-a3e3-2e68fe0f8d74" />
      </body>
      <title>In eigenen Anwendungen Daten mit Excel über die Zwischenablage austauschen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,29a317d4-7e3b-4503-a3e3-2e68fe0f8d74.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,29a317d4-7e3b-4503-a3e3-2e68fe0f8d74.aspx</link>
      <pubDate>Fri, 22 Sep 2006 13:26:27 GMT</pubDate>
      <description>&lt;p&gt;
Als Erweiterung zu meinem Beitrag zum Übernehmen von Excel-Daten über die Zwischenablage &lt;a href="http://www.artiso.com/ProBlog/PermaLink,guid,2017b61d-19f4-4e4a-a033-cbf820d2b18e.aspx"&gt;(http://www.artiso.com/ProBlog/PermaLink,guid,2017b61d-19f4-4e4a-a033-cbf820d2b18e.aspx&lt;/a&gt;)
hier nun das Gegenstück, Daten über die Zwischenablage an Excel übergeben:
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; Data &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"1,1;2,7;3,1;4,8;5,9"&lt;/span&gt;;&lt;br&gt;
Byte[] ClipboardData &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; Encoding.UTF8.GetBytes(Data);&lt;br&gt;
MemoryStream ClipboardStream &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; MemoryStream(ClipboardData);&lt;br&gt;
DataObject DataObj &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; DataObject(DataFormats.CommaSeparatedValue,
ClipboardStream);&lt;br&gt;
Clipboard.SetDataObject(DataObj, &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;true&lt;/span&gt;);&lt;br&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
Daten über mehrere Zeilen werden übrigens mit Environment.NewLine getrennt.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=29a317d4-7e3b-4503-a3e3-2e68fe0f8d74" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,29a317d4-7e3b-4503-a3e3-2e68fe0f8d74.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=c7396c7d-e433-42be-8db2-ab3e37dd3231</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,c7396c7d-e433-42be-8db2-ab3e37dd3231.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,c7396c7d-e433-42be-8db2-ab3e37dd3231.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=c7396c7d-e433-42be-8db2-ab3e37dd3231</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Der nachfolgende Code zeigt, wie JPEG Grafiken (und ebenso auch andere Formate) verlustlos
rotiert werden können: 
<br /><code><br />
Image i = Image.FromFile(this.imageFilename); 
<br />
ImageCodecInfo usedIC = this.GetEncoderInfo("image/jpeg"); 
<br /><br />
System.Drawing.Imaging.Encoder encoder = 
<br />
System.Drawing.Imaging.Encoder.Transformation; 
<br /><br />
EncoderParameters encparams = new EncoderParameters(1); 
<br />
EncoderParameter encparam = 
<br />
new EncoderParameter(encoder, 
<br />
(long)EncoderValue.TransformRotate270); 
<br />
encparams.Param[0] = encparam; 
<br /><br />
i.Save("filename.jpg", usedIC, encparams ); 
<br /><br />
i.Dispose(); 
<br />
i = null; 
<br />
GC.Collect(); 
<br /></code></p>
        <p>
          <code>
            <font face="Verdana">Quelle: <a href="http://blog.norberteder.com/index.php?entry=entry060920-223506">http://blog.norberteder.com/index.php?entry=entry060920-223506</a></font>
          </code>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=c7396c7d-e433-42be-8db2-ab3e37dd3231" />
      </body>
      <title>Grafiken verlustfrei rotieren</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,c7396c7d-e433-42be-8db2-ab3e37dd3231.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,c7396c7d-e433-42be-8db2-ab3e37dd3231.aspx</link>
      <pubDate>Fri, 22 Sep 2006 05:43:24 GMT</pubDate>
      <description>&lt;p&gt;
Der nachfolgende Code zeigt, wie JPEG Grafiken (und ebenso auch andere Formate) verlustlos
rotiert werden können: 
&lt;br&gt;
&lt;code&gt;
&lt;br&gt;
Image i = Image.FromFile(this.imageFilename); 
&lt;br&gt;
ImageCodecInfo usedIC = this.GetEncoderInfo("image/jpeg"); 
&lt;br&gt;
&lt;br&gt;
System.Drawing.Imaging.Encoder encoder = 
&lt;br&gt;
System.Drawing.Imaging.Encoder.Transformation; 
&lt;br&gt;
&lt;br&gt;
EncoderParameters encparams = new EncoderParameters(1); 
&lt;br&gt;
EncoderParameter encparam = 
&lt;br&gt;
new EncoderParameter(encoder, 
&lt;br&gt;
(long)EncoderValue.TransformRotate270); 
&lt;br&gt;
encparams.Param[0] = encparam; 
&lt;br&gt;
&lt;br&gt;
i.Save("filename.jpg", usedIC, encparams ); 
&lt;br&gt;
&lt;br&gt;
i.Dispose(); 
&lt;br&gt;
i = null; 
&lt;br&gt;
GC.Collect(); 
&lt;br&gt;
&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;code&gt;&lt;font face=Verdana&gt;Quelle: &lt;a href="http://blog.norberteder.com/index.php?entry=entry060920-223506"&gt;http://blog.norberteder.com/index.php?entry=entry060920-223506&lt;/a&gt;&lt;/font&gt;
&lt;/p&gt;
&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=c7396c7d-e433-42be-8db2-ab3e37dd3231" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,c7396c7d-e433-42be-8db2-ab3e37dd3231.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=11b325f8-ecd0-4bd0-8cae-d01372b5d825</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,11b325f8-ecd0-4bd0-8cae-d01372b5d825.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,11b325f8-ecd0-4bd0-8cae-d01372b5d825.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=11b325f8-ecd0-4bd0-8cae-d01372b5d825</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
HTML-Emails mit integrierten Bildern zu verschicken ist unter .net gar nicht schwer
- wenn man weiss, wie es geht. Hier ist's beschrieben:
</p>
        <p>
          <a href="http://blog.freakfabrik.net/PermaLink.aspx?guid=2fc780aa-14e2-45a6-a58e-73bfbd966905">http://blog.freakfabrik.net/PermaLink.aspx?guid=2fc780aa-14e2-45a6-a58e-73bfbd966905</a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=11b325f8-ecd0-4bd0-8cae-d01372b5d825" />
      </body>
      <title>Bilder in HTML-eMails einbinden</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,11b325f8-ecd0-4bd0-8cae-d01372b5d825.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,11b325f8-ecd0-4bd0-8cae-d01372b5d825.aspx</link>
      <pubDate>Fri, 22 Sep 2006 04:56:58 GMT</pubDate>
      <description>&lt;p&gt;
HTML-Emails mit integrierten Bildern zu verschicken ist unter .net gar nicht schwer
- wenn man weiss, wie es geht. Hier ist's beschrieben:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.freakfabrik.net/PermaLink.aspx?guid=2fc780aa-14e2-45a6-a58e-73bfbd966905"&gt;http://blog.freakfabrik.net/PermaLink.aspx?guid=2fc780aa-14e2-45a6-a58e-73bfbd966905&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=11b325f8-ecd0-4bd0-8cae-d01372b5d825" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,11b325f8-ecd0-4bd0-8cae-d01372b5d825.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=1c677e2e-3a2c-45bf-8da2-a7f3432a4e22</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,1c677e2e-3a2c-45bf-8da2-a7f3432a4e22.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,1c677e2e-3a2c-45bf-8da2-a7f3432a4e22.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=1c677e2e-3a2c-45bf-8da2-a7f3432a4e22</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
User-Controls können auch mit eigenen Events erweitert werden. Das ist eigenlich recht
simpel. Man definiert einfach einen Event, z.B. 
</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">public</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">event</span> EventHandler
LinesChanged;</span>
        </p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <font face="Verdana" color="#003300" size="2">Dann
ruft man an der Stelle, an der der Event ausgelöst werden soll einfach den Event auf.
Das geht am einfachsten über:</font>
          </span>
        </p>
        <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
          <font face="Verdana" color="#003300" size="2">
            <p>
              <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">LinesChanged(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>,
EventArgs.Empty);</span>
            </p>
            <p>
              <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                <font face="Verdana" color="#003300" size="2">Der
Event kann dann außerhalb des User-Controls wie gewohnt mit einem Eventhandler ausgewertet
werden. Möchte man mehr Informationen als den Sender übergeben, erstellt man sich
einfach eine Klasse, die man von EventArgs ableitet und übergibt dann eine Instanz
dieser Klasse beim Aufruf des Events, z.B.</font>
              </span>
            </p>
            <span style="FONT-SIZE: 11px; COLOR: black; 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> MyEventArgs
: EventArgs<br />
{<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">string</span> msg;<br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   public</span> MyEventArgs( <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> messageData
) <br /></span>
                <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   {<br />
      msg <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> messageData;<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">string</span> Message
{ <br />
   get { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> msg;
} <br />
   set { msg <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> value;
}<br />
   }<br />
}</span>
              </p>
              <p>
                <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                  <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                    <font face="Verdana" color="#003300" size="2">Damit
der Eventhandler nun auch noch den richtigen Datentyp für die EventArgs übergeben
bekommt braucht mann noch ein Delegate, z.B. </font>
                  </span>
                </span>
              </p>
              <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                <span style="FONT-SIZE: 11px; COLOR: black; 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">delegate</span>
                      <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> MyEventHandler(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
MyEventArgs e); </span>
                  </p>
                  <p>
                    <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                      <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                        <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                          <font face="Verdana" color="#003300" size="2">Der
Event muss nun entsprechend deklariert werden:</font>
                        </span>
                      </span>
                    </span>
                  </p>
                  <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                    <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
                      <span style="FONT-SIZE: 11px; COLOR: black; 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">event</span> MyEventHandler
LinesChanged;</span>
                        </p>
                      </span>
                    </span>
                  </span>
                </span>
                <p>
                  <font face="Verdana" color="#003300" size="2">Um den Eventhandler nun zu erzeugen,
legt man in der umgebenden Klasse eine Instanz des Objektes an, das den Event wirft.
Auf dieser Instanz kann man nun den Event mit dem Handler verbinden. Das geht in VS
ganz einfach. Man gibt z.B. ein:</font>
                </p>
                <p>
                  <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">MyControl.LinesChanged
+=</span>
                </p>
                <p>
                  <font face="Verdana" color="#003300" size="2">Dann drückt man zweimal Tab und schon
hat man den Eventhandler angelegt. Fertig sieht das dann ungefähr so aus:</font>
                </p>
                <p>
                  <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">MyControl.LinesChanged
+= <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> UControl.MyEventHandler(MyControl_LinesChanged)<br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> MyControl_LinesChanged(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
MyEventArgs e)<br />
{<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   throw</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> Exception(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"The
method or operation is not implemented."</span>);<br />
}</span>
                </p>
                <p>
                  <font face="Verdana" color="#003300" size="2">
                  </font>
                  <br />
 
</p>
              </span>
            </span>
          </font>
        </span>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=1c677e2e-3a2c-45bf-8da2-a7f3432a4e22" />
      </body>
      <title>Eigene Events aus Winform User-Controls auslösen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,1c677e2e-3a2c-45bf-8da2-a7f3432a4e22.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,1c677e2e-3a2c-45bf-8da2-a7f3432a4e22.aspx</link>
      <pubDate>Wed, 20 Sep 2006 19:56:44 GMT</pubDate>
      <description>&lt;p&gt;
User-Controls können auch mit eigenen Events erweitert werden. Das ist eigenlich recht
simpel. Man definiert einfach einen Event, z.B. 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;event&lt;/span&gt; EventHandler
LinesChanged;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana color=#003300 size=2&gt;Dann
ruft man an der Stelle, an der der Event ausgelöst werden soll einfach den Event auf.
Das geht am einfachsten über:&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana color=#003300 size=2&gt; 
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;LinesChanged(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;this&lt;/span&gt;,
EventArgs.Empty);&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana color=#003300 size=2&gt;Der
Event kann dann außerhalb des User-Controls wie gewohnt mit einem Eventhandler ausgewertet
werden. Möchte man mehr Informationen als den Sender übergeben, erstellt man sich
einfach eine Klasse, die man von EventArgs ableitet und übergibt dann eine Instanz
dieser Klasse beim Aufruf des Events, z.B.&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt; 
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;class&lt;/span&gt; MyEventArgs
: EventArgs&lt;br&gt;
{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;private&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; msg;&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&lt;/span&gt; MyEventArgs( &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; messageData
)&amp;nbsp;&lt;br&gt;
&lt;/span&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;msg &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; messageData;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; Message
{&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;get { &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;return&lt;/span&gt; msg;
}&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;set { msg &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; value;
}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana color=#003300 size=2&gt;Damit
der Eventhandler nun auch noch den richtigen Datentyp für die EventArgs übergeben
bekommt braucht mann noch ein Delegate, z.B. &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt; 
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;delegate&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; MyEventHandler(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;object&lt;/span&gt; sender,
MyEventArgs e); &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana color=#003300 size=2&gt;Der
Event muss nun entsprechend deklariert werden:&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt; 
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;event&lt;/span&gt; MyEventHandler
LinesChanged;&lt;/span&gt;
&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; 
&lt;p&gt;
&lt;font face=Verdana color=#003300 size=2&gt;Um den Eventhandler nun zu erzeugen, legt
man in der umgebenden Klasse eine Instanz des Objektes an, das den Event wirft. Auf
dieser Instanz kann man nun den Event mit dem Handler verbinden. Das geht in VS ganz
einfach. Man gibt z.B. ein:&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;MyControl.LinesChanged
+=&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Verdana color=#003300 size=2&gt;Dann drückt man zweimal Tab und schon hat
man den Eventhandler angelegt. Fertig sieht das dann ungefähr so aus:&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;MyControl.LinesChanged
+= &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; UControl.MyEventHandler(MyControl_LinesChanged)&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; MyControl_LinesChanged(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;object&lt;/span&gt; sender,
MyEventArgs e)&lt;br&gt;
{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;throw&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; Exception(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"The
method or operation is not implemented."&lt;/span&gt;);&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Verdana color=#003300 size=2&gt;&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=1c677e2e-3a2c-45bf-8da2-a7f3432a4e22" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,1c677e2e-3a2c-45bf-8da2-a7f3432a4e22.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=854dd564-1680-4f54-bc8e-a888017dd994</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,854dd564-1680-4f54-bc8e-a888017dd994.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,854dd564-1680-4f54-bc8e-a888017dd994.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=854dd564-1680-4f54-bc8e-a888017dd994</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Vor kurzem habe ich hier <a href="http://www.artiso.com/ProBlog/PermaLink,guid,a593c275-c0fa-4acb-89e3-dde65c3fd9d5.aspx">gepostet</a>,
wie man Debug-Informationen ausgeben kann. Hier noch eine kleine Ergänzung. Man kann
den Debug-Informationen auch noch Informationen über die Quelldatei, das Modul und
die Zeile ausgeben. Dazu dient der folgende Code:
</p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Debug.WriteLine(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Quelledatei
= "</span><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> StackFrame(0, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">true</span>).GetFileName() <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><br /><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"\nMethode
= "</span><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> StackFrame(0, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">true</span>).GetMethod() <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><br /><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"\nZeile
= "</span><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> StackFrame(0, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">true</span>).GetFileLineNumber() <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"\n"</span>);</span>
        </p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <font face="Verdana">Gefunden
bei </font>
            <a href="http://blogs.dotnetgerman.com/dani.net/PermaLink,guid,3c58b4a7-7073-4843-aa9d-731e4eed0a86.aspx">
              <font face="Verdana">Dani.Net</font>
            </a>
            <br />
          </span>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=854dd564-1680-4f54-bc8e-a888017dd994" />
      </body>
      <title>Mit Debug-Informationen Zeilennummer ausgeben</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,854dd564-1680-4f54-bc8e-a888017dd994.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,854dd564-1680-4f54-bc8e-a888017dd994.aspx</link>
      <pubDate>Sat, 16 Sep 2006 20:13:53 GMT</pubDate>
      <description>&lt;p&gt;
Vor kurzem habe ich hier &lt;a href="http://www.artiso.com/ProBlog/PermaLink,guid,a593c275-c0fa-4acb-89e3-dde65c3fd9d5.aspx"&gt;gepostet&lt;/a&gt;,
wie man Debug-Informationen ausgeben kann. Hier noch eine kleine Ergänzung. Man kann
den Debug-Informationen auch noch Informationen über die Quelldatei, das Modul und
die Zeile ausgeben. Dazu dient der folgende Code:
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;Debug.WriteLine(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Quelledatei
= "&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; StackFrame(0, &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;true&lt;/span&gt;).GetFileName() &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"\nMethode
= "&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; StackFrame(0, &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;true&lt;/span&gt;).GetMethod() &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"\nZeile
= "&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; StackFrame(0, &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;true&lt;/span&gt;).GetFileLineNumber() &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"\n"&lt;/span&gt;);&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana&gt;Gefunden
bei &lt;/font&gt;&lt;a href="http://blogs.dotnetgerman.com/dani.net/PermaLink,guid,3c58b4a7-7073-4843-aa9d-731e4eed0a86.aspx"&gt;&lt;font face=Verdana&gt;Dani.Net&lt;/font&gt;&lt;/a&gt;
&lt;br&gt;
&lt;/p&gt;
&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=854dd564-1680-4f54-bc8e-a888017dd994" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,854dd564-1680-4f54-bc8e-a888017dd994.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=034f4482-1e24-48fc-8816-5c0800a7c9ad</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,034f4482-1e24-48fc-8816-5c0800a7c9ad.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,034f4482-1e24-48fc-8816-5c0800a7c9ad.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=034f4482-1e24-48fc-8816-5c0800a7c9ad</wfw:commentRss>
      <title>History bei cmd</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,034f4482-1e24-48fc-8816-5c0800a7c9ad.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,034f4482-1e24-48fc-8816-5c0800a7c9ad.aspx</link>
      <pubDate>Thu, 14 Sep 2006 17:35:19 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;font color=#000000&gt;Bei Christoph
Schmid habe ich gerade folgenden Tipp gefunden:&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;font face="Times New Roman" color=#000000 size=3&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-fareast-font-family: 'Times New Roman'"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Dass
man per Pfeiltasten zwischen den eingegebenen Befehlen wechseln kann, war mir bekannt.&lt;br&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
Aber es geht einfacher mit der F7-Taste. Dann erscheint ein Fenster, in welchem man
die Befehle sieht und schnell wechseln kann.&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-fareast-font-family: 'Times New Roman'"&gt;
&lt;br&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.artiso.com/ProBlog/content/binary/cmd_f71.gif" border=0&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p style="MARGIN-RIGHT: 0px"&gt;
Quelle: &lt;a href="http://blogs.dotnetgerman.com/schmidi/PermaLink,guid,a9bace19-3447-47e2-94a1-5bb83ce10e2d.aspx"&gt;http://blogs.dotnetgerman.com/schmidi/PermaLink,guid,a9bace19-3447-47e2-94a1-5bb83ce10e2d.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=034f4482-1e24-48fc-8816-5c0800a7c9ad" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,034f4482-1e24-48fc-8816-5c0800a7c9ad.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=c5728e43-7fbe-4415-aad3-13e83874e5e0</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,c5728e43-7fbe-4415-aad3-13e83874e5e0.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,c5728e43-7fbe-4415-aad3-13e83874e5e0.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=c5728e43-7fbe-4415-aad3-13e83874e5e0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Heute habe ich mir mal Outlook 2007 näher angeschaut und dabei bin ich über die Funktion
gestolpert, mit der Outlook RSS Feeds lesen kann. Eigentlich bin ich mit dem SharpReader,
den ich bisher einsetze, ganz zufrieden. Einzig sört mich, dass ich auf verschiedenen
Rechnern nicht sauber synchronisieren kann, welche Einträge ich schon gelesen habe.
</p>
        <p>
In Outlook werden die Einträge der Feeds werden in Outlook als Nachrichten
auf dem Exchange-Server abgelegt. Daraus ergeben sich zwei Vorteile: 
</p>
        <p>
1.) Die Einträge stehen auf allen Rechnern zur Verfügung. Auch der Status (gelesen
/ ungelesen) wird für alle Outlook-Clients zur Verfügung gestellt. 
</p>
        <p>
2.) Ich kann die Einträge auch offline lesen. Dazu bietet Outlook auch die Möglichkeit,
den kompletten Eintrag als HTML-File lokal zu speichern.
</p>
        <p>
Total begeistert war ich dann, als ich feststellte, dass ich sogar mit meinem Outlook
2003 auf die heruntergeladenen Einträge Zugriff habe. OPML-Files können übrigens über
die Import / Export-Funktion von Outlook importiert und auch wieder exportiert werden.
</p>
        <p>
Nachträgliche Einstellungen können über einen etwas versteckten Dialog vorgenommen
werden: Tools / Options / Mail Setup / E-mail Accounts / RSS-Feeds
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=c5728e43-7fbe-4415-aad3-13e83874e5e0" />
      </body>
      <title>Outlook 2007 als RSS Reader</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,c5728e43-7fbe-4415-aad3-13e83874e5e0.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,c5728e43-7fbe-4415-aad3-13e83874e5e0.aspx</link>
      <pubDate>Thu, 14 Sep 2006 16:50:04 GMT</pubDate>
      <description>&lt;p&gt;
Heute habe ich mir mal Outlook 2007 näher angeschaut und dabei bin ich über die Funktion
gestolpert, mit der Outlook RSS Feeds lesen kann. Eigentlich bin ich mit dem SharpReader,
den ich bisher einsetze, ganz zufrieden.&amp;nbsp;Einzig sört mich, dass ich auf verschiedenen
Rechnern nicht sauber synchronisieren kann, welche Einträge ich schon gelesen habe.
&lt;/p&gt;
&lt;p&gt;
In Outlook&amp;nbsp;werden die&amp;nbsp;Einträge der Feeds werden in Outlook als Nachrichten
auf dem Exchange-Server abgelegt. Daraus ergeben sich zwei Vorteile: 
&lt;/p&gt;
&lt;p&gt;
1.) Die Einträge stehen auf allen Rechnern zur Verfügung. Auch der Status (gelesen
/ ungelesen) wird für alle Outlook-Clients zur Verfügung gestellt. 
&lt;/p&gt;
&lt;p&gt;
2.) Ich kann die Einträge auch offline lesen. Dazu bietet Outlook auch die Möglichkeit,
den kompletten Eintrag als HTML-File lokal zu speichern.
&lt;/p&gt;
&lt;p&gt;
Total begeistert war ich dann, als ich feststellte, dass ich sogar mit meinem Outlook
2003 auf die heruntergeladenen Einträge Zugriff habe. OPML-Files können übrigens über
die Import / Export-Funktion von Outlook importiert und auch wieder exportiert werden.
&lt;/p&gt;
&lt;p&gt;
Nachträgliche Einstellungen können über einen etwas versteckten Dialog vorgenommen
werden: Tools / Options / Mail Setup / E-mail Accounts / RSS-Feeds
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=c5728e43-7fbe-4415-aad3-13e83874e5e0" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,c5728e43-7fbe-4415-aad3-13e83874e5e0.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=47995659-e7e5-4ec5-82e4-530505c6e7b3</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,47995659-e7e5-4ec5-82e4-530505c6e7b3.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,47995659-e7e5-4ec5-82e4-530505c6e7b3.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=47995659-e7e5-4ec5-82e4-530505c6e7b3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Texte können in Winforms-Anwendungen auch einfach vertikal geschrieben werden.
</p>
        <p>
          <a href="http://msdn2.microsoft.com/de-de/library/da9f790s.aspx">http://msdn2.microsoft.com/de-de/library/da9f790s.aspx</a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=47995659-e7e5-4ec5-82e4-530505c6e7b3" />
      </body>
      <title>Vertikalen Text in Winforms zeichnen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,47995659-e7e5-4ec5-82e4-530505c6e7b3.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,47995659-e7e5-4ec5-82e4-530505c6e7b3.aspx</link>
      <pubDate>Wed, 13 Sep 2006 09:06:27 GMT</pubDate>
      <description>&lt;p&gt;
Texte können in Winforms-Anwendungen auch einfach vertikal geschrieben werden.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://msdn2.microsoft.com/de-de/library/da9f790s.aspx"&gt;http://msdn2.microsoft.com/de-de/library/da9f790s.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=47995659-e7e5-4ec5-82e4-530505c6e7b3" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,47995659-e7e5-4ec5-82e4-530505c6e7b3.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=a593c275-c0fa-4acb-89e3-dde65c3fd9d5</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,a593c275-c0fa-4acb-89e3-dde65c3fd9d5.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,a593c275-c0fa-4acb-89e3-dde65c3fd9d5.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=a593c275-c0fa-4acb-89e3-dde65c3fd9d5</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In manchen Situationen hilft ein Breakpoint beim Debugen einfach nicht weiter. Haben
Sie schon mal versucht, einen Eventhandler für ein Mouse-Move-Ereignis mit einem Breakpoint
zu debuggen? Das ist schlicht unmöglich.
</p>
        <p>
Abhilfe schafft hier das Debug-Objekt. Sie können damit z.B. Informationen im Ausgabefenster
von VS ausgeben. In oben beschriebenen Fall würden Sie also z.B. folgendes verwenden:
</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">private</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> Form2_MouseMove(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
MouseEventArgs e)<br />
{<br />
   System.Diagnostics.Debug.WriteLine(e.X <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"
- "</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> e.Y);<br />
}</span>
        </p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <font face="Verdana" size="2">Das
Ergebnis sieht man wie gesagt im Ausgabefenster von Visual Studio (Einblenden über
Strg + Alt + O).</font>
          </span>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <br />
          </span>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=a593c275-c0fa-4acb-89e3-dde65c3fd9d5" />
      </body>
      <title>Informationen währen der Debug-Sitzung ausgeben</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,a593c275-c0fa-4acb-89e3-dde65c3fd9d5.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,a593c275-c0fa-4acb-89e3-dde65c3fd9d5.aspx</link>
      <pubDate>Tue, 12 Sep 2006 18:05:53 GMT</pubDate>
      <description>&lt;p&gt;
In manchen Situationen hilft ein Breakpoint beim Debugen einfach nicht weiter. Haben
Sie schon mal versucht, einen Eventhandler für ein Mouse-Move-Ereignis mit einem Breakpoint
zu debuggen? Das ist schlicht unmöglich.
&lt;/p&gt;
&lt;p&gt;
Abhilfe schafft hier das Debug-Objekt. Sie können damit z.B. Informationen im Ausgabefenster
von VS ausgeben. In oben beschriebenen Fall würden Sie also z.B. folgendes verwenden:
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;private&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; Form2_MouseMove(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;object&lt;/span&gt; sender,
MouseEventArgs e)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;System.Diagnostics.Debug.WriteLine(e.X &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"
- "&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; e.Y);&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana size=2&gt;Das
Ergebnis sieht man wie gesagt im Ausgabefenster von Visual Studio (Einblenden über
Strg + Alt + O).&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;
&lt;br&gt;
&lt;/p&gt;
&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=a593c275-c0fa-4acb-89e3-dde65c3fd9d5" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,a593c275-c0fa-4acb-89e3-dde65c3fd9d5.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=ac7237cf-3178-4024-be9b-f9d6a7274255</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,ac7237cf-3178-4024-be9b-f9d6a7274255.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,ac7237cf-3178-4024-be9b-f9d6a7274255.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=ac7237cf-3178-4024-be9b-f9d6a7274255</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Welche Entwickler hat denn schon die Namespaces aller Objekte des Frameworks im Kopf?
Da hilft oft nur in der Hilfe nachschauen - oder man kennt eine kleine aber sehr nette
Funktion im Visual Studio 2005!
</p>
        <p>
Man gibt einfach den Namen des Objektes ein. Ist das Objekt im .net Framework enthalten,
erkennt VS das automatisch und zeigt dies durch einen kleinen roten Strich am Ende
des Objektnamens ein. Klickt man darauf, kann man auswählen, ob der Namespace vor
dem Objekt eingefügt l oder ob automatisch ein Using für den Namespace eingefügt
werden soll. Unten sieht man ein Beispiel mit dem Objekt MailMessage.
</p>
        <img src="http://www.artiso.com/ProBlog/content/binary/MailMessage.png" border="0" />
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=ac7237cf-3178-4024-be9b-f9d6a7274255" />
      </body>
      <title>Namespaces für Objekte automatisch einfügen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,ac7237cf-3178-4024-be9b-f9d6a7274255.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,ac7237cf-3178-4024-be9b-f9d6a7274255.aspx</link>
      <pubDate>Tue, 12 Sep 2006 17:09:44 GMT</pubDate>
      <description>&lt;p&gt;
Welche Entwickler hat denn schon die Namespaces aller Objekte des Frameworks im Kopf?
Da hilft oft nur in der Hilfe nachschauen - oder man kennt eine kleine aber sehr nette
Funktion im Visual Studio 2005!
&lt;/p&gt;
&lt;p&gt;
Man gibt einfach den Namen des Objektes ein. Ist das Objekt im .net Framework enthalten,
erkennt VS das automatisch und zeigt dies durch einen kleinen roten Strich am Ende
des Objektnamens ein. Klickt man darauf, kann man auswählen, ob der Namespace vor
dem Objekt eingefügt&amp;nbsp;l oder ob automatisch ein Using für den Namespace eingefügt
werden soll. Unten sieht man ein Beispiel mit dem Objekt MailMessage.
&lt;/p&gt;
&lt;img src="http://www.artiso.com/ProBlog/content/binary/MailMessage.png" border=0&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=ac7237cf-3178-4024-be9b-f9d6a7274255" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,ac7237cf-3178-4024-be9b-f9d6a7274255.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=aca1d825-3f4d-41fc-9df9-fd8dd2ad305e</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,aca1d825-3f4d-41fc-9df9-fd8dd2ad305e.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,aca1d825-3f4d-41fc-9df9-fd8dd2ad305e.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=aca1d825-3f4d-41fc-9df9-fd8dd2ad305e</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Eigentlich dachte ich, das sei eine ganz simple Aufgabe, aber dann hat mich das Ganze
doch 2 Stunden Zeit gekostet. Das Ziel war, zwei Panels über einen separaten Scrollbar
zu scrollen. Alse Panels in der Form platziert, AutoScroll auf false gesetzt, damit
nicht jedes Panel mit einem Scrollbar versehen wird und den Scrollbar hinzugefügt.
Der Event für das Scrollen war auch schenll gefunden, aber dann gab es Probleme.
</p>
        <p>
Deshalb hier die Vorgehensweise, die nach meinen Versuchen am besten funktioniert
hat.
</p>
        <font color="#0000ff" size="2">
          <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">private</span>
              <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> Form2_Load(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
EventArgs e)<br />
{<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   this</span>.panel1.AutoScroll <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">true</span>;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   this</span>.panel2.AutoScroll <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">true</span>;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   this</span>.ultraScrollBar1.Minimum <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>.panel1.HorizontalScroll.Minimum;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   this</span>.ultraScrollBar1.Maximum <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>.panel1.HorizontalScroll.Maximum;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   this</span>.ultraScrollBar1.Value <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>.panel1.HorizontalScroll.Value;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   this</span>.ultraScrollBar1.SmallChange <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>.panel1.HorizontalScroll.SmallChange;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   this</span>.ultraScrollBar1.LargeChange <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>.panel1.HorizontalScroll.LargeChange;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   this</span>.panel1.AutoScroll <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">false</span>;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   this</span>.panel2.AutoScroll <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">false</span>;<br />
}<br /><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">void</span> ultraScrollBar1_Scroll(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
ScrollEventArgs e)<br />
{<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   this</span>.panel1.AutoScrollPosition <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> Point(e.NewValue,
0);<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   this</span>.panel2.AutoScrollPosition <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> Point(e.NewValue,
0);<br />
}</span>
          </p>
          <p>
            <font color="#000000">Hierzu ein paar Anmerkungen:<br /></font>
            <font color="#000000">1.) Die Werte für Minimum, Maximum, SmalChange und LargeChange
können vom Panel nur dann sauber abgefragt werden, wenn AutoScroll = true gesetzt
ist. 
<br /></font>
            <font color="#000000">2.) Wird die Scrollposition über this.panel1.HorizontalScroll.Value
gesetzt, was naheliegend wäre, kommt es bei abgeschaltetem AutoScroll zu einem seltsamen
Flimmer-Effekt. Statt dessen muss die AutoScrollPosition gesetzt werden.<br />
3.) Auch für das zweite Panel muss das AutoScroll einmal aktiviert und dann wieder
deaktiviert werden, sonst scrollt das nicht mit.</font>
          </p>
          <p>
            <font color="#000000">Also diese Lösung funktioniert mal.</font>
          </p>
          <p>
          </p>
        </font>
        <img src="http://www.artiso.com/ProBlog/content/binary/Panels1.png" border="0" />
        <p>
Diese Vorgehensweise scheint mir jedoch recht unlogisch und sehr umständlich. Ob das
Framework da nichts besseres bietet oder ob ich da einfach noch nicht den richtigen
Dreh gefunden hab, weiss ich im Moment noch nicht. Ich werde bei Gelegenheit das mal
vertiefen und an dieser Stelle wieder posten.
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=aca1d825-3f4d-41fc-9df9-fd8dd2ad305e" />
      </body>
      <title>Panels über separaten Scrollbar scrollen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,aca1d825-3f4d-41fc-9df9-fd8dd2ad305e.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,aca1d825-3f4d-41fc-9df9-fd8dd2ad305e.aspx</link>
      <pubDate>Tue, 12 Sep 2006 13:22:54 GMT</pubDate>
      <description>&lt;p&gt;
Eigentlich dachte ich, das sei eine ganz simple Aufgabe, aber dann hat mich das Ganze
doch 2 Stunden Zeit gekostet. Das Ziel war, zwei Panels über einen separaten Scrollbar
zu scrollen. Alse Panels in der Form platziert, AutoScroll auf false gesetzt, damit
nicht jedes Panel mit einem Scrollbar versehen wird und den Scrollbar hinzugefügt.
Der Event für das Scrollen war auch schenll gefunden, aber dann gab es Probleme.
&lt;/p&gt;
&lt;p&gt;
Deshalb hier die Vorgehensweise, die nach meinen Versuchen am besten funktioniert
hat.
&lt;/p&gt;
&lt;font color=#0000ff size=2&gt; 
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;private&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; Form2_Load(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;object&lt;/span&gt; sender,
EventArgs e)&lt;br&gt;
{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;this&lt;/span&gt;.panel1.AutoScroll &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;true&lt;/span&gt;;&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;this&lt;/span&gt;.panel2.AutoScroll &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;true&lt;/span&gt;;&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;this&lt;/span&gt;.ultraScrollBar1.Minimum &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;this&lt;/span&gt;.panel1.HorizontalScroll.Minimum;&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;this&lt;/span&gt;.ultraScrollBar1.Maximum &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;this&lt;/span&gt;.panel1.HorizontalScroll.Maximum;&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;this&lt;/span&gt;.ultraScrollBar1.Value &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;this&lt;/span&gt;.panel1.HorizontalScroll.Value;&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;this&lt;/span&gt;.ultraScrollBar1.SmallChange &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;this&lt;/span&gt;.panel1.HorizontalScroll.SmallChange;&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;this&lt;/span&gt;.ultraScrollBar1.LargeChange &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;this&lt;/span&gt;.panel1.HorizontalScroll.LargeChange;&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;this&lt;/span&gt;.panel1.AutoScroll &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;false&lt;/span&gt;;&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;this&lt;/span&gt;.panel2.AutoScroll &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;false&lt;/span&gt;;&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;private&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; ultraScrollBar1_Scroll(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;object&lt;/span&gt; sender,
ScrollEventArgs e)&lt;br&gt;
{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;this&lt;/span&gt;.panel1.AutoScrollPosition &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; Point(e.NewValue,
0);&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;this&lt;/span&gt;.panel2.AutoScrollPosition &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; Point(e.NewValue,
0);&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;Hierzu ein paar Anmerkungen:&lt;br&gt;
&lt;/font&gt;&lt;font color=#000000&gt;1.) Die Werte für Minimum, Maximum, SmalChange und LargeChange
können vom Panel nur dann sauber abgefragt werden, wenn AutoScroll = true gesetzt
ist. 
&lt;br&gt;
&lt;/font&gt;&lt;font color=#000000&gt;2.) Wird die Scrollposition über this.panel1.HorizontalScroll.Value
gesetzt, was naheliegend wäre, kommt es bei abgeschaltetem AutoScroll zu einem seltsamen
Flimmer-Effekt. Statt dessen muss die AutoScrollPosition gesetzt werden.&lt;br&gt;
3.) Auch für das zweite Panel muss das AutoScroll einmal aktiviert und dann wieder
deaktiviert werden, sonst scrollt das nicht mit.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;Also diese Lösung funktioniert mal.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/font&gt;&lt;img src="http://www.artiso.com/ProBlog/content/binary/Panels1.png" border=0&gt;&gt;
&lt;p&gt;
Diese Vorgehensweise scheint mir jedoch recht unlogisch und sehr umständlich. Ob das
Framework da nichts besseres bietet oder ob ich da einfach noch nicht den richtigen
Dreh gefunden hab, weiss ich im Moment noch nicht. Ich werde bei Gelegenheit das mal
vertiefen und an dieser Stelle wieder posten.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=aca1d825-3f4d-41fc-9df9-fd8dd2ad305e" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,aca1d825-3f4d-41fc-9df9-fd8dd2ad305e.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=2bf071cb-d703-4f8e-b267-0084819de8d4</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,2bf071cb-d703-4f8e-b267-0084819de8d4.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,2bf071cb-d703-4f8e-b267-0084819de8d4.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=2bf071cb-d703-4f8e-b267-0084819de8d4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Oftmals benötigt man für eine Anwendung die Feiertage. Dass der 1. Mai z.B. am 01.05
ist und Neujahr am 01.01, das ist ja noch klar. Aber die kirchlichen Feiertage liegen
jedes Jahr anders. Glücklicherweise lassen sich diese Feiertage alle von Ostern ableiten.
Und dank des deutschen Mathematikers Carl Friedrich Gauß kann man auch das Datum des Ostersonntags
mathematisch ermitteln.
</p>
        <p>
          <u>
            <font color="#800080">
              <a href="http://www.microsoft.com/germany/msdn/library/visualtools/vb6/BerechnungbeweglicherFeiertageunterVisualBasic.mspx">http://www.microsoft.com/germany/msdn/library/visualtools/vb6/BerechnungbeweglicherFeiertageunterVisualBasic.mspx</a>
            </font>
          </u>
          <a href="http://www.microsoft.com/germany/msdn/library/net/windowsforms/QuickiesPfiffigeTippsFuerDieFeinarbeit.mspx?mfr=true">
          </a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=2bf071cb-d703-4f8e-b267-0084819de8d4" />
      </body>
      <title>Feiertage berechnen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,2bf071cb-d703-4f8e-b267-0084819de8d4.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,2bf071cb-d703-4f8e-b267-0084819de8d4.aspx</link>
      <pubDate>Wed, 30 Aug 2006 08:11:40 GMT</pubDate>
      <description>&lt;p&gt;
Oftmals benötigt man für eine Anwendung die Feiertage. Dass der 1. Mai z.B. am 01.05
ist und Neujahr am 01.01, das ist ja noch klar. Aber die kirchlichen Feiertage liegen
jedes Jahr anders. Glücklicherweise lassen sich diese Feiertage alle von Ostern ableiten.
Und dank des deutschen Mathematikers Carl Friedrich Gauß kann man auch das Datum des&amp;nbsp;Ostersonntags
mathematisch ermitteln.
&lt;/p&gt;
&lt;p&gt;
&lt;u&gt;&lt;font color=#800080&gt;&lt;a href="http://www.microsoft.com/germany/msdn/library/visualtools/vb6/BerechnungbeweglicherFeiertageunterVisualBasic.mspx"&gt;http://www.microsoft.com/germany/msdn/library/visualtools/vb6/BerechnungbeweglicherFeiertageunterVisualBasic.mspx&lt;/a&gt;&lt;/font&gt;&lt;/u&gt;&lt;a href="http://www.microsoft.com/germany/msdn/library/net/windowsforms/QuickiesPfiffigeTippsFuerDieFeinarbeit.mspx?mfr=true"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=2bf071cb-d703-4f8e-b267-0084819de8d4" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,2bf071cb-d703-4f8e-b267-0084819de8d4.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=8bf00352-6c6f-4636-9cb9-5ce69d007322</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,8bf00352-6c6f-4636-9cb9-5ce69d007322.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,8bf00352-6c6f-4636-9cb9-5ce69d007322.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=8bf00352-6c6f-4636-9cb9-5ce69d007322</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Oft möchte man von einem DateTime-Wert die Kalenderwoche abfragen. Hierzu gibt es
eine einfache Funktion:
</p>
        <font color="#008080" size="2">
          <p>
Application
</p>
        </font>
        <font color="#000000" size="2">.CurrentCulture.Calendar.GetWeekOfYear(CurrentDate,
System.Globalization.</font>
        <font color="#008080" size="2">CalendarWeekRule</font>
        <font color="#000000" size="2">.FirstFourDayWeek, </font>
        <font color="#008080" size="2">DayOfWeek</font>
        <font size="2">
          <font color="#000000">.Monday);</font>
        </font>
        <p>
          <font size="2">
            <font color="#000000">Dabei steht in CurrentDate das aktuelle Datum
und die beiden anderen Parametern definieren Regeln, welche Woche als erste KW gilt.
Standard in Deutschland ist dass der 1. Janur in KW 1 liegt, wenn dieser Tag ein Montag,
ein Dienstag oder ein Mittwoch ist. Andernfalls zählt der 1. Januar noch zur letzten
Woche des alten Jahrs und die KW1 beginnt am darauffolgenden Montag.</font>
          </font>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=8bf00352-6c6f-4636-9cb9-5ce69d007322" />
      </body>
      <title>Kalenderwoche zu einem Datum abfragen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,8bf00352-6c6f-4636-9cb9-5ce69d007322.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,8bf00352-6c6f-4636-9cb9-5ce69d007322.aspx</link>
      <pubDate>Wed, 23 Aug 2006 07:37:33 GMT</pubDate>
      <description>&lt;p&gt;
Oft möchte man von einem DateTime-Wert die Kalenderwoche abfragen. Hierzu gibt es
eine einfache Funktion:
&lt;/p&gt;
&lt;font color=#008080 size=2&gt; 
&lt;p&gt;
Application
&lt;/font&gt;&lt;font color=#000000 size=2&gt;.CurrentCulture.Calendar.GetWeekOfYear(CurrentDate,
System.Globalization.&lt;/font&gt;&lt;font color=#008080 size=2&gt;CalendarWeekRule&lt;/font&gt;&lt;font color=#000000 size=2&gt;.FirstFourDayWeek, &lt;/font&gt;&lt;font color=#008080 size=2&gt;DayOfWeek&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#000000&gt;.Monday);&lt;/font&gt;&lt;/font&gt;&gt;
&lt;p&gt;
&lt;font size=2&gt;&lt;font color=#000000&gt;Dabei steht in CurrentDate das aktuelle Datum und
die beiden anderen Parametern definieren Regeln, welche Woche als erste KW gilt. Standard
in Deutschland ist dass der 1. Janur in KW 1 liegt, wenn dieser Tag ein Montag, ein
Dienstag oder ein Mittwoch ist. Andernfalls zählt der 1. Januar noch zur letzten Woche
des alten Jahrs und die KW1 beginnt am darauffolgenden Montag.&lt;/font&gt;
&lt;/p&gt;
&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=8bf00352-6c6f-4636-9cb9-5ce69d007322" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,8bf00352-6c6f-4636-9cb9-5ce69d007322.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=7e8e503a-0a6a-4d36-84ea-0e0458588075</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,7e8e503a-0a6a-4d36-84ea-0e0458588075.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,7e8e503a-0a6a-4d36-84ea-0e0458588075.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=7e8e503a-0a6a-4d36-84ea-0e0458588075</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Um Einträge in die Toolbox von VS hinzuzufügen gibt es die Standard-Methode - rechte
Maustaste, Elemente auswählen und sich dann die Elemente einzeln auswählen um sie
hinzuzufügen. Weniger bekannt ist eine Methode, die gerade bei einer größeren Anzahl
hinzuzufügender Controls schneller ist. Man kann die zugehörigen DLL-Dateien einfach
per Drag &amp; Drop aus dem Windows-Explorer auf die Toolbox ziehen.
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=7e8e503a-0a6a-4d36-84ea-0e0458588075" />
      </body>
      <title>Alternative Methode zum Hinzufügen von Einträgen in die VS Toolbox</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,7e8e503a-0a6a-4d36-84ea-0e0458588075.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,7e8e503a-0a6a-4d36-84ea-0e0458588075.aspx</link>
      <pubDate>Tue, 22 Aug 2006 17:02:21 GMT</pubDate>
      <description>&lt;p&gt;
Um Einträge in die Toolbox von VS hinzuzufügen gibt es die Standard-Methode - rechte
Maustaste, Elemente auswählen und sich dann die Elemente einzeln auswählen um sie
hinzuzufügen. Weniger bekannt ist eine Methode, die gerade bei einer größeren Anzahl
hinzuzufügender Controls schneller ist. Man kann die zugehörigen DLL-Dateien einfach
per Drag &amp;amp; Drop aus dem Windows-Explorer auf die Toolbox ziehen.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=7e8e503a-0a6a-4d36-84ea-0e0458588075" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,7e8e503a-0a6a-4d36-84ea-0e0458588075.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=8a31d644-04fa-4d3c-9a5b-6577d997739b</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,8a31d644-04fa-4d3c-9a5b-6577d997739b.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,8a31d644-04fa-4d3c-9a5b-6577d997739b.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=8a31d644-04fa-4d3c-9a5b-6577d997739b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Der kostenlose Internet Explorer Developer Toolbar von Microsoft bietet eine Fülle
von sehr nützlichen Funktionen für Web-Entwickler. Der Toolbar integriert sich im
Internet-Explorer. Man kann sich z.B. Objekte wie Tabellen, Bilder, DIVs etc. durch
eine Umrandung hervorheben lassen oder man kann die komplette DOM-Struktur dursuchen
und die Eigenschaften der Elemente abfragen und sogar verändern. Die Änderungen werden
sofort sichtbar. Darüber hinaus werden noch eine vielzahl nützlicher Helfer angeboten,
z.B. um Cookies anzuzeigen und zu löschen etc. Ein Tool, das bei keinem Web-Entwickler
fehlen sollte!
</p>
        <p>
          <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyID=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;displaylang=en</a>
        </p>
        <a href="http://www.artiso.com/ProBlog/content/binary/devtoolbar.png" target="_blank">
          <img style="WIDTH: 532px; HEIGHT: 427px" height="554" src="http://www.artiso.com/ProBlog/content/binary/devtoolbar.png" width="817" border="0" />
        </a>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=8a31d644-04fa-4d3c-9a5b-6577d997739b" />
      </body>
      <title>Internet Explorer Developer Toolbar</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,8a31d644-04fa-4d3c-9a5b-6577d997739b.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,8a31d644-04fa-4d3c-9a5b-6577d997739b.aspx</link>
      <pubDate>Tue, 22 Aug 2006 16:59:42 GMT</pubDate>
      <description>&lt;p&gt;
Der kostenlose Internet Explorer Developer Toolbar von Microsoft bietet eine Fülle
von sehr nützlichen Funktionen für Web-Entwickler. Der Toolbar integriert sich im
Internet-Explorer. Man kann sich z.B. Objekte wie Tabellen, Bilder, DIVs etc. durch
eine Umrandung hervorheben lassen oder man kann die komplette DOM-Struktur dursuchen
und die Eigenschaften der Elemente abfragen und sogar verändern. Die Änderungen werden
sofort sichtbar. Darüber hinaus werden noch eine vielzahl nützlicher Helfer angeboten,
z.B. um Cookies anzuzeigen und zu löschen etc. Ein Tool, das bei keinem Web-Entwickler
fehlen sollte!
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;amp;displaylang=en&lt;/a&gt;
&lt;/p&gt;
&lt;a href="http://www.artiso.com/ProBlog/content/binary/devtoolbar.png" target="_blank"&gt;&lt;img style="WIDTH: 532px; HEIGHT: 427px" height=554 src="http://www.artiso.com/ProBlog/content/binary/devtoolbar.png" width=817 border=0&gt;&lt;/a&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=8a31d644-04fa-4d3c-9a5b-6577d997739b" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,8a31d644-04fa-4d3c-9a5b-6577d997739b.aspx</comments>
      <category>Tipps und Tricks;Tools</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=04c5f05a-e163-4a41-a01e-c998db223553</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,04c5f05a-e163-4a41-a01e-c998db223553.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,04c5f05a-e163-4a41-a01e-c998db223553.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=04c5f05a-e163-4a41-a01e-c998db223553</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Das MSDN-Wiki ist eine Erweiterung zur MSDN-Dokumentation mit Tipps und Tricks aus
der .net Community.
</p>
        <p>
Das MSDN-Wiki funktioniert jetzt auch mit FireFox und es bietet nun auch eine RSS-Unterstützung.
</p>
        <p>
          <a href="http://msdnwiki.microsoft.com/en-us/mtpswiki/default.aspx">http://msdnwiki.microsoft.com/en-us/mtpswiki/default.aspx</a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=04c5f05a-e163-4a41-a01e-c998db223553" />
      </body>
      <title>MSDN Wiki erweitert</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,04c5f05a-e163-4a41-a01e-c998db223553.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,04c5f05a-e163-4a41-a01e-c998db223553.aspx</link>
      <pubDate>Tue, 22 Aug 2006 07:26:07 GMT</pubDate>
      <description>&lt;p&gt;
Das MSDN-Wiki ist eine Erweiterung zur MSDN-Dokumentation mit Tipps und Tricks aus
der .net Community.
&lt;/p&gt;
&lt;p&gt;
Das MSDN-Wiki funktioniert jetzt auch mit FireFox und es bietet nun auch eine RSS-Unterstützung.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://msdnwiki.microsoft.com/en-us/mtpswiki/default.aspx"&gt;http://msdnwiki.microsoft.com/en-us/mtpswiki/default.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=04c5f05a-e163-4a41-a01e-c998db223553" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,04c5f05a-e163-4a41-a01e-c998db223553.aspx</comments>
      <category>.Net und drum rum;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=5e978b60-a322-495e-9718-66f4a55487ee</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,5e978b60-a322-495e-9718-66f4a55487ee.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,5e978b60-a322-495e-9718-66f4a55487ee.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=5e978b60-a322-495e-9718-66f4a55487ee</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Jede Menge Code-Snippets für alle Lebenslagen finden sich unter
</p>
        <p>
          <a href="http://dotnet-snippets.de/dns">http://dotnet-snippets.de/dns</a>
        </p>
        <p>
Achtung Cookies müssen zugelassen werden, sonst funktioniert die Seite nicht korrekt.
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=5e978b60-a322-495e-9718-66f4a55487ee" />
      </body>
      <title>Code-Snippets</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,5e978b60-a322-495e-9718-66f4a55487ee.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,5e978b60-a322-495e-9718-66f4a55487ee.aspx</link>
      <pubDate>Tue, 22 Aug 2006 06:39:50 GMT</pubDate>
      <description>&lt;p&gt;
Jede Menge Code-Snippets für alle Lebenslagen finden sich unter
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dotnet-snippets.de/dns"&gt;http://dotnet-snippets.de/dns&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Achtung Cookies müssen zugelassen werden, sonst funktioniert die Seite nicht korrekt.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=5e978b60-a322-495e-9718-66f4a55487ee" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,5e978b60-a322-495e-9718-66f4a55487ee.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=e19965fe-e585-4430-bdc1-6e9959adc571</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,e19965fe-e585-4430-bdc1-6e9959adc571.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,e19965fe-e585-4430-bdc1-6e9959adc571.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=e19965fe-e585-4430-bdc1-6e9959adc571</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Recht bekannt ist die Option im Infragistics Grid Datensätze durch einen Klick auf
den Kopf einer Spalte zu filtern.
</p>
        <p>
          <img src="http://www.artiso.com/ProBlog/content/binary/filter1.png" border="0" />
        </p>
        <p>
Es gibt aber auch die Möglichkeit, eine Zeile einzublenden, in der die Filterbedingung
für jede Spalte eingegeben wird. Der Vorteil liegt dabei darin, dass auch nur Anfangsbuchstaben
eingegeben werden können. Um dies zu erreichen, stellt man einfach im Designer Dialog
unter Feature Picker die Option Filtering / Filter UI Type auf Filter Row. Das Ergebnis
sieht dan so aus:
</p>
        <img src="http://www.artiso.com/ProBlog/content/binary/filter2.png" border="0" />
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=e19965fe-e585-4430-bdc1-6e9959adc571" />
      </body>
      <title>Rowfilter bei Infragistics Grid</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,e19965fe-e585-4430-bdc1-6e9959adc571.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,e19965fe-e585-4430-bdc1-6e9959adc571.aspx</link>
      <pubDate>Sat, 19 Aug 2006 14:14:13 GMT</pubDate>
      <description>&lt;p&gt;
Recht bekannt ist die Option im Infragistics Grid Datensätze durch einen Klick auf
den Kopf einer Spalte zu filtern.
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.artiso.com/ProBlog/content/binary/filter1.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Es gibt aber auch die Möglichkeit, eine Zeile einzublenden, in der die Filterbedingung
für jede Spalte eingegeben wird. Der Vorteil liegt dabei darin, dass auch nur Anfangsbuchstaben
eingegeben werden können. Um dies zu erreichen, stellt man einfach im Designer Dialog
unter Feature Picker die Option Filtering / Filter UI Type auf Filter Row. Das Ergebnis
sieht dan so aus:
&lt;/p&gt;
&lt;img src="http://www.artiso.com/ProBlog/content/binary/filter2.png" border=0&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=e19965fe-e585-4430-bdc1-6e9959adc571" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,e19965fe-e585-4430-bdc1-6e9959adc571.aspx</comments>
      <category>Komponenten und Bibliotheken;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=8a00c6b4-2802-498a-99b9-92ccd91eafc0</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,8a00c6b4-2802-498a-99b9-92ccd91eafc0.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,8a00c6b4-2802-498a-99b9-92ccd91eafc0.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=8a00c6b4-2802-498a-99b9-92ccd91eafc0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Die aktuelle Bildschirmauflösung abzufragen ist in .NET denkbar einfach, möchte man
jedoch alle verfügbaren Auflösungen erfragen und eventuell sogar eine neue Auflösung
setzen, muss man auf die Win32 API-Mittel zurückgreifen. Dieser Beitrag stellt eine
Klasse zur Verfügung mit der mit jeweils einer Zeile Code über die verfügbaren Auflösungen
iteriert werden bzw. eine neue Auflösung festgelegt werden kann
</p>
        <p>
          <a href="http://www.codegod.de/WebAppCodeGod/Main.aspx?pid=168">http://www.codegod.de/WebAppCodeGod/Main.aspx?pid=168</a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=8a00c6b4-2802-498a-99b9-92ccd91eafc0" />
      </body>
      <title>Bildschirmauflösung unter .Net abfragen und setzen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,8a00c6b4-2802-498a-99b9-92ccd91eafc0.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,8a00c6b4-2802-498a-99b9-92ccd91eafc0.aspx</link>
      <pubDate>Mon, 14 Aug 2006 05:47:42 GMT</pubDate>
      <description>&lt;p&gt;
Die aktuelle Bildschirmauflösung abzufragen ist in .NET denkbar einfach, möchte man
jedoch alle verfügbaren Auflösungen erfragen und eventuell sogar eine neue Auflösung
setzen, muss man auf die Win32 API-Mittel zurückgreifen. Dieser Beitrag stellt eine
Klasse zur Verfügung mit der mit jeweils einer Zeile Code über die verfügbaren Auflösungen
iteriert werden bzw. eine neue Auflösung festgelegt werden kann
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codegod.de/WebAppCodeGod/Main.aspx?pid=168"&gt;http://www.codegod.de/WebAppCodeGod/Main.aspx?pid=168&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=8a00c6b4-2802-498a-99b9-92ccd91eafc0" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,8a00c6b4-2802-498a-99b9-92ccd91eafc0.aspx</comments>
      <category>Know-How;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=3f1fcf0c-89c9-4701-81d5-967fafb4be89</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,3f1fcf0c-89c9-4701-81d5-967fafb4be89.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,3f1fcf0c-89c9-4701-81d5-967fafb4be89.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=3f1fcf0c-89c9-4701-81d5-967fafb4be89</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Ein wenig bekanntes Control ist das FlowLayoutPanel, das in VS 2005 standardmäßig
enthalten ist. Mit diesem Control kann man Unterelemente in einer fließenden Ansicht
darstellen wie das z.B. auch von Web-Seiten bekannt ist. Sie möchten eine Liste von
Textboxen die untereinander stehen? Kein Problem mit dem FlowLayoutPanel. Sie können
eine beliebige Richtung wählen (von rechts nach links, von oben nach unten etc.).
Passen nicht alle Control in die Reihe, wird automatisch ein Umgruch eingefügt. Damit
ist das FlowLayoutPanel wesentlich flexibler als man diese Funktion z.B. mit Docking
erreichen könnte. Vor allem bei dynamisch generierten Control leistet das FlowLayoutPanel
gute Dienste!
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=3f1fcf0c-89c9-4701-81d5-967fafb4be89" />
      </body>
      <title>FlowLayoutPanel</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,3f1fcf0c-89c9-4701-81d5-967fafb4be89.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,3f1fcf0c-89c9-4701-81d5-967fafb4be89.aspx</link>
      <pubDate>Wed, 09 Aug 2006 12:48:34 GMT</pubDate>
      <description>&lt;p&gt;
Ein wenig bekanntes Control ist das FlowLayoutPanel, das in VS 2005 standardmäßig
enthalten ist. Mit diesem Control kann man Unterelemente in einer fließenden Ansicht
darstellen wie das z.B. auch von Web-Seiten bekannt ist. Sie möchten eine Liste von
Textboxen die untereinander stehen? Kein Problem mit dem FlowLayoutPanel. Sie können
eine beliebige Richtung wählen (von rechts nach links, von oben nach unten etc.).
Passen nicht alle Control in die Reihe, wird automatisch ein Umgruch eingefügt. Damit
ist das FlowLayoutPanel wesentlich flexibler als man diese Funktion z.B. mit Docking
erreichen könnte. Vor allem bei dynamisch generierten Control leistet das FlowLayoutPanel
gute Dienste!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=3f1fcf0c-89c9-4701-81d5-967fafb4be89" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,3f1fcf0c-89c9-4701-81d5-967fafb4be89.aspx</comments>
      <category>Know-How;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=2017b61d-19f4-4e4a-a033-cbf820d2b18e</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,2017b61d-19f4-4e4a-a033-cbf820d2b18e.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,2017b61d-19f4-4e4a-a033-cbf820d2b18e.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=2017b61d-19f4-4e4a-a033-cbf820d2b18e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Oft möchte man Daten, die aus Excel in die Zwischenablage kopiert wurden, in der Anwendung
verarbeiten. Dies geht recht einfach, da die Excel-Daten in der Zwischenablage einfach
als CSV-Format vorliegen.
</p>
        <font size="2">
          <p>
          </p>
        </font>
        <font color="#0000ff" size="2">string</font>
        <font size="2"> ExcelValue
= </font>
        <font color="#800000" size="2">""</font>
        <font size="2">;<br /></font>
        <font color="#008080" size="2">IDataObject</font>
        <font size="2"> ClipboadData
= </font>
        <font color="#008080" size="2">Clipboard</font>
        <font size="2">.GetDataObject();<br /></font>
        <font color="#0000ff" size="2">if</font>
        <font size="2"> (ClipboadData.GetDataPresent(</font>
        <font color="#008080" size="2">DataFormats</font>
        <font size="2">.CommaSeparatedValue))<br />
{<br />
   </font>
        <font color="#008080" size="2">StreamReader</font>
        <font size="2"> ExcelReader
= </font>
        <font color="#0000ff" size="2">new</font>
        <font size="2">
        </font>
        <font color="#008080" size="2">StreamReader</font>
        <font size="2">((</font>
        <font color="#008080" size="2">Stream</font>
        <font size="2">)ClipboadData.GetData(</font>
        <font color="#008080" size="2">DataFormats</font>
        <font size="2">.CommaSeparatedValue));<br />
   </font>
        <font color="#0000ff" size="2">while</font>
        <font size="2"> (!ExcelReader.EndOfStream)<br />
   {<br />
      ExcelValue = ExcelReader.ReadLine();<br />
   }<br />
}</font>
        <p>
          <font size="2">Man holt sich die Daten aus der Zwischenablage und prüft diese, ob
sie im CSV-Format vorliegen. Dann kann man mit Hilfe eines StreamReaders die Daten
lesen. Die Daten kommen dann in einem Format wie z.B. 5,8;8,9;7,5. Das lässt sich
nun problemlos in der eigenen Anwendung verarbeiten.
</font>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=2017b61d-19f4-4e4a-a033-cbf820d2b18e" />
      </body>
      <title>Excel-Daten aus Zwischenablage auslesen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,2017b61d-19f4-4e4a-a033-cbf820d2b18e.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,2017b61d-19f4-4e4a-a033-cbf820d2b18e.aspx</link>
      <pubDate>Wed, 09 Aug 2006 12:37:59 GMT</pubDate>
      <description>&lt;p&gt;
Oft möchte man Daten, die aus Excel in die Zwischenablage kopiert wurden, in der Anwendung
verarbeiten. Dies geht recht einfach, da die Excel-Daten in der Zwischenablage einfach
als CSV-Format vorliegen.
&lt;/p&gt;
&lt;font size=2&gt; 
&lt;p&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;string&lt;/font&gt;&lt;font size=2&gt; ExcelValue = &lt;/font&gt;&lt;font color=#800000 size=2&gt;""&lt;/font&gt;&lt;font size=2&gt;;&lt;br&gt;
&lt;/font&gt;&lt;font color=#008080 size=2&gt;IDataObject&lt;/font&gt;&lt;font size=2&gt; ClipboadData = &lt;/font&gt;&lt;font color=#008080 size=2&gt;Clipboard&lt;/font&gt;&lt;font size=2&gt;.GetDataObject();&lt;br&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;if&lt;/font&gt;&lt;font size=2&gt; (ClipboadData.GetDataPresent(&lt;/font&gt;&lt;font color=#008080 size=2&gt;DataFormats&lt;/font&gt;&lt;font size=2&gt;.CommaSeparatedValue))&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color=#008080 size=2&gt;StreamReader&lt;/font&gt;&lt;font size=2&gt; ExcelReader
= &lt;/font&gt;&lt;font color=#0000ff size=2&gt;new&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#008080 size=2&gt;StreamReader&lt;/font&gt;&lt;font size=2&gt;((&lt;/font&gt;&lt;font color=#008080 size=2&gt;Stream&lt;/font&gt;&lt;font size=2&gt;)ClipboadData.GetData(&lt;/font&gt;&lt;font color=#008080 size=2&gt;DataFormats&lt;/font&gt;&lt;font size=2&gt;.CommaSeparatedValue));&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;while&lt;/font&gt;&lt;font size=2&gt; (!ExcelReader.EndOfStream)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ExcelValue = ExcelReader.ReadLine();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
}&lt;/font&gt;&gt;
&lt;p&gt;
&lt;font size=2&gt;Man holt sich die Daten aus der Zwischenablage und prüft diese, ob sie
im CSV-Format vorliegen. Dann kann man mit Hilfe eines StreamReaders die Daten lesen.
Die Daten kommen dann in einem Format wie z.B. 5,8;8,9;7,5. Das lässt sich nun problemlos
in der eigenen Anwendung verarbeiten.
&lt;/p&gt;
&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=2017b61d-19f4-4e4a-a033-cbf820d2b18e" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,2017b61d-19f4-4e4a-a033-cbf820d2b18e.aspx</comments>
      <category>Know-How;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=39a8ab7f-3e00-4c30-ab5a-e1dc4b8ff962</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,39a8ab7f-3e00-4c30-ab5a-e1dc4b8ff962.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,39a8ab7f-3e00-4c30-ab5a-e1dc4b8ff962.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=39a8ab7f-3e00-4c30-ab5a-e1dc4b8ff962</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Um von generischen Objekten den Typ abzufragen kann man folgenden Code verwenden:
</p>
        <font size="2">
          <p>
          </p>
        </font>
        <font color="#008080" size="2">Dictionary</font>
        <font size="2">&lt;</font>
        <font color="#0000ff" size="2">string</font>
        <font size="2">, </font>
        <font color="#0000ff" size="2">int</font>
        <font size="2">&gt;
MyObject = </font>
        <font color="#0000ff" size="2">new</font>
        <font size="2">
        </font>
        <font color="#008080" size="2">Dictionary</font>
        <font size="2">&lt;</font>
        <font color="#0000ff" size="2">string</font>
        <font size="2">, </font>
        <font color="#0000ff" size="2">int</font>
        <font size="2">&gt;();<br /></font>
        <font color="#008080" size="2">Type</font>
        <font size="2"> T = MyObject.GetType();<br /></font>
        <font color="#008080" size="2">Type</font>
        <font size="2">[] Ts = T.GetGenericArguments();</font>
        <p>
          <font size="2">Dieser Code liefert ein Array zurück, das im ersten Element System.String
und im zweiten System.Double enthält.</font>
        </p>
        <p>
          <font size="2">Weitere Infos unter <a href="http://msdn2.microsoft.com/en-us/library/b8ytshk6.aspx">http://msdn2.microsoft.com/en-us/library/b8ytshk6.aspx</a></font>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=39a8ab7f-3e00-4c30-ab5a-e1dc4b8ff962" />
      </body>
      <title>Type von generischen Objekten abfragen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,39a8ab7f-3e00-4c30-ab5a-e1dc4b8ff962.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,39a8ab7f-3e00-4c30-ab5a-e1dc4b8ff962.aspx</link>
      <pubDate>Tue, 08 Aug 2006 12:33:43 GMT</pubDate>
      <description>&lt;p&gt;
Um von generischen Objekten den Typ abzufragen kann man folgenden Code verwenden:
&lt;/p&gt;
&lt;font size=2&gt; 
&lt;p&gt;
&lt;/font&gt;&lt;font color=#008080 size=2&gt;Dictionary&lt;/font&gt;&lt;font size=2&gt;&amp;lt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;string&lt;/font&gt;&lt;font size=2&gt;, &lt;/font&gt;&lt;font color=#0000ff size=2&gt;int&lt;/font&gt;&lt;font size=2&gt;&amp;gt;
MyObject = &lt;/font&gt;&lt;font color=#0000ff size=2&gt;new&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#008080 size=2&gt;Dictionary&lt;/font&gt;&lt;font size=2&gt;&amp;lt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;string&lt;/font&gt;&lt;font size=2&gt;, &lt;/font&gt;&lt;font color=#0000ff size=2&gt;int&lt;/font&gt;&lt;font size=2&gt;&amp;gt;();&lt;br&gt;
&lt;/font&gt;&lt;font color=#008080 size=2&gt;Type&lt;/font&gt;&lt;font size=2&gt; T = MyObject.GetType();&lt;br&gt;
&lt;/font&gt;&lt;font color=#008080 size=2&gt;Type&lt;/font&gt;&lt;font size=2&gt;[] Ts = T.GetGenericArguments();&lt;/font&gt;&gt;
&lt;p&gt;
&lt;font size=2&gt;Dieser Code liefert ein Array zurück, das im ersten Element System.String
und im zweiten System.Double enthält.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=2&gt;Weitere Infos unter &lt;a href="http://msdn2.microsoft.com/en-us/library/b8ytshk6.aspx"&gt;http://msdn2.microsoft.com/en-us/library/b8ytshk6.aspx&lt;/a&gt;
&lt;/p&gt;
&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=39a8ab7f-3e00-4c30-ab5a-e1dc4b8ff962" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,39a8ab7f-3e00-4c30-ab5a-e1dc4b8ff962.aspx</comments>
      <category>Know-How;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=129518a1-6c18-4166-a9f1-1d265106e0cb</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,129518a1-6c18-4166-a9f1-1d265106e0cb.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,129518a1-6c18-4166-a9f1-1d265106e0cb.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=129518a1-6c18-4166-a9f1-1d265106e0cb</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Um die Work Items aller Team-Projekte eines Team-Servers anzeigen zu können, kann
man einfach eine entsprechende Query anlegen. Hierzu einfach im Team-Explorer auf
Work Items mit der rechten Maustaste klicken und dann "Add Query" auswählen. Die Query
is dann schon mit einem Filter nach einem Projekt vorbelegt. Diesen einfach löschen,
dann erscheinen alle Work Items.
</p>
        <p>
 
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=129518a1-6c18-4166-a9f1-1d265106e0cb" />
      </body>
      <title>Work Items aller Team-Projekte anzeigen lassen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,129518a1-6c18-4166-a9f1-1d265106e0cb.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,129518a1-6c18-4166-a9f1-1d265106e0cb.aspx</link>
      <pubDate>Wed, 02 Aug 2006 18:27:32 GMT</pubDate>
      <description>&lt;p&gt;
Um die Work Items aller Team-Projekte eines Team-Servers anzeigen zu können, kann
man einfach eine entsprechende Query anlegen. Hierzu einfach im Team-Explorer&amp;nbsp;auf
Work Items mit der rechten Maustaste klicken und dann "Add Query" auswählen. Die Query
is dann schon mit einem Filter nach einem Projekt vorbelegt. Diesen einfach löschen,
dann erscheinen alle Work Items.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=129518a1-6c18-4166-a9f1-1d265106e0cb" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,129518a1-6c18-4166-a9f1-1d265106e0cb.aspx</comments>
      <category>Team System Server;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=113ebfb3-421a-488c-83ca-59273f78d3c0</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,113ebfb3-421a-488c-83ca-59273f78d3c0.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,113ebfb3-421a-488c-83ca-59273f78d3c0.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=113ebfb3-421a-488c-83ca-59273f78d3c0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Oft erhält mein eine Meldung in einer Message-Box und möchte den text kopieren. Mit
Alt-Druck erhält man einen Screen-Shoot, aber das ist eine Grafik. Wie kommt man nun
an den Text?
</p>
        <p>
Mit Strg-C !
</p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=113ebfb3-421a-488c-83ca-59273f78d3c0" />
      </body>
      <title>Textinhalt von Meldungsfenstern kopieren</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,113ebfb3-421a-488c-83ca-59273f78d3c0.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,113ebfb3-421a-488c-83ca-59273f78d3c0.aspx</link>
      <pubDate>Tue, 01 Aug 2006 18:55:46 GMT</pubDate>
      <description>&lt;p&gt;
Oft erhält mein eine Meldung in einer Message-Box und möchte den text kopieren. Mit
Alt-Druck erhält man einen Screen-Shoot, aber das ist eine Grafik. Wie kommt man nun
an den Text?
&lt;/p&gt;
&lt;p&gt;
Mit Strg-C !
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=113ebfb3-421a-488c-83ca-59273f78d3c0" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,113ebfb3-421a-488c-83ca-59273f78d3c0.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=128ebc76-0450-4482-9fef-ad601f4fce61</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,128ebc76-0450-4482-9fef-ad601f4fce61.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,128ebc76-0450-4482-9fef-ad601f4fce61.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=128ebc76-0450-4482-9fef-ad601f4fce61</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Oft müssem am Anfang und am Ende eines Strings überflüssige Zeichen gelöscht werden.
Dazu kann in .Net der Befehl Trimm eingesetzt werden.
</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">string</span> t <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"
Test "</span>;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> Result <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> t.Trim('
');</span>
        </p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <font face="Verdana" size="2">Mit
Trim lassen sich aber auch mehrere Zeichen auf einmal löschen. Dabei ist die Reihenfolge
der Zeichen egal!</font>
          </span>
        </p>
        <span style="FONT-SIZE: 11px; COLOR: black; 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">string</span> t <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"
\r\n Test \r \n "</span>;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> Result <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> t.Trim('\r',
'\n', ' ');</span>
          </p>
        </span>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=128ebc76-0450-4482-9fef-ad601f4fce61" />
      </body>
      <title>Mehrere Zeichen am Anfang und Ende eines Strings löschen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,128ebc76-0450-4482-9fef-ad601f4fce61.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,128ebc76-0450-4482-9fef-ad601f4fce61.aspx</link>
      <pubDate>Tue, 01 Aug 2006 15:31:42 GMT</pubDate>
      <description>&lt;p&gt;
Oft müssem am Anfang und am Ende eines Strings überflüssige Zeichen gelöscht werden.
Dazu kann in .Net der Befehl Trimm eingesetzt werden.
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; t &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"
Test "&lt;/span&gt;;&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; Result &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; t.Trim('
');&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana size=2&gt;Mit
Trim lassen sich aber auch mehrere Zeichen auf einmal löschen. Dabei ist die Reihenfolge
der Zeichen egal!&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt; 
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; t &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"
\r\n Test \r \n "&lt;/span&gt;;&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; Result &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; t.Trim('\r',
'\n', ' ');&lt;/span&gt;
&lt;/p&gt;
&lt;/span&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=128ebc76-0450-4482-9fef-ad601f4fce61" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,128ebc76-0450-4482-9fef-ad601f4fce61.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=e50e24ce-87cc-4d11-a9cb-eb8bce51d583</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,e50e24ce-87cc-4d11-a9cb-eb8bce51d583.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,e50e24ce-87cc-4d11-a9cb-eb8bce51d583.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=e50e24ce-87cc-4d11-a9cb-eb8bce51d583</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <div>
          <p>
            <span class="641082009-28072006">
              <font face="Tahoma" size="2">In einer Anwendung aus
der ich auf Access via COM zugreife, wollte ich das Access-Fenster ausblenden.
Die "visible" Eigenschaft kann man auch setzten - es passiert nur nix, daher das ganze
über DLLImport. Wichtig ist, dass man sich den/die "handle" auf das/die Fenster merkt
- die findet man sonst nicht mehr und kann sie sonst auch nicht mehr sichbar schalten.<br />
Das Beispiel kann man natürlich auch auf jede andere Anwendung übertragen und das
Process-Objekt hat ja auch noch paar andere Methoden, um ein bestimmtes Fenster zu
finden, "GetProcessByID()" usw. sind auch vorhanden.</font>
            </span>
          </p>
          <p>
            <font face="Tahoma" size="2">
              <span class="641082009-28072006">z.B. ausblenden von
allen Access-Fenstern:</span>
            </font>
          </p>
          <p>
            <font size="2">ArrayList processHandles = <font color="#0000ff">new</font> ArrayList();<br /></font>
            <font size="2">
              <font color="#0000ff">foreach</font> (Process p <font color="#0000ff">in</font> Process.GetProcessesByName("msaccess"))<br /></font>
            <font size="2">{<br /></font>
            <font size="2">   ShowWindow((<font color="#0000ff">int</font>)p.MainWindowHandle,
0); <span class="641082009-28072006"> // 0 steht für unsichtbar<br />
   </span></font>
            <font size="2">processHandles.Add((</font>
            <font color="#0000ff" size="2">int</font>
            <font size="2">)p.MainWindowHandle);<br />
}
</font>
          </p>
        </div>
        <div>
          <span class="641082009-28072006">
            <font face="Tahoma" size="2">einblenden</font>
          </span>
        </div>
        <div>
          <span class="641082009-28072006">
            <font color="#0000ff" size="2">
              <br />
foreach</font>
            <font color="#000000" size="2"> (</font>
            <font color="#0000ff" size="2">int</font>
            <font color="#000000" size="2"> processHandle </font>
            <font color="#0000ff" size="2">in</font>
            <font color="#000000" size="2"> processHandles)<br /></font>
            <span class="641082009-28072006">
              <font size="2">{<br />
   </font>
            </span>
            <font size="2">ShowWindow(processHandle, 9); <span class="641082009-28072006"> //
9 bedeutet restore - sprich so, wie das Fenster vor dem ausblenden aussah (Position,
Größe)<br /></span></font>
          </span>
          <font face="Tahoma" size="2">
            <span class="641082009-28072006">}</span>
          </font>
        </div>
        <p align="left">
          <span class="641082009-28072006">
            <font face="Tahoma" size="2">und der dllimport, damit
die Funktion genutzet werden kann:</font>
          </span>
        </p>
        <span class="641082009-28072006">
          <font size="2">
            <p>
[DllImport("User32")] 
<br /></p>
          </font>
          <font color="#0000ff" size="2">private</font>
          <font size="2">
          </font>
          <font color="#0000ff" size="2">static</font>
          <font size="2">
          </font>
          <font color="#0000ff" size="2">extern</font>
          <font size="2">
          </font>
          <font color="#0000ff" size="2">int</font>
          <font size="2"> ShowWindow
(</font>
          <font color="#0000ff" size="2">int</font>
          <font size="2"> hwnd, </font>
          <font color="#0000ff" size="2">int</font>
          <font size="2"> nCmdShow);</font>
        </span>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=e50e24ce-87cc-4d11-a9cb-eb8bce51d583" />
      </body>
      <title>Access-Fenster über COM ausblenden</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,e50e24ce-87cc-4d11-a9cb-eb8bce51d583.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,e50e24ce-87cc-4d11-a9cb-eb8bce51d583.aspx</link>
      <pubDate>Tue, 01 Aug 2006 04:35:56 GMT</pubDate>
      <description>&lt;div&gt;
&lt;p&gt;
&lt;span class=641082009-28072006&gt;&lt;font face=Tahoma size=2&gt;In einer Anwendung aus der
ich auf&amp;nbsp;Access via COM zugreife, wollte ich das Access-Fenster ausblenden. Die
"visible" Eigenschaft kann man auch setzten - es passiert nur nix, daher das ganze
über DLLImport. Wichtig ist, dass man sich den/die "handle" auf das/die Fenster merkt
- die findet man sonst nicht mehr und kann sie sonst auch nicht mehr sichbar schalten.&lt;br&gt;
Das Beispiel kann man natürlich auch auf jede andere Anwendung übertragen und das
Process-Objekt hat ja auch noch paar andere Methoden, um ein bestimmtes Fenster zu
finden, "GetProcessByID()" usw. sind auch vorhanden.&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Tahoma size=2&gt;&lt;span class=641082009-28072006&gt;z.B. ausblenden von allen
Access-Fenstern:&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=2&gt;ArrayList processHandles = &lt;font color=#0000ff&gt;new&lt;/font&gt; ArrayList();&lt;br&gt;
&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#0000ff&gt;foreach&lt;/font&gt; (Process p &lt;font color=#0000ff&gt;in&lt;/font&gt; Process.GetProcessesByName("msaccess"))&lt;br&gt;
&lt;/font&gt;&lt;font size=2&gt;{&lt;br&gt;
&lt;/font&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;ShowWindow((&lt;font color=#0000ff&gt;int&lt;/font&gt;)p.MainWindowHandle,
0);&amp;nbsp;&lt;span class=641082009-28072006&gt; // 0 steht für unsichtbar&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;font size=2&gt;processHandles.Add((&lt;/font&gt;&lt;font color=#0000ff size=2&gt;int&lt;/font&gt;&lt;font size=2&gt;)p.MainWindowHandle);&lt;br&gt;
}
&lt;/p&gt;
&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span class=641082009-28072006&gt;&lt;font face=Tahoma size=2&gt;einblenden&lt;/font&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span class=641082009-28072006&gt;&lt;font color=#0000ff size=2&gt;
&lt;br&gt;
foreach&lt;/font&gt;&lt;font color=#000000 size=2&gt; (&lt;/font&gt;&lt;font color=#0000ff size=2&gt;int&lt;/font&gt;&lt;font color=#000000 size=2&gt; processHandle &lt;/font&gt;&lt;font color=#0000ff size=2&gt;in&lt;/font&gt;&lt;font color=#000000 size=2&gt; processHandles)&lt;br&gt;
&lt;/font&gt;&lt;span class=641082009-28072006&gt;&lt;font size=2&gt;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;font size=2&gt;ShowWindow(processHandle, 9);&amp;nbsp;&lt;span class=641082009-28072006&gt; //
9 bedeutet restore - sprich so, wie das Fenster vor dem ausblenden aussah (Position,
Größe)&lt;br&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;font face=Tahoma size=2&gt;&lt;span class=641082009-28072006&gt;}&lt;/span&gt;&lt;/font&gt;
&lt;/div&gt;
&lt;p align=left&gt;
&lt;span class=641082009-28072006&gt;&lt;font face=Tahoma size=2&gt;und der dllimport, damit die
Funktion genutzet werden kann:&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;span class=641082009-28072006&gt;&lt;font size=2&gt; 
&lt;p&gt;
[DllImport("User32")] 
&lt;br&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;private&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;static&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;extern&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;int&lt;/font&gt;&lt;font size=2&gt; ShowWindow
(&lt;/font&gt;&lt;font color=#0000ff size=2&gt;int&lt;/font&gt;&lt;font size=2&gt; hwnd, &lt;/font&gt;&lt;font color=#0000ff size=2&gt;int&lt;/font&gt;&lt;font size=2&gt; nCmdShow);&lt;/font&gt;&gt;
&lt;/span&gt;&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=e50e24ce-87cc-4d11-a9cb-eb8bce51d583" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,e50e24ce-87cc-4d11-a9cb-eb8bce51d583.aspx</comments>
      <category>Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=26801ddb-1fa9-4b3d-9f80-2dac7a30c6c1</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,26801ddb-1fa9-4b3d-9f80-2dac7a30c6c1.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,26801ddb-1fa9-4b3d-9f80-2dac7a30c6c1.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=26801ddb-1fa9-4b3d-9f80-2dac7a30c6c1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Statt try-catch-finally gibt es auch noch eine Alternative mit Hilfe sog. Scopes.
</p>
        <p>
          <a href="http://blog.veloursnebel.de/PermaLink,guid,fb472ac8-d855-4224-a2e0-ddf758492b17.aspx">http://blog.veloursnebel.de/PermaLink,guid,fb472ac8-d855-4224-a2e0-ddf758492b17.aspx</a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=26801ddb-1fa9-4b3d-9f80-2dac7a30c6c1" />
      </body>
      <title>Schließen von Datenbank-Verbindungen auch bei Fehler sicherstellen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,26801ddb-1fa9-4b3d-9f80-2dac7a30c6c1.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,26801ddb-1fa9-4b3d-9f80-2dac7a30c6c1.aspx</link>
      <pubDate>Thu, 27 Jul 2006 18:04:14 GMT</pubDate>
      <description>&lt;p&gt;
Statt try-catch-finally gibt es auch noch eine Alternative mit Hilfe sog. Scopes.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.veloursnebel.de/PermaLink,guid,fb472ac8-d855-4224-a2e0-ddf758492b17.aspx"&gt;http://blog.veloursnebel.de/PermaLink,guid,fb472ac8-d855-4224-a2e0-ddf758492b17.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=26801ddb-1fa9-4b3d-9f80-2dac7a30c6c1" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,26801ddb-1fa9-4b3d-9f80-2dac7a30c6c1.aspx</comments>
      <category>Know-How;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=18a084bd-2322-4b7c-a11e-af983d945ea8</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,18a084bd-2322-4b7c-a11e-af983d945ea8.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,18a084bd-2322-4b7c-a11e-af983d945ea8.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=18a084bd-2322-4b7c-a11e-af983d945ea8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Will man Fenster mit ungewöhnlichen Formen erzeugen (wie z.B. unten), ist das mit
Hilfe der Region-Eigenschaft kein Problem.
</p>
        <p>
          <a href="http://www.microsoft.com/germany/msdn/library/net/windowsforms/WindowsFormsUmrisseFreiBestimmen.mspx?mfr=true">http://www.microsoft.com/germany/msdn/library/net/windowsforms/WindowsFormsUmrisseFreiBestimmen.mspx?mfr=true</a>
        </p>
        <p>
          <img style="WIDTH: 458px; HEIGHT: 374px" height="621" src="http://www.artiso.com/ProBlog/content/binary/fenster.gif" width="262" border="0" />
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=18a084bd-2322-4b7c-a11e-af983d945ea8" />
      </body>
      <title>Fenster müssen nicht immer rechteckig sein</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,18a084bd-2322-4b7c-a11e-af983d945ea8.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,18a084bd-2322-4b7c-a11e-af983d945ea8.aspx</link>
      <pubDate>Thu, 27 Jul 2006 17:27:42 GMT</pubDate>
      <description>&lt;p&gt;
Will man Fenster mit ungewöhnlichen Formen erzeugen (wie z.B. unten), ist das mit
Hilfe der Region-Eigenschaft kein Problem.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.microsoft.com/germany/msdn/library/net/windowsforms/WindowsFormsUmrisseFreiBestimmen.mspx?mfr=true"&gt;http://www.microsoft.com/germany/msdn/library/net/windowsforms/WindowsFormsUmrisseFreiBestimmen.mspx?mfr=true&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img style="WIDTH: 458px; HEIGHT: 374px" height=621 src="http://www.artiso.com/ProBlog/content/binary/fenster.gif" width=262 border=0&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=18a084bd-2322-4b7c-a11e-af983d945ea8" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,18a084bd-2322-4b7c-a11e-af983d945ea8.aspx</comments>
      <category>Know-How;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=95b76059-dbec-4e32-8fb5-1afcd366ce16</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,95b76059-dbec-4e32-8fb5-1afcd366ce16.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,95b76059-dbec-4e32-8fb5-1afcd366ce16.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=95b76059-dbec-4e32-8fb5-1afcd366ce16</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Unter IDesign gibt es einen Download, mit dem das My-Objekt von VB auch unter C# genutzt
werden kann.
</p>
        <p>
          <a href="http://www.idesign.net/idesign/DesktopDefault.aspx?tabindex=-1&amp;tabid=19&amp;download=141">http://www.idesign.net/idesign/DesktopDefault.aspx?tabindex=-1&amp;tabid=19&amp;download=141</a>
        </p>
        <p>
The My class in VB often simplifies and streamlines many operations, from Network
programming to clipboard, to audio access, and so on. What takes sometimes a programming
fit in C# can be done in one line using the My class in VB. If VB has Me and My, then
C# should have this and That. The That class is the C# equivalent of the VB My class.
It is a static class that uses the VB implementation as much as possible, and it requires
adding a referencing to Microsoft.VisualBasic. The That class is instrumental when
working in heterogeneous environments and when dealing with in porting of VB to C#
or visa-versa. 
</p>
        <p>
Weitere interessante Downloads gibt's unter <a href="http://www.idesign.net/idesign/DesktopDefault.aspx?tabindex=5&amp;tabid=11#ES">http://www.idesign.net/idesign/DesktopDefault.aspx?tabindex=5&amp;tabid=11#ES</a></p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=95b76059-dbec-4e32-8fb5-1afcd366ce16" />
      </body>
      <title>VB my-Objekt unter C# nutzen</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,95b76059-dbec-4e32-8fb5-1afcd366ce16.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,95b76059-dbec-4e32-8fb5-1afcd366ce16.aspx</link>
      <pubDate>Tue, 25 Jul 2006 08:46:16 GMT</pubDate>
      <description>&lt;p&gt;
Unter IDesign gibt es einen Download, mit dem das My-Objekt von VB auch unter C# genutzt
werden kann.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.idesign.net/idesign/DesktopDefault.aspx?tabindex=-1&amp;amp;tabid=19&amp;amp;download=141"&gt;http://www.idesign.net/idesign/DesktopDefault.aspx?tabindex=-1&amp;amp;tabid=19&amp;amp;download=141&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The My class in VB often simplifies and streamlines many operations, from Network
programming to clipboard, to audio access, and so on. What takes sometimes a programming
fit in C# can be done in one line using the My class in VB. If VB has Me and My, then
C# should have this and That. The That class is the C# equivalent of the VB My class.
It is a static class that uses the VB implementation as much as possible, and it requires
adding a referencing to Microsoft.VisualBasic. The That class is instrumental when
working in heterogeneous environments and when dealing with in porting of VB to C#
or visa-versa. 
&lt;/p&gt;
&lt;p&gt;
Weitere interessante Downloads gibt's unter &lt;a href="http://www.idesign.net/idesign/DesktopDefault.aspx?tabindex=5&amp;amp;tabid=11#ES"&gt;http://www.idesign.net/idesign/DesktopDefault.aspx?tabindex=5&amp;amp;tabid=11#ES&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=95b76059-dbec-4e32-8fb5-1afcd366ce16" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,95b76059-dbec-4e32-8fb5-1afcd366ce16.aspx</comments>
      <category>Know-How;Tipps und Tricks</category>
    </item>
    <item>
      <trackback:ping>http://www.artiso.com/ProBlog/Trackback.aspx?guid=4a521c87-41ed-42eb-811a-805b4940ab9f</trackback:ping>
      <pingback:server>http://www.artiso.com/ProBlog/pingback.aspx</pingback:server>
      <pingback:target>http://www.artiso.com/ProBlog/PermaLink,guid,4a521c87-41ed-42eb-811a-805b4940ab9f.aspx</pingback:target>
      <dc:creator>Thomas Schissler</dc:creator>
      <wfw:comment>http://www.artiso.com/ProBlog/CommentView,guid,4a521c87-41ed-42eb-811a-805b4940ab9f.aspx</wfw:comment>
      <wfw:commentRss>http://www.artiso.com/ProBlog/SyndicationService.asmx/GetEntryCommentsRss?guid=4a521c87-41ed-42eb-811a-805b4940ab9f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Jeder kennt das Problem. Man hat einen ellenlangen SQL-String und spätestens nach
der dritten Klammer hat man den Überblick verloren, wenn allles in einer Zeile steht.
Hier hilft ein kleines Tool weiter, das SQL-Strings, auch komplexe, übersichtlich
formatiert. Das Tool gibt es als kostenlose Online-Version und als kostenpflichtige
Offline-Version oder auch als API.
</p>
        <p>
          <a href="http://www.sqlinform.com/">http://www.sqlinform.com/</a>
        </p>
        <img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=4a521c87-41ed-42eb-811a-805b4940ab9f" />
      </body>
      <title>SQL-Strings formatieren</title>
      <guid isPermaLink="false">http://www.artiso.com/ProBlog/PermaLink,guid,4a521c87-41ed-42eb-811a-805b4940ab9f.aspx</guid>
      <link>http://www.artiso.com/ProBlog/PermaLink,guid,4a521c87-41ed-42eb-811a-805b4940ab9f.aspx</link>
      <pubDate>Mon, 10 Jul 2006 09:42:16 GMT</pubDate>
      <description>&lt;p&gt;
Jeder kennt das Problem. Man hat einen ellenlangen SQL-String und spätestens nach
der dritten Klammer hat man den Überblick verloren, wenn allles in einer Zeile steht.
Hier hilft ein kleines Tool weiter, das SQL-Strings, auch komplexe, übersichtlich
formatiert. Das Tool gibt es als kostenlose Online-Version und als kostenpflichtige
Offline-Version oder auch als API.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.sqlinform.com/"&gt;http://www.sqlinform.com/&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.artiso.com/ProBlog/aggbug.ashx?id=4a521c87-41ed-42eb-811a-805b4940ab9f" /&gt;</description>
      <comments>http://www.artiso.com/ProBlog/CommentView,guid,4a521c87-41ed-42eb-811a-805b4940ab9f.aspx</comments>
      <category>SQL;Tools;Tipps und Tricks</category>
    </item>
  </channel>
</rss>