internal LogViewProgressMonitor(LogView pad, bool clearConsole) : base(Runtime.MainSynchronizationContext) { outputPad = pad; Indent = new IndentTracker(); if (clearConsole) { outputPad.Clear(); } internalLogger.TextWritten += WriteConsoleLogText; console = new LogViewProgressConsole(this); }
//FIXME: this sync context is somewhat redundant, as the pad does its own GUI synchronization //that said, it's also used for the console and writers, so it's not simple to fix internal LogViewProgressMonitor(LogView pad, bool clearConsole) : base(Runtime.MainSynchronizationContext) { outputPad = pad; Indent = new IndentTracker(); if (clearConsole) { unchecked { outputPad.Cookie++; } outputPad.Clear(); } padCookie = pad.Cookie; internalLogger.TextWritten += WriteConsoleLogText; InfoLog.TextWritten += InfoLog_TextWritten; DebugLog.TextWritten += DebugLog_TextWritten; WarningLog.TextWritten += WarningLog_TextWritten; console = new LogViewProgressConsole(this); }