예제 #1
0
 protected void OnCommand(CommandEventArgs e)
 {
     if (Command != null)
     {
         Command(this, e);
     }
 }
예제 #2
0
 private void OnCommand(object sender, CommandEventArgs args)
 {
     try
     {
         postMessageEvent(new MessageEventArgs(EventType.COMMAND, args.Command, args.ChannelID));
         IReturnVector result = interpreter.executeCommand(args.Command);
         postMessageEvent(new MessageEventArgs(EventType.RESULT, result, args.ChannelID));
     }
     catch (Exception e)
     {
         postMessageEvent(new MessageEventArgs(EventType.ERROR, e, args.ChannelID));
     }
 }