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

<channel>
	<title>devbar.de &#187; .NET</title>
	<atom:link href="http://www.devbar.de/index.php/tag/net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devbar.de</link>
	<description>just code chunks</description>
	<lastBuildDate>Sat, 07 Jan 2012 19:50:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PB .NET Add-In: Generating Structures and NonVisualObjects from Datawindow</title>
		<link>http://www.devbar.de/index.php/2011/08/generating-structures-and-nonvisuals-from-datawindow-with-pb-net-add-in/</link>
		<comments>http://www.devbar.de/index.php/2011/08/generating-structures-and-nonvisuals-from-datawindow-with-pb-net-add-in/#comments</comments>
		<pubDate>Tue, 09 Aug 2011 19:19:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Powerbuilder]]></category>
		<category><![CDATA[Add-In]]></category>
		<category><![CDATA[Datawindow]]></category>
		<category><![CDATA[Dw2Struct]]></category>
		<category><![CDATA[Nonvisual]]></category>
		<category><![CDATA[Structure]]></category>

		<guid isPermaLink="false">http://www.devbar.de/index.php/2011/08/generating-structures-and-nonvisuals-from-datawindow-with-pb-net-add-in/</guid>
		<description><![CDATA[Don’t try to adjust your screen if you can’t read anymore what’s written in my blog. Yes it’s true! This is the first experimental English post here. This is for the English speaking Powerbuilder community I want to achieve.
So back to topic: What is this post about? Inspired by a small discussion in the Powerbuilder [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devbar.de/wp-content/uploads/2011/08/gb.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 6px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top: 0px; border-right: 0px; padding-top: 0px" title="gb" border="0" alt="gb" align="left" src="http://www.devbar.de/wp-content/uploads/2011/08/gb_thumb.png" width="16" height="11" /></a>Don’t try to adjust your screen if you can’t read anymore what’s written in my blog. Yes it’s true! This is the first experimental English post here. This is for the English speaking Powerbuilder community I want to achieve.</p>
<p>So back to topic: What is this post about? Inspired by a small discussion in the Powerbuilder 12.5 beta newsgroup I created a small plugin to easily create some Structures and NonVisualObjects from a Datawindow.</p>
<p>  <span id="more-721"></span>
<p><a href="http://www.devbar.de/wp-content/uploads/2011/08/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 16px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://www.devbar.de/wp-content/uploads/2011/08/image_thumb.png" width="183" height="158" /></a>This is very useful if you want to transfer data from or to a Datawindow by dot notation. If you have a lot of fields it can be a very painful job to create the Nonvisual and enter the variables in the correct order. Because of this Bruce Armstrong created a small tool called “Dw2Struct” that can do this for you in PB Classic. What I do is to extend the tool for NonVisuals and build a add-in around it.</p>
<p>So take a look at the code and the binaries. The Installation is easy. Just put it in a directory where Powerbuilder 12.5 .NET looks for add-ins. You can see what paths are observed by going to Extras-&gt;Options-&gt;Add-In. If you are not sure where to copy it, enter the path where you unpack the downloaded files. After restart the IDEs shows you two new entries in context menu of Datawindow. That’s it. </p>
<p>Have fun!</p>
<p><strong>Links:</strong></p>
<ul>
<li>
<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:e2e5e9cb-a8ba-4a47-9ccc-140ede6de99c" class="wlWriterEditableSmartContent">
<div><a href="http://www.devbar.de/wp-content/uploads/2011/08/PB-Addin-Dw2Struct.zip" target="_self">PB-Addin-Dw2Struct.zip</a></div>
</div>
</li>
<li><a href="https://github.com/devbar/PB-Addin-Dw2Struct">GitHub</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2011/08/generating-structures-and-nonvisuals-from-datawindow-with-pb-net-add-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerBuilder Support</title>
		<link>http://www.devbar.de/index.php/2010/06/powerbuilder-support/</link>
		<comments>http://www.devbar.de/index.php/2010/06/powerbuilder-support/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 17:13:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Powerbuilder]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Vivo]]></category>

		<guid isPermaLink="false">http://www.devbar.de/?p=569</guid>
		<description><![CDATA[Vor einiger Zeiten hat Jason Fenter eine eigene Community für Powerbuilder-Entwickler in Ning ins Leben gerufen. Leider will Ning nicht mehr kostenlos hosten und so ziehen wir jetzt um.
Das neue Board befindet sich jetzt hier. Als Engine nutze ich das auf DotNetNuke basierende Vivo. Vivo selbst und die Community sind noch im Aufbau, weswegen es [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devbar.de/wp-content/uploads/2010/06/logo_pb_small.png"><img class="aligncenter size-full wp-image-570" title="logo_pb_small" src="http://www.devbar.de/wp-content/uploads/2010/06/logo_pb_small.png" alt="" width="444" height="110" /></a>Vor einiger Zeiten hat Jason Fenter eine eigene Community für Powerbuilder-Entwickler in <a href="http://powerbuilder.ning.com/">Ning </a>ins Leben gerufen. Leider will Ning nicht mehr kostenlos hosten und so ziehen wir jetzt um.</p>
<p>Das neue Board befindet sich jetzt <a href="http://www.powerbuilder.devbar.de/">hier</a>. Als Engine nutze ich das auf DotNetNuke basierende <a href="http://imvivo.com/">Vivo</a>. Vivo selbst und die Community sind noch im Aufbau, weswegen es mit Sicherheit an der ein oder anderen Ecke haken wird. Also &#8211; Einfach mal reinschauen.</p>
<p>Links:</p>
<ul>
<li><a href="http://powerbuilder.devbar.de">www.powerbuilder.devbar.de</a></li>
<li><a href="http://imvivo.com/">vivo</a></li>
<li><a href="http://www.ning.com/">Ning</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2010/06/powerbuilder-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top Ten Extensions für Visual Studio 2010</title>
		<link>http://www.devbar.de/index.php/2010/06/top-ten-extensions-fur-visual-studio-2010/</link>
		<comments>http://www.devbar.de/index.php/2010/06/top-ten-extensions-fur-visual-studio-2010/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 03:10:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.devbar.de/?p=564</guid>
		<description><![CDATA[Leider hatte ich noch nicht viel Zeit mich in Visual Studio 2010 reinzufuchsen. Auf CodeProject gibt es aber schonmal die Top Ten Extensions, die man auf jeden Fall braucht  
Links

CodeProject: Top Ten Extensions for Visual Studio 2010

]]></description>
			<content:encoded><![CDATA[<p>Leider hatte ich noch nicht viel Zeit mich in Visual Studio 2010 reinzufuchsen. Auf CodeProject gibt es aber schonmal die Top Ten Extensions, die man auf jeden Fall braucht <img src='http://www.devbar.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Links</p>
<ul>
<li><a href="http://www.codeproject.com/KB/macros/TopTenFreeExtensions2010.aspx">CodeProject: Top Ten Extensions for Visual Studio 2010</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2010/06/top-ten-extensions-fur-visual-studio-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic in C# 4.0</title>
		<link>http://www.devbar.de/index.php/2010/05/dynamic-in-c-4-0/</link>
		<comments>http://www.devbar.de/index.php/2010/05/dynamic-in-c-4-0/#comments</comments>
		<pubDate>Sun, 30 May 2010 03:11:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.devbar.de/?p=537</guid>
		<description><![CDATA[Die Powerbuilder-Entwickler kennen das Schlüsselwert DYNAMIC um beim Aufruf einer Methode erst zur Laufzeit prüfen zu lassen ob diese bereits vorhanden ist. In C# gibt es ab der Version 4.0 ein ähnliches Hilfsmittel um späte Bindung zu vereinfachen.
Das Schlüsselwor DYNAMIC gibt es in C# jetzt auch. Aber anstatt es, wie in Powerbuilder, vor die Methode [...]]]></description>
			<content:encoded><![CDATA[<p>Die Powerbuilder-Entwickler kennen das Schlüsselwert <em>DYNAMIC </em>um beim Aufruf einer Methode erst zur Laufzeit prüfen zu lassen ob diese bereits vorhanden ist. In C# gibt es ab der Version 4.0 ein ähnliches Hilfsmittel um späte Bindung zu vereinfachen.</p>
<p><span id="more-537"></span>Das Schlüsselwor <em>DYNAMIC </em>gibt es in C# jetzt auch. Aber anstatt es, wie in Powerbuilder, vor die Methode oder den Event zu stellen wird es hier als Datentyp eingesetzt.</p>
<p><strong>Powerbuilder:</strong></p>
<pre class="brush: powerbuilder">
powerobject  lpo_powerobject
n_test               lnv_test

lnv_test = CREATE n_test
lpo_powerobject = lnv_test
lpo_powerobject.DYNAMIC of_helloWorld ( )
</pre>
<p><strong>C#</strong></p>
<pre class="brush: csharp">dynamic myobject;
myojbject = new TestA();
myobject.HelloWorld ( );
</pre>
<p>Das heißt natürlich im Umkehrschluss, dass man jetzt jede beliebige Methode als Aufruf programmieren kann ohne dass der Compiler aufmuckt. Ich würde sagen: Fluch und Segen <img src='http://www.devbar.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Daraus folgt aber auch, dass ich jede belibige Klasse unabhängig von Vererbungshierarchie in <em>myObject </em>füllen kann an der die Methode HelloWorld existiert.</p>
<p>Dieses Listing soll das Verhalten verdeutlichen:</p>
<pre class="brush: csharp">
static void Main(string[] args)
{
	dynamic work = null;

	work = new TestA();
	work.HelloWorld();

	work = new TestB();
	work.HelloWorld();

	Console.Read();

}

public class TestA
{
	public void HelloWorld()
	{
		Console.WriteLine("Hallo ich bin TestA");
	}
}

public class TestB
{
	public void HelloWorld()
	{
		Console.WriteLine("Hallo ich bin TestB");
	}
}
</pre>
<p><strong>Fazit</strong></p>
<p>Dynamic ist eine schöne Sache um späte Bindung zu vereinfachen. Früher oder später führt es aber, bei zu häufiger Anwendung, zum Chaos. Also: Immer Verantwortungsbewusst einsetzen <img src='http://www.devbar.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2010/05/dynamic-in-c-4-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Augmented Reality mit Goblin XNA</title>
		<link>http://www.devbar.de/index.php/2010/05/augmented-reality-mit-goblin-xna/</link>
		<comments>http://www.devbar.de/index.php/2010/05/augmented-reality-mit-goblin-xna/#comments</comments>
		<pubDate>Fri, 28 May 2010 04:09:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[4fun]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Games]]></category>

		<guid isPermaLink="false">http://www.devbar.de/?p=510</guid>
		<description><![CDATA[Das sieht mal richtig gut aus. Goblin XNA ist ein OpenSource-Framework zur Programmierung von Augmented Reality-Games mit C# / .NET. Das hat jetzt erstmal einen Platz auf meiner ToCode-Liste  
Links

Coding4fun:  Augmnented Reality Domino Knowk-Down Game
Goblin XNA auf CodePlex



]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devbar.de/wp-content/uploads/2010/05/clip_image0024_thumb-wetfloor.png"><img class="alignright size-medium wp-image-511" title="clip_image002[4]_thumb-wetfloor" src="http://www.devbar.de/wp-content/uploads/2010/05/clip_image0024_thumb-wetfloor-300x290.png" alt="" width="201" height="194" /></a>Das sieht mal richtig gut aus. Goblin XNA ist ein OpenSource-Framework zur Programmierung von Augmented Reality-Games mit C# / .NET. Das hat jetzt erstmal einen Platz auf meiner ToCode-Liste <img src='http://www.devbar.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Links</p>
<ul>
<li><a href="http://blogs.msdn.com/coding4fun/archive/2010/05/13/10012840.aspx">Coding4fun:  Augmnented Reality Domino Knowk-Down Game</a></li>
<li><a href="http://goblinxna.codeplex.com/">Goblin XNA auf CodePlex</a></li>
</ul>
<p><span id="more-510"></span><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/6AKgH4On65A" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/6AKgH4On65A"></embed></object></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/c_LrVqI6StY" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/c_LrVqI6StY"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2010/05/augmented-reality-mit-goblin-xna/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Einstieg in ASP.NET</title>
		<link>http://www.devbar.de/index.php/2010/05/einstieg-in-asp-net/</link>
		<comments>http://www.devbar.de/index.php/2010/05/einstieg-in-asp-net/#comments</comments>
		<pubDate>Thu, 27 May 2010 04:11:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.devbar.de/?p=506</guid>
		<description><![CDATA[Ich versuche mich momentan ein bischen in ASP.NET einzuarbeiten. Ein Freund von mir hat dieses Buch empfohlen und bisher bin ich wirklich begeistert. Der Schreiber kommt schnell auf den Punkt und es gibt viele praktische Beispiele mit denen man arbeiten kann.
Aber jetzt kommt&#8217;s : 70 Euronen. Mein Herz hat geblutet  . Das Buch ist [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.amazon.de/gp/product/1590598911?ie=UTF8&amp;tag=devbarde-21&amp;linkCode=as2&amp;camp=1638&amp;creative=19454&amp;creativeASIN=1590598911"><img class="alignright size-medium wp-image-507" title="asp-wetfloor" src="http://www.devbar.de/wp-content/uploads/2010/05/asp-wetfloor-174x300.png" alt="" width="174" height="300" /></a>Ich versuche mich momentan ein bischen in ASP.NET einzuarbeiten. Ein Freund von mir hat dieses Buch empfohlen und bisher bin ich wirklich begeistert. Der Schreiber kommt schnell auf den Punkt und es gibt viele praktische Beispiele mit denen man arbeiten kann.</p>
<p>Aber jetzt kommt&#8217;s : 70 Euronen. Mein Herz hat geblutet <img src='http://www.devbar.de/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> . Das Buch ist zwar sein Geld Wert, aber trotzdem frag&#8217; ich mich natürlich ob man nicht auch günstiger in&#8217;s Thema kommt. Vielleicht habt ihr ja einen Tipp.</p>
<p>Ansonsten würde ich es aber trotzdem weiterempfehlen.</p>
<p>Links:</p>
<ul>
<li><a href="http://www.amazon.de/gp/product/1590598911?ie=UTF8&amp;tag=devbarde-21&amp;linkCode=as2&amp;camp=1638&amp;creative=19454&amp;creativeASIN=1590598911">Amazon</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2010/05/einstieg-in-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tuples in C# 4.0 verwenden</title>
		<link>http://www.devbar.de/index.php/2010/05/tuples-in-c-4-0-verwenden/</link>
		<comments>http://www.devbar.de/index.php/2010/05/tuples-in-c-4-0-verwenden/#comments</comments>
		<pubDate>Tue, 25 May 2010 04:15:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://devbar.de/?p=471</guid>
		<description><![CDATA[Tuples sind eine Möglichkeit Elemente mit verschiedenen Datentypen zu gruppieren. In Python oder Haspell gibt es dieses Feature schon länger. In .NET kann man Tuples ab der Version 4.0 nutzen.
Tuples erstellen
Um einen Tuple in C# zu erstellen benötigt man den Standardtyp Tuple. Die Tuple-Klasse hat 8 überladene statische Methoden mit dem Namen Create.

Create (T1)
Create(T1,T2)
Create(T1,T2,T3)
Create(T1,T2,T3,T4)
Create(T1,T2,T3,T4,T5)
Create(T1,T2,T3,T4,T5,T6,T7)
Create(T1,T2,T3,T4,T5,T6,T7,T8)

Die Methoden [...]]]></description>
			<content:encoded><![CDATA[<p>Tuples sind eine Möglichkeit Elemente mit verschiedenen Datentypen zu gruppieren. In Python oder Haspell gibt es dieses Feature schon länger. In .NET kann man Tuples ab der Version 4.0 nutzen.</p>
<p><span id="more-471"></span><strong>Tuples erstellen</strong></p>
<p>Um einen Tuple in C# zu erstellen benötigt man den Standardtyp <em>Tuple</em>. Die Tuple-Klasse hat 8 überladene statische Methoden mit dem Namen <em>Create</em>.</p>
<ul>
<li>Create (T1)</li>
<li>Create(T1,T2)</li>
<li>Create(T1,T2,T3)</li>
<li>Create(T1,T2,T3,T4)</li>
<li>Create(T1,T2,T3,T4,T5)</li>
<li>Create(T1,T2,T3,T4,T5,T6,T7)</li>
<li>Create(T1,T2,T3,T4,T5,T6,T7,T8)</li>
</ul>
<p>Die Methoden geben folgende Datentypen zurück.</p>
<ul>
<li>Tuple&lt;T1&gt;</li>
<li>Tuple&lt;T1,T2&gt;</li>
<li>Tuple&lt;T1,T2,T3&gt;</li>
<li>Tuple&lt;T1,T2,T3,T4&gt;</li>
<li>Tuple&lt;T1,T2,T3,T4,T5&gt;</li>
<li>Tuple&lt;T1,T2,T3,T4,T5,T6&gt;</li>
<li>Tuple&lt;T1,T2,T3,T4,T5,T6,T7&gt;</li>
<li>Tuple&lt;T1,T2,T3,T4,T5,T6,T7,TRest&#8230;&gt; ( alle Tuples &gt; 8 wie das geht kommt noch <img src='http://www.devbar.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  )</li>
</ul>
<p>Hier der Code um einen einfachen Tuple zu erstellen.</p>
<pre class="brush: csharp">var album = Tuple.Create&lt;string,int&gt;("Rammstein", 2008);
Console.WriteLine(album);
Console.Read();</pre>
<p>Die Ausgabe ist: <em>(Rammstein, 2008)</em></p>
<p>Natürlich kann man auch auf einzelne Elemente zugreifen.</p>
<pre class="brush: csharp">var album = Tuple.Create&lt;string,int&gt;("Rammstein", 2008);
Console.WriteLine("Band: {0}, Jahr: {1}", album.Item1, album.Item2);
Console.Read();</pre>
<p>Die Ausgabe ist: <em>Band: Rammstein, Jahr: 2008</em></p>
<p><strong>Verschachtelte Tuples</strong></p>
<p>Tuples lassen sich auch verschachteln.</p>
<pre class="brush: csharp">var album = Tuple.Create("Rammstein", 2008,new Tuple&lt;int,int&gt;(1,2));
Console.WriteLine(album);
Console.Read();</pre>
<p>Die Ausgabe ist: <em>(Rammstein,(1,2))</em></p>
<p><strong>Tuples &gt; 8</strong></p>
<p>Die Create-Methoden haben nur 8 Überladungen. Wenn man Tuples erstellen will, die größer als 8 Elemente sind, benutzt man den new-Operator.</p>
<pre class="brush: csharp">var album = new Tuple&lt;string, int, int, int, int, int, int,  Tuple&lt;int, int&gt;&gt;("Rammstein", 1, 2, 3, 4, 5, 6, new  Tuple&lt;int, int&gt;(8, 9));
Console.WriteLine(album);
Console.Read();</pre>
<p>Die Ausfabe ist:<em> (Rammstein, 1, 2, 3, 4, 5, 6, 7, 8, 9)</em></p>
<p>Das direkte zugreifen auf die Elemente ist ebenfalls möglich.</p>
<pre class="brush: csharp">var album = new Tuple&lt;string, int, int, int, int, int, int, Tuple&lt;int, int&gt;&gt;("Rammstein", 1, 2, 3, 4, 5, 6, new Tuple&lt;int, int&gt;(8, 9));
Console.WriteLine(album.Rest.Item1);
Console.Read();
</pre>
<p><strong>Fazit</strong></p>
<p>Hin und wieder kommt man in die Verlegenheit temporär Daten speichern zu müssen. Eine vernünftige Gruppierung hält den Code sauber und übersichtlich. Was man allerdings vermeiden sollte, ist das Verwenden von Tuples anstatt eines sauberen Klassenkonzepts. Wenn ich also meinen Album-Datentyp noch öfter brauchen werden, dann erstelle ich mir lieber eine Klasse mit sprechend benannten Attributen anstatt<em> Item1 Item2,</em> <em>etc</em>.</p>
<p>Und noch etwas zum Schluss: Die Frage die ich mir zu Anfang gestellt habe war, warum man hier mit der Begrenzung auf 8 Parameter arbeitet. Des Rätsels Lösung: C# unterstützt keine generischen Konstruktoren/Methoden mit unterschiedlichen Datentypen. Soll heißen, dass z.B <em>Create</em> nur generisch sein könnte, wenn es nur int-Werte nehmen würde. Das ergibt aber keinen Sinn, da man dann besser ein Array deklarieren könnte.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2010/05/tuples-in-c-4-0-verwenden/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programming WPF</title>
		<link>http://www.devbar.de/index.php/2010/05/programming-wpf/</link>
		<comments>http://www.devbar.de/index.php/2010/05/programming-wpf/#comments</comments>
		<pubDate>Mon, 24 May 2010 03:11:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Powerbuilder]]></category>
		<category><![CDATA[Bücher]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://devbar.de/?p=474</guid>
		<description><![CDATA[Dieses Buch habe ich vor ca. 3 Jahren in die Hand genommen um mich ein bischen in WPF einzulesen. Meiner Meinung nach das beste Druckwerk um einen umfassenden Einstieg in das Thema zu bekommen.
Wer also der englischen Sprache mächtig ist sollte hier zugreifen. Ich finde ~ 30 Euro für ein Fachbuch ist auch noch im [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.amazon.de/gp/product/0596510373?ie=UTF8&amp;tag=devbarde-21&amp;linkCode=as2&amp;camp=1638&amp;creative=19454&amp;creativeASIN=0596510373"><img class="alignright size-full wp-image-475" title="wpf_buch" src="http://devbar.de/wp-content/uploads/2010/05/wpf_buch.png" alt="" width="192" height="300" /></a>Dieses Buch habe ich vor ca. 3 Jahren in die Hand genommen um mich ein bischen in WPF einzulesen. Meiner Meinung nach das beste Druckwerk um einen umfassenden Einstieg in das Thema zu bekommen.</p>
<p>Wer also der englischen Sprache mächtig ist sollte hier zugreifen. Ich finde ~ 30 Euro für ein Fachbuch ist auch noch im sehr fairen Bereich.</p>
<p>Links:</p>
<ul>
<li><a href="http://www.amazon.de/gp/product/0596510373?ie=UTF8&amp;tag=devbarde-21&amp;linkCode=as2&amp;camp=1638&amp;creative=19454&amp;creativeASIN=0596510373">Amazon</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2010/05/programming-wpf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Entwurfsmuster von Kopf bis Fuß</title>
		<link>http://www.devbar.de/index.php/2010/05/buchtipp-entwurfsmuster-von-kopf-bis-fus/</link>
		<comments>http://www.devbar.de/index.php/2010/05/buchtipp-entwurfsmuster-von-kopf-bis-fus/#comments</comments>
		<pubDate>Sun, 23 May 2010 03:15:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Bücher]]></category>

		<guid isPermaLink="false">http://devbar.de/?p=464</guid>
		<description><![CDATA[Das Buch richtet sich an fortgeschrittene OO-Entwickler die ihren Horizont erweitern möchten. Es geht darum wie man mit Entwurfsmustern wiederkehrende Programmierprobleme des Alltags elegant löst.
Mir hat das Buch viele Erkenntnisse über meinen eigenen Programmierstil und Verbesserungsmöglichkeiten geliefert. Vererbung ist z.B. nicht immer der beste Weg und wie setzt man Interfaces sinnvoll ein.
Das Buch richtet sich [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.amazon.de/gp/product/3897214210?ie=UTF8&amp;tag=devbarde-21&amp;linkCode=as2&amp;camp=1638&amp;creative=6742&amp;creativeASIN=3897214210"><img class="size-full wp-image-465 alignright" title="517HsBMdL4L._SL160_-wetfloor" src="http://devbar.de/wp-content/uploads/2010/05/517HsBMdL4L._SL160_-wetfloor.png" alt="" width="138" height="208" /></a>Das Buch richtet sich an fortgeschrittene OO-Entwickler die ihren Horizont erweitern möchten. Es geht darum wie man mit Entwurfsmustern wiederkehrende Programmierprobleme des Alltags elegant löst.</p>
<p>Mir hat das Buch viele Erkenntnisse über meinen eigenen Programmierstil und Verbesserungsmöglichkeiten geliefert. Vererbung ist z.B. nicht immer der beste Weg und wie setzt man Interfaces sinnvoll ein.</p>
<p>Das Buch richtet sich zwar eher an Java-Entwickler aber wer C# kann, kommt auch sehr gut zurecht. Den reinen Powerbuilder-Entwicklern würde ich abraten. Viele Elemente (Interfaces, EventHandler, Enumarations, &#8230; ) gibt es in der Powerbuilder Classic nicht und in Powerbuilder .NET nur bedingt.</p>
<p>Kritikpunkt ist sicherlich der Preis, der mit Knapp 50 Euronen doch sehr happig ist. Ich habe die Investition aber nicht bereut.</p>
<p>Links:</p>
<ul>
<li><a href="http://www.amazon.de/gp/product/3897214210?ie=UTF8&amp;tag=devbarde-21&amp;linkCode=as2&amp;camp=1638&amp;creative=6742&amp;creativeASIN=3897214210">Amazon</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2010/05/buchtipp-entwurfsmuster-von-kopf-bis-fus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom (XAML-)Controls in Datawindows nutzen</title>
		<link>http://www.devbar.de/index.php/2010/05/custom-xaml-controls-in-datawindows-nutzen/</link>
		<comments>http://www.devbar.de/index.php/2010/05/custom-xaml-controls-in-datawindows-nutzen/#comments</comments>
		<pubDate>Thu, 20 May 2010 03:12:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Powerbuilder]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://devbar.de/?p=433</guid>
		<description><![CDATA[
Eines der interessantesten Features in Powerbuilder .NET ist die Verwendung von WPF (XAML) zur Definition der Benutzeroberfläche. Dabei ist es nicht nur möglich Controls auf dem Fenster mit XAML zu beschreiben, sondern auch innerhalb von Datawindows (Custom Control). In dieser kleinen Beispielanwendung bette ich ein 5-Sterne-Rating-XAML-Control zur Bewertung von Filmen in ein Datawindow ein und [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-434  aligncenter" title="2010-05-18 23h33_54" src="http://devbar.de/wp-content/uploads/2010/05/2010-05-18-23h33_54.png" alt="" width="417" height="506" /></p>
<p style="text-align: left;">Eines der interessantesten Features in Powerbuilder .NET ist die Verwendung von WPF (XAML) zur Definition der Benutzeroberfläche. Dabei ist es nicht nur möglich Controls auf dem Fenster mit XAML zu beschreiben, sondern auch innerhalb von Datawindows (<strong>Custom Control</strong>). In dieser kleinen Beispielanwendung bette ich ein 5-Sterne-Rating-XAML-Control zur Bewertung von Filmen in ein Datawindow ein und &#8220;binde&#8221; es an die enthaltenen Daten.</p>
<p style="text-align: left;"><span id="more-433"></span></p>
<p><strong>Überblick</strong></p>
<p>Der Source und das Tool können <a href="http://devbar.de/wp-content/uploads/2010/05/MovieCat.zip">hier</a> heruntergeladen werden. Das Projekt besteht aus einem Fenster, einem Datawindow, ein paar Ressourcen und einem Assembly (RatingControlSample.dll). Das Assembly enthält  das Rating-Control, dass wir im Datawindow verwenden wollen (gefunden auf <a href="http://nickeandersson.blogs.com/blog/2008/02/a-rating-contro.html">Nick Andersson&#8217;s Blog</a>). Um mir die Arbeit ein wenig zu vereinfachen, habe ich mir ein External-Datawindow gebaut, das meine Filme enthält. Natürlich könnte hier auch eine Datenbank oder ein SOAP-Service als Datenquelle genutzt werden.</p>
<p><strong>Vorgehensweise</strong></p>
<p style="text-align: center;"><a href="http://devbar.de/wp-content/uploads/2010/05/2010-05-18-23h34_47.png"><img class="size-medium wp-image-438  aligncenter" title="2010-05-18 23h34_47" src="http://devbar.de/wp-content/uploads/2010/05/2010-05-18-23h34_47-297x300.png" alt="" width="297" height="300" /></a></p>
<p style="text-align: left;">Das Erstellen des Projekts, des Fensters und des Datawindows ist wie aus Powerbuilder Classic bekannt.</p>
<p style="text-align: left;"><strong>1. Das Assemly aufnehmen</strong></p>
<p style="text-align: left;">Dafür sucht ihr im Navigator(links) den Bereich &#8220;References&#8221; und wählt &#8220;Add Reference&#8221;. Anschließend müsst ihr per &#8220;Browse&#8221; das gewünschte Assembly auswählen.</p>
<p style="text-align: left;"><strong>2. Das Custom Control hinzufügen</strong></p>
<p style="text-align: left;">Wenn ihr im Datawindow-Painter seid, gibt es in eurer Toolbox einen Eintrag &#8220;Custom Control&#8221;. Zieht das Control auf das Datawindow und es öffnet sich ein neuer Dialog. Das Wichtige hier ist der XAML-Code, der eingefügt werden muss.</p>
<pre class="brush: xml">&lt;RatingControl xmlns="clr-namespace:RatingControlSample;assembly=RatingControlSample" Width="87" Height="15" /&gt;</pre>
<p style="text-align: left;">Die restlichen Felder kann man erstmal leer lassen.</p>
<p style="text-align: left;"><strong>3. Das Control mit den Datawindow verbinden</strong></p>
<p style="text-align: left;">Um das Datawindow mit den Daten zu binden, sind folgende Eigenschaften des Controls wichtig:</p>
<ul>
<li>Table und Column: Dies ist die Tabelle und die Spalte die in das Control übergeben werden soll. Im Fall eines External-Datawindows muss nur Column gefüllt werden. In diesem Fall wird Column mit &#8220;rating&#8221; gefüllt.</li>
<li>Content: Hier wird der Name der Property angegeben, in die der Wert aus &#8220;Column&#8221; geschrieben werden soll. Selbstverständlich müssen die Datentypen kompatibel sein. Für das Beispiel sollte hier &#8220;RatingValue&#8221; stehen, da die entsprechende Eigenschaft zum Einblenden der Sterne so heißt. Die Eigenschaft kann Werte von 1 bis 5 aufnehmen, je nachdem wieviele Sterne vergeben werden.</li>
<li>Keyclause: Hier wird die Bedingung angegeben, die zum Laden der Tabelle genutzt werden soll. Ich brauche dies in meinem Beispiel eigentlich nicht, da ich auf ein External-Datawindow zurückgreife.</li>
<li>XAML Syntax: Hier kann die in Schritt 2 eingegebene Syntax bearbeitet werden.</li>
</ul>
<p>Wenn ihr das Datawindow verwendet, wird das Control entsprechend den Daten aus dem DW geladen. Wenn der Anwender die Anzahl der Sterne verändert, wird der entsprechende Wert in das Datawindow zurückgeschrieben.</p>
<p>Viel Spaß beim Ausprobieren <img src='http://www.devbar.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Links:</p>
<ul>
<li><a href="http://devbar.de/wp-content/uploads/2010/05/MovieCat.zip">MovieCat downloaden</a></li>
<li><a href="http://nickeandersson.blogs.com/blog/2008/02/a-rating-contro.html">Nick Andersson&#8217;s Blog</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2010/05/custom-xaml-controls-in-datawindows-nutzen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

