/// <summary>
        ///
        /// </summary>
        /// <param name="e"></param>
        protected override void OnLoad(EventArgs e)
        {
            loopPeriodTextBox.Text        = (string)Application.UserAppDataRegistry.GetValue(GetType().Name + "LoopPeriod", "0.5");
            loopCheckBox.Checked          = ((int)Application.UserAppDataRegistry.GetValue(GetType().Name + "LoopEnabled", 0) != 0);
            assumeUnknownCheckBox.Checked = ((int)Application.UserAppDataRegistry.GetValue(GetType().Name + "AssumeUnknownTags", 0) != 0);
            switch ((int)Application.UserAppDataRegistry.GetValue(GetType().Name + "ReceiveTags", 0))
            {
            case 0:
            default:
                receiveTagsAsynchronouslyRadioButton.Checked = true;
                break;

            case 1:
                receiveTagsSynchronouslyAfterScanRadioButton.Checked = true;
                break;

            case 2:
                receiveTagsSynchronouslyDuringScanRadioButton.Checked = true;
                break;
            }

            base.OnLoad(e);

            // Get the latch status and display it.
            PbRspGetStatus status = (PbRspGetStatus)device.getStatus();

            // Get the device's current correlation threshold. This value is saved in Flash ROM on the
            // device and may be different per device.
            byte correlationThreshold = device.getCorrelationThreshold();

            Debug.Assert(correlationThreshold > 0);
            correlationThresholdTextBox.Text = correlationThreshold.ToString();
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="deviceBoard"></param>
        public DoorAndLightDialog(DeviceRfidBoard deviceBoard)
        {
            this.deviceBoard = deviceBoard;
            InitializeComponent();

            PbRspGetStatus status = (PbRspGetStatus)deviceBoard.getStatus();

            if ((status.doorStatus & (int)DoorStatusFlags.DSF_DoorIsOpen) != 0)
            {
                doorStateLabel.Text = "Door Open";
            }
            else
            {
                doorStateLabel.Text = "Door Closed";
            }
        }