[JEDI.NET-commits] main/run Jedi.IO.IniFiles.pas,1.5,1.6
Status: Pre-Alpha
Brought to you by:
jedi_mbe
From: Marcel B. <jed...@us...> - 2005-06-16 13:15:26
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30595/main/run Modified Files: Jedi.IO.IniFiles.pas Log Message: * Adapted to changes in ScheduledEvents Index: Jedi.IO.IniFiles.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.IO.IniFiles.pas,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Jedi.IO.IniFiles.pas 29 Mar 2005 18:31:15 -0000 1.5 --- Jedi.IO.IniFiles.pas 16 Jun 2005 13:15:17 -0000 1.6 *************** *** 37,41 **** Jedi.System.SourceVersioning, Jedi.System.Strings, ! Jedi.Timers.EventScheduler; {$ENDREGION} --- 37,42 ---- Jedi.System.SourceVersioning, Jedi.System.Strings, ! Jedi.Timers.EventScheduler, ! Jedi.Timers.Schedules; {$ENDREGION} *************** *** 526,531 **** {$REGION 'Protected methods'} strict protected ! procedure AutoFlushHandler(event: ScheduledEvent); ! procedure AutoReloadHandler(event: ScheduledEvent); procedure FlushImpl; function NeedFlush: Boolean; --- 527,532 ---- {$REGION 'Protected methods'} strict protected ! procedure AutoFlushHandler(event: ScheduledEventBase); ! procedure AutoReloadHandler(event: ScheduledEventBase); procedure FlushImpl; function NeedFlush: Boolean; *************** *** 612,617 **** FPath := path; ReloadImpl(True); ! FAutoFlushEvent := ScheduledEvent.Create(0, AutoFlushHandler); ! FAutoReloadEvent := ScheduledEvent.Create(0, AutoReloadHandler); Self.AutoFlushInterval := autoFlushInterval; Self.AutoReloadInterval := autoReloadInterval; --- 613,618 ---- FPath := path; ReloadImpl(True); ! FAutoFlushEvent := ScheduledEvent.Create(nil, AutoFlushHandler); ! FAutoReloadEvent := ScheduledEvent.Create(nil, AutoReloadHandler); Self.AutoFlushInterval := autoFlushInterval; Self.AutoReloadInterval := autoReloadInterval; *************** *** 628,632 **** end; ! procedure BufferedIniFile.AutoFlushHandler(event: ScheduledEvent); begin Monitor.Enter(Self); --- 629,633 ---- end; ! procedure BufferedIniFile.AutoFlushHandler(event: ScheduledEventBase); begin Monitor.Enter(Self); *************** *** 639,643 **** end; ! procedure BufferedIniFile.AutoReloadHandler(event: ScheduledEvent); begin Monitor.Enter(Self); --- 640,644 ---- end; ! procedure BufferedIniFile.AutoReloadHandler(event: ScheduledEventBase); begin Monitor.Enter(Self); *************** *** 682,687 **** procedure BufferedIniFile.Dispose; begin ! FAutoReloadEvent.Interval := 0; ! FAutoFlushEvent.Interval := 0; if HasChanges then FlushImpl; --- 683,688 ---- procedure BufferedIniFile.Dispose; begin ! FAutoReloadEvent.Schedule := nil; ! FAutoFlushEvent.Schedule := nil; if HasChanges then FlushImpl; *************** *** 713,722 **** function BufferedIniFile.get_AutoFlushInterval: Integer; begin ! Result := FAutoFlushEvent.Interval div 10000; end; function BufferedIniFile.get_AutoReloadInterval: Integer; begin ! Result := FAutoReloadEvent.Interval div 10000; end; --- 714,723 ---- function BufferedIniFile.get_AutoFlushInterval: Integer; begin ! Result := MillisecondSchedule(FAutoFlushEvent.Schedule).Interval end; function BufferedIniFile.get_AutoReloadInterval: Integer; begin ! Result := MillisecondSchedule(FAutoReloadEvent.Schedule).Interval; end; *************** *** 808,812 **** raise ArgumentOutOfRangeException.Create('AutoFlushInterval', MscorlibResources.GetResourceString('ArgumentOutOfRange_NeedNonNegNum')); ! FAutoFlushEvent.Interval := 10000 * value; end; --- 809,813 ---- raise ArgumentOutOfRangeException.Create('AutoFlushInterval', MscorlibResources.GetResourceString('ArgumentOutOfRange_NeedNonNegNum')); ! FAutoFlushEvent.Schedule := MillisecondSchedule.Create(value); end; *************** *** 816,820 **** raise ArgumentOutOfRangeException.Create('AutoReloadInterval', MscorlibResources.GetResourceString('ArgumentOutOfRange_NeedNonNegNum')); ! FAutoReloadEvent.Interval := 10000 * value; end; --- 817,821 ---- raise ArgumentOutOfRangeException.Create('AutoReloadInterval', MscorlibResources.GetResourceString('ArgumentOutOfRange_NeedNonNegNum')); ! FAutoReloadEvent.Schedule := MillisecondSchedule.Create(value); end; |