private void buttonOK_Click(object sender, RoutedEventArgs e)
        {
            if (cbEndWorkday.IsChecked.Value)
            {
                WorkdayHandler.WorkdayEnd(pickerEndTime.Value.Value);
            }

            if (cbStartWorkday.IsChecked.Value)
            {
                WorkdayHandler.WorkdayStart(UserData.getWorkDuration(), pickerStartTime.Value.Value);
                UserData.setLastLockTime(DateTime.Now);
            }

            Close();
        }
Ejemplo n.º 2
0
 private void SessionSwitch(object sender, SessionSwitchEventArgs e)
 {
     ////logoff or shutdown or locked
     if (e.Reason == SessionSwitchReason.SessionLogoff || e.Reason == SessionSwitchReason.SessionLock)
     {
         //Save the Lock timestamp
         UserData.setLastLockTime(DateTime.Now);
     }
     ////startup or logon or unlock
     else if (e.Reason == SessionSwitchReason.SessionLogon || e.Reason == SessionSwitchReason.SessionUnlock)
     {
         ////startup or logon or unlock
         VerifySessionState();
     }
 }