private void btnScan_Click(object sender, EventArgs e)
{
if (!(Cursor != Cursors.WaitCursor))
return;
ShowProgress(true);
devForm.StartTimer(DeviceForm.EventType.Scan);
discoverConnectStatus = DiscoverConnectStatus.Scan;
DiscoverConnectUserInputControl();
ResetSlaveDevices();
SlaveDeviceFound = (ushort)0;
lblDeviceFound.Text = SlaveDeviceFound.ToString();
devForm.sendCmds.SendGAP(new HCICmds.GAPCmds.GAP_DeviceDiscoveryRequest()
{
activeScan = !ckBoxActiveScan.Checked ? HCICmds.GAP_EnableDisable.Disable : HCICmds.GAP_EnableDisable.Enable,
whiteList = !ckBoxWhiteList.Checked ? HCICmds.GAP_EnableDisable.Disable : HCICmds.GAP_EnableDisable.Enable,
mode = (HCICmds.GAP_DiscoveryMode)cbScanMode.SelectedIndex
});
}