From: Marcel B. <jed...@us...> - 2002-11-09 21:58:11
|
Update of /cvsroot/jvcl/dev/help In directory usw-pr-cvs1:/tmp/cvs-serv6102/dev/help Added Files: JvScheduledEvents.dtx Log Message: Documented JvScheduledEvents.pas --- NEW FILE: JvScheduledEvents.dtx --- @@JvScheduledEvents.pas <GROUP JVCL.FileRef> Summary Provides code and a component to schedule execution of events. <INCLUDE JVCL.UnitText.dtx> Author Marcel Bestebroer ---------------------------------------------------------------------------------------------------- @@TJvScheduledEvents ##JVCL:Component <GROUP JVCL.System.AlarmsAndTimers.Alarms> <TITLEIMG TJvCustomScheduledEvents> Summary Allows you to schedule execution of events using a recurring schedule. Description TJvScheduledEvents allows you to schedule execution of events based on a recurring schedule, much like the recurring appointments/tasks in Microsoft® Outlook® or the replication/job scheduler in Microsoft® SQL Server. The component uses the JclSchedule unit and it's interface to generate the execution times. For more information on scheduling posibilities, check out the help for JclSchedule. Components usage: * Drop a TJvScheduledEvents component on a form or a datamodule * Optionally specify if schedule states should be <LINK TJvCustomScheduledEvents.AutoSave, automatically saved/restored> when the application is terminated/started. * Optionally specify the <LINK TJvCustomScheduledEvents.AutoSave, registry key> to store/retrieve the schedule states. * Add some events (at design time using the component popup menu or the <LINK TJvCustomScheduledEvents.Events, events property>, specifying the <LINK TJvEventCollectionItem.Schedule, schedule> and the <LINK TJvEventCollectionItem.OnExecute, handler>; at run time by using <LINK TJvEventCollection.Add, Events.Add>). * Optionally assign handlers to to fire <LINK TJvCustomScheduledEvents.OnStartEvent, before> and/or <LINK TJvCustomScheduledEvents.OnEndEvent, after> an event is/has fired. ---------------------------------------------------------------------------------------------------- @@TJvCustomScheduledEvents Summary Base class for the TJvScheduleEvents component. Description TJvCustomScheduledEvents is the base class for the TJvScheduledEvents component. It provides the base functionalitiy but does not publish anything. You should not create an instance of this class. Use one of the descendants instead. See Also TJvScheduledEvents ---------------------------------------------------------------------------------------------------- @@TJvCustomScheduledEvents.AutoSave Summary Specifies if the component should save the event states when it is destroyed. Description AutoSave determines if the component stores all event states and last execution times in the registry when the component is destroyed (usually when the application terminates). When set to True, all event states and last execution times are saved to the location specified by the SaveTo property when the component is destroyed and are read back in from that location when the component is created. When set to False, no information is saved. See Also SaveTo ---------------------------------------------------------------------------------------------------- @@TJvCustomScheduledEvents.OnEndEvent Summary Event called when a scheduled events has been completed. Description Write an OnEndEvent handler to take special action when a scheduled event has just been executed. See Also OnStartEvent ---------------------------------------------------------------------------------------------------- @@TJvCustomScheduledEvents.OnStartEvent Summary Event called when a scheduled event is about to be executed. Description Write an OnStartEvent handler to take special action when a scheduled event is about to be executed. See Also OnEndEvent ---------------------------------------------------------------------------------------------------- @@TJvCustomScheduledEvents.SaveTo Summary Specifies the location where event states are stored to or retrieved from. Description SaveTo specifies where event states and last execution time should be saved to or retrieved from when AutoSave is True. SaveTo should point to a registry location. The string should be in the format <<B><I>HKEY_specifier</I>\</B>><B><I>path</I></B> where <I>HKEY_Specifier</I> specifies which root key to use and <I>path</I> specifies the path in that root key. <I>HKEY_Specifier</I> can be one of the following values: <TABLE> Value Alternate ===== ========= HKEY_CLASSES_ROOT HKCR HKEY_CURRENT_USER HKCU HKEY_LOCAL_MACHINE HKLM HKEY_USERS HKU HKEY_PERFORMANCE_DATA HKPD HKEY_CURRENT_CONFIG HKCC HKEY_DYN_DATA HKDD </TABLE> If you ommit the <I>HKEY_Specifier</I> when setting SaveTo <B>HKEY_CURRENT_USER</B> is assumed. See Also AutoSave ---------------------------------------------------------------------------------------------------- @@TJvCustomScheduledEvents.Handle Summary Window handle used by background thread to signal the execution of an event. Description Handle is the window handle to receives messages from the background thread to signal when an event should be executed. ---------------------------------------------------------------------------------------------------- @@TJvCustomScheduledEvents.Events Summary Holds a collection of events and their schedules. Description Events is a collection of events and their schedules. At run time you can iterate over the items to retrieve information on each of the event or add new events on the fly. At design time you can use the editor to add events and set the schedule for each of them. ---------------------------------------------------------------------------------------------------- @@TJvEventCollection Summary Maintains a list of scheduled events. Description TJvEventCollection maintains a list of scheduled events as used by TJvCustomScheduledEvents descendants. The collection will be populated with TJvEventCollectionItem objects. See Also TJvCustomScheduledEvents, TJvCustomScheduledEvents.Events, TJvEventCollectionItem ---------------------------------------------------------------------------------------------------- @@TJvEventCollectionItem Summary Represents a single scheduled event. Description TJvEventCollectionItem represents a single scheduled event. It allows you to specify: * if <LINK TJvEventCollectionItem.CountMissedEvents, missed events> since the last save or the start of the schedule should be counted. * the <LINK TJvEventCollectionItem.Name, name> to represent the event with. * the <LINK TJvEventCollectionItem.Schedule, (recurring) schedule> for the event. * the <LINK TJvEventCollectionItem.OnExecute, handler> for the event. ---------------------------------------------------------------------------------------------------- @@TJvEventCollectionItem.CountMissedEvents Summary Specifies if events missed since the start of the schedule or since the last saved state should be counted. Description CountMissedEvents determines if events that should have occured since the start of the schedule or since the last saved state should be counted. This could potentionally influence the ending of the schedule if it's end type is set to a specific day count and/or trigger count. If set to True events that should have occured are counted when determining the end of the schedule. If set to False events that should have occured are not counted when determining the end of the schedule. ---------------------------------------------------------------------------------------------------- @@TJvEventCollectionItem.Initialized Summary Determines if the scheduled event is initialized and is awaiting execution. Description Intialized determines if the scheduled event is properly initialized and ready to be triggered. If Initialized is True, the scheduled event is ready to be triggered. If Initialized is False, the scheduled event has not been properly initialized or it has ended. ---------------------------------------------------------------------------------------------------- @@TJvEventCollectionItem.Name Summary Represents the name of the scheduled event. Description Name represents the name of the scheduled event. It's main purpose is to identify different events at design time, but could be used also at run time to identify the various events. At design time when a new event is added it's given a unique name <within the component> based on the format <B>Event<I>n</I></B> when <I>n</I> is the lowest number (larger than 0) that makes the name unique. ---------------------------------------------------------------------------------------------------- @@TJvEventCollectionItem.NextFire Summary Determines the date and time at which the event is fired again. Description NextFire determines the timestamp at which the event will be fired again. If there are no more events, NextFire will hold NullStamp. ---------------------------------------------------------------------------------------------------- @@TJvEventCollectionItem.Schedule Summary Specifies the dates and times at which the event should fire. Description Schedule specifies at which dates and times the event should fire. Schedule uses the IJclSchedule interface as defined in the JclSchedule unit (JEDI Code Library) to represent a recurring schedule for the event. For full information on recurring schedules you should read the help for IJclSchedule. ---------------------------------------------------------------------------------------------------- @@TJvEventCollectionItem.LoadState Summary Initializes the schedule to a specific state. Description LoadState initializes the schedule state to the one specified by the input parameters. LoadState and SaveState are used by descendant components of TJvCustomScheduledEvent when its <LINK TJvCustomScheduledEvent.AutoSave, AutoSave> property is set to True. Parameters TriggerStamp - Timestamp of next event. DayCount - Number of days events have been triggered <B>after</B> the event specified by TriggerStamp is executed. TriggerCount - Number of events that have been triggered <B>after</B> the event specified by TriggerStamp is executed. See Also SaveState ---------------------------------------------------------------------------------------------------- @@TJvEventCollectionItem.OnExecute Summary Event to call at the preset dates and times. Description Write an OnExecute event handler to execute at the intervals specified by the Schedule property. The event will be executed in the context of the main VCL thread. ---------------------------------------------------------------------------------------------------- @@TJvEventCollectionItem.SaveState Summary Retrieves the current state of the schedule. Description SaveState retrieves the current state of the schedule and stores it in the parameters. LoadState and SaveState are used by descendant components of TJvCustomScheduledEvent when its <LINK TJvCustomScheduledEvent.AutoSave, AutoSave> property is set to True. Parameters TriggerStamp - Timestamp of next event. DayCount - Number of days events have been triggered <B>after</B> the event specified by TriggerStamp is executed. TriggerCount - Number of events that have been triggered <B>after</B> the event specified by TriggerStamp is executed. See Also LoadState ---------------------------------------------------------------------------------------------------- @@TJvEventCollectionItem.Start Summary Initializes the scheduled event. Description Start will initialize the scheduled event to its initial values. ---------------------------------------------------------------------------------------------------- @@TJvEventCollectionItem.Stop Summary Ends the scheduled event. Description Stop will end the schedule of the scheduled event. ---------------------------------------------------------------------------------------------------- |