1 |
(*
|
2 |
* IBX For Lazarus (Firebird Express)
|
3 |
*
|
4 |
* The contents of this file are subject to the Initial Developer's
|
5 |
* Public License Version 1.0 (the "License"); you may not use this
|
6 |
* file except in compliance with the License. You may obtain a copy
|
7 |
* of the License here:
|
8 |
*
|
9 |
* http://www.firebirdsql.org/index.php?op=doc&id=idpl
|
10 |
*
|
11 |
* Software distributed under the License is distributed on an "AS
|
12 |
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
13 |
* implied. See the License for the specific language governing rights
|
14 |
* and limitations under the License.
|
15 |
*
|
16 |
* The Initial Developer of the Original Code is Tony Whyman.
|
17 |
*
|
18 |
* The Original Code is (C) 2015 Tony Whyman, MWA Software
|
19 |
* (http://www.mwasoftware.co.uk).
|
20 |
*
|
21 |
* All Rights Reserved.
|
22 |
*
|
23 |
* Contributor(s): ______________________________________.
|
24 |
*
|
25 |
*)
|
26 |
|
27 |
unit SelectValidationDlgUnit;
|
28 |
|
29 |
{$mode objfpc}{$H+}
|
30 |
|
31 |
interface
|
32 |
|
33 |
uses
|
34 |
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
35 |
ExtCtrls;
|
36 |
|
37 |
type
|
38 |
|
39 |
{ TSelectValidationDlg }
|
40 |
|
41 |
TSelectValidationDlg = class(TForm)
|
42 |
Bevel1: TBevel;
|
43 |
Button1: TButton;
|
44 |
Button2: TButton;
|
45 |
Edit1: TEdit;
|
46 |
Edit2: TEdit;
|
47 |
Label1: TLabel;
|
48 |
Label2: TLabel;
|
49 |
OnlineValidation: TRadioButton;
|
50 |
FullValidation: TRadioButton;
|
51 |
private
|
52 |
|
53 |
public
|
54 |
function ShowModal(aServerName: string;
|
55 |
var DatabaseName: string; var aOnlineValidation: boolean): TModalResult;
|
56 |
end;
|
57 |
|
58 |
var
|
59 |
SelectValidationDlg: TSelectValidationDlg;
|
60 |
|
61 |
implementation
|
62 |
|
63 |
{$R *.lfm}
|
64 |
|
65 |
{ TSelectValidationDlg }
|
66 |
|
67 |
function TSelectValidationDlg.ShowModal(aServerName: string;
|
68 |
var DatabaseName: string; var aOnlineValidation: boolean): TModalResult;
|
69 |
begin
|
70 |
Edit1.Text := DatabaseName;
|
71 |
Edit2.text := aServerName;
|
72 |
OnlineValidation.checked := aOnlineValidation;
|
73 |
Result := inherited ShowModal;
|
74 |
if Result = mrOK then
|
75 |
begin
|
76 |
DatabaseName := Edit1.Text;
|
77 |
aOnlineValidation := OnlineValidation.checked;
|
78 |
end;
|
79 |
end;
|
80 |
|
81 |
end.
|
82 |
|