PosPrinter 類別

定義

表示服務點印表機。

public ref class PosPrinter sealed
public ref class PosPrinter sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class PosPrinter final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class PosPrinter final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class PosPrinter
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class PosPrinter : System.IDisposable
Public NotInheritable Class PosPrinter
Public NotInheritable Class PosPrinter
Implements IDisposable
繼承
Object Platform::Object IInspectable PosPrinter
屬性
實作

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

若要取得 PosPrinter 物件,請使用 FromIdAsyncGetDefaultAsync 靜態方法。

如需範例實作,請參閱 POS 印表機範例

版本歷程記錄

Windows 版本 SDK 版本 已新增值
1703 15063 GetDeviceSelector (PosConnectionTypes)
1903 18362 GetFontProperty
1903 18362 SupportedBarcodeSymbologies

屬性

Capabilities

取得服務點印表機的功能。

DeviceId

取得服務點印表機的識別碼。

Status

取得服務點印表機電源和可用性的目前狀態。

SupportedBarcodeSymbologies

取得服務點印表機支援的條碼符號。

SupportedCharacterSets

取得服務點印表機支援的字元集清單。

SupportedTypeFaces

取得服務點印表機支援的字型和字樣。

方法

CheckHealthAsync(UnifiedPosHealthCheckLevel)

以非同步方式取得服務點印表機的健康狀態。

ClaimPrinterAsync()

宣告要使用的服務點印表機,並取得服務點印表機的 ClaimedPosPrinter 類別實例。

Close()

關閉 POS 印表機會話。 針對 C++ 和 JavaScript,請使用 Close () 。 針對 C# 和 Visual Basic,請使用 Dispose () 。

Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。

FromIdAsync(String)

使用指定的DeviceInformation.Id,為服務點印表機建立PosPrinter物件。

GetDefaultAsync()

取得預設配對或本機連接的印表機。

GetDeviceSelector()

取得進階查詢語法 (AQS) 字串,可用來列出可用的服務點印表機。

GetDeviceSelector(PosConnectionTypes)

取得進階查詢語法 (AQS) 字串,可用來列出可透過指定連線類型取得的服務點印表機

GetFontProperty(String)

從服務點印表機取得指定的字型屬性。

GetStatisticsAsync(IIterable<String>)

從服務點印表機取得指定的統計資料。

事件

StatusUpdated

發生于服務點印表機的電源狀態或可用性變更時。

適用於

另請參閱