private void logEntryList_NewEntry(object sender, LogEntryList.ViewEntryEventArgs e) { DataLogOutput.LogEntry logEntry = e.Entry.LogEntry; bool isHidden = this.DockHandler.DockState.IsAutoHide() && !this.ContainsFocus; bool unseenChanges = false; if (isHidden) { if (logEntry.Type == LogMessageType.Warning) { this.unseenWarnings++; unseenChanges = true; } else if (logEntry.Type == LogMessageType.Error) { if (this.unseenErrors == 0) { System.Media.SystemSounds.Hand.Play(); } this.unseenErrors++; unseenChanges = true; } } if (unseenChanges) { this.UpdateTabText(); } }
public ViewEntry AddEntry(DataLogOutput.LogEntry entry) { ViewEntry viewEntry = new ViewEntry(this, entry); this.entryList.Add(viewEntry); if (this.NewEntry != null) { this.NewEntry(this, new ViewEntryEventArgs(viewEntry)); } this.OnContentChanged(); return(viewEntry); }
public ViewEntry(LogEntryList parent, DataLogOutput.LogEntry log) { this.parent = parent; this.log = log; this.msgLines = log.Message.Split(new string[] { Environment.NewLine }, StringSplitOptions.None).Length; }
public ViewEntry GetViewEntry(DataLogOutput.LogEntry entry) { return(this.entryList.FirstOrDefault(e => e.LogEntry == entry)); }