public TimeSpreadCalculator(LogWindow logWindow)
 {
     this.logWindow          = logWindow;
     this.callback           = new LogWindow.ColumnizerCallback(this.logWindow);
     calcThread              = new Thread(new ThreadStart(WorkerFx));
     calcThread.IsBackground = true;
     calcThread.Start();
 }
Example #2
0
 internal IColumnizedLogLine GetColumnsForLine(LogfileReader logFileReader, int lineNumber,
                                               ILogLineColumnizer columnizer,
                                               LogWindow.ColumnizerCallback columnizerCallback)
 {
     if (lastColumnizer != columnizer || lastLineNumber != lineNumber && cachedColumns != null ||
         columnizerCallback.LineNum != lineNumber)
     {
         lastColumnizer = columnizer;
         lastLineNumber = lineNumber;
         ILogLine line = logFileReader.GetLogLineWithWait(lineNumber);
         if (line != null)
         {
             columnizerCallback.LineNum = lineNumber;
             cachedColumns = columnizer.SplitLine(columnizerCallback, line);
         }
         else
         {
             cachedColumns = null;
         }
     }
     return(cachedColumns);
 }