Exemplo n.º 1
0
        public CefWebBrowser()
        {
            SetStyle(
                ControlStyles.ContainerControl
                | ControlStyles.ResizeRedraw
                | ControlStyles.FixedWidth
                | ControlStyles.FixedHeight
                | ControlStyles.StandardClick
                | ControlStyles.UserMouse
                | ControlStyles.SupportsTransparentBackColor
                | ControlStyles.StandardDoubleClick
                | ControlStyles.OptimizedDoubleBuffer
                | ControlStyles.CacheText
                | ControlStyles.EnableNotifyMessage
                | ControlStyles.DoubleBuffer
                | ControlStyles.OptimizedDoubleBuffer
                | ControlStyles.UseTextForAccessibility
                | ControlStyles.Opaque,
                false);

            SetStyle(
                ControlStyles.UserPaint
                | ControlStyles.AllPaintingInWmPaint
                | ControlStyles.Selectable,
                true);

            var settings = new CefBrowserSettings();

            // settings.ImageLoading = CefState.Disabled;
            // settings.AcceleratedCompositing = CefState.Disabled;

            _core          = new WebBrowser(this, settings, "about:blank");
            _core.Created += new EventHandler(BrowserCreated);
        }
Exemplo n.º 2
0
        public CefWebBrowser()
        {
            SetStyle(
                ControlStyles.ContainerControl
                | ControlStyles.ResizeRedraw
                | ControlStyles.FixedWidth
                | ControlStyles.FixedHeight
                | ControlStyles.StandardClick
                | ControlStyles.UserMouse
                | ControlStyles.SupportsTransparentBackColor
                | ControlStyles.StandardDoubleClick
                | ControlStyles.OptimizedDoubleBuffer
                | ControlStyles.CacheText
                | ControlStyles.EnableNotifyMessage
                | ControlStyles.DoubleBuffer
                | ControlStyles.OptimizedDoubleBuffer
                | ControlStyles.UseTextForAccessibility
                | ControlStyles.Opaque,
                false);

            SetStyle(
                ControlStyles.UserPaint
                | ControlStyles.AllPaintingInWmPaint
                | ControlStyles.Selectable,
                true);

            var settings = new CefBrowserSettings();
            // settings.ImageLoading = CefState.Disabled;
            // settings.AcceleratedCompositing = CefState.Disabled;

            _core = new WebBrowser(this, settings, "about:blank");
            _core.Created += new EventHandler(BrowserCreated);
        }
Exemplo n.º 3
0
 public WebClient(WebBrowser core)
 {
     _core = core;
     _lifeSpanHandler = new WebLifeSpanHandler(_core);
     _displayHandler = new WebDisplayHandler(_core);
     _loadHandler = new WebLoadHandler(_core);
 }
Exemplo n.º 4
0
        public CefWebBrowser()
        {
            _core = new WebBrowser(this, new CefBrowserSettings(), "about:blank");
            _core.Created += new EventHandler(BrowserCreated);

            WidgetFlags &= ~(WidgetFlags.DoubleBuffered);
            WidgetFlags |= WidgetFlags.NoWindow;
        }
Exemplo n.º 5
0
        protected override void Dispose(bool disposing)
        {
            if (_core != null && disposing)
            {
                _core.Close();
            }

            _core = null;
            _browserWindowHandle = IntPtr.Zero;

            base.Dispose(disposing);
        }
Exemplo n.º 6
0
 public WebLoadHandler(WebBrowser core)
 {
     _core = core;
 }
 public WebLifeSpanHandler(WebBrowser core)
 {
     _core = core;
 }
Exemplo n.º 8
0
 public WebDisplayHandler(WebBrowser core)
 {
     _core = core;
 }
Exemplo n.º 9
0
        protected override void Dispose(bool disposing)
        {
            if (_core != null && disposing)
            {
                _core.Close();
            }

            _core = null;
            _browserWindowHandle = IntPtr.Zero;

            base.Dispose(disposing);
        }
Exemplo n.º 10
0
 internal void Attach(WebBrowser browser)
 {
     _browser = browser;
 }