Example #1
0
		void Adapter_DeviceDiscovered(object sender, DeviceDiscoveredEventArgs e)
		{
			Debug.WriteLine("SyncHandler: Device Discovered.");
			if (e.Device.Name != null)
			{
				if (Utils.isValidDevice(e.Device.Name))
				{
					Debug.WriteLine("Found Valid Device");
					this.StopScan();
					this.Connect(e.Device);
				}
			}
		}
Example #2
0
		void Adapter_DeviceDiscovered (object sender, DeviceDiscoveredEventArgs e)
		{
			Debug.WriteLine("Device discovered");
			Device.BeginInvokeOnMainThread(() => {
				//devices.Add (e.Device);
				//Debug.WriteLine ("Found device: "+e.Device.Name+")");
				int numLines = this.lblDevice.Text.Split('\n').Length;
				if(numLines > 8)
					this.lblDevice.Text = "";
				String c = this.lblDevice.Text;

				c += "\nName: "+ e.Device.Name + "   RSSI:" + e.RSSI;
				this.lblDevice.Text = c;
			});
			//this.ConnectDevice(e.Device,e.RSSI);
		}
Example #3
0
		void Adapter_DeviceDiscovered(object sender, DeviceDiscoveredEventArgs e)
		{
			Debug.WriteLine("SyncHandler: Device Discovered.");
			if (e.Device.Name != null)
			{
				if (!this.ProcessingDevice && Utils.isValidDevice(e.Device.Name))
				{
					Debug.WriteLine("Found Valid Device");
					this.StopScan();
					this.Connect(e.Device);
				}
				else if (this.ProcessingDevice)
				{
					Debug.WriteLine("Currently processing valid device.");
				}
			}
		}