private void game_NewGenerationCreated(object sender, NewGenerationEventArgs e) { if (InvokeRequired) { Invoke(new UpdateUiCallback(UpdateUi), new object[] { e.Bitmap }); } else { UpdateUi(e.Bitmap); } }