1 |
unit MonitorFormUnit;
|
2 |
|
3 |
{$mode objfpc}{$H+}
|
4 |
|
5 |
interface
|
6 |
|
7 |
uses
|
8 |
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
9 |
IBSQLMonitor;
|
10 |
|
11 |
type
|
12 |
|
13 |
{ TMonitorForm }
|
14 |
|
15 |
TMonitorForm = class(TForm)
|
16 |
IBSQLMonitor1: TIBSQLMonitor;
|
17 |
Memo1: TMemo;
|
18 |
procedure FormShow(Sender: TObject);
|
19 |
procedure IBSQLMonitor1SQL(EventText: String; EventTime: TDateTime);
|
20 |
private
|
21 |
{ private declarations }
|
22 |
public
|
23 |
{ public declarations }
|
24 |
end;
|
25 |
|
26 |
var
|
27 |
MonitorForm: TMonitorForm;
|
28 |
|
29 |
implementation
|
30 |
|
31 |
{$R *.lfm}
|
32 |
|
33 |
{ TMonitorForm }
|
34 |
|
35 |
procedure TMonitorForm.IBSQLMonitor1SQL(EventText: String; EventTime: TDateTime);
|
36 |
begin
|
37 |
Memo1.Lines.Add(FormatDateTime('dd/mm/yyyy hh:nn:ss.zzzz',EventTime) + ': ' + EventText);
|
38 |
end;
|
39 |
|
40 |
procedure TMonitorForm.FormShow(Sender: TObject);
|
41 |
begin
|
42 |
EnableMonitoring;
|
43 |
end;
|
44 |
|
45 |
end.
|
46 |
|