--- ibx/trunk/runtime/IBDialogs.pas 2013/02/28 16:56:14 16 +++ ibx/trunk/runtime/IBDialogs.pas 2013/12/28 19:22:24 17 @@ -1,71 +1,71 @@ -{************************************************************************} -{ } -{ Borland Delphi Visual Component Library } -{ InterBase Express core components } -{ } -{ Copyright (c) 1998-2000 Inprise Corporation } -{ } -{ InterBase Express is based in part on the product } -{ Free IB Components, written by Gregory H. Deatz for } -{ Hoagland, Longo, Moran, Dunst & Doukas Company. } -{ Free IB Components is used under license. } -{ } -{ The contents of this file are subject to the InterBase } -{ Public License Version 1.0 (the "License"); you may not } -{ use this file except in compliance with the License. You } -{ may obtain a copy of the License at http://www.Inprise.com/IPL.html } -{ Software distributed under the License is distributed on } -{ an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either } -{ express or implied. See the License for the specific language } -{ governing rights and limitations under the License. } -{ The Original Code was created by InterBase Software Corporation } -{ and its successors. } -{ Portions created by Inprise Corporation are Copyright (C) Inprise } -{ Corporation. All Rights Reserved. } -{ Contributor(s): Jeff Overcash } -{ } -{************************************************************************} - -unit IBDialogs; - -{$Mode Delphi} - -interface - -uses -{$IFDEF WINDOWS } - Windows, -{$ELSE} - unix, -{$ENDIF} - SysUtils, Messages, Classes, Graphics, Controls, - Forms, StdCtrls, ExtCtrls, dblogindlg; - -function ServerLoginDialog(const AServerName: string; - var AUserName, APassword: string): Boolean; - -implementation - -function ServerLoginDialog(const AServerName: string; - var AUserName, APassword: string): Boolean; -begin - with TIBXLoginDlg.Create(nil) do - try - Caption := 'Firebird Server Login'; - Label3.Caption := 'Server Name: '; - DatabaseName.Caption := AServerName; - UserName.Text := AUserName; - Result := False; - if AUserName = '' then ActiveControl := UserName; - if ShowModal = mrOk then - begin - AUserName := UserName.Text; - APassword := Password.Text; - Result := True; - end; - finally - Free; - end; -end; - -end. +{************************************************************************} +{ } +{ Borland Delphi Visual Component Library } +{ InterBase Express core components } +{ } +{ Copyright (c) 1998-2000 Inprise Corporation } +{ } +{ InterBase Express is based in part on the product } +{ Free IB Components, written by Gregory H. Deatz for } +{ Hoagland, Longo, Moran, Dunst & Doukas Company. } +{ Free IB Components is used under license. } +{ } +{ The contents of this file are subject to the InterBase } +{ Public License Version 1.0 (the "License"); you may not } +{ use this file except in compliance with the License. You } +{ may obtain a copy of the License at http://www.Inprise.com/IPL.html } +{ Software distributed under the License is distributed on } +{ an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either } +{ express or implied. See the License for the specific language } +{ governing rights and limitations under the License. } +{ The Original Code was created by InterBase Software Corporation } +{ and its successors. } +{ Portions created by Inprise Corporation are Copyright (C) Inprise } +{ Corporation. All Rights Reserved. } +{ Contributor(s): Jeff Overcash } +{ } +{************************************************************************} + +unit IBDialogs; + +{$Mode Delphi} + +interface + +uses +{$IFDEF WINDOWS } + Windows, +{$ELSE} + unix, +{$ENDIF} + SysUtils, Messages, Classes, Graphics, Controls, + Forms, StdCtrls, ExtCtrls, dblogindlg; + +function ServerLoginDialog(const AServerName: string; + var AUserName, APassword: string): Boolean; + +implementation + +function ServerLoginDialog(const AServerName: string; + var AUserName, APassword: string): Boolean; +begin + with TIBXLoginDlg.Create(nil) do + try + Caption := 'Firebird Server Login'; + Label3.Caption := 'Server Name: '; + DatabaseName.Caption := AServerName; + UserName.Text := AUserName; + Result := False; + if AUserName = '' then ActiveControl := UserName; + if ShowModal = mrOk then + begin + AUserName := UserName.Text; + APassword := Password.Text; + Result := True; + end; + finally + Free; + end; +end; + +end.