private void OnNewStatusReceived(object sender, NewStatusEventArgs e) { if (InvokeRequired) { // that ninjutsu helps with OutOfMemory! BeginInvoke(new EventHandler <NewStatusEventArgs>(OnNewStatusReceived), sender, e) .AsyncWaitHandle.WaitOne(); } else { Text = e.Status; } }
void _forum_StatusUpdate(object sender, NewStatusEventArgs e) { statusText.Text = e.Status; }
private void Catalog_NewStatusSent(object sender, NewStatusEventArgs e) { Invoke(new MethodInvoker(() => { btnGenerate.Text = e.Message; })); }