//****************************************// // Open RS232 Port for MPQ device // //****************************************// public void PortInit(String ConnectString) { if (m_MPQIO == null) { m_MPQIO = new MPQIO(); m_MPQIO.CloseComm(); if (!m_MPQIO.OpenComm(ConnectString)) { throw new Exception("Error in OpenComm: " + m_MPQIO.m_LastError); } else { OnMPQMessage(new MPQMessageEventArgs("MPQ_OpenComm: Success")); } } }
//****************************************// // Open RS232 Port for MPQ device // //****************************************// public void PortInit(String ConnectString) { if (m_MPQIO == null) { m_MPQIO = new MPQIO(); m_MPQIO.CloseComm(); if (!m_MPQIO.OpenComm(ConnectString)) throw new Exception("Error in OpenComm: " + m_MPQIO.m_LastError); else OnMPQMessage(new MPQMessageEventArgs("MPQ_OpenComm: Success")); } }