共用方式為


ClaimedPosPrinter.ReleaseDeviceRequested 事件

定義

發生于服務點印表機取得釋放其獨佔宣告的要求時。

// Register
event_token ReleaseDeviceRequested(TypedEventHandler<ClaimedPosPrinter, PosPrinterReleaseDeviceRequestedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
ClaimedPosPrinter::ReleaseDeviceRequested_revoker ReleaseDeviceRequested(auto_revoke_t, TypedEventHandler<ClaimedPosPrinter, PosPrinterReleaseDeviceRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<ClaimedPosPrinter,PosPrinterReleaseDeviceRequestedEventArgs> ReleaseDeviceRequested;
function onReleaseDeviceRequested(eventArgs) { /* Your code */ }
claimedPosPrinter.addEventListener("releasedevicerequested", onReleaseDeviceRequested);
claimedPosPrinter.removeEventListener("releasedevicerequested", onReleaseDeviceRequested);
- or -
claimedPosPrinter.onreleasedevicerequested = onReleaseDeviceRequested;
Public Custom Event ReleaseDeviceRequested As TypedEventHandler(Of ClaimedPosPrinter, PosPrinterReleaseDeviceRequestedEventArgs) 

事件類型

備註

發生此事件時,應用程式有兩秒的時間範圍可以呼叫 RetainDeviceAsync ,讓應用程式可以在裝置上保留獨佔宣告。 或者,應用程式可以呼叫 Close 來釋放宣告,並立即結束視窗。

適用於

另請參閱