コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }