I’m trying to write a simple WPF application in C#. Coming from a primarily front-end web dev background, I’m sort of new to this, and I’d really like tips on where to start. 🙂 I’ve searched the internet for resources, but haven’t found anything yet which gives a more solid sense of direction in how I should approach the problem.
Basically, I’d like an application where I can click one button to “Check In” and save a timestamp, then another button to “Check Out” that saves another timestamp. I’d then like to be able to calculate how many total hours I’ve worked based on these timestamps.
Right now, I think the biggest problem I have is figuring out how/where to save the timestamp information. I’ve read stuff online on using a database, like SQLite, or something else called IsolatedStorage…
Any tips on how to tackle this would be super appreciated.
If you want to do it in WPF, which I don’t think is necessary (You can achieve the same thing with WinForms if it doesn’t need to look so nice), you can use one of these classes:
DateTimeStopWatchAs for the gui, well this is simple enough. Just add two buttons to the window.
Finally for storage, if you can store the data on your HD it will be simple to save it.
Otherwise SQL is an option:
http://www.codeproject.com/KB/database/sql_in_csharp.aspx