// Handles clocking in private void ClockIn() { m_currentState = State.ClockedIn; ClockToggle_Button.Text = "Clock Out"; m_miniForm.SetButtonText(ClockToggle_Button.Text); m_startTime = DateTime.Now; Main_Timer.Start(); }
// Handles clocking out private void ClockOut() { if (MessageBox.Show("Are you sure you want to clock out?", "Confirm", MessageBoxButtons.YesNo) == DialogResult.Yes) { m_currentState = State.ClockedOut; ClockToggle_Button.Text = "Clock In"; m_miniForm.SetButtonText(ClockToggle_Button.Text); m_endTime = DateTime.Now; Main_Timer.Stop(); WorkTimer_Label.Text = BreakTimer_Label.Text = "00:00:00"; FillOutTimesheet(); } }