コード例 #1
0
 //****************************************//
 //    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"));
         }
     }
 }
コード例 #2
0
ファイル: MPQ.cs プロジェクト: countrymarmot/Cypress
 //****************************************//
 //    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"));
     }
 }