BarcodeScannerFrameReader.FrameArrived 事件

定义

准备好获取帧时引发的事件。 在使用 StartAsync 启动帧读取器之前,不会引发此事件。

// Register
event_token FrameArrived(TypedEventHandler<BarcodeScannerFrameReader, BarcodeScannerFrameReaderFrameArrivedEventArgs const&> const& handler) const;

// Revoke with event_token
void FrameArrived(event_token const* cookie) const;

// Revoke with event_revoker
BarcodeScannerFrameReader::FrameArrived_revoker FrameArrived(auto_revoke_t, TypedEventHandler<BarcodeScannerFrameReader, BarcodeScannerFrameReaderFrameArrivedEventArgs const&> const& handler) const;
public event TypedEventHandler<BarcodeScannerFrameReader,BarcodeScannerFrameReaderFrameArrivedEventArgs> FrameArrived;
function onFrameArrived(eventArgs) { /* Your code */ }
barcodeScannerFrameReader.addEventListener("framearrived", onFrameArrived);
barcodeScannerFrameReader.removeEventListener("framearrived", onFrameArrived);
- or -
barcodeScannerFrameReader.onframearrived = onFrameArrived;
Public Custom Event FrameArrived As TypedEventHandler(Of BarcodeScannerFrameReader, BarcodeScannerFrameReaderFrameArrivedEventArgs) 

事件类型

注解

若要在帧到达后获取帧,请调用 TryAcquireLatestFrameAsync。 请注意,调用 TryAcquireLatestFrameAsync 将始终返回最新的帧,而不是导致引发此事件的帧。

如果需要在方法处理程序范围之外异步完成处理,请使用 BarcodeScannerFrameReaderFrameArrivedEventArgs.GetDeferral

适用于

另请参阅