Changeset 9 for trunk/UDatabase.pas
- Timestamp:
- Jan 25, 2015, 9:41:26 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UDatabase.pas
r8 r9 125 125 procedure Load; virtual; 126 126 procedure Save; virtual; 127 procedure Clear; 127 128 property Engine: TDatabaseEngine read FEngine write SetEngine; 128 129 end; 129 130 131 { TDatabases } 132 130 133 TDatabases = class(TObjectList) 131 134 function FindByName(Name: string): TDatabase; 132 135 end; 133 136 … … 179 182 end; 180 183 184 TPreferences = class 185 RememberDatabase: Boolean; 186 LastDatabaseName: string; 187 end; 188 181 189 182 190 implementation … … 184 192 uses 185 193 UDataTypes; 194 195 { TDatabases } 196 197 function TDatabases.FindByName(Name: string): TDatabase; 198 var 199 I: Integer; 200 begin 201 I := 0; 202 while (I < Count) and (TDatabase(Items[I]).Name <> Name) do Inc(I); 203 if (I < Count) then Result := TDatabase(Items[I]) 204 else Result := nil; 205 end; 186 206 187 207 { TDatabaseClient } … … 465 485 end; 466 486 487 procedure TDatabase.Clear; 488 begin 489 Tables.Clear; 490 end; 491 467 492 end. 468 493
Note:
See TracChangeset
for help on using the changeset viewer.