Exemple #1
0
        public SerialComPort()
        {
            m_selectedPort    = new SerialPort();
            m_SerialUtilities = new SerialUtilities();

            dataReceivedHandler          = new SerialDataReceivedEventHandler(SerialDataReceived);
            m_selectedPort.DataReceived += dataReceivedHandler;

            errorReceivedHandler          = new SerialErrorReceivedEventHandler(ErrorReceivedHandler);
            m_selectedPort.ErrorReceived += errorReceivedHandler;
        }
Exemple #2
0
        public SerialComPort()
        {
            m_selectedPort = new SerialPort();
            m_SerialUtilities = new SerialUtilities();

            dataReceivedHandler = new SerialDataReceivedEventHandler(SerialDataReceived);
            m_selectedPort.DataReceived += dataReceivedHandler;

            errorReceivedHandler = new SerialErrorReceivedEventHandler(ErrorReceivedHandler);
            m_selectedPort.ErrorReceived += errorReceivedHandler;
        }