private static void Completed(IAsyncResult result) { AsyncResult _result = (AsyncResult)result; ShowWaitFormEventHandler showHandler = (ShowWaitFormEventHandler)_result.AsyncDelegate; try { showHandler.EndInvoke(result); } catch { } WaitFormService.Close(); }
public static void Show() { ShowWaitFormEventHandler showWaitFormEventHandler = new ShowWaitFormEventHandler(CreateForm); IAsyncResult result = showWaitFormEventHandler.BeginInvoke(new AsyncCallback(Completed), null); }