Example #1
0
        private void handler(Event e)
        {
            StateEvent ev = (StateEvent)e;

            switch (ev.type)
            {
            case StateEvent.TURN_ON:
            {
                turnOn(ev.next, ev.args);
            } break;

            case StateEvent.TURN_OFF:
            {
                turnOff();
            } break;

            case StateEvent.CHANGE_STATE:
            {
                changeState(ev.next, ev.args);
            } break;
            }
        }
Example #2
0
 private void changeState(Event e)
 {
     StateEvent se = (StateEvent)e;
 }