Exemplo n.º 1
0
 public week(day arg0, day arg1, day arg2, day arg3, day arg4)
 {
     monday    = arg0;
     tuesday   = arg1;
     wednesday = arg2;
     thursday  = arg3;
     friday    = arg4;
     days      = new List <day> {
         monday, tuesday, wednesday, thursday, friday
     };
 }
Exemplo n.º 2
0
        private void hourCalc_Load(object sender, EventArgs e)
        {
            // Initialize days
            day monday    = new day(monStartTime, monLunchStartTime, monLunchEndTime, monEndTime);
            day tuesday   = new day(tueStartTime, tueLunchStartTime, tueLunchEndTime, tueEndTime);
            day wednesday = new day(wedStartTime, wedLunchStartTime, wedLunchEndTime, wedEndTime);
            day thursday  = new day(thuStartTime, thuLunchStartTime, thuLunchEndTime, thuEndTime);
            day friday    = new day(friStartTime, friLunchStartTime, friLunchEndTime, friEndTime);

            currentWeek = new week(monday, tuesday, wednesday, thursday, friday);

            // Load data
            loadData();
        }
Exemplo n.º 3
0
        public double getDepartTimeOffsetDay(day weekday)
        {
            double morningHours   = (Helper.timeToNum(weekday.lunchStart.Time()) - Helper.timeToNum(weekday.start.Time()));
            double afternoonHours = (Helper.timeToNum(weekday.end.Time()) - Helper.timeToNum(weekday.lunchEnd.Time()));

            if (morningHours < 0 || afternoonHours < 0)
            {
                MessageBox.Show("Undefined Result, check that time values are chronological", "Doble Hour Calculator");
                return(-1.0);
            }
            double result = 8 - (morningHours + afternoonHours); // Hours per day does not change at the moment

            return(result);
        }