Casio DT-X8 Series Quick Start Manual page 67

Casio dt-x8 series barcode scanner
Hide thumbs Also See for DT-X8 Series:
Table of Contents

Advertisement

5. Add a button to your form, rename it LED and double click it and then add the following code:
Int32 result = new Int32();
string msg;
result = SystemLibNet.Api.SysSetLED(SystemLibNet.Def.LED_RED, 5,
8, 8);
// .Net values "true" and "false" are "-1" and "0" respectively.
if(result == -1)
{
result = SystemLibNet.Api.SysGetLED();
switch(result & 0x0000000F)
{
case SystemLibNet.Def.LED_OFF:
msg = "LED_OFF";
break;
case SystemLibNet.Def.LED_RED:
msg = "LED_RED";
break;
case SystemLibNet.Def.LED_GREEN:
msg = "LED_GREEN";
break;
case SystemLibNet.Def.LED_ORANGE:
msg = "LED_ORANGE";
break;
case SystemLibNet.Def.LED_BLUE:
msg = "LED_BLUE";
break;
case SystemLibNet.Def.LED_CYAN:
msg = "LED_CYAN";
break;
case SystemLibNet.Def.LED_MAGENTA:
msg = "LED_MAGENTA";
break;
default:
msg = "LED_UNKNOWN";
break;
}
MessageBox.Show( msg, "LED");
}
Note:
If you add this code manually you should see the IntelliSense offer you suitable options as
appropriate. If you do not see this, then review steps 2 to 4 in the previous page to make sure you
have not made a mistake.
67

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents