Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit Unit2;
- interface
- uses
- System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
- FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, System.Bluetooth,
- FMX.Layouts, FMX.ListBox, FMX.StdCtrls, FMX.Memo, FMX.Controls.Presentation,
- FMX.Edit, FMX.TabControl, FMX.ScrollBox, FMX.ListView.Types, FMX.ListView, FMX.ListView.Appearances, System.ImageList,
- FMX.ImgList, FMX.ListView.Adapters.Base;
- type
- MyThread2 = class(TThread)
- private
- { Private declarations }
- protected
- procedure Execute; override;
- end;
- TForm1 = class(TForm)
- private
- { Private declarations }
- FBluetoothManager: TBluetoothManager;
- FDiscoverDevices: TBluetoothDeviceList;
- FPairedDevices: TBluetoothDeviceList;
- FAdapter: TBluetoothAdapter;
- FSocket: TBluetoothSocket;
- ItemIndex: Integer;
- //procedure DevicesDiscoveryEnd(const Sender: TObject; const ADevices: TBluetoothDeviceList);
- // procedure SendData;
- // procedure ReadData;
- public
- { Public declarations }
- end;
- Const
- ServiceName = 'SerialPort';
- ServiceGUI = '{00001101-0000-1000-8000-00805f9b34fb}';
- var
- Form1: TForm1;
- ToSend: TBytes;
- LDevice: TBluetoothDevice;
- LData: TBytes;
- s:string;
- a:boolean;
- implementation
- {$R *.fmx}
- procedure MyThread2.Execute;
- begin
- { Place thread code here }
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement