/// <summary> /// Event handler to receive notice that the device has connected /// </summary> /// <param name="sender">Sender</param> /// <param name="e">Event args including the device info</param> private void _bleManager_DeviceConnectedEvent(object sender, DeviceEventArgs e) { Log(string.Format("Device {0} [{1}] connected", e.Device.Name, e.Device.Address)); DeviceInfo device = FindDeviceInfo(e.Device); if (device != null) { DeviceConnectedEvent?.Invoke(this, new DeviceInfoEventArgs(FindDeviceInfo(e.Device))); } }
public void RaiseDeviceConnectedEvent(IChannel channel) { Services.DispatcherServices.Invoke(() => DeviceConnectedEvent?.Invoke(this, channel)); }
public void OnDeviceConnected(BluetoothDevice p0) { DeviceConnectedEvent?.Invoke(this, new DeviceEventArgs(p0)); }
/// <summary> /// Event handler for when the device is connected /// </summary> /// <param name="sender">Sender</param> /// <param name="e">Event arguments including a Bluetooth device</param> private void _skfBleManagerCallbacks_DeviceConnectedEvent(object sender, DeviceEventArgs e) { _currentDevice = e.Device; DeviceConnectedEvent?.Invoke(this, new DeviceEventArgs(e.Device)); }