aboutsummaryrefslogtreecommitdiff
path: root/Source/logunit.pas
blob: 187684fea220d8d6281ef4c0d11f006c69ebc53f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
unit logunit;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ComCtrls, ExtCtrls;

type
  Tlog = class(TForm)
    PanelLog: TPanel;
    Panel2: TPanel;
    ButtonClear: TButton;
    RELog: TRichEdit;
    PanelConsole: TPanel;
    Panel1: TPanel;
    Panel3: TPanel;
    ButtonClose: TButton;
    procedure ButtonClearClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure ButtonCloseClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    procedure add(const s: String);
  end;

var
  log: Tlog;

implementation

uses mainunit;

{$R *.DFM}

procedure Tlog.add(const s: String);
begin
  RELog.Lines.Add(s);
end;

procedure Tlog.ButtonCloseClick(Sender: TObject);
begin
  main.MiLog.Click;
end;

procedure Tlog.ButtonClearClick(Sender: TObject);
begin
  main.REConsole.Lines.Clear;
  RELog.Lines.Clear;
end;

procedure Tlog.FormCreate(Sender: TObject);
begin
  main.REConsole.Parent := PanelConsole;
  main.REConsole.Align := alClient;
end;

end.