-
Notifications
You must be signed in to change notification settings - Fork 22
/
deviceselect.pas
55 lines (42 loc) · 1.18 KB
/
deviceselect.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
50
51
52
53
54
55
unit deviceselect;
interface
uses Windows, Classes, Graphics, Forms, Controls, StdCtrls,
Buttons, ExtCtrls, ComCtrls;
type
Tdeviceselectbox = class(TForm)
Panel1: TPanel;
OKButton: TButton;
ListView1: TListView;
CancelButton: TButton;
Label3: TLabel;
EditBaudrate: TComboBox;
procedure ListView1DblClick(Sender: TObject);
procedure OKButtonClick(Sender: TObject);
procedure CancelButtonClick(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
deviceselectbox: Tdeviceselectbox;
implementation
{$R *.dfm}
procedure Tdeviceselectbox.CancelButtonClick(Sender: TObject);
begin
deviceselectbox.ModalResult:= mrCancel;
end;
procedure Tdeviceselectbox.OKButtonClick(Sender: TObject);
begin
deviceselectbox.ModalResult:=mrCancel;
if deviceselectbox.ListView1.itemindex >= 0 then
deviceselectbox.ModalResult:=mrOK;
// if (ComboBoxComPort.ItemIndex > 0) then
// deviceselectbox.ModalResult:= mrOK;
end;
procedure Tdeviceselectbox.ListView1DblClick(Sender: TObject);
begin
// ComboBoxComPort.ItemIndex:=0;
OKButtonClick(Sender);
end;
end.