ReadSoftButtons() private method

private ReadSoftButtons ( int device, SoftButtonFlags &buttons ) : ReturnValue
device int
buttons SoftButtonFlags
return ReturnValue
Ejemplo n.º 1
0
        public SoftButtonFlags ReadSoftButtons()
        {
            if (!Opened)
            {
                throw new Exception("Not opened.");
            }
            LgLcd.SoftButtonFlags buttonFlags;
            var error = LgLcd.ReadSoftButtons(Handle, out buttonFlags);

            if (error != LgLcd.ReturnValue.ErrorSuccess)
            {
                if (error == LgLcd.ReturnValue.ErrorDeviceNotConnected)
                {
                    throw new Exception("The specified device has been disconnected.");
                }
                throw new Win32Exception((int)error);
            }
            return((SoftButtonFlags)buttonFlags);
        }