private void stopCollecting_Click(object sender, RoutedEventArgs e) { if (device != null) { device.StopCollecting(); device.NewMeasurementTaken -= newMeasurementTaken; } }
private void stopCollecting_Click(object sender, RoutedEventArgs e) { if (device != null) { device.StopCollecting(); // TODO - Disconnect the event handler. } }