Here is the code for the What Time Do I Leave Friday program I made. It is in C# and was made using Visual C# 2005, Express Edition.
(screenshot here)
I will not include the form designer code, it should be easy enough to make using the screenshot above and the code.
This is an early beta (while the title says Beta 1, it actually is about the third version in the beta 1 series, there are at least two or three more betas to go before final code).
The program takes the hours worked so far this week and the time the user shows up on Friday then gives the the time to leave Friday based on a standard 40 hour work week.
The program verifies the user entered a valid time, and if the entered military time on Friday, it can still figure it out. It will also figure things out if the entered decimal time (not the French version, but a minutes/60 version).
Known Bugs:
- If the user enters more then standard work week (for now 40 or more) it will give a box saying you are already over hours but continues to calculate hours. Attempts to clear the boxes doesn’t stop it from trying to perform the calculations.
Future enhancements:
- Allow the user to change the standard work week from 40 to something else.
- Allow the user to enter lunch time in on Friday. I don’t take lunches typically so it wasn’t included on this version.
Code has been removed from this page as it was way out of date. Sorry. Find other What Time Do I Leave Friday posts. If I repost the updated code, one of those posts will say.



Pingback: Brian A. Thomas .com · My First Semi-Practical C# Program