private void http_OnResived(object sender, HttpSync.HttpSyncArgs e) { HttpSync httpSync = sender as HttpSync; if (httpSync != null) { httpSync.OnResived -= new EventHandler <HttpSync.HttpSyncArgs>(this.http_OnResived); } this.User.ErrorMsg = Login.CocosLoginMsg(e.Message); this.Resived(this.User); }
public void SyncLoginCocos(string name, string password) { this.User = new User() { UserName = name, PassWord = password }; HttpSync httpSync = new HttpSync(); httpSync.OnResived += new EventHandler <HttpSync.HttpSyncArgs>(this.http_OnResived); httpSync.GetSyncResponseOfString("https://passport.cocos.com/oauth/token/?" + this.User.CocosLoginData, "get", ""); }
public void SyncLoginCocoaChina(string name, string password) { this.User = new User() { UserName = name, PassWord = password }; HttpSync httpSync = new HttpSync(); httpSync.OnResived += new EventHandler <HttpSync.HttpSyncArgs>(this.http_OnResived); httpSync.GetSyncResponseOfString("http://open.cocos.org/api/user_login", "post", this.User.LoginData); }