private void RemoveLineWithDelay(CConsoleLineVM line, int delayMillisec) { Task.Factory.StartNew(() => { Thread.Sleep(delayMillisec); Invoke(() => Lines.Remove(line)); }); }
private void AddConsoleLine(CConsoleLineVM line) { Invoke(() => Lines.Add(line)); if (mRemoveAfterDelay) RemoveLineWithDelay(line, 5000); }