Navigation bar
  Home Print document Start Previous page
 125 of 234 
Next page End  

Gravitybox Schedule Primer
Page 123 
1998-2004 Gravitybox Software LLC
well as the ScheduleItems collection, the appointments. The resolution of the select bar
scrolling is defined by the “SubIncrement” property. This must be less than or equal to
the ScheduleIncrement property. This is the smallest increment by which the select bars
will be moved when dragging. For example, if this value is set to 30, the user would find
that the defined area is rounded to 30 minute increments when dragging. As the user
moves the left select bar to the right, the SelectBarTime would move from “9:00” to
“9:30”, “10:00”, etc. The “ScheduleIncrement” property defines the time resolution
displayed on the top margin. If this value is set to 60 minutes then only hours will be
displayed in the top margin (“9:00”, “10:00”, etc) but with the SubIncrement set to 30 the
user may define an area of one hour from “9:30” and “10:30” with the select bars though
these times are not displayed on the top margin.
The most useful functionality of the control is to define an area to for appointment
creation. This is performed interactively with the user moving the select bars to define a
desired area, effectively to define a time block. The select bars identify a time slot that is
delineated by the “SelectBarDate”, “SelectBarTime”, and “SelectBarLength” properties.
These properties may be used by an application to create a default appointment on the
schedule control. This is not done automatically. You as the programmer have the
information needed to create an appointment and you must add the code to do so.
Since are as many add scenarios as there are software developers the
ScheduleSummary offers no predefined way to create an appointment. You may utilize
the user-defined information to generate an appointment, creation routine.
When the user moves the mouse over either of the select
bars, the mouse pointer will turn to a vertical scroll icon.
This informs the user that he may grab a bar to resize the
defined area. As the user scrolls the select bars left or right, changing the defined time
area, the “SelectionChanged” event is raised to inform the calling a container of this
state change. You may use this information to update screen information if necessary or
not use it at all if your application has no use of it. Instead of the user scrolling to define
an appointment area, you may provide functionality to the user that searches for the
next available time slot. This means that there are no appointments defined for any
displayed provider. You may use this functionality with the “SearchNextFreeSlot”
method. When called this method searches for the next available slot taking into
consideration all appointments on the schedule. If one is found, the selection bars are
updated, the view is scrolled to bring the defined area in viewing range, and the method
returns true. If an available area is not found before the end of the schedule (the
maximum defined date) then the control’s display does not change and the method
returns false. A limitation with using this control is that an increment that spans multiple
days will not be found using the “SearchNextFreeSlot” method. You may define a multi-
day increment using the select bars but this method will not find a “next” slot using the
current select bar information.
You may also capture clicks that occur when the user clicks on a provider’s name with
which you may wish to perform some action. When the user clicks on a provider’s
name, the “ProviderClick” event is raised. The index of the provider in the Providers
Quick Tip
Automatically search for an available
appointment slot with the
“SearchNextFreeSlot” method.
http://www.purepage.com