Ejemplo n.º 1
0
        public void PostAsync(string Url, string Data, AjaxCallBack callback = null)
        {
            WebClientExt client = GetWebClient();

            client.UploadStringCompleted += Client_UploadStringCompleted;
            client.UploadStringAsync(new Uri(Url), "POST", Data, callback);
        }
Ejemplo n.º 2
0
        public void GetAsync(string Url, AjaxCallBack callback = null)
        {
            WebClientExt client = GetWebClient();

            client.DownloadStringCompleted += Client_DownloadStringCompleted;;
            client.DownloadStringAsync(new Uri(Url), callback);
        }
Ejemplo n.º 3
0
        public void PostDataAsync(string Url, string Data, AjaxCallBack callback = null)
        {
            WebClientExt client = GetWebClient();

            client.UploadDataCompleted += Client_UploadDataCompleted;
            client.UploadDataAsync(new Uri(Url), "POST", Encoder.GetBytes(Data), callback);
        }
Ejemplo n.º 4
0
        public static void GetData(Http http, string devid, LoginXmlResult loginInfo, SyncKeyData syncKey, long countid, AjaxCallBack callback)
        {
            string url = GetUrl(devid, loginInfo, syncKey, countid);

            http.GetAsync(url, callback);
        }
Ejemplo n.º 5
0
        public static void GetData(Http http, string devid, LoginXmlResult loginInfo, SyncKeyData syncKey, long rnd, AjaxCallBack callback)
        {
            string url   = GetUrl(loginInfo);
            string param = GetParams(devid, loginInfo, syncKey, rnd);

            http.PostDataAsync(url, param, callback);
        }
Ejemplo n.º 6
0
        public static void GetData(Http http, LoginXmlResult loginInfo, AjaxCallBack callback)
        {
            string url = GetUrl(loginInfo);

            http.GetAsync(url, callback);
        }
Ejemplo n.º 7
0
        public static void GetData(Http http, string devid, LoginXmlResult loginInfo, SendMsgInfo msgInfo, int Scene, AjaxCallBack callback)
        {
            string url   = GetUrl(loginInfo.pass_ticket);
            string param = GetParams(devid, loginInfo, msgInfo, Scene);

            http.PostDataAsync(url, param, callback);
        }
Ejemplo n.º 8
0
        public static void GetData(Http http, string devid, LoginXmlResult loginInfo, int code, string fromUser, string toUser, AjaxCallBack callback)
        {
            string url   = GetUrl(loginInfo.pass_ticket);
            string param = GetParams(devid, loginInfo, code, fromUser, toUser);

            http.PostDataAsync(url, param, callback);
        }
        public static void GetData(Http http, string devid, LoginXmlResult loginInfo, List <Contact> list, AjaxCallBack callback)
        {
            string url   = GetUrl(loginInfo.pass_ticket, loginInfo.skey);
            string param = GetParams(devid, loginInfo, list);

            http.PostDataAsync(url, param, callback);
        }