Use invoke so that we run code on the UI thread (no idea how this was working before)
This commit is contained in:
Родитель
77e7a20f83
Коммит
da843919c9
|
@ -102,8 +102,13 @@ namespace WindowsFormsSample
|
|||
}
|
||||
|
||||
private void Log(Color color, string message)
|
||||
{
|
||||
Action callback = () =>
|
||||
{
|
||||
messagesList.Items.Add(new LogMessage(color, message));
|
||||
};
|
||||
|
||||
Invoke(callback);
|
||||
}
|
||||
|
||||
private class LogMessage
|
||||
|
|
Загрузка…
Ссылка в новой задаче