public bool DisconnectComPort() { StopScanning(); _commandReturnCode = DllInteropBridge.CloseSpecComPort(_comNumber); if (_commandReturnCode != 0) { ConnectionState = ConnectionState.Error; return(false); } return(true); }