A WPF Countdown Timer in PowerShell 2.0

Well, it’s been awhile since I posted anything, and this causes me angst. I’ve been spending all of my time lately on PoshCode.org — not writing content, but working on a new Asp.Net MVC-based back-end (on codeplex) — but in the meantime, this month PoshCode.org finally passed this site’s raw pageview count, and it made me realized I hadn’t posted anything in a long time.

I have a whole stack of PowerBoots demos that I’ve been promising various people that I would post, so I figure I really ought to start putting them up, even if I don’t feel like I have time to properly explain them.

A few in particular don’t need much explaining, so lets start with a couple of those. A while back I wrote a kitchen timer function in response to Hal Rottenberg’s one liner and recently I had cause to pull that out to help my kids take turns playing computer games on Up to Ten … but I needed something a little more visible for their sake.

So I converted my old script to a new PowerBoots-based version with large numbers and a gradient brush that slides across and turns the whole thing to red text as the end of the time get’s closer and closer:

Similar Posts:

    None Found

2 responses to “A WPF Countdown Timer in PowerShell 2.0”

  1. David Mohundro

    Very cool!

    I had to remove the BitmapEffect from line 122 to get it to work on my machine, though. I was getting an error about ‘OuterGlowBitmapEffect’ not being recognized. Works great on my machine without it though!