public static void promoteUI(string entry, string account, string ip, string port) { insMainFrm.tsslableEntry.Text = entry; insMainFrm.tsslableAccount.Text = account; insMainFrm.tsslableIP.Text = ip; insMainFrm.tsslablePort.Text = port; bindDelegate insBindDelegate = new bindDelegate(insMainFrm.bindData); insMainFrm.Invoke(insBindDelegate); }
public static void MainUIInvoke(Action action) { if (MainForm == null || MainForm.Disposing || MainForm.IsDisposed) { return; } MainForm.Invoke(action); }
void _guiTimer_Tick(object sender, EventArgs e) { _guiTimer.Stop(); //_elapsed(sender, e); // Synchronize thread with GUI because SIP stack works with GUI thread only if ((_form.IsDisposed) || (_form.Disposing) || (!_form.IsInitialized)) { return; } _form.Invoke(_elapsed, new object[] { sender, e }); }