Changeset 581 for Common/RegistryEx.pas
- Timestamp:
- Dec 10, 2024, 4:50:34 PM (12 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/RegistryEx.pas
r571 r581 36 36 function ReadFloatWithDefault(const Name: string; 37 37 DefaultValue: Double): Double; 38 function ReadDateTimeWithDefault(const Name: string; DefaultValue: TDateTime): TDateTime; 38 39 function DeleteKeyRecursive(const Key: string): Boolean; 39 40 function OpenKey(const Key: string; CanCreate: Boolean): Boolean; … … 110 111 end; 111 112 113 function TRegistryEx.ReadDateTimeWithDefault(const Name: string; 114 DefaultValue: TDateTime): TDateTime; 115 begin 116 if ValueExists(Name) then Result := ReadDateTime(Name) 117 else begin 118 WriteDateTime(Name, DefaultValue); 119 Result := DefaultValue; 120 end; 121 end; 122 112 123 function TRegistryEx.DeleteKeyRecursive(const Key: string): Boolean; 113 124 var
Note:
See TracChangeset
for help on using the changeset viewer.