Example #1
0
 public void StopCPPPlayer()
 {
     try
     {
         pipeStream.WaitForConnection();
         using (StreamReader sr = new StreamReader(pipeStream))
         {
             string line;
             while ((line = sr.ReadLine()) != null)
             {
                 Thread.Sleep(500);
                 string strValue = line;
                 if (line == "-1000")
                 {
                     break;
                 }
             }
         }
         CoreEvent.SetEvent(m_handle);
         pipeStream.Close();
         CoreEvent.CloseHandle(m_handle);
     }
     catch (Exception es)
     {
         return;
     }
 }
Example #2
0
 public void StopCPPPlayer2()
 {
     try
     {
         CoreEvent.SetEvent(m_handle);
         pipeStream.Close();
         CoreEvent.CloseHandle(m_handle);
     }
     catch (Exception es)
     {
         return;
     }
 }