public void EndWrite(bool initialLoad, TailStatistics tailStatistics) { this.Invoke(new Action(() => { if (initialLoad) { scintilla.Enabled = true; toolStripStatusLabelStatus.Text = "Following"; } SendMessage(scintilla.Handle, WM_SETREDRAW, true, 0); if (initialLoad || (tailStatistics.LastRead > 0)) { if (AutoScroll && scintilla.Enabled) { scintilla.SelectionStart = scintilla.Text.Length; scintilla.ScrollCaret(); } scintilla.Refresh(); var now = DateTime.Now; toolStripStatusLabelRead.Text = string.Format("Updated: {0} (Read {1})", now.ToString("G"), tailStatistics.LastRead); toolStripStatusLabelTotalLines.Text = "Total: " + tailStatistics.Total; toolStripStatusLabelLinesDisplayed.Text = "Displayed: " + tailStatistics.Displayed; toolStripStatusLabelLinesIgnored.Text = "Ignored: " + tailStatistics.Ignored; } this.UseWaitCursor = false; })); }