Subversion Repositories svnkaklik

Rev

Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
unit Unit1;
2
 
3
interface
4
 
5
uses
6
  Portinc,Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
7
  Dialogs, StdCtrls, ExtCtrls, Tabs, ComCtrls;
8
 
9
type
10
  TForm1 = class(TForm)
11
    Button1: TButton;
12
    Button2: TButton;
13
    CheckBox1: TCheckBox;
14
    CheckBox3: TCheckBox;
15
    StaticText1: TStaticText;
16
    StaticText2: TStaticText;
17
    Timer1: TTimer;
18
    Edit1: TEdit;
19
    Button3: TButton;
20
    Label1: TLabel;
21
    CheckBox2: TCheckBox;
22
    StaticText3: TStaticText;
23
    Button4: TButton;
24
    Button5: TButton;
25
    procedure Button1Click(Sender: TObject);
26
    procedure Button2Click(Sender: TObject);
27
    procedure FormCreate(Sender: TObject);
28
    procedure Timer1Timer(Sender: TObject);
29
    procedure Button3Click(Sender: TObject);
30
    procedure Button5Click(Sender: TObject);
31
    procedure Button4Click(Sender: TObject);
32
  private
33
    { Private declarations }
34
  public
35
    { Public declarations }
36
  end;
37
 
38
var
39
  Form1: TForm1;
40
 
41
implementation
42
 
43
{$R *.dfm}
44
 
45
procedure TForm1.Button1Click(Sender: TObject);
46
begin
47
 
48
  TXD (1);
49
  CheckBox1.Checked:=True;
50
end;
51
 
52
procedure TForm1.Button2Click(Sender: TObject);
53
begin
54
  TXD(0);
55
  CheckBox1.Checked:=False;
56
end;
57
 
58
procedure TForm1.FormCreate(Sender: TObject);
59
begin
60
  OPENCOM (Pchar('COM1,1200,N,8,'));
61
  Timer1.Interval:=1;
62
  Timer1.Enabled:=True;
63
end;
64
 
65
procedure TForm1.Timer1Timer(Sender: TObject);
66
begin
67
  if DCD=1 then CheckBox3.Checked:=True
68
    else CheckBox3.Checked:=False
69
end;
70
 
71
procedure TForm1.Button3Click(Sender: TObject);
72
//  var i,c:integer;
73
 
74
  //    b:string;
75
begin
76
//  b:=Edit1.Text;
77
 // for c:=1 to len(b)
78
  //b:=Edit1.Text[c];
79
  //ord (i,b);
80
  //SENDBYTE (i);
81
  //edit1.text:=i
82
end;
83
 
84
procedure TForm1.Button5Click(Sender: TObject);
85
begin
86
  DTR (1);
87
  CheckBox2.Checked:=True;
88
end;
89
 
90
procedure TForm1.Button4Click(Sender: TObject);
91
begin
92
  DTR(0);
93
  CheckBox2.Checked:=False;
94
end;
95
 
96
end.