- Timestamp:
- Aug 9, 2012, 9:46:09 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/ULastOpenedList.pas
r393 r402 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(Context: TRegistryContext); 26 procedure SaveToRegistry(Context: TRegistryContext); 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(Context: TRegistryContext); 90 90 var 91 91 I: Integer; … … 96 96 with Registry do 97 97 try 98 RootKey := Root;99 OpenKey( Key, True);98 RootKey := Context.RootKey; 99 OpenKey(Context.Key, True); 100 100 Items.Clear; 101 101 I := 0; … … 112 112 end; 113 113 114 procedure TLastOpenedList.SaveToRegistry( Root: HKEY; Key: string);114 procedure TLastOpenedList.SaveToRegistry(Context: TRegistryContext); 115 115 var 116 116 I: Integer; … … 120 120 with Registry do 121 121 try 122 RootKey := Root;123 OpenKey( Key, True);122 RootKey := Context.RootKey; 123 OpenKey(Context.Key, True); 124 124 for I := 0 to Items.Count - 1 do 125 125 WriteString('File' + IntToStr(I), UTF8Decode(Items[I]));
Note:
See TracChangeset
for help on using the changeset viewer.