private void lvMessages_DoubleClick(object sender, EventArgs e) { var msg = SelectedRecord; if (msg == null) { return; } LogMessageEventArgs ev = new LogMessageEventArgs { LogRecord = msg, Handled = false }; if (MessageDoubleClick != null) { MessageDoubleClick(sender, ev); } if (!ev.Handled) { ShowDetail(msg); } }
void m_source_OnMessage(object sender, LogMessageEventArgs e) { try { Invoke((Action)(() => { AddLogMessage(e.LogRecord); })); } catch { } }