DeviceWatcher.Added Evento

Definición

Evento que se genera cuando un dispositivo se agrega a la colección enumerada por 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) 

Tipo de evento

Comentarios

Nota

Una aplicación debe suscribirse a todos los eventos agregados, quitados y actualizados que se notificarán cuando haya adiciones, eliminaciones o actualizaciones de dispositivos. Si una aplicación controla solo el evento agregado, no recibirá una actualización si se agrega un dispositivo al sistema una vez completada la enumeración inicial del dispositivo.

Se aplica a

Consulte también