Changeset 19 for trunk/Application
- Timestamp:
- Nov 15, 2012, 6:08:11 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 5 5 lib 6 6 Dochazka 7 ChronIS
-
- Property svn:ignore
-
trunk/Application/URegistredModules.pas
r12 r19 15 15 16 16 uses 17 U Core, UModuleAttendance;17 UModuleAttendance; 18 18 19 19 procedure RegisterModules(ModuleManager: TModuleManager); 20 20 begin 21 21 UnregisterModules(ModuleManager); 22 with Core.ModuleManager do22 with ModuleManager do 23 23 try 24 Module Manager.Modules.BeginUpdate;24 Modules.BeginUpdate; 25 25 RegisterModule(TModuleAttendance.Create(nil)); 26 26 finally 27 Module Manager.Modules.EndUpdate;27 Modules.EndUpdate; 28 28 end; 29 29 end; … … 32 32 var 33 33 I: Integer; 34 Module: TModule; 34 35 begin 36 with ModuleManager do 35 37 try 36 ModuleManager.Modules.BeginUpdate; 37 ModuleManager.Modules.Clear; 38 Modules.BeginUpdate; 39 for I := Modules.Count - 1 downto 0 do begin 40 Module := TModule(Modules[I]); 41 UnregisterModule(Module); 42 Module.Free; 43 end; 38 44 finally 39 Module Manager.Modules.EndUpdate;45 Modules.EndUpdate; 40 46 end; 41 47 end;
Note:
See TracChangeset
for help on using the changeset viewer.