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 } |
26 |
|
|
{ } |
27 |
|
|
{************************************************************************} |
28 |
|
|
|
29 |
|
|
unit IBDialogs; |
30 |
|
|
|
31 |
tony |
5 |
{$Mode Delphi} |
32 |
|
|
|
33 |
tony |
1 |
interface |
34 |
|
|
|
35 |
tony |
5 |
uses |
36 |
|
|
{$IFDEF LINUX } |
37 |
|
|
unix, |
38 |
|
|
{$ELSE} |
39 |
|
|
Windows, |
40 |
|
|
{$ENDIF} |
41 |
|
|
SysUtils, Messages, Classes, Graphics, Controls, |
42 |
|
|
Forms, StdCtrls, ExtCtrls, dblogindlg; |
43 |
tony |
1 |
|
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 |
tony |
5 |
with TLoginDlg.Create(nil) do |
53 |
tony |
1 |
try |
54 |
tony |
5 |
Caption := 'Firebird Server Login'; |
55 |
tony |
1 |
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. |