Example #1
0
        //print the tag code for the tag that was just lost
        void rfid_TagLost(object sender, TagEventArgs e)
        {
            IServiceProvider services       = Services;
            IMessageDisplay  messageDisplay = (IMessageDisplay)services.GetService(typeof(IMessageDisplay));

            messageDisplay.ShowFormattedMessage("Tag {0} lost", e.Tag);
        }
Example #2
0
        //detach event handler...display the serial number of the detached RFID phidget
        void rfid_Detach(object sender, DetachEventArgs e)
        {
            IServiceProvider services       = Services;
            IMessageDisplay  messageDisplay = (IMessageDisplay)services.GetService(typeof(IMessageDisplay));

            messageDisplay.ShowFormattedMessage("RFID reader {0} detached!", e.Device.SerialNumber.ToString());
        }
Example #3
0
        //Error event handler...display the error description string
        void rfid_Error(object sender, ErrorEventArgs e)
        {
            IServiceProvider services       = Services;
            IMessageDisplay  messageDisplay = (IMessageDisplay)services.GetService(typeof(IMessageDisplay));

            messageDisplay.ShowFormattedMessage(e.Description);
        }
Example #4
0
        //attach event handler...display the serial number of the attached RFID phidget
        void rfid_Attach(object sender, AttachEventArgs e)
        {
            //Get the toast message component
            IServiceProvider services       = Services;
            IMessageDisplay  messageDisplay = (IMessageDisplay)services.GetService(typeof(IMessageDisplay));

            rfid.Antenna = true;
            rfid.LED     = true;

            //pop up a message
            messageDisplay.ShowFormattedMessage("RFIDReader {0} attached!", e.Device.SerialNumber.ToString());
        }