void AddLogEntry(CLogEntry logentry) { ListViewItem lvi; int k = 0; lvi = lvEvents.Items.Add(logentry.SourceName); lvi.SubItems.Add(logentry.Messsage); if (logentry.LogEntryType == ELogEntryType.Error) k = 1; lvi.ImageIndex = k; }
public void Add(ELogEntryType logentrytype, string sourcename, string messsage) { CLogEntry logentry; lock (this) { logentry = new CLogEntry(logentrytype, sourcename, messsage); LogEntries.Add(logentry); } OnAddToLog(logentry); }
private void OnAddToLog(CLogEntry logentry) { CLogEventArgs e = new CLogEventArgs(); e.LogEntry = logentry; EventHandler <CLogEventArgs> handler = SourceEventListener; if (handler != null) { handler(this, e); } }
void AddLogEntry(CLogEntry logentry) { ListViewItem lvi; int k = 0; lvi = lvEvents.Items.Add(logentry.SourceName); lvi.SubItems.Add(logentry.Messsage); if (logentry.LogEntryType == ELogEntryType.Error) { k = 1; } lvi.ImageIndex = k; }
private void OnAddToLog(CLogEntry logentry) { CLogEventArgs e = new CLogEventArgs(); e.LogEntry = logentry; EventHandler<CLogEventArgs> handler = SourceEventListener; if (handler != null) { handler(this, e); } }