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;
 }
Example #2
0
        public void Add(ELogEntryType logentrytype, string sourcename, string messsage)
        {
            CLogEntry logentry;

            lock (this)
            {
                logentry = new CLogEntry(logentrytype, sourcename, messsage);
                LogEntries.Add(logentry);
            }
            OnAddToLog(logentry);
        }
Example #3
0
        private void OnAddToLog(CLogEntry logentry)
        {
            CLogEventArgs e = new CLogEventArgs();

            e.LogEntry = logentry;
            EventHandler <CLogEventArgs> handler = SourceEventListener;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Example #4
0
        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;
        }
Example #5
0
 public void Add(ELogEntryType logentrytype, string sourcename, string messsage)
 {
     CLogEntry logentry;
     lock (this)
     {
         logentry = new CLogEntry(logentrytype, sourcename, messsage);
         LogEntries.Add(logentry);
     }
     OnAddToLog(logentry);
 }
Example #6
0
 private void OnAddToLog(CLogEntry logentry)
 {
     CLogEventArgs e = new CLogEventArgs();
     e.LogEntry = logentry;
     EventHandler<CLogEventArgs> handler = SourceEventListener;
     if (handler != null)
     {
         handler(this, e);
     }
 }