Example #1
0
        /// <summary>
        /// Handler for the BluetoothSensorManager's DiscoveredPeripheral event.
        /// </summary>
        /// <param name="sender">Sender.</param>
        /// <param name="e">E.</param>
        void OnDiscoveredPeripheral(object sender, BluetoothDiscoveredPeripheralEventArgs e)
        {
            Console.WriteLine($"discovered {e.PeripheralName}");

            // add to underlying list and reload data
            _sensorListSource.Add(e.PeripheralName, e.Peripheral, e.bIsHexoskinPeripheral);
            DeviceTableView.ReloadData();
        }
Example #2
0
        /// <summary>
        /// Called internally which emits custom event to let subscribers know that DiscoveredPeripheral occurred
        /// </summary>
        /// <param name="e">E.</param>
        protected virtual void OnDiscoveredPeripheral(BluetoothDiscoveredPeripheralEventArgs e)
        {
            EventHandler <BluetoothDiscoveredPeripheralEventArgs> handler = DiscoveredPeripheral;

            if (handler != null)
            {
                handler(this, e);
            }
        }