Sub butConnect_Click
Dim PairedDevices As Map
'
PairedDevices = Main.o_Serial.GetPairedDevices
Dim l As List
l.Initialize
For i = 0 To PairedDevices.Size - 1
lcPrinterName = PairedDevices.GetKeyAt(i)
l.Add(lcPrinterName)
Next
'
Dim res As Int
res = InputList(l, "Select Printer", -1) 'show list with paired devices
If res <> DialogResponse.CANCEL Then
lcPrinterAddress = PairedDevices.Get(l.Get(res))
lcPrinterName = l.Get(res)
Msgbox("Conectarse a: " & l.Get(res), lcPrinterAddress)
Main.o_Serial.Connect(lcPrinterAddress) 'convert the name to mac address
End If
End Sub