public void toLogin(LoginArgs e) { if (Login != null) { Login(this, e); } }
public TaringaApi(string user, string password) { this.user = user; this.passwd = password; request = new HTTPRequests(); request.onRecieveAsync += (rr, re) => { switch (re.type) { case "login": try { JObject jo = JObject.Parse(re.response); string Result = ""; switch (jo.SelectToken("status").ToString()) { case "0": Result = "Datos incorrectos"; break; case "1": Result = "true"; string html = request.getRequest("http://www.taringa.net/mi"); getKeys(html); getWebSocketPath(html); break; case "2": Result = "Esta cuenta se encuentra suspendida."; break; } LoginArgs e = new LoginArgs(); e.Result = Result; toLogin(e); } catch { LoginArgs e = new LoginArgs(); e.Result = "false"; toLogin(e); } break; case "shout": break; } }; }