private void mainTimer_Tick(object sender, EventArgs e)
{
lock (_textToAppend)
{
if (!string.IsNullOrEmpty(_textToAppend) && !_inPause)
{
logTextBox.AppendText(_textToAppend);
_textToAppend = "";
logTextBox.SelectionLength = 0;
logTextBox.SelectionStart = logTextBox.TextLength - 1;
logTextBox.ScrollToCaret();
}
EnableControls();
}
}