1 |
tony |
1 |
{************************************************************************}
|
2 |
|
|
{ }
|
3 |
|
|
{ Borland Delphi Visual Component Library }
|
4 |
|
|
{ InterBase Express core components }
|
5 |
|
|
{ }
|
6 |
|
|
{ Copyright (c) 1998-2000 Inprise Corporation }
|
7 |
|
|
{ }
|
8 |
|
|
{ InterBase Express is based in part on the product }
|
9 |
|
|
{ Free IB Components, written by Gregory H. Deatz for }
|
10 |
|
|
{ Hoagland, Longo, Moran, Dunst & Doukas Company. }
|
11 |
|
|
{ Free IB Components is used under license. }
|
12 |
|
|
{ }
|
13 |
|
|
{ The contents of this file are subject to the InterBase }
|
14 |
|
|
{ Public License Version 1.0 (the "License"); you may not }
|
15 |
|
|
{ use this file except in compliance with the License. You }
|
16 |
|
|
{ may obtain a copy of the License at http://www.Inprise.com/IPL.html }
|
17 |
|
|
{ Software distributed under the License is distributed on }
|
18 |
|
|
{ an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either }
|
19 |
|
|
{ express or implied. See the License for the specific language }
|
20 |
|
|
{ governing rights and limitations under the License. }
|
21 |
|
|
{ The Original Code was created by InterBase Software Corporation }
|
22 |
|
|
{ and its successors. }
|
23 |
|
|
{ Portions created by Inprise Corporation are Copyright (C) Inprise }
|
24 |
|
|
{ Corporation. All Rights Reserved. }
|
25 |
|
|
{ Contributor(s): Jeff Overcash, James Thorpe }
|
26 |
|
|
{ }
|
27 |
|
|
{************************************************************************}
|
28 |
|
|
|
29 |
|
|
unit IBEventsEditor;
|
30 |
|
|
|
31 |
tony |
5 |
{$MODE Delphi}
|
32 |
|
|
|
33 |
tony |
1 |
interface
|
34 |
|
|
|
35 |
|
|
uses
|
36 |
tony |
5 |
SysUtils, {Windows,} Messages, Classes, Graphics, Controls,
|
37 |
|
|
Forms, Dialogs, ExtCtrls, StdCtrls, Grids, IBEvents, LResources;
|
38 |
tony |
1 |
|
39 |
|
|
type
|
40 |
tony |
5 |
|
41 |
|
|
{ TIBEventsEditor }
|
42 |
|
|
|
43 |
tony |
1 |
TIBEventsEditor = class(TForm)
|
44 |
|
|
Panel1: TPanel;
|
45 |
|
|
Panel2: TPanel;
|
46 |
|
|
cEvents: TStringGrid;
|
47 |
|
|
RequestedEvents: TLabel;
|
48 |
|
|
bOK: TButton;
|
49 |
|
|
bCancel: TButton;
|
50 |
|
|
procedure FormCreate(Sender: TObject);
|
51 |
tony |
5 |
procedure Panel1Click(Sender: TObject);
|
52 |
tony |
1 |
private
|
53 |
|
|
{ Private declarations }
|
54 |
|
|
public
|
55 |
|
|
{ Public declarations }
|
56 |
|
|
end;
|
57 |
|
|
|
58 |
|
|
function EditAlerterEvents( Events: TStrings): Boolean;
|
59 |
|
|
|
60 |
|
|
implementation
|
61 |
|
|
|
62 |
|
|
|
63 |
|
|
function EditAlerterEvents( Events: TStrings): Boolean;
|
64 |
|
|
var
|
65 |
|
|
i: integer;
|
66 |
|
|
begin
|
67 |
|
|
result := false;
|
68 |
|
|
with TIBEventsEditor.Create(Application) do
|
69 |
|
|
begin
|
70 |
|
|
try
|
71 |
|
|
for i := 0 to Events.Count-1 do
|
72 |
|
|
cEvents.Cells[1, i] := Events[i];
|
73 |
tony |
5 |
if ShowModal = mrOk then
|
74 |
tony |
1 |
begin
|
75 |
|
|
result := true;
|
76 |
|
|
Events.Clear;
|
77 |
|
|
for i := 0 to MaxEvents-1 do
|
78 |
|
|
if length( cEvents.Cells[1, i]) <> 0 then
|
79 |
|
|
Events.Add( cEvents.Cells[1, i]);
|
80 |
|
|
end;
|
81 |
|
|
finally
|
82 |
|
|
Free;
|
83 |
|
|
end;
|
84 |
|
|
end;
|
85 |
|
|
end;
|
86 |
|
|
|
87 |
|
|
procedure TIBEventsEditor.FormCreate(Sender: TObject);
|
88 |
|
|
var
|
89 |
|
|
i: integer;
|
90 |
|
|
begin
|
91 |
|
|
for i := 1 to MaxEvents do
|
92 |
|
|
cEvents.Cells[0, i-1] := IntToStr( i);
|
93 |
|
|
end;
|
94 |
|
|
|
95 |
tony |
5 |
procedure TIBEventsEditor.Panel1Click(Sender: TObject);
|
96 |
|
|
begin
|
97 |
|
|
|
98 |
|
|
end;
|
99 |
|
|
|
100 |
|
|
initialization
|
101 |
|
|
{$i IBEventsEditor.lrs}
|
102 |
|
|
|
103 |
tony |
1 |
end.
|