DeviceWatcher.Added Kejadian

Definisi

Peristiwa yang dinaikkan saat perangkat ditambahkan ke koleksi yang dijumlahkan oleh DeviceWatcher.

// Register
event_token Added(TypedEventHandler<DeviceWatcher, DeviceInformation const&> const& handler) const;

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

// Revoke with event_revoker
DeviceWatcher::Added_revoker Added(auto_revoke_t, TypedEventHandler<DeviceWatcher, DeviceInformation const&> const& handler) const;
public event TypedEventHandler<DeviceWatcher,DeviceInformation> Added;
function onAdded(eventArgs) { /* Your code */ }
deviceWatcher.addEventListener("added", onAdded);
deviceWatcher.removeEventListener("added", onAdded);
- or -
deviceWatcher.onadded = onAdded;
Public Custom Event Added As TypedEventHandler(Of DeviceWatcher, DeviceInformation) 

Jenis Acara

Keterangan

Catatan

Aplikasi harus berlangganan semua peristiwa yang ditambahkan, dihapus, dan diperbarui untuk diberi tahu saat ada penambahan, penghapusan, atau pembaruan perangkat. Jika aplikasi hanya menangani peristiwa yang ditambahkan, aplikasi tidak akan menerima pembaruan jika perangkat ditambahkan ke sistem setelah enumerasi perangkat awal selesai.

Berlaku untuk

Lihat juga