共用方式為


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 屬性的事件處理常式取得。

適用於