unit Unit1;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, uBarcodeScannerIntent,
FMX.ScrollBox, FMX.Memo, FMX.Controls.Presentation, FMX.StdCtrls;
type
TForm1 =
class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
Scanner:TBarcodeScannerIntent;
Procedure OnBarcodeScanned(Sender:TObject);
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.fmx}
procedure TForm1.Button1Click(Sender: TObject);
begin
Scanner.scan;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Scanner := TBarcodeScannerIntent.Create(self);
Scanner.OnBarcodeScanned := OnBarcodeScanned;
end;
procedure TForm1.OnBarcodeScanned(Sender: TObject);
begin
Memo1.Lines.insert(0,Scanner.Barcode);
end;