public Int32 InvStopProc([In] IntPtr hWnd, [In] UInt32 nMessage, [In, Out] UInt32 wParam, ref ACCESS_STATUS lpAccessStatus) { #region codes ======================================== ErrorMessageDelegate errorMessage = new ErrorMessageDelegate(ErrorMessage); this.Invoke(errorMessage, new Object[] { (Result)lpAccessStatus.dwStatus, (Int32)lpAccessStatus.dwErrorCode, String.Empty }); InsertItemDelegate insertItem = new InsertItemDelegate(InsertItem); RetrieveData(ref lpAccessStatus, insertItem, true); if (m_bContinue) { if ((Result)lpAccessStatus.dwStatus == Result.OPERATION_CANCELLED) { this.Invoke(new StopInvDelegate(StopInventory)); } } else { this.Invoke(new StopInvDelegate(StopInventory)); } return(1); #endregion //end codes }
private static void onDisconnected(IAsyncResult result) { ErrorMessageDelegate show_disconnect = new ErrorMessageDelegate(GlobalObject.MainWindowInstance.showDisconnectError); GlobalObject.MainWindowInstance.Dispatcher.Invoke(show_disconnect, new object[] { "网络异常", "网络连接中断,请尝试重新进入中二世界!" }); }