private void OnIdReceived(RFIDReader sender, string e)
        {
            if (this.onIdReceived == null)
            {
                this.onIdReceived = this.OnIdReceived;
            }

            if (Program.CheckAndInvoke(this.IdReceived, this.onIdReceived, sender, e))
            {
                this.IdReceived(sender, e);
            }
        }
        private void OnMalformedIdReceived(RFIDReader sender, EventArgs e)
        {
            if (this.onMalformedIdReceived == null)
            {
                this.onMalformedIdReceived = this.OnMalformedIdReceived;
            }

            if (Program.CheckAndInvoke(this.MalformedIdReceived, this.onMalformedIdReceived, sender, e))
            {
                this.MalformedIdReceived(sender, e);
            }
        }
        /// <summary>
        /// Raises the <see cref="CardIDBadChecksum"/> event.
        /// </summary>
        /// <param name="sender">Sending module.</param>
        /// <param name="ID">Error text.</param>
        protected virtual void OnIDBadChecksumEvent(RFIDReader sender, String ID)
        {
            string id = ID.Substring(1, 10);

            if (_CardIDBadChecksum == null)
            {
                _CardIDBadChecksum = new CardIDBadChecksumEventHandler(OnIDBadChecksumEvent);
            }

            if (Program.CheckAndInvoke(CardIDBadChecksum, _CardIDBadChecksum, sender, ID))
            {
                this.CardIDBadChecksum(sender, id);
            }
        }