WiFiDirectDevice.ConnectionStatusChanged 事件
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
發生于 Wi-Fi 直接裝置連線或中斷連線時。
// Register
event_token ConnectionStatusChanged(TypedEventHandler<WiFiDirectDevice, IInspectable const&> const& handler) const;
// Revoke with event_token
void ConnectionStatusChanged(event_token const* cookie) const;
// Revoke with event_revoker
WiFiDirectDevice::ConnectionStatusChanged_revoker ConnectionStatusChanged(auto_revoke_t, TypedEventHandler<WiFiDirectDevice, IInspectable const&> const& handler) const;
public event TypedEventHandler<WiFiDirectDevice,object> ConnectionStatusChanged;
function onConnectionStatusChanged(eventArgs) { /* Your code */ }
wiFiDirectDevice.addEventListener("connectionstatuschanged", onConnectionStatusChanged);
wiFiDirectDevice.removeEventListener("connectionstatuschanged", onConnectionStatusChanged);
- or -
wiFiDirectDevice.onconnectionstatuschanged = onConnectionStatusChanged;
Public Custom Event ConnectionStatusChanged As TypedEventHandler(Of WiFiDirectDevice, Object)
事件類型
TypedEventHandler<WiFiDirectDevice,IInspectable>
備註
您可以新增 ConnectionStatusChanged 事件的處理常式,以在建立或中斷連線時收到通知。