/// <summary>
        /// Get current button state.
        /// This internally checks the connection and try reconnection if needed.
        /// </summary>
        public DelcomButtonState GetButtonState()
        {
            if (!this.DeviceIsConnected())
            {
                Trace.TraceWarning("Delcom light device seems disconnected. Reconnecting.");
                ReopenDevice();
            }

            return((DelcomButtonState)Delcom.DelcomGetButtonStatus(this.deviceHandle));
        }
 public static ButtonState DelcomGetButtonStatus(uint hUSB)
 {
     return((ButtonState)Delcom.DelcomGetButtonStatus(hUSB));
 }