Archive for the 'development' Category

WmAutoUpdate – a .NET Compact Framework auto-update library

Posted by admin on September 23rd, 2009

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’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 IIS with ASP.NET on the server side, which I neither had, nor wanted to use.

So I took the weekend and coded a little library, which I call “WmAutoUpdate” (freely available on Github). 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.

Scaling images to fit a screen

Posted by admin on June 4th, 2009

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’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 (most phones let the user switch between landscape and portrait mode). The following code solves theses issues (IBitmapImage and ImageUtils are OpenNETCF classes):

private IBitmapImage scaleImageToDisplay(Image img, Stream s)
{
float ScreenRatio = this.targetWidth / (float)this.targetHeight;
float ImgRatio = img.Width / (float)img.Height;
 
if (ImgRatio > 1.0f)
{
if (ScreenRatio > ImgRatio)
return ImageUtils.CreateThumbnail(s, new System.Drawing.Size((int)Math.Round(this.targetHeight * ImgRatio, 0), this.targetHeight));
else
return ImageUtils.CreateThumbnail(s, new System.Drawing.Size(this.targetWidth, (int)Math.Round(this.targetWidth / ImgRatio, 0)));
}
else
{
if (ScreenRatio < ImgRatio)
return ImageUtils.CreateThumbnail(s, new System.Drawing.Size(this.targetWidth, (int)Math.Round(this.targetWidth / ImgRatio, 0)));
else
return ImageUtils.CreateThumbnail(s, new System.Drawing.Size((int)Math.Round(this.targetHeight * ImgRatio, 0), this.targetHeight));
}
 
return null;
}

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’t want to leave your computer running throughout the entire night…

NightTunes is for you!

No more harddisk clatter noise or blowing CPU fans disturbing your sleep …plus you’re reducing your your energy bill and your carbon footprint :-)

Contact Alarm v.1.0 released

Posted by admin on February 25th, 2009


Today I released version 1.0 of my Skype plugin “Contact Alarm”. 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.

NEW WEBSITE – http://earlybirdapplications.com

Posted by admin on February 6th, 2009

For a while now I’ve been working on a platform to publish some of the software I’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…but after way too many several re-writes, platform switches and logo changes (big thanks to Tobi for the final one), today I proudly present to you (*drumroll*):

http://earlybirdapplications.com

Come in, take a cookie and browse through the, yet, sparse exclusive product list!

iTunesSnarl is Open Source now!

Posted by admin on September 10th, 2008

Hey y’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’d be more than happy :-)

Check it out here: http://code.google.com/p/itunessnarl/

iTunesSnarl 1.1 is out!

Posted by admin on September 4th, 2008

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’s title is now displayed in the title of the snarl window.
  • The snarl window now also lists the artist’s album title (most of the time….don’t know why it bails out sometimes).
  • Removed Snarl_CMD.exe and any dependencies to it.
  • Plugin now registers with Snarl and popups can be disabled via Snarl.

iTunes plugin for Snarl (Growl for Windows)

Posted by admin on August 4th, 2008

———————————————————————————–

Update: Go here for version 1.1

———————————————————————————–

Over the last weeks I’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 “bubble” message boxes that close itself after a certain period of time. This way the desktop isn’t cluttered with message windows that the user has to close by hand.

So far, the number of extensions/plugins that are available for Snarl is still small, but with the software below I’m doing my part to increase it :-)

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. “A first chance exception of type ‘System.Runtime.InteropServices.COMException’ occurred in PresentationCore.dll“. Now, the only thing I had changed was letting the tagging routine run in a seperate thread:

[STAThread]
static void Main()
{
Thread t = new Thread(writeMetadata);
t.Start();
Application.Run(new Form1());
}
static void writeMetadata()
{
// write the metadata to the image here
}

AppUpdater with Apache Server (without Web-DAV)

Posted by admin on April 14th, 2008

What if you’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 ClickOnce apps.