-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathudSelectOptions.pas
49 lines (41 loc) · 1.11 KB
/
udSelectOptions.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
unit udSelectOptions;
{
Feb 2015 Code By: Daniel Campbell
}
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TdSelectOptions = class(TForm)
edtTop: TLabeledEdit;
cbNoLock: TCheckBox;
btnOK: TButton;
btnCancel: TButton;
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
private
{ Private declarations }
public
{ Public declarations }
procedure SetUp(aTop : Integer; aNoLock : Boolean);
procedure GetOptions(var aTop : Integer; var aNoLock : Boolean);
end;
implementation
{$R *.dfm}
procedure TdSelectOptions.SetUp(aTop : Integer; aNoLock : Boolean);
begin
edtTop.Text := IntToStr(aTop);
cbNoLock.Checked := aNoLock;
end;
procedure TdSelectOptions.GetOptions(var aTop : Integer; var aNoLock : Boolean);
begin
aTop := StrToInt(edtTop.Text);
aNoLock := cbNoLock.Checked;
end;
procedure TdSelectOptions.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Key = VK_ESCAPE then
Close;
end;
end.