private void EndInvokeMethod(System.IAsyncResult result) { SenderLoadControl slc = (SenderLoadControl)((AsyncResult)result).AsyncDelegate; slc.EndInvoke(result); CloseThisWin(); }
private void frmPreloading_Shown(object sender, EventArgs e) { try { if (m_frmReference != null) { SenderLoadControl slc = new SenderLoadControl(((IProcessAsync)m_frmReference).InitProcess); AsyncCallback async = new AsyncCallback(EndInvokeMethod); slc.BeginInvoke(async, null); } else { try { SenderLoadControl slc = new SenderLoadControl(((IProcessAsync)_frmReference).InitProcess); AsyncCallback async = new AsyncCallback(EndInvokeMethod); slc.BeginInvoke(async, null); } catch { CloseThisWin(); } } } catch { CloseThisWin(); } }
private void Splash_Shown(object sender, EventArgs e) { SenderLoadControl slc = new SenderLoadControl(LoadControl); slc.BeginInvoke(null, null); }