|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
Announcements
Chapters
Services
Feature Zones
|
IntroductionI had a problem, common to a lot of people, of reporting how I am spending my time during the day. I looked at many of the free time tracking programs out there and they didn't really fit my personal needs. So, being a programmer, I wrote a program that met my needs. I am posting it here in the hope that it can meet the needs of others as well. Personal Time Tracker ( Another reason (the main reason maybe?) I wrote The main features of this program are:
Using the ApplicationThis application does not have a main menu. It is controlled through context sensitive menus and some buttons. When minimized, you right click on the systray icon to access the menu. When the app is visible, you right click on the grid. The first thing you will need to do is set up your customers and tasks. To set up customers click on the Customer List... button and set up tasks by clicking on the Task List... button. Click on the blank line in each of the dialogs to add a new entry. Once you have customers and tasks, then you can start tracking your time against them. The easiest way to do that is to right click in the data grid and select a customer from the context menu and then select a task from the customer sub-menu. You can temporarily stop tracking time against the current activity by checking the Pause check box. When you come back to work on that activity you can uncheck the pause check box and an interruption time will be added from when you paused the activity until when you unpaused it. Or, after pausing an activity you may decide to start a different activity. In that case an interruption is inserted into the paused activity and a new activity is started. If you modify the start and end time of an activity log entry, then the other log entries will adjust to account for the new time entered. For example, if you change the stop time to be after the start time of the next log entry then the next log entry's start time will be adjusted to be just after to the edited log's end time. Data FilesThe activity logs are stored in XML files with a different file for each month. This way you can archive off old data as desired. If you wish to view the time logs for that month again, you can simply place those files back in the directory with the application again. About the Code
DataGridViewMemoCellI had a lot of information to display in the PositionEditingPanel method.
The actual cell edit control is called A Note About Shared Sub-MenusIt is important to understand when sharing a sub-menu between more than one parent menu that you can't do it....but you can imitate it. Having Esc Minimize the ApplicationI wanted to very easily hide ReportsI wanted to have reports that showed a summary of activity. I decided that using the .NET printing hooks would be the easiest way to accomplish this. So I wrote a dialog to host a LimitedStack<T>I needed a stack to hold the undo information but I wanted to limit the number of elements that could be in that stack. So I wrote the Detecting StandBy ModeI had a problem of forgetting to click the Done with Task button before putting my laptop into StandBy mode when leaving for the day. So, I added code to detect when the computer is entering stand by mode and to clear the current task and save. This is accomplished by using the private void OnPowerModeChanged(object sender,
Microsoft.Win32.PowerModeChangedEventArgs e)
{
if (_clearOnStandyCheckBox.Checked
&& e.Mode == Microsoft.Win32.PowerModes.Suspend
&& null != m_currentActivity)
{
// Update Time
m_currentActivity.StopTime = DateTime.Now;
// Going into standby mode so clear current event
m_currentActivity = null;
// Save latest changes
m_isDirty = !LogFileManager.SaveDataFile();
}
}
History17th April, 2008: 1.0.0.2 - First posted version 11th August 2008: 1.0.0.3
|
||||||||||||||||||||||