void GetRollThread(object _BetID) { try { long BetID = (long)_BetID; HttpWebRequest betrequest = (HttpWebRequest)HttpWebRequest.Create("https://api.primedice.com/api/bets/" + BetID); if (Prox != null) { betrequest.Proxy = Prox; } betrequest.Method = "GET"; betrequest.ContentType = "application/x-www-form-urlencoded; charset=UTF-8"; HttpWebResponse EmitResponse = (HttpWebResponse)betrequest.GetResponse(); string sEmitResponse = new StreamReader(EmitResponse.GetResponseStream()).ReadToEnd(); pdbet tmp = json.JsonDeserialize <pdbet>(sEmitResponse); if (tmp.bet.server != "") { sqlite_helper.InsertSeed(tmp.bet.server, sqlite_helper.GetHashForBet(Name, long.Parse(tmp.bet.id))); } } catch { } GettingSeed = false; }
void GetRollThread(object _BetID) { try { long BetID = (long)_BetID; string sEmitResponse = Client.GetStringAsync("bets/" + BetID).Result; pdbet tmp = json.JsonDeserialize <pdbet>(sEmitResponse); if (tmp.bet.server != "") { sqlite_helper.InsertSeed(tmp.bet.server, sqlite_helper.GetHashForBet(Name, long.Parse(tmp.bet.id))); } } catch { } GettingSeed = false; }