Sub Admin_DiscoveryFinished
ProgressDialogHide
If foundDevices.Size = 0 Then
...
Else
Dim l As List
l.Initialize
For i = 0 To foundDevices.Size - 1
Dim nm As NameAndMac
nm = foundDevices.Get(i)
l.Add(nm.Name)
Next
Dim res As Int
res = InputList(l, "Select", -1)
If res <> DialogResponse.CANCEL Then
connectedDevice = foundDevices.Get(res)
serial1.Connect(connectedDevice.Mac)
End If
End If
End Sub