Changeset 68 for trunk/IDE/Forms


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.
Location:
trunk/IDE/Forms
Files:
2 edited

Legend:

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

    r66 r68  
    55  Width = 695
    66  Caption = 'Transpascal IDE'
    7   ClientHeight = 476
     7  ClientHeight = 482
    88  ClientWidth = 695
    99  Font.Height = -11
     
    2020    Left = 0
    2121    Height = 5
    22     Top = 471
     22    Top = 477
    2323    Width = 695
    2424    Align = alBottom
     
    8989    object ComboBoxTarget: TComboBox
    9090      Left = 230
    91       Height = 27
     91      Height = 21
    9292      Top = 2
    9393      Width = 100
    94       ItemHeight = 0
     94      ItemHeight = 13
    9595      OnChange = ComboBoxTargetChange
    9696      Style = csDropDownList
     
    105105  object Splitter1: TSplitter
    106106    Left = 490
    107     Height = 339
     107    Height = 345
    108108    Top = 26
    109109    Width = 5
     
    113113  object PageControlRight: TPageControl
    114114    Left = 495
    115     Height = 339
     115    Height = 345
    116116    Top = 26
    117117    Width = 200
     
    137137    Left = 0
    138138    Height = 101
    139     Top = 370
     139    Top = 376
    140140    Width = 695
    141141    ActivePage = TabSheetMessages
     
    155155    Left = 0
    156156    Height = 5
    157     Top = 365
     157    Top = 371
    158158    Width = 695
    159159    Align = alBottom
     
    162162  object PageControlMain: TPageControl
    163163    Left = 0
    164     Height = 339
     164    Height = 345
    165165    Top = 26
    166166    Width = 490
  • 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.