Ignore:
Timestamp:
Jul 30, 2012, 3:52:56 PM (12 years ago)
Author:
chronos
Message:
  • Added: Addon modules support.
  • Modified: Restored usage of URegistry unit.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IDE/Forms/UFormMain.pas

    r66 r68  
    77uses
    88  SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
    9   ComCtrls, ExtCtrls, SynEdit, SynHighlighterPas,
     9  ComCtrls, ExtCtrls, SynEdit, SynHighlighterPas, Registry,
    1010  UProject, FileUtil, Menus, ActnList, DateUtils,
    11   UFormTargetCode, UFormCodeTree, UGeneralRegistry;
     11  UFormTargetCode, UFormCodeTree, URegistry;
    1212
    1313type
     
    146146    procedure ProducerProcessOutput(Text: string);
    147147  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);
    150150    procedure OpenRecentClick(Sender: TObject);
    151151    function GetSource(Name: string; var SourceCode: string): Boolean;
     
    402402end;
    403403
    404 procedure TFormMain.LoadFromRegistry(Root: Integer; const Key: string);
    405 begin
    406   with TGeneralRegistry.Create(nil) do
     404procedure TFormMain.LoadFromRegistry(Root: HKEY; const Key: string);
     405begin
     406  with TRegistryEx.Create do
    407407    try
    408       CurrentRoot := Root;
     408      RootKey := Root;
    409409      OpenKey(Key, True);
    410410      if ValueExists('RightPanelWidth') then
     
    419419end;
    420420
    421 procedure TFormMain.SaveToRegistry(Root: Integer; const Key: string);
    422 begin
    423   with TGeneralRegistry.Create(nil) do
     421procedure TFormMain.SaveToRegistry(Root: HKEY; const Key: string);
     422begin
     423  with TRegistryEx.Create do
    424424    try
    425       CurrentRoot := Root;
     425      RootKey := Root;
    426426      OpenKey(Key, True);
    427427      WriteInteger('RightPanelWidth', PageControlRight.Width);
     
    477477begin
    478478  AProjectClose.Execute;
    479   Core.SaveToRegistry(Integer(Core.ApplicationInfo.RegistryRoot), Core.ApplicationInfo.RegistryKey);
     479  Core.SaveToRegistry(HKEY(Core.ApplicationInfo.RegistryRoot), Core.ApplicationInfo.RegistryKey);
    480480end;
    481481
     
    503503procedure TFormMain.FormShow(Sender: TObject);
    504504begin
    505   Core.LoadFromRegistry(Integer(Core.ApplicationInfo.RegistryRoot), Core.ApplicationInfo.RegistryKey);
     505  Core.LoadFromRegistry(HKEY(Core.ApplicationInfo.RegistryRoot), Core.ApplicationInfo.RegistryKey);
    506506  DockInit;
    507507  Core.ProjectTemplatesInit;
Note: See TracChangeset for help on using the changeset viewer.