public async void ShowDevices() { List <Entity> listDevices = new List <Entity>(); DeviceInformationCollection devices = await bluetoothLE.GetSensors(); foreach (var deviceInformation in devices) { listDevices.Add(new Entity(deviceInformation.Name, typeof(DeviceInformation), deviceInformation)); } enuminator = new Enuminator("Bluetooth LE Devices", listDevices, OnDeviceSelected); enuminator.ShowDialog(); }
public override void Connect() { List <Entity> listDevices = new List <Entity>(); foreach (var potentialSensor in KinectSensor.KinectSensors) { listDevices.Add(new Entity(potentialSensor.UniqueKinectId, typeof(KinectSensor), potentialSensor)); } enuminator = new Enuminator("Kinect Devices", listDevices, DeviceSelected); enuminator.ShowDialog(); }
private void OnCharacteristicSelected(object sender, SelectionChangedEventArgs e) { if (e.AddedItems.Count > 0) { selectedCharacteristic = (GattCharacteristic)((Entity)e.AddedItems[0]).Item; if (selectedCharacteristic != null) { enuminator.Hide(); enuminator = null; Status = "Connected"; OnConnect(this, new ConnectEventArgs("Success")); } } }