public void WriteToLog(string logText)
{
if (this.bReconstruct.Dispatcher.CheckAccess())
{
tbLog.Text += "\n" + logText;
tbLog.ScrollToEnd();
}
else
{
this.tbLog.Dispatcher.BeginInvoke(
System.Windows.Threading.DispatcherPriority.Normal,
new LogUpdate(WriteToLog), logText);
}
}