㩷
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
㩷
Содержание DT-X30 R-50
Страница 11: ...External views of the DT X8 and the dedicated options Figure 2 1 11...
Страница 12: ...Figure 2 2 12...