ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/examples/isqlmonitor/MonitorFormUnit.pas
Revision: 143
Committed: Fri Feb 23 12:11:21 2018 UTC (6 years, 2 months ago) by tony
Content type: text/x-pascal
File size: 1674 byte(s)
Log Message:
Fixes Merged

File Contents

# User Rev Content
1 tony 143 (*
2     * IBX For Lazarus (Firebird Express)
3     *
4     * The contents of this file are subject to the Initial Developer's
5     * Public License Version 1.0 (the "License"); you may not use this
6     * file except in compliance with the License. You may obtain a copy
7     * of the License here:
8     *
9     * http://www.firebirdsql.org/index.php?op=doc&id=idpl
10     *
11     * Software distributed under the License is distributed on an "AS
12     * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
13     * implied. See the License for the specific language governing rights
14     * and limitations under the License.
15     *
16     * The Initial Developer of the Original Code is Tony Whyman.
17     *
18     * The Original Code is (C) 2015 Tony Whyman, MWA Software
19     * (http://www.mwasoftware.co.uk).
20     *
21     * All Rights Reserved.
22     *
23     * Contributor(s): ______________________________________.
24     *
25     *)
26    
27 tony 31 unit MonitorFormUnit;
28    
29     {$mode objfpc}{$H+}
30    
31     interface
32    
33     uses
34     Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
35     IBSQLMonitor;
36    
37     type
38    
39     { TMonitorForm }
40    
41     TMonitorForm = class(TForm)
42     IBSQLMonitor1: TIBSQLMonitor;
43     Memo1: TMemo;
44     procedure FormShow(Sender: TObject);
45     procedure IBSQLMonitor1SQL(EventText: String; EventTime: TDateTime);
46     private
47     { private declarations }
48     public
49     { public declarations }
50     end;
51    
52     var
53     MonitorForm: TMonitorForm;
54    
55     implementation
56    
57     {$R *.lfm}
58    
59     { TMonitorForm }
60    
61     procedure TMonitorForm.IBSQLMonitor1SQL(EventText: String; EventTime: TDateTime);
62     begin
63 tony 33 Memo1.Lines.Add(FormatDateTime('dd/mm/yyyy hh:nn:ss.zzzz',EventTime) + ': ' + EventText);
64 tony 31 end;
65    
66     procedure TMonitorForm.FormShow(Sender: TObject);
67     begin
68     EnableMonitoring;
69     end;
70    
71     end.
72