public void ConvertToMirros() { List <Mirror> mirrorList = new List <Mirror>(); foreach (Bookmaker bookmaker in (Collection <Bookmaker>) this.Bookmakers) { mirrorList.Add(new Mirror() { BkName = bookmaker.Name, Url = bookmaker.CheckToRuAndGetCorrectMirror().ToString() }); } mirrorList.Add(new Mirror() { BkName = "2ip", Url = "https://2ip.ru" }); mirrorList.Add(new Mirror() { BkName = "yandex", Url = "https://yandex.ru/internet" }); mirrorList.Add(new Mirror() { BkName = "PositiveBet", Url = PositibetServerClient.GetUrl() }); if (this.Br1 != null) { this.Br1.Mirrors = mirrorList; } if (this.Br2 == null) { return; } this.Br2.Mirrors = mirrorList; }
public void SetPositiveCookie() { try { Dictionary <string, string> cookies = (this._client as PositibetServerClient)?.GetCookies(); ICookieManager globalCookieManager = Cef.GetGlobalCookieManager(); string url = PositibetServerClient.GetUrl(); if (cookies == null || globalCookieManager == null) { return; } foreach (KeyValuePair <string, string> keyValuePair in cookies) { globalCookieManager.SetCookie(url, new Cookie() { Name = keyValuePair.Key, Value = keyValuePair.Value }, (ISetCookieCallback)null); } } catch (Exception ex) { } }