private void ConverterOnMessageReceived(object sender, MessageEventArgs e) { ReceivedMessage(e); }
private void WorkflowExtractorOnMessageReceived(object sender, MessageEventArgs e) { ReceivedMessage(e); }
private void UpdateError(object sender, MessageEventArgs e) { try { if (this.InvokeRequired) this.Invoke(new EventHandler<MessageEventArgs>(this.UpdateError), new object[] { sender, e }); else { if (e.CallStack.Count > 2) lstErrors.Items.Insert(0, "[" + e.CallStack[2] + "] " + e.Message); else lstErrors.Items.Insert(0, "[unknown] " + e.Message); } } catch { } }
private void UpdateOutput(object sender, MessageEventArgs e) { try { if (this.InvokeRequired) this.Invoke(new EventHandler<MessageEventArgs>(this.UpdateOutput), new object[] { sender, e }); else { //if (e.Type == Base.EventType.Complete) lstOutput.Items.Insert(0, "[" + sender + "] " + e.Message); } } catch { } }
private void ReceivedMessage(MessageEventArgs e) { if (e.Type == Base.EventType.Error) { UpdateError(this, e); } else if (e.Type == Base.EventType.Output || e.Type == Base.EventType.Complete || e.Type == Base.EventType.Started) { UpdateOutput(this, e); } }