private void AddLog(ListBox listBox, Helper.LogEntity logEntity) { if (listBox.InvokeRequired) { listBox.Invoke(new Action(() => listBox.Items.Insert(0, logEntity.Message))); } else { listBox.Items.Insert(0, logEntity.Message); } }
private void TlRunner_LogEvent(Helper.LogEntity logEntity) { AddLog(this.logTelegram, logEntity); }
private void BaleRunner_LogEvent(Helper.LogEntity logEntity) { AddLog(this.logBale, logEntity); }