Share via


ClaimedBarcodeScanner 类

定义

表示声明的条形码扫描仪。

public ref class ClaimedBarcodeScanner 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 ClaimedBarcodeScanner final : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class ClaimedBarcodeScanner 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 ClaimedBarcodeScanner : System.IDisposable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class ClaimedBarcodeScanner : System.IDisposable
Public NotInheritable Class ClaimedBarcodeScanner
Implements IDisposable
继承
Object Platform::Object IInspectable ClaimedBarcodeScanner
属性
实现

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 中引入)

注解

当 ClaimScannerAsync 方法完成时,将创建 对象。

版本历史记录

Windows 版本 SDK 版本 增值
1703 15063 GetSymbologyAttributesAsync
1703 15063 SetSymbologyAttributesAsync
1803 17134 HideVideoPreview
1803 17134 IsVideoPreviewShownOnEnable
1803 17134 ShowVideoPreviewAsync
1809 17763 已关闭

属性

DeviceId

获取声明的条形码扫描仪 的 DeviceInformation.Id

IsDecodeDataEnabled

获取或设置一个布尔值,该值指示是否向服务对象提供解码的数据。

IsDisabledOnDataReceived

获取或设置一个布尔值,该值指示在接收数据后是否禁用条形码扫描仪。

IsEnabled

指示条形码扫描仪是否可以接收 DataReceived 事件。

IsVideoPreviewShownOnEnable

获取或设置是否在启用条形码扫描仪时显示视频预览窗口。

方法

Close()

释放对条形码扫描仪的独占声明。 对于 C++ 和 JavaScript,请使用 Close () 。 对于 C# 和 Visual Basic,请使用 Dispose () 。

DisableAsync()

将条形码扫描仪置于无法接收 DataReceived 事件的状态。

Dispose()

执行与释放或重置非托管资源关联的应用程序定义的任务。

EnableAsync()

DataReceived 事件获取条形码扫描仪进入就绪状态。

GetSymbologyAttributesAsync(UInt32)

获取指定条形码符号系统的属性。

HideVideoPreview()

隐藏视频预览窗口。

ResetStatisticsAsync(IIterable<String>)

对于可以重置的所有统计信息,将指定的统计信息重置为零。

RetainDevice()

保留对条形码扫描仪的独占声明。

SetActiveProfileAsync(String)

设置条形码扫描仪上的活动配置文件。

重要

此 API 仅适用于适用于 UWP) 的 Windows Mobile 设备系列 (Windows Mobile 扩展的内部版本 10240 和内部版本 10586。 此 API 不适用于 Windows 桌面设备系列,不适用于其他设备系列,也不适用于 10240 和 10586 以外的 Windows Mobile 内部版本。 当在操作系统 (操作系统) 上调用它不适用时,此 API 的行为是不确定的。 有关设备系列的详细信息,请参阅 设备系列扩展 SDK 和 API 协定

SetActiveSymbologiesAsync(IIterable<UInt32>)

设置设备要使用的条形码符号。

SetSymbologyAttributesAsync(UInt32, BarcodeSymbologyAttributes)

设置声明的条形码扫描仪使用的条形码符号的属性。

ShowVideoPreviewAsync()

显示视频预览窗口。

StartSoftwareTriggerAsync()

用于向条形码扫描仪发出信号以开始扫描。 会话在调用 StopSoftwareTriggerAsync 之前处于活动状态,或直到扫描程序自行结束会话。

StopSoftwareTriggerAsync()

用于停止使用 StartSoftwareTriggerAsync 启动的会话。 如果没有会话处于活动状态,则不会引发错误。

UpdateStatisticsAsync(IIterable<KeyValuePair<String,String>>)

汇报指定的统计信息。

事件

Closed

关闭 ClaimedBarcodeScanner 时引发的事件。

DataReceived

当设备扫描条形码时发生。

ErrorOccurred

在读取条形码时遇到问题时发生。

ImagePreviewReceived

当设备收到扫描的位图图像时发生。

ReleaseDeviceRequested

当设备收到释放其独占声明的请求时发生。

TriggerPressed

在扫描操作期间按下条形码扫描仪触发器或按钮时发生。

TriggerReleased

在扫描操作期间释放条形码扫描仪触发器或按钮时发生。

适用于

另请参阅