PlexityHide

Home 

Products 

Downloads 

Our Shop 

Support 

Contact 


Saturday, June 11, 2011

BlockedTime-Extension a.k.a “NoWorkTime-Extension”

 

Background

A plan may contain spans of time where no work can be done. When putting activities inside such spans, or near such spans so that they extend into the span, the activity should be paused and continue after the span.

Requirements

Implementation

1

- For each TimeItemLayout you can associate a list of no work time intervals, i.e. a "no work calendar".

A new property “Calendars” has been added to Gantt. Calenders contains zero to many Calender objects. A Calendar objects contains zero to many CalendarEntry objects.

clip_image002

2

- The list can handle "one-off" and repeated intervals.

Each CalendarEntry has a Start and Stop date. CalenderEntries may also have a Frequency to handle repetitive intervals.

3

- If time items use a TimeItemLayout with a "no work calendar", the effective Stop will be calculated from the given length and contents of the "no work calendar" in such a way that the no work intervals that fall within the period from Start to Start+Length are added to the effective stop. This is done repeatedly until no no-work-intervals in the span from Start to effective Stop are missed.

clip_image004

In the picture above the TimeItem uses a TimeItemLayout that has a BlockedTimeCalendar set. The TimeItemLayout also has BlockedTimeCalculatedStop set to true; this gives the effect that the CalenderEntries that intersect with the TimeItem are added to the Stop property of the TimeItem.

In code you can go like this:

TimeItemLayout til_wta=gantt1.TimeItemLayouts.GetFromName("WorkTimeAware");

til_wta.BlockedTimeCalculatedStop=true;

til_wta.BlockedTimeCalendar = gantt1.Calendars[0];

4

- If a time item that uses a no work calendar is resized by drag of the Stop time, the resulting Length will be updated with the Value of Stop minus Start minus "all non working intervals between"

Implemented

5

- If a time item that uses a no work calendar is moved or resized by dragging the start end, the effective Stop will be recalculated.

Implemented

6

- If a time item that uses a no work calendar is moved or resized by dragging the start end in such a way that the Start time ends up in a "no work calendar" interval an action is triggered so that the developer can choose to move the whole time item to the end of the interval, or leave it to allow for the “no work calendar”-logic to extend the effective end to the far side of the interval.

A new event was added to handle this:

gantt1.OnTimeItem_StartMovedIntoBlockedTime += new TimeItemEvent(gantt1_OnTimeItem_StartMovedIntoNoWorkTime);

void gantt1_OnTimeItem_StartMovedIntoNoWorkTime(Gantt aGantt, TimeItemEventArgs e)

{

e.Allow=false;

}

Setting e.Allow=false like this will make the TimeItem “jump” to the end of the CalendarEntry.

7

- The areas for one single time item that falls within the intervals in the no-work-calendar can be reached from the time item.

clip_image006

As shown in the picture above the BlockingCalendarEntries for one time item can be reached from the TimeItem.

8

- The areas for one single time item that falls within the intervals in the no-work-calendar can be visualized by special drawing in the time item.

By setting the property BlockedTimeShow

clip_image008

clip_image010

You can toggle the visualization of the blocked time inside the TimeItem.

9

-The “no work calendar” intervals can be visualized in the GanttRow background like it is done in MS-project where a hatched band from top to bottom shows the non working time.

By setting the properties DrawnInDateScaler and DrawnInTimeItemArea in the CalendarEntry you control if the CalendarEntries show or not:

clip_image012 clip_image014


This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]

Support

Support intro

Knowledgebase

FAQ phGantTimePackage

FAQ GTP.NET

FAQ general

History