/// <summary> /// Handler for the BluetoothSensorManager's SensorConnectionsChanged event. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">E.</param> void OnSensorConnectionsChanged(object sender, BluetoothConnectionChangedEventArgs e) { // Invoke on main thread to trigger UI change InvokeOnMainThread(() => { PairedDevicesLabel.Text = e.UpdatedConnectedDevicesString; }); }
/// <summary> /// Called internally which emits custom event to let subscribers know that SensorConnectionsChanged occurred /// </summary> /// <param name="e">E.</param> protected virtual void OnSensorConnectionsChanged(BluetoothConnectionChangedEventArgs e) { EventHandler <BluetoothConnectionChangedEventArgs> handler = SensorConnectionsChanged; if (handler != null) { handler(this, e); } }
void OnSensorConnectionsChanged(object sender, BluetoothConnectionChangedEventArgs e) { DoUIRefreshWork(); }