TcxCustomSchedulerStorage.FindAvailableAllDay(TDateTime,TDateTime,Variant,Boolean,TDateTime) Method
Searches for free time blocks which can be used to schedule an all-day user event.
Declaration
function FindAvailableAllDay(var AStart: TDateTime; var AFinish: TDateTime; AResourceID: Variant; AExceptEventsWithoutResources: Boolean; ADuration: TDateTime = 0): Boolean;
Parameters
Name | Type |
---|---|
AStart | TDateTime |
AFinish | TDateTime |
AResourceID | Variant |
AExceptEventsWithoutResources | Boolean |
ADuration | TDateTime |
Returns
Type |
---|
Boolean |
Remarks
An all-day user event lasts at least 24 hours or longer. A free time block means the period of time which no user event is scheduled for.
Use the FindAvailableAllDay method when overlapping user events are not allowed (the TcxSchedulerEventOperations.Intersection property is set to False).
The AStart and AFinish parameters specify the time range that the search will be carried out for. By default, the specified time range is extended for 30 days (the end time of it). You can change the additional time period by specifying another value for the cxMaxCheckedDuration constant.
The AResourceID parameter specifies the unique identifier of the resource which the AEvent user event belongs to.
The AExceptEventsWithoutResources parameter specifies whether the scheduled time of the intersected user event, which is not assigned to any resource, will be treated as free time or occupied. Set the AExceptEventsWithoutResources parameter to False to skip the times scheduled by this type of user events. Note: a user event that doesn’t belong to any resource will be shown in the scheduling area if the TcxSchedulerOptionsView.ShowEventsWithoutResource property is set to True. Otherwise, it will be hidden.
The ADuration parameter specifies the desired time bounds of the user event.
The FindAvailableAllDay method returns a value of True if the search was successful.