Changeset 66 for trunk/IDE/Forms


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

Legend:

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

    r65 r66  
    11object FormMain: TFormMain
    2   Left = 140
     2  Left = 202
    33  Height = 501
    4   Top = 52
     4  Top = 62
    55  Width = 695
    66  Caption = 'Transpascal IDE'
  • 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
  • trunk/IDE/Forms/UFormMessages.pas

    r57 r66  
    5454  with Core, FormMain, FormSourceCode do
    5555  with TErrorMessage(Compiler.ErrorMessages[Item.Index]) do begin
    56     Item.Caption := FileName;
     56    if FileName = '' then Item.Caption := ' '
     57      else Item.Caption := FileName;
    5758    Item.Data := Compiler.ErrorMessages[Item.Index];
    5859    Item.SubItems.Add(IntToStr(Position.X) + ',' + IntToStr(Position.Y));
     
    6970  with Core, FormSourceCode do
    7071  if Assigned(ListView1.Selected) then
    71   with TErrorMessage(ListView1.Selected.Data) do begin
     72  with TErrorMessage(ListView1.Selected.Data) do
     73  if FileName <> '' then begin
    7274    ProjectFile := Project.Files.SearchFile(FileName);
    7375    if Assigned(ProjectFile) then
Note: See TracChangeset for help on using the changeset viewer.