Ignore:
Timestamp:
Jul 19, 2012, 8:16:57 AM (12 years ago)
Author:
chronos
Message:
  • Added: Information text about completion of build process including elapsed time.
File:
1 edited

Legend:

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

    r65 r66  
    88  SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
    99  ComCtrls, ExtCtrls, SynEdit, SynHighlighterPas,
    10   UProject, FileUtil, Menus, ActnList,
    11   UFormTargetCode, UFormCodeTree, UGeneralRegistry, UApplicationInfo;
     10  UProject, FileUtil, Menus, ActnList, DateUtils,
     11  UFormTargetCode, UFormCodeTree, UGeneralRegistry;
    1212
    1313type
     
    146146    procedure ProducerProcessOutput(Text: string);
    147147  public
    148     procedure LoadFromRegistry(Root: Integer; Key: string);
    149     procedure SaveToRegistry(Root: Integer; Key: string);
     148    procedure LoadFromRegistry(Root: Integer; const Key: string);
     149    procedure SaveToRegistry(Root: Integer; const Key: string);
    150150    procedure OpenRecentClick(Sender: TObject);
    151151    function GetSource(Name: string; var SourceCode: string): Boolean;
     
    165165  UFormTargets, UTarget, UExecutor, UFormProjectNew,
    166166  UFormTargetProject, UFormExternalProducerOutput;
     167
     168resourcestring
     169  SBuildFinished = 'Build finished in %s seconds';
    167170
    168171{ TFormMain }
     
    192195      Compiler.Compile;
    193196      TargetProject.Files.LoadFromList(Compiler.TargetFiles.Files);
    194       TargetProject.MainSource := TProjectFile(TargetProject.Files.First);
     197      if TargetProject.Files.Count > 0 then
     198        TargetProject.MainSource := TProjectFile(TargetProject.Files.First);
    195199      FormTargetProject.UpdateInterface;
    196200
     
    203207    end;
    204208    FormProject.TreeViewProjectChange(Self, FormProject.TreeViewProject.Selected);
     209    Compiler.ErrorMessage(Format(SBuildFinished, [FloatToStrF(Compiler.ElapsedTime / OneSecond, ffGeneral, 3, 10)]), Point(0, 0), '');
    205210    FormMessages.Reload;
    206211  end;
     
    397402end;
    398403
    399 procedure TFormMain.LoadFromRegistry(Root: Integer; Key: string);
     404procedure TFormMain.LoadFromRegistry(Root: Integer; const Key: string);
    400405begin
    401406  with TGeneralRegistry.Create(nil) do
     
    414419end;
    415420
    416 procedure TFormMain.SaveToRegistry(Root: Integer; Key: string);
     421procedure TFormMain.SaveToRegistry(Root: Integer; const Key: string);
    417422begin
    418423  with TGeneralRegistry.Create(nil) do
Note: See TracChangeset for help on using the changeset viewer.