Ignore:
Timestamp:
Jul 13, 2012, 1:49:52 PM (12 years ago)
Author:
chronos
Message:
  • Updated: Common package now contain TApplicationInfo class which contain various application info.
File:
1 edited

Legend:

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

    r54 r55  
    77uses
    88  SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
    9   UCompiler, Registry, ComCtrls, ExtCtrls, SynEdit, SynHighlighterPas,
     9  Registry, ComCtrls, ExtCtrls, SynEdit, SynHighlighterPas,
    1010  UProject, FileUtil, Menus, ActnList,
    11   UCoolTranslator, UFormTargetCode, UFormCodeTree, URegistry, ULastOpenedList, UApplicationInfo,
    12   UDebugLog;
    13 
    14 const
    15   RegistryRootKey = HKEY_CURRENT_USER;
     11  UFormTargetCode, UFormCodeTree, URegistry, UApplicationInfo;
    1612
    1713type
     
    164160uses
    165161  UCore, UFormMessages, UFormSourceCode, UFormProject, UCommon, UFormAbout, UFormOptions,
    166   UFormTargets, UTarget, UAnalyzer, UProducer, UExecutor, UFormProjectNew,
    167   UProjectTemplates, UFormTargetProject;
    168 
    169 resourcestring
    170   SNewProject = 'New project';
     162  UFormTargets, UTarget, UExecutor, UFormProjectNew,
     163  UFormTargetProject;
    171164
    172165{ TFormMain }
     
    441434  Title: string;
    442435begin
    443   Title := ApplicationInfo.Name;
     436  Title := Core.ApplicationInfo.AppName;
    444437  if Assigned(Core.Project) then begin
    445438    if Core.Project.FileName <> '' then Title := Core.Project.FileName + ' - ' + Title;
     
    452445begin
    453446  AProjectClose.Execute;
    454   Core.SaveToRegistry(RegistryRootKey, ApplicationInfo.RegistryKey);
     447  Core.SaveToRegistry(HKEY(Core.ApplicationInfo.RegistryRoot), Core.ApplicationInfo.RegistryKey);
    455448end;
    456449
    457450procedure TFormMain.FormCreate(Sender: TObject);
    458 var
    459   I: Integer;
    460451begin
    461452end;
     
    472463
    473464procedure TFormMain.FormShow(Sender: TObject);
    474 var
    475   NewProjectFile: TProjectFile;
    476 begin
    477   Core.LoadFromRegistry(RegistryRootKey, ApplicationInfo.RegistryKey);
     465begin
     466  Core.LoadFromRegistry(HKEY(Core.ApplicationInfo.RegistryRoot), Core.ApplicationInfo.RegistryKey);
    478467  DockInit;
    479468  Core.ProjectTemplatesInit;
     
    517506procedure TFormMain.AHomepageExecute(Sender: TObject);
    518507begin
    519   OpenWebPage(ApplicationInfo.HomePage);
     508  OpenWebPage(Core.ApplicationInfo.HomePage);
    520509end;
    521510
     
    526515
    527516procedure TFormMain.AProjectNewExecute(Sender: TObject);
    528 var
    529   NewFile: TProjectFile;
    530517begin
    531518  if FormProjectNew.ShowModal = mrOk then begin
Note: See TracChangeset for help on using the changeset viewer.