Casio IT-800 Series Spezifikationen Seite 58

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 60
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 57
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.
58
Seitenansicht 57
1 2 ... 53 54 55 56 57 58 59 60

Kommentare zu diesen Handbüchern

Keine Kommentare