public void WriteRedline(string text) { if (LogToFile) streamWriter.WriteLine(text); AddToBox(text); }