Ejemplo n.º 1
0
        private void VIEW_MODEL_ScannerStateChanged(BluetoothScannerControlContext ctx, BLEScannerStateChangedEventArgs args)
        {
            switch (args.NEW_STATE)
            {
            case BLEScannerState.DISABLED:
                break;

            case BLEScannerState.SCANNING:
                UpdateViewState(State_Scanning.Name);
                break;

            case BLEScannerState.ERROR_BLE_NOT_SUPPORTED:
            case BLEScannerState.ERROR_BLUETOOTH_NOT_SUPPORTED:
            case BLEScannerState.ERROR_BLUETOOTH_DISABLED:
            default:
                UpdateViewState(State_Error.Name);
                break;
            }
        }
Ejemplo n.º 2
0
 private void VIEW_MODEL_ScannerDeviceFound(BluetoothScannerControlContext ctx, BLEDeviceEventArgs args)
 {
     UpdateViewState(State_Success.Name);
     Device = args.DEVICE;
 }