Esempio n. 1
0
        /// <summary>
        ///  Update is called once per frame
        /// </summary>
        public void Update()
        {
            if (LayoutController == null || DeviceHandler == null)
            {
                return;
            }

            if (Xdk.BluetoothState == BluetoothLeDeviceState.DiscoveringDevices || Xdk.BluetoothState == BluetoothLeDeviceState.DiscoveredDevices)
            {
                LayoutController.VisibleDialog = this;
                switch (Xdk.BluetoothState)
                {
                case BluetoothLeDeviceState.Initialized:
                    ClearDeviceList();
                    break;

                case BluetoothLeDeviceState.DiscoveredDevices:
                    UpdateDevices(DeviceHandler.GetRecentlyDiscoveredDevices());
                    break;
                }
            }
            else if (IsEnabled)
            {
                IsEnabled = false;
            }
        }