Пример #1
0
 @Override
 public void onKeyDown(final KyPressedEvent evt) {
   if (evt.getCode() == CODE[index]) {
     index++;
     if (index > CODE.length - 2) evt.consume();
     if (index == CODE.length) {
       index = 0;
       final ThreadService threadService = getContext().getService(ThreadService.class);
       threadService.run(this);
       final CommandService commandService = getContext().getService(CommandService.class);
       commandService.run(COMMAND);
     }
   } else index = 0;
 }
Пример #2
0
 @Override
 public void configure() {
   commandService.run(OptionsChannels.class);
 }