N
netprobe
Unregistered / Unconfirmed
GUEST, unregistred user!
是POS机中的打印机!
//打印机
TNarrowPrinter = class(TObject)
private
FOwner: TWinControl;
FOPOSPrinter: TOPOSPOSPrinter;
FOnDirectIOEvent: TOPOSPOSPrinterDirectIOEvent;
FOnErrorEvent: TOPOSPOSPrinterErrorEvent;
FOnOutputCompleteEvent: TOPOSPOSPrinterOutputCompleteEvent;
FOnStatusUpdateEvent: TOPOSPOSPrinterStatusUpdateEvent;
public
function PrintSegment(astr: string): Boolean;
constructor Create;
destructor Destroy; override;
procedure PrintSpaceline;
procedure PrintaLine;
function PrinteLine(astr: widestring): Boolean;
function PrinterStrings(aStrs: TStringList): Boolean;
function CutPaper: boolean;
function Printertest: boolean;
function SetAlignment(astr: string; pa: TPrintAlignment; aFont: Char):
string;
function SetFont(aFont: Char): string;
property OnDirectIOEvent: TOPOSPOSPrinterDirectIOEvent read FOnDirectIOEvent
write FOnDirectIOEvent;
property OnErrorEvent: TOPOSPOSPrinterErrorEvent read FOnErrorEvent write
FOnErrorEvent;
property OnOutputCompleteEvent: TOPOSPOSPrinterOutputCompleteEvent read
FOnOutputCompleteEvent write FOnOutputCompleteEvent;
property OnStatusUpdateEvent: TOPOSPOSPrinterStatusUpdateEvent read
FOnStatusUpdateEvent write FOnStatusUpdateEvent;
end;
//打印机
TNarrowPrinter = class(TObject)
private
FOwner: TWinControl;
FOPOSPrinter: TOPOSPOSPrinter;
FOnDirectIOEvent: TOPOSPOSPrinterDirectIOEvent;
FOnErrorEvent: TOPOSPOSPrinterErrorEvent;
FOnOutputCompleteEvent: TOPOSPOSPrinterOutputCompleteEvent;
FOnStatusUpdateEvent: TOPOSPOSPrinterStatusUpdateEvent;
public
function PrintSegment(astr: string): Boolean;
constructor Create;
destructor Destroy; override;
procedure PrintSpaceline;
procedure PrintaLine;
function PrinteLine(astr: widestring): Boolean;
function PrinterStrings(aStrs: TStringList): Boolean;
function CutPaper: boolean;
function Printertest: boolean;
function SetAlignment(astr: string; pa: TPrintAlignment; aFont: Char):
string;
function SetFont(aFont: Char): string;
property OnDirectIOEvent: TOPOSPOSPrinterDirectIOEvent read FOnDirectIOEvent
write FOnDirectIOEvent;
property OnErrorEvent: TOPOSPOSPrinterErrorEvent read FOnErrorEvent write
FOnErrorEvent;
property OnOutputCompleteEvent: TOPOSPOSPrinterOutputCompleteEvent read
FOnOutputCompleteEvent write FOnOutputCompleteEvent;
property OnStatusUpdateEvent: TOPOSPOSPrinterStatusUpdateEvent read
FOnStatusUpdateEvent write FOnStatusUpdateEvent;
end;