protected void OnCommand(CommandEventArgs e) { if (Command != null) { Command(this, e); } }
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)); } }