WiFiDirectDevice.ConnectionStatusChanged 事件

定义

当 Wi-Fi Direct 设备连接已连接或断开连接时发生。

// 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) 

事件类型

注解

可以为 ConnectionStatusChanged 事件添加处理程序,以便在建立连接或断开连接时收到通知。

适用于

另请参阅