//--// static PowerState() { PowerStateEventProcessor psep = new PowerStateEventProcessor(); PowerStateEventListener psel = new PowerStateEventListener(); Microsoft.SPOT.EventSink.AddEventProcessor(EventCategory.SleepLevel, psep); Microsoft.SPOT.EventSink.AddEventListener(EventCategory.SleepLevel, psel); Microsoft.SPOT.EventSink.AddEventProcessor(EventCategory.PowerLevel, psep); Microsoft.SPOT.EventSink.AddEventListener(EventCategory.PowerLevel, psel); }