![]() ![]() ![]() ![]() Gravitybox Schedule Primer
Page 27
1998-2004 Gravitybox Software LLC
parameter of an existing objects index or name and the new
name to give the object. If the new name already belongs to
another Provider object, an error is raised.
An important feature not to be overlooked is the
ExtraProperties collection. You may store any amount of
extra information using an appointment objects
ExtraProperties collection. This is a collection of name /
value pairs that be used to store anything. You may address
the collection by name or index to retrieve its associated value setting. You may not
need this functionality but if you have a large amount of information to store with a task
this collection is quite useful.
NoDropAreas
There are circumstances that require that certain area of a
schedule be blocked from creating and receiving
appointments. The NoDropAreas collection provides this
functionality. This is an added convenience for developers
so that they might not be required to write these
complicated routines themselves. The functionality essentially defines reserved areas of
a schedule.
If the user attempts to drag (move or copy) an appointment to a NoDrop zone, the
mouse will turn to a no-drop pointer to indicate that the appointment may not dropped.
When an appointments edge touches a NoDrop zone, the appointment will no longer
move, as this would move it into the reserved zone. If the user continues dragging until
the appointment has passed the zone, it will jump to the other side of the NoDrop zone.
There is no way to move an appointment or portion thereof into one of these zones.
There must be a valid portion of the schedule grid available for the entire length of the
appointment.
NOTE: Appointments may be scheduled in these zones by using the Add method of the
ScheduleItems collection, however the user may not drop appointments in these areas.
There is a way to determine with code, if an appointment slot is free. You may use the
GetNextFreeSlot method. This will be covered later in chapter 8.
There may be days that need to be invalid, for example weekends. A developer might
constructed a loop and walk through all the days on the schedule, check to see if the
date is a weekend day, and add it to this collection. The following code blocks the first
weekend in June 2002.
Call NoDropAreas.Add(#6/8/2002#)
Call NoDropAreas.Add(#6/9/2002#)
Quick Tip
You may store any number of
name/value pairs for each
appointment its ExtraProperties
collection. Use it to store any amount
of information.
Quick Tip
Mark areas on a schedule as
unavailable for appointment by using
the NoDropAreas collection.
Appointments cannot be added,
moved, or copied to these areas.
|