1 |
tony |
143 |
{************************************************************************} |
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 ServicesLoginDlgUnit; |
30 |
|
|
|
31 |
|
|
{$mode objfpc}{$H+} |
32 |
|
|
|
33 |
|
|
interface |
34 |
|
|
|
35 |
|
|
uses |
36 |
|
|
{$IFDEF WINDOWS } |
37 |
|
|
Windows, |
38 |
|
|
{$ELSE} |
39 |
|
|
unix, |
40 |
|
|
{$ENDIF} |
41 |
|
|
SysUtils, Classes, Graphics, Controls, Dialogs, |
42 |
|
|
Forms, StdCtrls, ExtCtrls, Buttons, IB, IBDialogs; |
43 |
|
|
|
44 |
|
|
type |
45 |
|
|
{ TSvcLoginDlg } |
46 |
|
|
|
47 |
|
|
TSvcLoginDlg = class(TForm) |
48 |
|
|
Bevel1: TBevel; |
49 |
|
|
Button1: TButton; |
50 |
|
|
Button2: TButton; |
51 |
|
|
TargetCaption: TLabel; |
52 |
|
|
Label2: TLabel; |
53 |
|
|
Label3: TLabel; |
54 |
|
|
Password: TEdit; |
55 |
|
|
UserName: TEdit; |
56 |
|
|
ServiceName: TEdit; |
57 |
|
|
private |
58 |
|
|
{ private declarations } |
59 |
|
|
public |
60 |
|
|
{ public declarations } |
61 |
|
|
function ShowModal(var aServiceName, aUserName, aPassword: string |
62 |
|
|
): TModalResult; |
63 |
|
|
end; |
64 |
|
|
|
65 |
|
|
var SvcLoginDlg: TSvcLoginDlg; |
66 |
|
|
|
67 |
|
|
implementation |
68 |
|
|
|
69 |
|
|
{$R *.lfm} |
70 |
|
|
|
71 |
|
|
{ TSvcLoginDlg } |
72 |
|
|
|
73 |
|
|
function TSvcLoginDlg.ShowModal(var aServiceName, aUserName, aPassword: string |
74 |
|
|
): TModalResult; |
75 |
|
|
begin |
76 |
|
|
ServiceName.Text := aServiceName; |
77 |
|
|
UserName.Text := aUserName; |
78 |
|
|
Password.Text := ''; |
79 |
|
|
Result := inherited ShowModal; |
80 |
|
|
if Result = mrOK then |
81 |
|
|
begin |
82 |
|
|
aServiceName := ServiceName.Text; |
83 |
|
|
aUserName := UserName.Text; |
84 |
|
|
aPassword := Password.Text; |
85 |
|
|
end; |
86 |
|
|
end; |
87 |
|
|
|
88 |
|
|
|
89 |
|
|
end. |