private static bool StartInitCryReport() { try { OnInitCryReportHandler handler = new OnInitCryReportHandler(InitCryReport); bool end = false; handler.BeginInvoke(new AsyncCallback(StartInitCryReporCallBack), end); return(end); } catch { return(true); } }
private static void StartInitCryReporCallBack(IAsyncResult result) { try { OnInitCryReportHandler hander = (OnInitCryReportHandler)((System.Runtime.Remoting.Messaging.AsyncResult)result).AsyncDelegate; hander.EndInvoke(result); if (result.IsCompleted) { initCryptEnd = true; } } catch { initCryptEnd = true; } }