共用方式為


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

適用於

另請參閱