- Timestamp:
- Jul 18, 2012, 4:13:05 PM (12 years ago)
- Location:
- Common
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/Common.lpk
r387 r390 91 91 <RequiredPkgs Count="3"> 92 92 <Item1> 93 <PackageName Value="RegistryPkg"/> 93 <PackageName Value="GeneralRegistry"/> 94 <MinVersion Minor="1" Valid="True"/> 94 95 </Item1> 95 96 <Item2> -
Common/StopWatch.pas
r358 r390 22 22 function GetElapsed: string; 23 23 public 24 constructor Create(const startOnCreate 24 constructor Create(const startOnCreate: Boolean = False) ; 25 25 procedure Start; 26 26 procedure Stop; 27 property IsHighResolution 28 property ElapsedTicks 29 property ElapsedMiliseconds 30 property Elapsed 31 property IsRunning 27 property IsHighResolution: Boolean read fIsHighResolution; 28 property ElapsedTicks: TLargeInteger read GetElapsedTicks; 29 property ElapsedMiliseconds: TLargeInteger read GetElapsedMiliseconds; 30 property Elapsed: string read GetElapsed; 31 property IsRunning: Boolean read fIsRunning; 32 32 end; 33 33 -
Common/UApplicationInfo.pas
r387 r390 6 6 7 7 uses 8 SysUtils, Registry2, Classes, Forms, URegistry;8 SysUtils, Classes, Forms, UGeneralRegistry; 9 9 10 10 type … … 74 74 FAppName := Application.Name; 75 75 FRegistryKey := '\Software\' + FAppName; 76 FRegistryRoot := rr KeyCurrentUser;76 FRegistryRoot := rrApplicationUser; 77 77 end; 78 78 -
Common/ULastOpenedList.pas
r387 r390 6 6 7 7 uses 8 Classes, SysUtils, Registry2, URegistry, Menus;8 Classes, SysUtils, UGeneralRegistry, Menus; 9 9 10 10 type … … 23 23 destructor Destroy; override; 24 24 procedure LoadToMenuItem(MenuItem: TMenuItem; ClickAction: TNotifyEvent); 25 procedure LoadFromRegistry(Root: HKEY;Key: string);26 procedure SaveToRegistry(Root: HKEY;Key: string);25 procedure LoadFromRegistry(Root: Integer; const Key: string); 26 procedure SaveToRegistry(Root: Integer; const Key: string); 27 27 procedure AddItem(FileName: string); 28 28 published … … 87 87 end; 88 88 89 procedure TLastOpenedList.LoadFromRegistry(Root: HKEY;Key: string);89 procedure TLastOpenedList.LoadFromRegistry(Root: Integer; const Key: string); 90 90 var 91 91 I: Integer; 92 Registry: T RegistryEx;92 Registry: TGeneralRegistry; 93 93 FileName: string; 94 94 begin 95 Registry := T RegistryEx.Create;95 Registry := TGeneralRegistry.Create(nil); 96 96 with Registry do 97 97 try 98 RootKey:= Root;98 CurrentRoot := Root; 99 99 OpenKey(Key, True); 100 100 Items.Clear; 101 101 I := 0; 102 102 while ValueExists('File' + IntToStr(I)) and (I < MaxCount) do begin 103 FileName := UTF8Encode(ReadStringWithDefault('File' + IntToStr(I), '')); 103 if ValueExists('File' + IntToStr(I)) then 104 FileName := UTF8Encode(ReadString('File' + IntToStr(I))) 105 else FileName := ''; 104 106 if Trim(FileName) <> '' then Items.Add(FileName); 105 107 Inc(I); … … 112 114 end; 113 115 114 procedure TLastOpenedList.SaveToRegistry(Root: HKEY;Key: string);116 procedure TLastOpenedList.SaveToRegistry(Root: Integer; const Key: string); 115 117 var 116 118 I: Integer; 117 Registry: T RegistryEx;119 Registry: TGeneralRegistry; 118 120 begin 119 Registry := T RegistryEx.Create;121 Registry := TGeneralRegistry.Create(nil); 120 122 with Registry do 121 123 try 122 RootKey:= Root;124 CurrentRoot := Root; 123 125 OpenKey(Key, True); 124 126 for I := 0 to Items.Count - 1 do
Note:
See TracChangeset
for help on using the changeset viewer.