source: trunk/Packages/synapse/source/demo/modem/Unit1.pas

Last change on this file was 2, checked in by chronos, 12 years ago
  • Přidáno: Základní kostra projektu.
  • Přidáno: Knihovna synapse.
File size: 876 bytes
Line 
1unit Unit1;
2
3interface
4
5uses
6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
7 SynaSer, StdCtrls, ExtCtrls;
8
9type
10 TForm1 = class(TForm)
11 Label1: TLabel;
12 Edit1: TEdit;
13 Label2: TLabel;
14 Edit2: TEdit;
15 Edit3: TEdit;
16 Label3: TLabel;
17 Button1: TButton;
18 Bevel1: TBevel;
19 Memo1: TMemo;
20 procedure Button1Click(Sender: TObject);
21 private
22 { Private declarations }
23 public
24 { Public declarations }
25 end;
26
27var
28 Form1: TForm1;
29
30implementation
31
32{$R *.DFM}
33
34procedure TForm1.Button1Click(Sender: TObject);
35var
36 ser:TBlockSerial;
37begin
38 ser:=TBlockSerial.Create;
39 ser.RaiseExcept:=True;
40 try
41 ser.Connect(Edit1.Text, StrToIntDef(Edit2.Text, 9600),8,'N',0,false,false);
42 memo1.lines.text:=ser.ATCommand(Edit3.Text);
43 finally
44 ser.free;
45 end;
46end;
47
48end.
49
Note: See TracBrowser for help on using the repository browser.