void FormTimer_Tick(object sender, EventArgs e) { if (serialDataHelper.HaveReceiveData == false)//100毫秒没接受到数据,清楚数据 { serialPortEx.ClearRecieveData(); } else { serialDataHelper.HaveReceiveData = false; } if (serialDataHelper.AddTimeTick()) { SendSerialData(); } if (serialDataHelper.CommunicationError) { OnFeedBack(new UartComdEventArgs(LowerDataType.CommunicatError)); } }