ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/design/IBEventsEditor.pas
Revision: 1
Committed: Mon Jul 31 16:43:00 2000 UTC (23 years, 8 months ago) by tony
Content type: text/x-pascal
File size: 3249 byte(s)
Log Message:
Borland IBX Open Source Release

File Contents

# Content
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 interface
32
33 uses
34 SysUtils, Windows, Messages, Classes, Graphics, Controls,
35 Forms, Dialogs, ExtCtrls, StdCtrls, Grids, IBEvents;
36
37 type
38 TIBEventsEditor = class(TForm)
39 Panel1: TPanel;
40 Panel2: TPanel;
41 cEvents: TStringGrid;
42 RequestedEvents: TLabel;
43 bOK: TButton;
44 bCancel: TButton;
45 procedure FormCreate(Sender: TObject);
46 private
47 { Private declarations }
48 public
49 { Public declarations }
50 end;
51
52 function EditAlerterEvents( Events: TStrings): Boolean;
53
54 implementation
55
56 {$R *.DFM}
57
58 function EditAlerterEvents( Events: TStrings): Boolean;
59 var
60 i: integer;
61 begin
62 result := false;
63 with TIBEventsEditor.Create(Application) do
64 begin
65 try
66 for i := 0 to Events.Count-1 do
67 cEvents.Cells[1, i] := Events[i];
68 if ShowModal = idOk then
69 begin
70 result := true;
71 Events.Clear;
72 for i := 0 to MaxEvents-1 do
73 if length( cEvents.Cells[1, i]) <> 0 then
74 Events.Add( cEvents.Cells[1, i]);
75 end;
76 finally
77 Free;
78 end;
79 end;
80 end;
81
82 procedure TIBEventsEditor.FormCreate(Sender: TObject);
83 var
84 i: integer;
85 begin
86 for i := 1 to MaxEvents do
87 cEvents.Cells[0, i-1] := IntToStr( i);
88 end;
89
90 end.