public event OnSerialPortMissingHander OnSerialPortMissing;                                  //串口丢失事件委托对象

        /*
         * 串口丢失事件触发函数
         **/
        private void OnSerialPortMiss(SerialPortMissingEventArgs e)
        {
            if (this.OnSerialPortMissing != null)
            {
                this.OnSerialPortMissing(this, e);
            }
        }
 private void SpManager_OnSerialPortMissing(object sender, SerialPortMissingEventArgs e)
 {
     comIsClosing = true;
     this.Dispatcher.BeginInvoke(new SendStringEventHander(AppendStringToLogBox), e.msg, true);
 }