/// <summary> /// Close serial port /// </summary> /// <returns></returns> public bool closeSnifferPort() { bool disconnecion_success = false; if ((null != SnifferSerialPort) && SnifferSerialPort.isPortOpen()) { SnifferSerialPort.ClosePort(); SnifferSerialPort = null; disconnecion_success = true; } return(disconnecion_success); }
/// <summary> /// Close serial port /// </summary> /// <returns></returns> public bool closeAVCLANPort() { bool disconnecion_success = false; if ((null != AVCLANSerialPort) && AVCLANSerialPort.isPortOpen()) { AVCLANSerialPort.ClosePort(); AVCLANSerialPort = null; disconnecion_success = true; foreach (var view in AVCLAN_Listeners) { view.Value.setCommunicationStatus(CommunicationStatus.DISABLE); } } return(disconnecion_success); }