public static void OnReceived(object sender, dataRcvdEventArgs data) { if (Received != null) { Received(sender, data); } }
void timer_Tick(object sender, EventArgs e) { if (this.is_connected) { Event.dataRcvdEventArgs drea = new Event.dataRcvdEventArgs(); drea.data = this.ReadData(length); Event.dataRcvd.OnReceived(this, drea); } }