コード例 #1
0
        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();
        }
コード例 #2
0
        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();
        }