Changeset 45 for trunk/USystem.pas
- Timestamp:
- Mar 12, 2012, 10:23:40 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/USystem.pas
r44 r45 107 107 108 108 TChronisBase = class 109 private 110 FActive: Boolean; 111 procedure SetActive(AValue: Boolean); 112 public 109 113 Types: TChronisTypeList; 110 114 Client: TChronisClient; 111 //Database: TSqlDatabase;112 115 Modules: TListObject; // TListObject<TChronisModule> 113 116 ModuleSystem: TChronisModule; … … 143 146 constructor Create; 144 147 destructor Destroy; override; 148 property Active: Boolean read FActive write SetActive; 145 149 private 146 150 end; … … 266 270 end; 267 271 272 procedure TChronisBase.SetActive(AValue: Boolean); 273 begin 274 if FActive = AValue then Exit; 275 FActive := AValue; 276 if AValue then begin 277 Client.Connect; 278 if Client.Connected then begin 279 if IsDatabaseEmpty then ModuleSystem.Install; 280 LoadTypes; 281 end else FActive := False; 282 end else begin 283 Client.Disconnect; 284 FreeAndNil(Client); 285 Types.Clear; 286 end; 287 end; 288 268 289 procedure TChronisBase.RegisterModule(ModuleClass: TChronisModuleClass); 269 290 begin … … 664 685 Proxy.SchemaName := 'information_schema'; 665 686 Proxy.ObjectName := 'tables'; 666 Proxy.Condition := 'table_name = " Information" AND table_schema = "' +687 Proxy.Condition := 'table_name = "SystemModule" AND table_schema = "' + 667 688 Client.Schema + '"'; 668 689 Proxy.Load;
Note:
See TracChangeset
for help on using the changeset viewer.