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 |
< |
interface |
32 |
< |
|
33 |
< |
uses SysUtils, Windows, Messages, Classes, Graphics, Controls, |
34 |
< |
Forms, StdCtrls, ExtCtrls, DBLogDlg; |
35 |
< |
|
36 |
< |
function ServerLoginDialog(const AServerName: string; |
37 |
< |
var AUserName, APassword: string): Boolean; |
38 |
< |
|
39 |
< |
implementation |
40 |
< |
|
41 |
< |
function ServerLoginDialog(const AServerName: string; |
42 |
< |
var AUserName, APassword: string): Boolean; |
43 |
< |
begin |
44 |
< |
with TLoginDialog.Create(nil) do |
45 |
< |
try |
46 |
< |
Caption := 'InterBase Server Login'; |
47 |
< |
Label3.Caption := 'Server Name: '; |
48 |
< |
DatabaseName.Caption := AServerName; |
49 |
< |
UserName.Text := AUserName; |
50 |
< |
Result := False; |
51 |
< |
if AUserName = '' then ActiveControl := UserName; |
52 |
< |
if ShowModal = mrOk then |
53 |
< |
begin |
54 |
< |
AUserName := UserName.Text; |
55 |
< |
APassword := Password.Text; |
56 |
< |
Result := True; |
57 |
< |
end; |
58 |
< |
finally |
59 |
< |
Free; |
60 |
< |
end; |
61 |
< |
end; |
62 |
< |
|
63 |
< |
end. |
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 WINDOWS } |
37 |
> |
Windows, |
38 |
> |
{$ELSE} |
39 |
> |
unix, |
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 TIBXLoginDlg.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. |