-
Notifications
You must be signed in to change notification settings - Fork 1
/
laz.pas
73 lines (52 loc) · 1.15 KB
/
laz.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
unit laz;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
LazSerial;
type
{ TForm1 }
TForm1 = class(TForm)
aktif: TButton;
Label1: TLabel;
pasif: TButton;
ayar: TButton;
LazSerial1: TLazSerial;
procedure aktifClick(Sender: TObject);
procedure ayarClick(Sender: TObject);
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure pasifClick(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
end;
procedure TForm1.pasifClick(Sender: TObject);
var str:String;
begin
LazSerial1.WriteData('1');
end;
procedure TForm1.FormClose(Sender: TObject; var CloseAction: TCloseAction);
begin
if LazSerial1.Active then
LazSerial1.Active := false ;
Application.Terminate;
end;
procedure TForm1.aktifClick(Sender: TObject);
var Str : string;
begin
LazSerial1.WriteData('0');
end;
procedure TForm1.ayarClick(Sender: TObject);
begin
LazSerial1.ShowSetupDialog;
LazSerial1.Open;
end;
end.