private void MMNotificationClient_DeviceRemoved(object sender, DeviceNotificationEventArgs e) { Application.Current.Dispatcher.BeginInvoke(new Action(() => RemoveDevice(e.DeviceId))); }
void _mmNotificationClient_DeviceAdded(object sender, DeviceNotificationEventArgs e) { Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() => AddDevice(e.DeviceID))); }