Example #1
0
        internal virtual void OnCardConnected(object sender, WatcherCardEventArgs e)
        {
            var card = new ContactlessCard(e.Card);

            Logger.TraceEvent(TraceEventType.Verbose, 0, "Cardreader: Save invocation of CardConnected");
            Logger.Flush();

            CardConnected.SafeInvoke(this, new CardreaderEventArgs(card, e.Card.CardreaderName));
        }
Example #2
0
        public void SetBuzzerOutputForCardDetection(ContactlessCard card, bool shouldBuzzWhenCardDetected)
        {
            if (_disposed) throw new ObjectDisposedException("Cardreader", "Cannot access a disposed object.");
            if (card == null) throw new ArgumentNullException("card");

            Logger.TraceEvent(TraceEventType.Verbose, 0, "Cardreader: SetBuzzerOutputForCardDetection entering");
            Logger.Flush();

            ActionQueue.EnqueueAction(new SetBuzzerOutputForCardDetectionAction(card, shouldBuzzWhenCardDetected));

            Logger.TraceEvent(TraceEventType.Verbose, 0, "Cardreader: SetBuzzerOutputForCardDetection done");
            Logger.Flush();
        }
Example #3
0
        public void UpdateLedAndBuzzer(ContactlessCard card, LedBuzzerStatus status)
        {
            if (_disposed)
            {
                throw new ObjectDisposedException("Cardreader", "Cannot access a disposed object.");
            }
            if (card == null)
            {
                throw new ArgumentNullException("card");
            }

            ActionQueue.EnqueueAction(new UpdateLedAndBuzzerAction(card, status));
        }
Example #4
0
        public void SetBuzzerOutputForCardDetection(ContactlessCard card, bool shouldBuzzWhenCardDetected)
        {
            if (_disposed)
            {
                throw new ObjectDisposedException("Cardreader", "Cannot access a disposed object.");
            }
            if (card == null)
            {
                throw new ArgumentNullException("card");
            }

            Logger.TraceEvent(TraceEventType.Verbose, 0, "Cardreader: SetBuzzerOutputForCardDetection entering");
            Logger.Flush();

            ActionQueue.EnqueueAction(new SetBuzzerOutputForCardDetectionAction(card, shouldBuzzWhenCardDetected));

            Logger.TraceEvent(TraceEventType.Verbose, 0, "Cardreader: SetBuzzerOutputForCardDetection done");
            Logger.Flush();
        }
Example #5
0
        internal virtual void OnCardConnected(object sender, WatcherCardEventArgs e)
        {
            var card = new ContactlessCard(e.Card);

            Logger.TraceEvent(TraceEventType.Verbose, 0, "Cardreader: Save invocation of CardConnected");
            Logger.Flush();

            CardConnected.SafeInvoke(this, new CardreaderEventArgs(card, e.Card.CardreaderName));
        }
Example #6
0
        public void UpdateLedAndBuzzer(ContactlessCard card, LedBuzzerStatus status)
        {
            if (_disposed) throw new ObjectDisposedException("Cardreader", "Cannot access a disposed object.");
            if (card == null) throw new ArgumentNullException("card");

            ActionQueue.EnqueueAction(new UpdateLedAndBuzzerAction(card, status));
        }