I wasn't sure what to do for day four. I knew I wouldn't have a ton of time to work on it so it needed to be something short and sweet. That's when one of my closest friends, Chris Reeder, paid me a visit and told me to take a look at a comment he left for me on my blog. Chris runs a Web site you may know, StupidProgrammer.com. If not you should check it out.
I would like to recommend a mileage tracking application using a SQL CE database (had to get SQL into the app).
I decided this would be a great application for today. Unfortunately I multiple sets of unexpected visits from friends and family tonight and just about didn't have any time to sit down and knock this one out. But once I cut some features: SQL CE, metric support, stats graph, and the ability to compare MPG (etc) over time, it wasn't so hard. :D
Mileage Tracker
I think tomorrow I'll do an application of my own choosing, you guys can't have all the fun. But I'm glad for the participation. Thanks!
First thing to discuss is the design. There is some eye-candy but it is really minimum. Just a pretty background. Actually it is a background based on Windows Live Messenger's default theme. Just enough color to not be sterile.
First issue I ran into with this was transparent labels. The .NET Compact Framework for some reason does not support these. You can set it to transparent it just isn't implement and it doesn't do anything. The way I got around this was to following this guide: Alex Yakhnin - Transparent labels. (There's a minor typo: the Graphics grx object that is passed into the method is called gxOff inside the method. Just correct that and everything works great.) Very nice work-around Alex.
Not to the technical design: I had to decide what calculations I was going to support. I decided I wanted to do the following:
Gallons Per 100 Miles: no new information needed. (How many gallons does it take to make it 100 miles.)
Cost Per 100 Miles: I would have to also get price per gallon. (How much does it cost to travel 100 miles.)
Maximum Range: I would need the user to provide total gallons tank can hold. (How far could I travel on a full tank of gas.)
The menu has Clear, About, and Exit menu items that are all basically self explanatory.
I decided to break out the fields and calculations into a separate class called Mileage.
I almost forgot to make a custom icon for this application. I would have hated that. I really dislike the default icon and try to always replace it. Once again we take advantage of the custom string formatter in the .NET Compact Framework. By using .ToString("0.00") we always get numbers to two decimal places, versus huge unwieldy and unsightly values. Like I said, "short and sweet". I hope you like it.
I almost forgot to make a custom icon for this application. I would have hated that. I really dislike the default icon and try to always replace it.
Once again we take advantage of the custom string formatter in the .NET Compact Framework. By using .ToString("0.00") we always get numbers to two decimal places, versus huge unwieldy and unsightly values.
Like I said, "short and sweet". I hope you like it.
Download executable: mileageTracker.cab
Download Source Code: milesageTracker.zip
Feedback
So I think we are off to a great start. Today request is for reader to help spread the word and let others know about this resource. These are meant to be great resources for training and proof of the rapid application development power of .NET Compact Framework and Windows Mobile. So if you are enjoying this series and know someone else who might maybe you should let them know about us?
Theme design by Jelle Druyts
Pick a theme: BlogXP BlogXP business calmBlue Candid Blue dasBlog dasblogger DirectionalRedux Discreet Blog Blue Elegante essence Just Html MadsSimple Mobile Mono Movable Radio Blue Movable Radio Heat nautica022 orangeCream Portal Project84 Project84Grass Slate Sound Waves The Right Stuff 2.0 Tricoleur useit.com Voidclass2 BlogXP BlogXP business calmBlue Candid Blue dasBlog dasblogger DirectionalRedux Discreet Blog Blue Elegante essence Just Html MadsSimple Mobile Mono Movable Radio Blue Movable Radio Heat nautica022 orangeCream Portal Project84 Project84Grass Slate Sound Waves The Right Stuff 2.0 Tricoleur useit.com Voidclass2
Powered by: newtelligence dasBlog 2.0.7226.0
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2009, Chris Craft
E-mail