public void Initialize()
        {
            cachePath = Path.Combine(Environment.CurrentDirectory, "Browser Cache", "Cef");

            if (clearCacheOnStartup.Value)
            {
                try
                {
                    Directory.Delete(cachePath, true);

                    clearCacheOnStartup.Value = false;
                }
                catch
                {
                }
            }

            CefSetting.Proxy = new CefProxy("localhost", proxy.ListeningPort.ToString());
            CefSetting.SubprocessExitIfParentProcessClosed = true;
            CefClass.Initialize(new DefaultCefSettings
            {
                CachePath = cachePath
            });
            CefClass.GetGlobalCookieManager().SetStoragePath(Path.Combine(Environment.CurrentDirectory, "Browser Cookies", "Cef"), true);

            proxy.IsEnabled = true;
        }
 public void Dispose() => CefClass.Shutdown();
 public void ClearCookie() => CefClass.GetGlobalCookieManager().DeleteCookies(null, null);