Пример #1
0
 public void VerifySessionState()
 {
     //If LastLockTime is not today
     if (!UserData.getLastLockTime().Date.Equals(DateTime.Now.Date))
     {
         //Raise the event
         OnWorkdayEvent();
     }
 }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            DateTime dtTempNow = DateTime.Now;

            if (!WorkdayHandler.getIsStarted())
            {
                Title = "First daily logon detected - No workday active";
                cbEndWorkday.IsEnabled  = false;
                cbEndWorkday.IsChecked  = false;
                pickerEndTime.IsEnabled = false;
                pickerStartTime.Value   = dtTempNow;
            }
            else
            {
                Title = "First daily logon detected - Workday on '" + UserData.getLastLockTime().ToShortDateString() + "' still active";
                pickerStartTime.Value = dtTempNow;
                pickerEndTime.Value   = UserData.getLastLockTime();
            }
        }