Sunday, August 14, 2011

Clock Revisited

I went for a walk, leaving my house at 6:30 AM. The morning air was slightly cool. As I crossed an intersection, I felt and smelled a warm, moist, slightly perfumed current of air. Someone was running a clothes dryer and it wasn’t even 7 AM yet. Laundry is a chore that awaits me today. But right now, it’s too early to think about laundry.

I took my Clock program I wrote about previously and tinkered with it. Now it’s an alarm clock and it looks like this. (Well, by default it does.)

I can change how it looks. If I right-click the clock, a context menu appears which allows me to choose any color for the digits as well as a new skin. For example, blue digits and a chrome skin look like:

Clicking the “A” button brings up the alarm dialog that allows me to specify the time of day for the alarm, as well as daily, weekday, weekend, or one-time options. The alarm dialog also lets me choose a sound for the alarm. It was supposed to be a two day project but I spent three days on it. On day one, I wrote the code for the clock. A lot of that involved designing how the segments worked. On day two, I added the alarm functionality. On day three, I created a Help file and an About box, and I created the chrome skin and tweaked the graphics and debugged the code.

It was an enjoyable little project. I guess I’ll add it to my library of free software. But first I have to create a setup program that will check for and install the necessary runtime software for people who are still using Windows XP. Then I’ll upload it to my website for the world to enjoy. Or more likely, three or four people.

No comments: