Ignore:
Timestamp:
Dec 21, 2024, 12:47:18 PM (27 hours ago)
Author:
chronos
Message:
  • Modified: Improved dark theme support on Windows.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/RegistryEx.pas

    r315 r341  
    3636    function ReadFloatWithDefault(const Name: string;
    3737      DefaultValue: Double): Double;
     38    function ReadDateTimeWithDefault(const Name: string; DefaultValue: TDateTime): TDateTime;
    3839    function DeleteKeyRecursive(const Key: string): Boolean;
    3940    function OpenKey(const Key: string; CanCreate: Boolean): Boolean;
     
    110111end;
    111112
     113function TRegistryEx.ReadDateTimeWithDefault(const Name: string;
     114  DefaultValue: TDateTime): TDateTime;
     115begin
     116  if ValueExists(Name) then Result := ReadDateTime(Name)
     117    else begin
     118      WriteDateTime(Name, DefaultValue);
     119      Result := DefaultValue;
     120    end;
     121end;
     122
    112123function TRegistryEx.DeleteKeyRecursive(const Key: string): Boolean;
    113124var
Note: See TracChangeset for help on using the changeset viewer.