MobileBroadbandAccountWatcher.AccountAdded 事件

定义

将移动宽带帐户添加到客户端时发生。

注意

此功能仅适用于移动运营商应用和由移动网络运营商授予特权访问权限的 UWP 应用。

如果要使用此 API 并将应用发布到 Microsoft Store,则需要获得特殊批准。 有关详细信息,请参阅应用功能声明主题中的受限功能部分。

// Register
event_token AccountAdded(TypedEventHandler<MobileBroadbandAccountWatcher, MobileBroadbandAccountEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
MobileBroadbandAccountWatcher::AccountAdded_revoker AccountAdded(auto_revoke_t, TypedEventHandler<MobileBroadbandAccountWatcher, MobileBroadbandAccountEventArgs const&> const& handler) const;
public event TypedEventHandler<MobileBroadbandAccountWatcher,MobileBroadbandAccountEventArgs> AccountAdded;
function onAccountAdded(eventArgs) { /* Your code */ }
mobileBroadbandAccountWatcher.addEventListener("accountadded", onAccountAdded);
mobileBroadbandAccountWatcher.removeEventListener("accountadded", onAccountAdded);
- or -
mobileBroadbandAccountWatcher.onaccountadded = onAccountAdded;
Public Custom Event AccountAdded As TypedEventHandler(Of MobileBroadbandAccountWatcher, MobileBroadbandAccountEventArgs) 

事件类型

Windows 要求

应用功能
cellularDeviceControl cellularDeviceIdentity

注解

可以从 NetworkAccountId 属性的事件处理程序中获取帐户的网络帐户 ID。

适用于