Inheritance: System.EventArgs
Esempio n. 1
0
 void FoundDevice(Object s, Plugin.BLE.Abstractions.EventArgs.DeviceEventArgs a)
 {
     Console.WriteLine("FOUND DEVICE: " + a.Device);
     if (a.Device.Name.Contains("Kijkdoos"))
     {
         ConnectDevice(a.Device);
     }
 }
        private void DeviceWatcher_Added(object sender, Plugin.BLE.Abstractions.EventArgs.DeviceEventArgs args)
        {
            int indexer = index++;

            if (args.Device.Name == string.Empty || mVisibleDevices == null)
            {
                return;
            }


            MutexBlock(() =>
            {
                mVisibleDevices.Clear();
                var devices = mAdapter.DiscoveredDevices;
                foreach (var item in devices)
                {
                    Debug.WriteLine(item.Name + " " + item.Id);
                    AddUniqueItem(new UnPairedDeviceBLE(item));
                }
            }, (indexer.ToString() + " Adding"));
        }
Esempio n. 3
0
 private void Adapter_DeviceDiscovered(object sender, Plugin.BLE.Abstractions.EventArgs.DeviceEventArgs e)
 {
     //if (!String.IsNullOrEmpty(e.Device.Name))
     OnMyDeviceDiscovered(e.Device);
 }
Esempio n. 4
0
 private void Adapter_DeviceDisconnected(object sender, Plugin.BLE.Abstractions.EventArgs.DeviceEventArgs e)
 {
     MessagingCenter.Send <BLEService, ToastNotificationEventArgs>(this, string.Empty, new ToastNotificationEventArgs("The Device {0} is disconnected", e.Device.Name));
 }