ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/runtime/IBDialogs.pas
Revision: 5
Committed: Fri Feb 18 16:26:16 2011 UTC (13 years, 9 months ago) by tony
Content type: text/x-pascal
File size: 2884 byte(s)
Log Message:
Committing updates for Release pre-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 }
26 { }
27 {************************************************************************}
28
29 unit IBDialogs;
30
31 {$Mode Delphi}
32
33 interface
34
35 uses
36 {$IFDEF LINUX }
37 unix,
38 {$ELSE}
39 Windows,
40 {$ENDIF}
41 SysUtils, Messages, Classes, Graphics, Controls,
42 Forms, StdCtrls, ExtCtrls, dblogindlg;
43
44 function ServerLoginDialog(const AServerName: string;
45 var AUserName, APassword: string): Boolean;
46
47 implementation
48
49 function ServerLoginDialog(const AServerName: string;
50 var AUserName, APassword: string): Boolean;
51 begin
52 with TLoginDlg.Create(nil) do
53 try
54 Caption := 'Firebird Server Login';
55 Label3.Caption := 'Server Name: ';
56 DatabaseName.Caption := AServerName;
57 UserName.Text := AUserName;
58 Result := False;
59 if AUserName = '' then ActiveControl := UserName;
60 if ShowModal = mrOk then
61 begin
62 AUserName := UserName.Text;
63 APassword := Password.Text;
64 Result := True;
65 end;
66 finally
67 Free;
68 end;
69 end;
70
71 end.