public void Activate() { AP_REPL = new AP_REPL(MainV2.comPort); AP_REPL.NewResponse += (sender, s) => { try { addText(s); } catch (Exception ex) { log.Error(ex); } }; }