示例#1
0
        //--//

        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);
        }
示例#2
0
        //--//

        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);
        }