Ejemplo n.º 1
0
		void HandlePeripheralSelected (object sender, PeripheralSelectedEventArgs e)
		{
			StopScanning ();

			// show our connecting... overlay
			connectingDialog.LabelText = string.Format("Connecting to {0}", e.SelectedPeripheral.Name);
			connectingDialog.Show (true);

			// when the peripheral connects, load our details screen
			BluetoothLEManager.Current.DeviceConnected += HandleDeviceConnected;

			// try and connect to the peripheral
			BluetoothLEManager.Current.CentralBleManager.ConnectPeripheral (e.SelectedPeripheral, new PeripheralConnectionOptions ());
		}
Ejemplo n.º 2
0
        void HandlePeripheralSelected(object sender, PeripheralSelectedEventArgs e)
        {
            StopScanning();

            // show our connecting... overlay
            connectingDialog.LabelText = string.Format("Connecting to {0}", e.SelectedPeripheral.Name);
            connectingDialog.Show(true);

            // when the peripheral connects, load our details screen
            BluetoothLEManager.Current.DeviceConnected += HandleDeviceConnected;

            // try and connect to the peripheral
            BluetoothLEManager.Current.CentralBleManager.ConnectPeripheral(e.SelectedPeripheral, new PeripheralConnectionOptions());
        }