예제 #1
0
        public FormMain()
        {
            InitializeComponent();

            ThisDay      = new Shifts.Day(DateTime.Today);
            CurrentShift = NewShift();

            SetUpDataGridBinding();

            UpdateLabels();
        }
예제 #2
0
 Shift NewShift()
 {
     if (CurrentShift == null)
     {
         CurrentShift = ThisDay.Days;
     }
     else if (CurrentShift.ThisShift == Shift.DayOrNight.Nights)
     {
         ThisDay      = new Shifts.Day(ThisDay.Date.AddDays(1));
         CurrentShift = ThisDay.Days;
     }
     else
     {
         CurrentShift = ThisDay.Nights;
     }
     return(CurrentShift);
 }