private void tSMenuItem_UserInfo_Click(object sender, EventArgs e) { RespFunStruct respO = new RespFunStruct(); ReqeFunStruct UserO = opUserParam(); FunctionReturnBoolDelegateHandler funcCall = new FunctionReturnBoolDelegateHandler(Call); OpCommand.ShowLoadForm(GlobalStaticObj.AppMainForm, OpCommand.LForm); funcCall.BeginInvoke("新建用户", UserO, out respO, CallBack, funcCall); }
private void CallBack(IAsyncResult ar) { RespFunStruct result = new RespFunStruct(); FunctionReturnBoolDelegateHandler andl = (FunctionReturnBoolDelegateHandler)ar.AsyncState; andl.EndInvoke(out result, ar); bool flag = false; string str = bool.TryParse(result.ReturnObject, out flag) ? "新建用户成功" : "新建用户失败"; OpCommand.closeForm(OpCommand.myFormClose, OpCommand.LForm); MessageBox.Show(str); }