예제 #1
0
        public MiBand(BluetoothLEDevice device)
        {
            _device = device;
            _io     = new BluetoothIO(device);

            Debug.WriteLine($"Name : {device.Name}");
            Debug.WriteLine($"Device connection status : {device.ConnectionStatus}");

            _device.ConnectionStatusChanged += OnConnectionStatusChanged;
            _device.GattServicesChanged     += OnGattServicesChanged;
            _device.NameChanged             += OnNameChanged;
        }
예제 #2
0
		public MiBand(BluetoothLEDevice device)
		{
			_device = device;
			_io = new BluetoothIO(device);

			Debug.WriteLine($"Name : {device.Name}");
			Debug.WriteLine($"Device connection status : {device.ConnectionStatus}");

			_device.ConnectionStatusChanged += OnConnectionStatusChanged;
			_device.GattServicesChanged += OnGattServicesChanged;
			_device.NameChanged += OnNameChanged;
		}