The Calendar and CalendarWithExceptions are used to create a WorkTimeSchedule from a string which defines the working/non-working days and working/non-working time.
Here is some example Calendar definition strings.
Calendar Name |
Calendar definition string |
8X5 Calendar |
MON 08:00:00 16:00:00;TUE 08:00:00 16:00:00;WED 08:00:00 16:00:00;THU 08:00:00 16:00:00;FRI 08:00:00 16:00:00;SAT 08:00:00 16:00:00 |
24X7 Calendar |
Mon 00:00:00 23:00:00;Tue 00:00:00 23:00:00;Wed 00:00:00 23:00:00;thu 00:00:00 23:00:00;fri 00:00:00 23:00:00;sat 00:00:00 23:00:00;sun 00:00:00 23:00:00; |
24X7 With Holidays |
Mon 00:00:00 23:00:00;Tue 00:00:00 23:00:00;Wed 00:00:00 23:00:00;thu 00:00:00 23:00:00;fri 00:00:00 23:00:00;sat 00:00:00 23:00:00;sun 00:00:00 23:00:00; HOL 2013-9-16;TeamOut:2013-9-18; |
The Calendar definition string holds the following information
Code Example
Calendar projectCalendar = new RadiantQ.Windows.Controls.Gantt.Calendar(/*Calendar Name */ "8X5 Calendar", /*Calendar Definition string*/ "MON 08:00:00 16:00:00;TUE 08:00:00 16:00:00;WED 08:00:00 16:00:00;THU 08:00:00 16:00:00;FRI 08:00:00 16:00:00;SAT 08:00:00 16:00:00"); //To create a work time schedule from Calendar from the above base calendar. WorkTimeSchedule workTimeSchedule = Calendar.CreateSchedule(baseCalendar); // This can then be assigned to the GanttControl's WorkTimeSchedule. |
CalendarWithExceptions
Used to define some exceptions (working days, non-working days, week days and week day times) that overrides a base calendar defined above.
Here is an example CalendarWithExceptions definition string.
WorkDaySpecific OT:2014-1-13 TimePeriod 08:00:00 20:00:00;OT:2015-5-23; NonWorkDaySpecific Meeting:2014-1-27;Meeting:2014-2-1;Meeting:2014-3-10; WeekDaySpecific Sun 00:00:00 1.00:00:00; |
The CalendarWithExceptions definition string holds the following information
Code Example
Calendar baseCalendar = new RadiantQ.Windows.Controls.Gantt.Calendar(/*Calendar Name */ "8X5 Calendar", /*Calendar Definition string*/ "MON 08:00:00 16:00:00;TUE 08:00:00 16:00:00;WED 08:00:00 16:00:00;THU 08:00:00 16:00:00;FRI 08:00:00 16:00:00;SAT 08:00:00 16:00:00"); CalendarWithExceptions expCalendar = new CalendarWithExceptions(/* base Calendar */baseCalendar, /*Calendar with Exceptions Definition string*/ "WorkDaySpecific OT:2014-1-13 TimePeriod 08:00:00 20:00:00;OT:2015-5-23; NonWorkDaySpecific Meeting:2014-1-27;Meeting:2014-2-1;Meeting:2014-3-10; WeekDaySpecific Sun 00:00:00 1.00:00:00;"); //To create a work time schedule from the above CalendarWithExceptions. WorkTimeSchedule workTimeSchedule = RadiantQ.Gantt.CalendarWithExceptions.CreateWorkTimeSchedule(expCalendar); |
© RadiantQ 2009 - 2019. All Rights Reserved.