private void SendGattDiscoverCmds(TreeNode treeNode, TxDataOut.CmdTypes cmdType)
{
DeviceForm deviceForm = GetActiveDeviceFormCallback();
if (deviceForm == null || treeNode == null || !(treeNode.Name == "HostHandle") && !(treeNode.Name == "SlaveHandle"))
return;
string str = treeNode.Text.Replace("Handle: ", "");
if (str != null)
{
try
{
ushort handle = Convert.ToUInt16(str, 16);
deviceForm.sendCmds.SendGATT(new HCICmds.GATTCmds.GATT_DiscAllPrimaryServices() { connHandle = handle }, cmdType);
deviceForm.sendCmds.SendGATT(new HCICmds.GATTCmds.GATT_DiscAllCharDescs() { connHandle = handle }, cmdType);
}
catch { }
}
}