Changeset 5 for trunk/FormMain.pas


Ignore:
Timestamp:
Jul 8, 2024, 11:31:59 PM (5 months ago)
Author:
chronos
Message:
  • Added: Show source tab with source text which is automatically loaded on start and saved on close.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FormMain.pas

    r3 r5  
    1717    MemoSummary: TMemo;
    1818    MemoLog: TMemo;
     19    MemoSource: TMemo;
    1920    PageControlSummary: TPageControl;
    20     TabSheet1: TTabSheet;
     21    TabSheetSummary: TTabSheet;
     22    TabSheetSource: TTabSheet;
    2123    TabSheetLog: TTabSheet;
     24    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    2225    procedure FormCreate(Sender: TObject);
    2326    procedure FormDestroy(Sender: TObject);
     
    4043procedure TFormMain.FormShow(Sender: TObject);
    4144begin
     45  if FileExists(EditSource.Text) then
     46    MemoSource.Lines.LoadFromFile(EditSource.Text);
    4247  Summary.OnLog := Log;
    43   Summary.LoadFromFile(EditSource.Text);
     48  Summary.LoadFromStrings(MemoSource.Lines);
    4449  MemoSummary.Text := Summary.Print;
     50  //PageControlSummary.TabIndex := 1;
    4551end;
    4652
     
    5561end;
    5662
     63procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction);
     64begin
     65  MemoSource.Lines.SaveToFile(EditSource.Text);
     66end;
     67
    5768procedure TFormMain.FormDestroy(Sender: TObject);
    5869begin
Note: See TracChangeset for help on using the changeset viewer.