1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| var cookieManager = Cef.GetGlobalCookieManager(); cookieManager.SetStoragePath(GetAppDir("Cache"), false); cookieManager.SetSupportedSchemes(new string[] { "http" , "https" }); string[] arrcookies;
if (!Common.setcookie.IsNullOrEmpty()) { arrcookies = Common.setcookie.Split(';'); int intEachCookPartsCount = arrcookies.Length; for (int i = 0; i < intEachCookPartsCount; i++) { if (!arrcookies[i].IsNullOrEmpty()) { int IndexofA = arrcookies[i].IndexOf('='); bool status = cookieManager.SetCookie(Common.ToUrl, new Cookie { Name = arrcookies[i].Substring(0, IndexofA), Value = arrcookies[i].Substring(IndexofA + 1), }); } } }
|