protected virtual void OnConnectionClosed(BluetoothConnectionEventArgs e) { if (ConnectionClosed == null) { return; } ConnectionClosed(this, e); }
private void OnConnectionClosed(object sender, BluetoothConnectionEventArgs e) { BluetoothAddress address = new BluetoothAddress(e.BluetoothConnection.Service.Device.Address); ReportDevice device; if (lookupDevice.TryGetValue(address, out device)) { device.Disconnect(); } }
protected virtual void OnConnectionOpened(BluetoothConnectionEventArgs e) { if (ConnectionOpened == null) return; ConnectionOpened(this, e); }