private void mnuToDo_Click(object sender, EventArgs e) { // Opens frmToDo. frmToDo todo = new frmToDo(this); todo.ShowDialog(); }
public void tmrTime_Tick(object sender, EventArgs e) { // Updates the time, and, through other methods, reminders, to-dos, checks for scheduled work and break periods, and checks for manually-timed monitoring. // Input (this method): Strings that were allocated values/updated from the 'Load' method. // Output (this method): The current date and time displayed on the main screen, according to the user's settings. frmReminder reminder = new frmReminder(this); frmToDo todo = new frmToDo(this); if (boolShortDate) { if (boolMDY) { if (boolYearFirst) { strDateFormat = "ddd, " + "yyyy" + strDateSeparator + "MM" + strDateSeparator + "dd, " + strTime; } else { strDateFormat = "ddd, " + "MM" + strDateSeparator + "dd" + strDateSeparator + strYear + ", " + strTime; } } else { if (boolYearFirst) { strDateFormat = "ddd, " + "yyyy" + strDateSeparator + "dd" + strDateSeparator + "MM, " + strTime; } else { strDateFormat = "ddd, " + "dd" + strDateSeparator + "MM" + strDateSeparator + strYear + ", " + strTime; } } } else { strDateFormat = "dddd, dd MMMM yyyy, " + strTime; } lblDate.Text = DateTime.Now.ToString(strDateFormat); statistics.uintSessionLength++; statistics.uintTotalTime++; UpdateReminders(); UpdateToDos(); CheckForSchedules(sender, e); ManualMonitor(); CheckIfUnproductive(); TickStatTimes(); }