<?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>sebastianvogelsang.com &#187; development</title>
	<atom:link href="http://www.sebastianvogelsang.com/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sebastianvogelsang.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 23 Sep 2009 08:59:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9-rare</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WmAutoUpdate &#8211; a .NET Compact Framework auto-update library</title>
		<link>http://www.sebastianvogelsang.com/2009/09/23/wmautoupdate-a-net-compact-framework-auto-update-library/</link>
		<comments>http://www.sebastianvogelsang.com/2009/09/23/wmautoupdate-a-net-compact-framework-auto-update-library/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 00:52:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[auto-update]]></category>
		<category><![CDATA[c sharp]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[cf]]></category>
		<category><![CDATA[compact framework]]></category>
		<category><![CDATA[self-update]]></category>
		<category><![CDATA[windows mobile]]></category>
		<category><![CDATA[wmautoupdate]]></category>

		<guid isPermaLink="false">http://www.sebastianvogelsang.com/?p=165</guid>
		<description><![CDATA[For one of my .NET Compact Framwork applications I needed some self-auto-update functionality, simliar to what Sparkle does on OSX. Unfortunatly, I couldn&#8217;t find any libraries that would help me achieve this goal. The only thing I could find was an outdated article in the MSDN library. But that, like many Microsoft examples, presupposed an [...]]]></description>
			<content:encoded><![CDATA[<p>For one of my .NET Compact Framwork applications I needed some self-auto-update functionality, simliar to what <a href="http://sparkle.andymatuschak.org/" target="_blank">Sparkle</a> does on OSX. Unfortunatly, I couldn&#8217;t find any libraries that would help me achieve this goal. The only thing I could find was an <a href="http://msdn.microsoft.com/en-us/library/aa446487.aspx" target="_blank">outdated article</a> in the MSDN library. But that, like many Microsoft examples, presupposed an IIS with ASP.NET on the server side, which I neither had, nor wanted to use.</p>
<p>So I took the weekend and coded a little library, which I call &#8220;<a href="http://github.com/seboslaw/wmautoupdate" target="_blank">WmAutoUpdate</a>&#8221; (freely available on <a href="http://github.com/seboslaw/wmautoupdate" target="_blank">Github</a>). It can easily be integrated with your .NET Compact Framework app and works with any webserver that is able to serve files on the server side.</p>
<p>Go on over to Github, get the source and check the &#8220;example&#8221; folder:</p>
<p>Usage<br />
============<br />
Consider the example folder for a simple example of how to use the framework. The application simply consists of a form, which displays the string &#8220;old Version&#8221;.</p>
<pre>  static void Main()</pre>
<pre>    {</pre>
<pre>      Updater updater = new Updater("<a href="http://www.myupdateurl.com/update.xml">http://www.myupdateurl.com/update.xml</a>");</pre>
<pre>      updater.CheckForNewVersion();</pre>
<pre>      Application.Run(new Form1());</pre>
<pre>    }</pre>
<p>Upon start, the WmAutoUpdate framework kicks in and downloads the XML file &#8220;update.xml&#8221; from the update server. The update.xml file looks as follows:</p>
<pre>  &lt;?xml version="1.0" encoding="utf-8" ?&gt;</pre>
<pre>  &lt;updates&gt;</pre>
<pre>    &lt;download name="WmAutoUpdateExample"&gt;</pre>
<pre>      &lt;version maj="3" min="0" bld="0000"/&gt;</pre>
<pre>      &lt;message&gt;Important Update. My very important release/update note. This will be displayed within the Update</pre>
<pre>      Form&lt;/message&gt;</pre>
<pre>      &lt;link&gt;<a href="http://www.myupdateurl.com/update.zip">http://www.myupdateurl.com/update.zip</a>&lt;/link&gt;</pre>
<pre>    &lt;/download&gt;</pre>
<pre>  &lt;/updates&gt;</pre>
<p>Pretty self-explanatory. Afterwards, the user can choose whether to update now, or skip the update for now. If the former is chosen, the file described in the &#8220;link&#8221; tag is downloaded and unpacked into a temporary folder (Unpacking is facilitated through the <a href="http://www.codeplex.com/DotNetZip">http://www.codeplex.com/DotNetZip</a> lib). Next, these files are moved from the temporary folder into the application folder, replacing the outdated files (the outdated files are copied into a backup folder, beforehand). If everything goes well, WmAutoUpdate creates a file called &#8220;success&#8221; within the backup folder. Lastly, the application is restarted (right now this is implemented via a call to CeRunAppAtTime; Unfortunately, the minimum time-frame this function accepts is 11 seconds. Thus, it will take 11 secs for your app to restart). Upon restart WmAutoUpdate checks for the &#8220;success&#8221; file within the backup folder. If found, the entire backup folder is deleted. If not, all files within the backup folder are copied back into the application folder (rollback).</p>
<p>Both update.zip (which simply contains the same application, but with a form saying &#8220;new Version&#8221; and the Assembly Version set to 3.0.0) and update.xml can be found in the &#8220;Server Files&#8221; directory within the example folder. Both files need to be put into the according server web directory.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastianvogelsang.com/2009/09/23/wmautoupdate-a-net-compact-framework-auto-update-library/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Scaling images to fit a screen</title>
		<link>http://www.sebastianvogelsang.com/2009/06/04/scaling-images-to-fit-a-screen/</link>
		<comments>http://www.sebastianvogelsang.com/2009/06/04/scaling-images-to-fit-a-screen/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 16:58:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[aspect ratio]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[opennetcf]]></category>
		<category><![CDATA[scaling]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[smart device framework]]></category>

		<guid isPermaLink="false">http://www.sebastianvogelsang.com/?p=159</guid>
		<description><![CDATA[Lately I had to do some image scaling for a .NET compact framework project. While the actual scaling can easily be done by means of the Smart Device Framework (OpenNETCF), the process of deciding whether to adjust the image to the screen&#8217;s height or the width takes a  little more effort than on a regular [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I had to do some image scaling for a .NET compact framework project. While the actual scaling can easily be done by means of the <span id="dnn_ctr415_dnnTITLE_lblTitle" class="Head"><a href="http://www.opennetcf.com/Default.aspx?tabid=65http://www.opennetcf.com/Default.aspx?tabid=65" target="_blank">Smart Device Framework</a> (OpenNETCF), the process of deciding whether to adjust the image to the screen&#8217;s height or the width takes a  little more effort than on a regular (landscape) computer, due to the multitude of possible screen/picture aspect-ratio combinations</span> (most phones let the user switch between landscape and portrait mode). The following code solves theses issues (IBitmapImage and ImageUtils are OpenNETCF classes):</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">private</span> IBitmapImage scaleImageToDisplay<span style="color: #000000;">&#40;</span>Image img, Stream s<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #FF0000;">float</span> ScreenRatio <span style="color: #008000;">=</span> <span style="color: #0600FF;">this</span>.<span style="color: #0000FF;">targetWidth</span> <span style="color: #008000;">/</span> <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">float</span><span style="color: #000000;">&#41;</span><span style="color: #0600FF;">this</span>.<span style="color: #0000FF;">targetHeight</span><span style="color: #008000;">;</span>
<span style="color: #FF0000;">float</span> ImgRatio <span style="color: #008000;">=</span> img.<span style="color: #0000FF;">Width</span> <span style="color: #008000;">/</span> <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">float</span><span style="color: #000000;">&#41;</span>img.<span style="color: #0000FF;">Height</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>ImgRatio <span style="color: #008000;">&amp;</span>gt<span style="color: #008000;">;</span> 1.0f<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>ScreenRatio <span style="color: #008000;">&amp;</span>gt<span style="color: #008000;">;</span> ImgRatio<span style="color: #000000;">&#41;</span>
<span style="color: #0600FF;">return</span> ImageUtils.<span style="color: #0000FF;">CreateThumbnail</span><span style="color: #000000;">&#40;</span>s, <span style="color: #008000;">new</span> <span style="color: #000000;">System.<span style="color: #0000FF;">Drawing</span></span>.<span style="color: #0000FF;">Size</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span><span style="color: #000000;">&#41;</span>Math.<span style="color: #0000FF;">Round</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">this</span>.<span style="color: #0000FF;">targetHeight</span> <span style="color: #008000;">*</span> ImgRatio, <span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span>, <span style="color: #0600FF;">this</span>.<span style="color: #0000FF;">targetHeight</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">else</span>
<span style="color: #0600FF;">return</span> ImageUtils.<span style="color: #0000FF;">CreateThumbnail</span><span style="color: #000000;">&#40;</span>s, <span style="color: #008000;">new</span> <span style="color: #000000;">System.<span style="color: #0000FF;">Drawing</span></span>.<span style="color: #0000FF;">Size</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">this</span>.<span style="color: #0000FF;">targetWidth</span>, <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span><span style="color: #000000;">&#41;</span>Math.<span style="color: #0000FF;">Round</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">this</span>.<span style="color: #0000FF;">targetWidth</span> <span style="color: #008000;">/</span> ImgRatio, <span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #0600FF;">else</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>ScreenRatio <span style="color: #008000;">&amp;</span>lt<span style="color: #008000;">;</span> ImgRatio<span style="color: #000000;">&#41;</span>
<span style="color: #0600FF;">return</span> ImageUtils.<span style="color: #0000FF;">CreateThumbnail</span><span style="color: #000000;">&#40;</span>s, <span style="color: #008000;">new</span> <span style="color: #000000;">System.<span style="color: #0000FF;">Drawing</span></span>.<span style="color: #0000FF;">Size</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">this</span>.<span style="color: #0000FF;">targetWidth</span>, <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span><span style="color: #000000;">&#41;</span>Math.<span style="color: #0000FF;">Round</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">this</span>.<span style="color: #0000FF;">targetWidth</span> <span style="color: #008000;">/</span> ImgRatio, <span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">else</span>
<span style="color: #0600FF;">return</span> ImageUtils.<span style="color: #0000FF;">CreateThumbnail</span><span style="color: #000000;">&#40;</span>s, <span style="color: #008000;">new</span> <span style="color: #000000;">System.<span style="color: #0000FF;">Drawing</span></span>.<span style="color: #0000FF;">Size</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span><span style="color: #000000;">&#41;</span>Math.<span style="color: #0000FF;">Round</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">this</span>.<span style="color: #0000FF;">targetHeight</span> <span style="color: #008000;">*</span> ImgRatio, <span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span>, <span style="color: #0600FF;">this</span>.<span style="color: #0000FF;">targetHeight</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0600FF;">return</span> null<span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.sebastianvogelsang.com/2009/06/04/scaling-images-to-fit-a-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NightTunes &#8211; a plugin for iTunes that shuts down your PC</title>
		<link>http://www.sebastianvogelsang.com/2009/04/09/nighttunes-a-plugin-for-itunes-that-shuts-down-your-pc/</link>
		<comments>http://www.sebastianvogelsang.com/2009/04/09/nighttunes-a-plugin-for-itunes-that-shuts-down-your-pc/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 11:15:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[shut down]]></category>
		<category><![CDATA[sleep timer]]></category>
		<category><![CDATA[standby]]></category>
		<category><![CDATA[turn off]]></category>

		<guid isPermaLink="false">http://www.sebastianvogelsang.com/?p=149</guid>
		<description><![CDATA[I released a new iTunes plugin on http://www.earlybirdapplications.com today: NightTunes, a simple plugin for iTunes that can automatically shutdown, hibernate or send your PC to standby at the end of a playlist.
If you, like me, enjoy listening to a good audiobook while dozing off to dreamland, but don&#8217;t want to leave your computer running throughout [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><img style="margin: 5px; float: left;" src="http://www.earlybirdapplications.com/uploads/Image/icon-nighttunes.png" alt="" width="128" height="128" />I released a new iTunes plugin on <a href="http://www.earlybirdapplications.com" target="_blank">http://www.earlybirdapplications.com</a> today: <a href="http://www.earlybirdapplications.com/products/5-NightTunes" target="_blank"><strong>NightTunes</strong></a>, a simple plugin for iTunes that can automatically shutdown, hibernate or send your PC to standby at the end of a playlist.</p>
<p style="text-align: justify;">If you, like me, enjoy listening to a good audiobook while dozing off to dreamland, but don&#8217;t want to leave your computer running throughout the entire night&#8230;</p>
<p style="text-align: center;"><strong>NightTunes</strong> is for you!</p>
<p style="text-align: justify;">No more harddisk clatter noise or blowing CPU fans disturbing your sleep &#8230;plus you&#8217;re reducing your your energy bill and your carbon footprint <img src='http://www.sebastianvogelsang.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p style="text-align: justify;">Unlike other shutdown solutions, NightTunes does not depend on user-set timers to determine when to shutdown your PC. That way it is guaranteed that your computer won&#8217;t bail out on you right in the middle of your goodnight tale, only because you forgot to set the timer right.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastianvogelsang.com/2009/04/09/nighttunes-a-plugin-for-itunes-that-shuts-down-your-pc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Contact Alarm v.1.0 released</title>
		<link>http://www.sebastianvogelsang.com/2009/02/25/contact-alarm-v10-released/</link>
		<comments>http://www.sebastianvogelsang.com/2009/02/25/contact-alarm-v10-released/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 20:45:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[contact alarm]]></category>
		<category><![CDATA[contacts]]></category>
		<category><![CDATA[notification]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[skype]]></category>
		<category><![CDATA[status]]></category>

		<guid isPermaLink="false">http://www.sebastianvogelsang.com/?p=117</guid>
		<description><![CDATA[
Today I released version 1.0 of my Skype plugin &#8220;Contact Alarm&#8221;. Amongst many new features like audio/video alarms and logging, it integrates with Snarl and allows for nice fade-in/fade-out status notification windows.
Check out http://www.earlybirdapplications.com for details.
]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" style="margin: 5px;" src="http://www.earlybirdapplications.com/uploads/Image/ca-icon.png" alt="" width="128" height="128" /><br />
Today I released version 1.0 of my Skype plugin &#8220;Contact Alarm&#8221;. Amongst many new features like audio/video alarms and logging, it integrates with <a href="http://www.fullphat.net/" target="_blank">Snarl</a> and allows for nice fade-in/fade-out status notification windows.</p>
<p>Check out <a href="http://www.earlybirdapplications.com" target="_blank">http://www.earlybirdapplications.com</a> for details.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastianvogelsang.com/2009/02/25/contact-alarm-v10-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NEW WEBSITE &#8211; http://earlybirdapplications.com</title>
		<link>http://www.sebastianvogelsang.com/2009/02/06/new-website-httpearlybirdapplicationscom/</link>
		<comments>http://www.sebastianvogelsang.com/2009/02/06/new-website-httpearlybirdapplicationscom/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 16:49:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[contact alarm]]></category>
		<category><![CDATA[earlybirdapplications]]></category>
		<category><![CDATA[flickrdrive]]></category>
		<category><![CDATA[iTunesSnarl]]></category>
		<category><![CDATA[notfication contacts]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[skype]]></category>
		<category><![CDATA[snarl]]></category>

		<guid isPermaLink="false">http://www.sebastianvogelsang.com/?p=108</guid>
		<description><![CDATA[For a while now I&#8217;ve been working on a platform to publish some of the software I&#8217;ve developed in the past (and that I will be developing in the future:-). Well, it was a long path, some people even doubted that, given my tendency to perfectionism, I would ever finish up on this&#8230;but after way [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><img class="alignleft" style="margin-right: 5px; margin-top: 3px;" src="http://farm4.static.flickr.com/3453/3258518878_36ddaa3b73_o.jpg" alt="" width="53" height="53" />For a while now I&#8217;ve been working on a platform to publish some of the software I&#8217;ve developed in the past (and that I will be developing in the future:-). Well, it was a long path, some people even doubted that, given my tendency to perfectionism, I would ever finish up on this&#8230;but after <span style="text-decoration: line-through;">way too many</span> several re-writes, platform switches and logo changes (big thanks to Tobi for the final one), today I proudly present to you (*drumroll*):</p>
<p style="text-align: center;"><img src="http://farm4.static.flickr.com/3111/3258519340_959af7393e_m.jpg" alt="" width="240" height="150" /></p>
<p style="text-align: center;"><a href="http://earlybirdapplications.com" target="_blank">http://earlybirdapplications.com</a></p>
<p>Come in, take a cookie and browse through the, yet, <span style="text-decoration: line-through;">sparse</span> exclusive product list!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastianvogelsang.com/2009/02/06/new-website-httpearlybirdapplicationscom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iTunesSnarl is Open Source now!</title>
		<link>http://www.sebastianvogelsang.com/2008/09/10/itunessnarl-is-open-source-now/</link>
		<comments>http://www.sebastianvogelsang.com/2008/09/10/itunessnarl-is-open-source-now/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 13:28:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[google code]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[iTunesSnarl]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[snarl]]></category>

		<guid isPermaLink="false">http://www.sebastianvogelsang.com/?p=76</guid>
		<description><![CDATA[Hey y&#8217;all,
I just released the source code of iTunesSnarl. It is available via Google Code. So if anyone out there could please fix the cover issues, I&#8217;d be more than happy  
Check it out here: http://code.google.com/p/itunessnarl/
]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" src="http://farm4.static.flickr.com/3154/2845078055_300e364620_m.jpg" alt="" width="93" height="93" />Hey y&#8217;all,</p>
<p>I just released the source code of iTunesSnarl. It is available via Google Code. So if anyone out there could please fix the cover issues, I&#8217;d be more than happy <img src='http://www.sebastianvogelsang.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Check it out here: <a href="http://code.google.com/p/itunessnarl/" target="_blank">http://code.google.com/p/itunessnarl/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastianvogelsang.com/2008/09/10/itunessnarl-is-open-source-now/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>iTunesSnarl 1.1 is out!</title>
		<link>http://www.sebastianvogelsang.com/2008/09/04/itunessnarl-11-is-out/</link>
		<comments>http://www.sebastianvogelsang.com/2008/09/04/itunessnarl-11-is-out/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 17:43:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[growl]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[iTunesSnarl]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[snarl]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.sebastianvogelsang.com/?p=68</guid>
		<description><![CDATA[Alright, I give up! Until someone explains to me, how to save the image, which that *beep*-ing iTunes Visual SDK function PlayerGetCurrentTrackCoverArt is supposed to return, this will remain a minor update:
Version 1.1, released 2008/09/04

The current song&#8217;s title is now displayed in the title of the snarl window.
The snarl window now also lists the artist&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" src="http://farm4.static.flickr.com/3285/2828520290_7a2140441b_o.jpg" alt="" width="250" height="64" />Alright, I give up! Until someone explains to me, how to save the image, which that *beep*-ing iTunes Visual SDK function <em>PlayerGetCurrentTrackCoverArt </em>is supposed to return, this will remain a minor update:</p>
<p><em>Version 1.1, released 2008/09/04</em></p>
<ul>
<li>The current song&#8217;s title is now displayed in the title of the snarl window.</li>
<li>The snarl window now also lists the artist&#8217;s album title (most of the time&#8230;.don&#8217;t know why it bails out sometimes).</li>
<li>Removed Snarl_CMD.exe and any dependencies to it.</li>
<li>Plugin now registers with Snarl and popups can be disabled via Snarl.</li>
</ul>
<p>I wish I could tell you that now the album cover is also displayed in the Snarl window, but as I said above, that proofs to be a little more difficult than expected. Any help is appreciated!</p>
<p>The installer can be downloaded <a href="http://earlybirdapplications.com/products/3-iTunesSnarl" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastianvogelsang.com/2008/09/04/itunessnarl-11-is-out/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>iTunes plugin for Snarl (Growl for Windows)</title>
		<link>http://www.sebastianvogelsang.com/2008/08/04/itunes-plugin-for-snarl-growl-for-windows/</link>
		<comments>http://www.sebastianvogelsang.com/2008/08/04/itunes-plugin-for-snarl-growl-for-windows/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 18:45:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[growl]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[iTunesSnarl]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[snarl]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.sebastianvogelsang.com/?p=51</guid>
		<description><![CDATA[
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;
Update: Go here for version 1.1
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;
Over the last weeks I&#8217;ve become a huge fan of Snarl, which is a Growl-like notfication system for Windows. With the appropriate plugin, applications like Firefox or Miranda can display user messages through Snarl, which only opens small &#8220;bubble&#8221; message boxes that close itself after a certain period of time. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://farm4.static.flickr.com/3188/2775083164_4412c9d79c_o.jpg" target="_blank"><img class="alignright" src="http://farm4.static.flickr.com/3188/2775083164_4412c9d79c_o.jpg" alt="" width="248" height="63" /></a></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p><strong>Update</strong>: Go <a href="http://www.sebastianvogelsang.com/2008/09/04/itunessnarl-11-is-out/">here </a>for version 1.1</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Over the last weeks I&#8217;ve become a huge fan of <a href="http://www.fullphat.net/" target="_blank">Snarl</a>, which is a <a href="http://growl.info/" target="_blank">Growl</a>-like notfication system for Windows. With the appropriate plugin, applications like Firefox or Miranda can display user messages through Snarl, which only opens small &#8220;bubble&#8221; message boxes that close itself after a certain period of time. This way the desktop isn&#8217;t cluttered with message windows that the user has to close by hand.</p>
<p>So far, the number of <a href="http://www.fullphat.net/extensions/index.html" target="_blank">extensions/plugins</a> that are available for Snarl is still small, but with the software below I&#8217;m doing my part to increase it <img src='http://www.sebastianvogelsang.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Since the only plugin for iTunes, <a href="http://f0vela.wordpress.com/category/ituny/" target="_blank">iTuny</a>, is more of a Launchy plugin than a Snarl plugin, and since I couldn&#8217;t get its Snarl component to work (maybe I didn&#8217;t try hard enough), I decided to give the iTunes SDK a try and developed my own plugin. You can download the installer below. When running the setup, the plugin will install itself to $Program Files$\iTunes\Plugins\iTunesSnarl\ from where iTunes will load it automatically whenever you launch it. So no need to start the plugin seperately (of course Snarl needs to be running). Just fire up iTunes and that&#8217;s it. From now on you will get a small bubble message showing you the current artist and track title whenever you skip from one track to another.</p>
<p><a href="http://www.earlybirdapplications.com/download/itunessnarl/setup.exe">Download it here</a></p>
<p>P.S.: I borrowed the Snarl_CMD.exe from the <a href="http://f0vela.wordpress.com/category/ituny/" target="_blank">iTuny</a> sources. f0vela, I hope you don&#8217;t mind!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastianvogelsang.com/2008/08/04/itunes-plugin-for-snarl-growl-for-windows/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Adding metadata (exif, iptc, xmp, etc.) to your image using .NET and the WPF</title>
		<link>http://www.sebastianvogelsang.com/2008/05/20/adding-metadata-exif-iptc-xmp-etc-to-your-image-using-net-and-the-wpf/</link>
		<comments>http://www.sebastianvogelsang.com/2008/05/20/adding-metadata-exif-iptc-xmp-etc-to-your-image-using-net-and-the-wpf/#comments</comments>
		<pubDate>Tue, 20 May 2008 14:35:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[bitmapmetadata]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[COMException]]></category>
		<category><![CDATA[PresentationCore.dll]]></category>
		<category><![CDATA[STA]]></category>
		<category><![CDATA[threads]]></category>
		<category><![CDATA[wpf]]></category>

		<guid isPermaLink="false">http://www.sebastianvogelsang.com/?p=49</guid>
		<description><![CDATA[Already a little while ago Robert postet some example code on how add meta data to images using the relatively new WPF.
After playing around with the code for a while, I got some weird exceptions thrown at me, e.g. &#8220;A first chance exception of type &#8216;System.Runtime.InteropServices.COMException&#8217; occurred in PresentationCore.dll&#8220;. Now, the only thing I had [...]]]></description>
			<content:encoded><![CDATA[<p>Already a little while ago <a href="http://blogs.msdn.com/rwlodarc/default.aspx">Robert</a> <a href="http://blogs.msdn.com/rwlodarc/archive/2007/07/18/using-wpf-s-inplacebitmapmetadatawriter.aspx">postet</a> <a href="http://www.rawweb.net/samples/UsingInPlaceBitmapMetadataWriter.zip">some example code</a> on how add meta data to images using the relatively new <a href="http://en.wikipedia.org/wiki/Windows_Presentation_Foundation">WPF</a>.</p>
<p>After playing around with the code for a while, I got some weird exceptions thrown at me, e.g. &#8220;<em>A first chance exception of type &#8216;System.Runtime.InteropServices.COMException&#8217; occurred in PresentationCore.dll</em>&#8220;. Now, the only thing I had changed was letting the tagging routine run in a seperate thread:</p>
<p><code>[STAThread]<br />
static void Main()<br />
{<br />
Thread t = new Thread(writeMetadata);<br />
t.Start();<br />
Application.Run(new Form1());<br />
}<br />
static void writeMetadata()<br />
{<br />
// write the metadata to the image here<br />
}<br />
</code></p>
<p>After searching the web for a while I found <a href="http://www.wiredprairie.us/journal/2007/04/extracting_thumbnails_from_a_j.html">an article</a> by Aaron who had run into similar problems. Apparently, WPF components cause some trouble when they&#8217;re executed outside a thread that doesn&#8217;t have its apartment state set to STA. Fortunately, Robert was kind enough to point me in the right direction. All you have to do is set the apartment state right and off you go with WPF components all over your threads <img src='http://www.sebastianvogelsang.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Thus, the Main() routine from above changes as follows:</p>
<p><code>[STAThread]<br />
static void Main()<br />
{<br />
Thread t = new Thread(writeMetadata);<br />
t.SetApartmentState(ApartmentState.STA);<br />
t.Start();<br />
Application.Run(new Form1());<br />
}</code></p>
<p>That&#8217;s all there is to it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastianvogelsang.com/2008/05/20/adding-metadata-exif-iptc-xmp-etc-to-your-image-using-net-and-the-wpf/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AppUpdater with Apache Server (without Web-DAV)</title>
		<link>http://www.sebastianvogelsang.com/2008/04/14/appupdater-with-apache-server-without-web-dav/</link>
		<comments>http://www.sebastianvogelsang.com/2008/04/14/appupdater-with-apache-server-without-web-dav/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 17:46:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[appupdater]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[dav]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[webdav]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.sebastianvogelsang.com/?p=48</guid>
		<description><![CDATA[What if you&#8217;re implementing an application in .NET (C#) that is supposed to automatically update itself once a new version comes out? Well, you have multiple options, some of which cost a lot of money, while others are free but come with certain restrictions, like being only compatible with an ISS or solely running in [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">What if you&#8217;re implementing an application in .NET (C#) that is supposed to automatically update itself once a new version comes out? Well, you have multiple options, some of which cost a lot of money, while others are free but come with certain restrictions, like being only compatible with an ISS or solely running in user space like <a href="http://de.wikipedia.org/wiki/ClickOnce">ClickOnce</a> apps.</p>
<p style="text-align: justify;">After searching for a solution for days, I stumbled upon <a href="http://windowsclient.net/articles//appupdater.aspx" target="_blank">AppUpdater</a>, which is a free .NET component that &#8220;<em>was written using the .NET Framework and enables you to make your application auto-updatable simply by dropping the component into your existing .NET applications and setting a few properties (ex. where to get updates from)</em>&#8220;. And indeed, it&#8217;s as easy as it sounds. Drag-and-drop the component on your application&#8217;s main form, configure the AppStart.config file and start your application by using the provided AppStart.exe. Then put an updated version into the according folder on your server and the AppUpdater component will take care of the rest. (if you cannot follow, read the AppUpdater article first <img src='http://www.sebastianvogelsang.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p style="text-align: justify;">Although step 5 of the walkthrough says that any Web-DAV enabled web server should suffice, I ran into trouble using an apache web server with the dav and dav-fs modules loaded. Apparently, you need an IIS, since it interprets DAV verbs a little different than its apache counterpart. While both the <code>CheckForFileUpdate()</code> and the <code>UpdateFile()</code> functions from the AppUpdater&#8217;s class &#8220;WebFileLoader.cs&#8221; work as expected, the client throws an exception in <code>GetDirectoryContents()</code>. It seems that the apache dav module has some problems with the <code>iscollection</code> and <code>displayname</code> tags of the request string since it returns the following response (e.g. for the file appupdater.dll):</p>
<p style="padding-left: 30px;"><code><br />
&lt;D:response xmlns:lp1=\"DAV:\" xmlns:lp2=\"http://apache.org/dav/props/\" xmlns:g0=\"DAV:\"&gt;<br />
&lt;D:href&gt;/update/1.0.0.1/appupdater.dll&lt;/D:href&gt;<br />
&lt;D:propstat&gt;<br />
&lt;D:prop&gt;&lt;lp1:getlastmodified&gt;Sat, 12 Apr 2008 00:30:16 GMT&lt;/lp1:getlastmodified&gt;&lt;/D:prop&gt;<br />
&lt;D:status&gt;HTTP/1.1 200 OK&lt;/D:status&gt;<br />
&lt;/D:propstat&gt;<br />
&lt;D:propstat&gt;<br />
&lt;D:prop&gt;<br />
&lt;g0:displayname /&gt;<br />
&lt;g0:iscollection /&gt;<br />
&lt;/D:prop&gt;<br />
&lt;D:status&gt;HTTP/1.1 404 Not Found&lt;/D:status&gt;<br />
&lt;/D:propstat&gt;<br />
&lt;/D:response&gt;</code></p>
<p style="text-align: justify;"><code>getlastmodified</code> returns the right timestamp, but both <code>displayname</code> and <code>iscollection</code> return a &#8220;404 Not Found&#8221; error. Now, I could&#8217;ve gotten into the DAV protocol, put my web server into debugging mode, TCP-dumped a couple of DAV requests and tried to build a proper request string, but then again there is actually no need to employ DAV for simple tasks like this. The simple HTTP protocol totally suffices in this situation. You just need to go a slightly different way:-) As initially implemented, the AppUpdater connects to the web server in the <code>GetDirectoryContents()</code> function and browses the directory to find and copy all the contained files to the client. &#8220;Directory Browsing&#8221; is a DAV feature, so we&#8217;ll have to improvise here.</p>
<p style="text-align: justify;">Let&#8217;s say I just released version 2.0.0.0 of my application (Former version was e.g. 1.0.0.0). According to step 5 of <a href="http://windowsclient.net/articles//appupdater.aspx" target="_blank">the article</a>, I simply need to create a new folder named &#8220;2.0.0.0&#8243; in my server&#8217;s root update directory and edit the UpdateVersion.xml file to point to this newly created dir. Instead of uploading all files from our release folder, we&#8217;ll zip them up and upload the resulting zip-file into the server&#8217;s &#8220;2.0.0.0&#8243; folder. That way our client only needs to download one file (via HTTP) and isn&#8217;t dependent upon the &#8220;Directory Browsing&#8221; feature. After downloading the zip-file we&#8217;ll just unpack it into the temp directory that the regular AppUpdater would have stored the downloaded files in and let it do its magic from there on.  It&#8217;s as simple as that, plus you only need to zip up and upload those files, which have changed between releases. The AppUpdater will copy all files, which it finds in the 1.0.0.0 but cannot find in the 2.0.0.0 folder to the latter folder. Unfortunately, this little hack doesn&#8217;t allow for auto-downloading of missing assemblies anymore (setting the AutoFileLoad option of the AppUpdater component to <code>true</code>), but then again users can just download the installer and re-install the app, if they accidently deleted any of the files in the app&#8217;s root folder.</p>
<p style="text-align: justify;">Now to get going and to enable the AppUpdater to work with your apache web server (without Web-DAV) you actually only need to modify one file. First download the the <a href="http://windowsclient.net/downloads/GDN/dotnetupdater.zip" target="_blank">.NET Application Updater Component package</a>, which includes the AppUpdater&#8217;s source code. Afterwards edit the file &#8220;WebFileLoader.cs&#8221;. Since  the <code>GetDirectoryContents()</code> function caused us so many headaches and we won&#8217;t need it anymore you can delete it entirely. Afterwards, replace the code of the function <code>CopyDirectory</code> with the following (most of which is copied from the <code>UpdateFile</code> function):</p>
<p style="padding-left: 30px;"><code><br />
Resource currentResource;<br />
int FileCount = 0;<br />
string newFilePath;<br />
if (!Directory.Exists(filePath))<br />
Directory.CreateDirectory(filePath);<br />
HttpWebResponse Response;<br />
HttpWebRequest Request = (HttpWebRequest)HttpWebRequest.Create(url);<br />
Request.Credentials = CredentialCache.DefaultCredentials;<br />
try<br />
{<br />
Response = (HttpWebResponse)Request.GetResponse();<br />
}<br />
catch (WebException e)<br />
{<br />
if (e.Response == null)<br />
{<br />
Debug.WriteLine("Error accessing Url " + url);<br />
throw;<br />
}<br />
HttpWebResponse errorResponse = (HttpWebResponse)e.Response;<br />
if (errorResponse.StatusCode == HttpStatusCode.NotModified)<br />
{<br />
e.Response.Close();<br />
return 0;<br />
}<br />
else<br />
{<br />
e.Response.Close();<br />
Debug.WriteLine("Error accessing Url " + url);<br />
throw;<br />
}<br />
}<br />
Stream respStream = null;<br />
string newPath = "";<br />
try<br />
{<br />
respStream = Response.GetResponseStream();<br />
newPath = filePath + Path.GetFileName((new Uri(url)).LocalPath);<br />
CopyStreamToDisk(respStream, newPath);<br />
DateTime d = System.Convert.ToDateTime(Response.GetResponseHeader("Last-Modified"));<br />
File.SetLastWriteTime(newPath, d);<br />
}<br />
catch (Exception)<br />
{<br />
Debug.WriteLine("APPMANAGER:  Error writing to:  " + filePath);<br />
throw;<br />
}<br />
finally<br />
{<br />
if (respStream != null)<br />
respStream.Close();<br />
if (Response != null)<br />
Response.Close();<br />
}<br />
// unzip files<br />
Shell32.ShellClass sc = new Shell32.ShellClass();<br />
Shell32.Folder srcFlder = sc.NameSpace(newPath);<br />
Shell32.Folder destFlder = sc.NameSpace(filePath);<br />
Shell32.FolderItems items = srcFlder.Items();<br />
destFlder.CopyHere(items, 20);<br />
File.Delete(newPath);<br />
return 1;</code></p>
<p style="text-align: justify;">(Sorry for the messy code. I couldn&#8217;t get Wordpress to indent it properly:-( In the last 7 lines we employ the Shell32 COM library to extract our zip file. To make this work, you need to add the correct reference. In your project, click on &#8220;Add Reference&#8221;, then on the &#8220;COM&#8221; tab in the opening dialog and then search for &#8220;Microsoft Shell Controls And Automation&#8221;. That&#8217;s the lib you want to add. Finally compile it and add the resulting .dlls to your project, although I would generally recommend adding the entire AppUpdater project to your solution and referencing it.</p>
<p style="text-align: justify;">Before we can test our new application, we need to create a new directory on our server (let&#8217;s assume the example from above and name it 2.0.0.0). Then go through the article&#8217;s steps 1-4 and do everything as told, build your application, zip up the new files (to e.g. app.zip) and upload the zip file to the 2.0.0.0 directory on the server. Afterwards, edit the UpdateVersion.xml file as follows:</p>
<p style="padding-left: 30px;"><code>&lt;VersionConfig&gt;<br />
&lt;AvailableVersion&gt;2.0.0.0&lt;/AvailableVersion&gt;<br />
&lt;ApplicationUrl&gt;http://your.web.server/your_update_dir/2.0.0.0/app.zip&lt;/ApplicationUrl&gt;<br />
&lt;/VersionConfig&gt;</code></p>
<p style="text-align: justify;">It&#8217;s very important to mention here that with the modifications you made, you now need to give the FULL PATH to your zip file within the ApplicationUrl tags, not just the directory as before.</p>
<p style="text-align: justify;">Last but not least, fire up your client and let it automatically update itself!</p>
<p style="text-align: justify;">That&#8217;s it! Hope it works for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastianvogelsang.com/2008/04/14/appupdater-with-apache-server-without-web-dav/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
