Changeset 68 for trunk/IDE/Forms/UFormMain.pas
- Timestamp:
- Jul 30, 2012, 3:52:56 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IDE/Forms/UFormMain.pas
r66 r68 7 7 uses 8 8 SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, 9 ComCtrls, ExtCtrls, SynEdit, SynHighlighterPas, 9 ComCtrls, ExtCtrls, SynEdit, SynHighlighterPas, Registry, 10 10 UProject, FileUtil, Menus, ActnList, DateUtils, 11 UFormTargetCode, UFormCodeTree, U GeneralRegistry;11 UFormTargetCode, UFormCodeTree, URegistry; 12 12 13 13 type … … 146 146 procedure ProducerProcessOutput(Text: string); 147 147 public 148 procedure LoadFromRegistry(Root: Integer; const Key: string);149 procedure SaveToRegistry(Root: Integer; const Key: string);148 procedure LoadFromRegistry(Root: HKEY; const Key: string); 149 procedure SaveToRegistry(Root: HKEY; const Key: string); 150 150 procedure OpenRecentClick(Sender: TObject); 151 151 function GetSource(Name: string; var SourceCode: string): Boolean; … … 402 402 end; 403 403 404 procedure TFormMain.LoadFromRegistry(Root: Integer; const Key: string);405 begin 406 with T GeneralRegistry.Create(nil)do404 procedure TFormMain.LoadFromRegistry(Root: HKEY; const Key: string); 405 begin 406 with TRegistryEx.Create do 407 407 try 408 CurrentRoot:= Root;408 RootKey := Root; 409 409 OpenKey(Key, True); 410 410 if ValueExists('RightPanelWidth') then … … 419 419 end; 420 420 421 procedure TFormMain.SaveToRegistry(Root: Integer; const Key: string);422 begin 423 with T GeneralRegistry.Create(nil)do421 procedure TFormMain.SaveToRegistry(Root: HKEY; const Key: string); 422 begin 423 with TRegistryEx.Create do 424 424 try 425 CurrentRoot:= Root;425 RootKey := Root; 426 426 OpenKey(Key, True); 427 427 WriteInteger('RightPanelWidth', PageControlRight.Width); … … 477 477 begin 478 478 AProjectClose.Execute; 479 Core.SaveToRegistry( Integer(Core.ApplicationInfo.RegistryRoot), Core.ApplicationInfo.RegistryKey);479 Core.SaveToRegistry(HKEY(Core.ApplicationInfo.RegistryRoot), Core.ApplicationInfo.RegistryKey); 480 480 end; 481 481 … … 503 503 procedure TFormMain.FormShow(Sender: TObject); 504 504 begin 505 Core.LoadFromRegistry( Integer(Core.ApplicationInfo.RegistryRoot), Core.ApplicationInfo.RegistryKey);505 Core.LoadFromRegistry(HKEY(Core.ApplicationInfo.RegistryRoot), Core.ApplicationInfo.RegistryKey); 506 506 DockInit; 507 507 Core.ProjectTemplatesInit;
Note:
See TracChangeset
for help on using the changeset viewer.