Changeset 108 for trunk/Packages


Ignore:
Timestamp:
Dec 10, 2024, 12:06:43 AM (3 months ago)
Author:
chronos
Message:
  • Added: Tools - Score menu action to show history of previously played games with score information.
Location:
trunk/Packages/Common
Files:
4 added
2 edited

Legend:

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

    r102 r108  
    190190  I: Integer;
    191191begin
     192  Result := Default(TStringArray);
    192193  SetLength(Result, GetEnvironmentVariableCount);
    193194  for I := 0 to GetEnvironmentVariableCount - 1 do
  • trunk/Packages/Common/RegistryEx.pas

    r89 r108  
    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.