예제 #1
0
 /// <summary>
 ///校准 Tcp连接断开
 /// </summary>
 void NetCalibrationStop()
 {
     if (upnpCalibration != null)
     {
         upnpCalibration.Stop();
         upnpCalibration = null;
     }
     if (oldCalibration != null)
     {
         oldCalibration.Close();
     }
 }
예제 #2
0
        /// <summary>
        /// NetUNP服务终止
        /// </summary>
        void NetUNPStop()
        {
            try
            {
                if (upnpServer != null)
                {
                    upnpServer.Stop();
                    upnpServer.NetDataArrayArrived -= NetData_Arrived;

                    upnpServer.ExceptionArrived -= Exception_TestArrived;
                    upnpServer.LinkingMsg       -= LinkMsg_TestArrived;
                    upnpServer = null;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "NetUNPStop");
            }
        }