Estrutura da Classe Publicada para os aplicativos
type CTipoIMP = (TI_DRIVER, TI_SERIAL, TI_BLUETOOTH);
type CModeloIMP = (MI_ELGINI9);
type CFormat = (FLeft, FCenter, FRigth); (*Formatacao do Texto*)
type CTypeText = (TT_NORMAL, TT_DOUBLE, TT_BOLD, TT_UNDERLINE ); (*Tipo do Texto*)
{ Timp }
type TImp = class(tobject)
private
FDevice: string;
LazSerial1: TLazSerial;
FSetDevice : string;
Ftipoimp : CTipoIMP;
Fmodeloimp: CModeloIMP;
procedure SetDevice( value: string);
procedure SetTipoimp(value : CTipoIMP);
procedure Setmodeloimp(value : CModeloIMP);
public
constructor create(PLazSerial1: TLazSerial);
destructor destroy();
procedure DefaultSerial();
function FormatacaoString(info: string;tam: integer; Formatacao:CFormat; margin: integer): TStringList;
procedure TextoSerial(info : string);
procedure TextoSerial(info : string; Formatacao : CFormat);
procedure TextoSerial(info : string; Formatacao : CFormat; typetext : CTypeText);
procedure PrintBARCODE(info : string);
procedure LineSerial();
procedure close();
procedure open;
procedure Guilhotina();
procedure Gaveta();
procedure Beep();
procedure EjetarCUPOM();
property device : string read FDevice write SetDevice ;
property tipoimp : CTipoIMP read Ftipoimp write SetTipoimp;
property modeloimp : CModeloIMP read Fmodeloimp write SetModeloImp;
end;
Estrutura da Classe Genérica da LIB
type
{ TIMP_GENERICO }
TIMP_GENERICO = class(TObject)
FCOLUNA : integer;
FSERIAL : String;
private
function getserial : string;
procedure setserial(value : string);
public
constructor create();
destructor destroy();
function InitPrint(): string;
function NewLine(): string;
function LineText(Info : string): string;
function Negrito(): string;
function Normal(): string;
function Sublinhado(): string;
function DoubleTexto(): string;
function beep(): string;
function Guilhotina(): string;
function AcionaGaveta(): string;
function Barra1D(Info : string): string;
function Barra2D(info : String): string;
function loadImagem(X,Y : integer; Info : String): string;
function imprimeImagem(X,Y : integer): string;
property Serial : String read getserial write setserial;
end;