Esempio n. 1
0
        // CEF checks (MUST not initialize CEF to avoid memory usage)
        static CEFHost()
        {
            var settings = GetCEFSettings();

            try
            {
                StopwatchAuto sw = new StopwatchAuto();
                DependencyChecker.AssertAllDependenciesPresent(null, settings.LocalesDirPath, settings.ResourcesDirPath, false, settings.BrowserSubprocessPath);
                sw.StopAndLog();
            }
            catch (Exception ex)
            {
                Utils.MsgBox("[HtmlView] CEFSharp initialization check failed: \n\n" + ex);
            }
        }
Esempio n. 2
0
        public Main()
        {
            InitializeComponent();

            Cef.Initialize(new CefSettings()
            {
                IgnoreCertificateErrors = true,
                UserAgent = "Mozilla/5.0 (Linux; Android 7.0; SM-G930V Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.125 Mobile Safari/537.36"
            });

            DependencyChecker.AssertAllDependenciesPresent();

            Browser = new ChromiumWebBrowser(string.Empty, new BrowserSettings()
            {
                ImageLoading = CefState.Disabled
            });
            Browser.FindHandler = new ListProcessor.FindResult();
            Browser.Size        = new System.Drawing.Size(1024, 16000);

            Go.Enabled = false;
        }