Пример #1
0
        public BrowserTab(string url, ToolStripComboBox addressBar)
        {
            this.addressBar = addressBar;

            Browser = new ExtendedBrowser {
                Dock = DockStyle.Fill
            };
            Browser.TitleChanged   += Browser_TitleChanged;
            Browser.AddressChanged += Browser_AddressChanged;

            var lifespanHandler = new LifespanHandler();

            Browser.LifeSpanHandler        = lifespanHandler;
            lifespanHandler.OpenInNewTab  += LifespanHandler_OpenInNewTab;
            Browser.HandleCreated         += Browser_HandleCreated;
            Browser.MouseMove             += Browser_MouseMove;
            Browser.OnLoadingStateChanged += Browser_OnLoadingStateChanged;

            BrowserSettings bs = new BrowserSettings
            {
                Javascript   = RuntimeSettings.JsDisabled ? CefState.Disabled : CefState.Default,
                ImageLoading = RuntimeSettings.ImagesDisabled ? CefState.Disabled : CefState.Default,
                Plugins      = RuntimeSettings.PluginsDisabled ? CefState.Disabled : CefState.Default
            };

            Browser.BrowserSettings = bs;

            Controls.Add(Browser);
            Browser.Load(url);
        }
Пример #2
0
        public BrowserTab(string url, ToolStripComboBox addressBar)
        {
            this.addressBar = addressBar;

            Browser = new ExtendedBrowser {Dock = DockStyle.Fill};
            Browser.TitleChanged += Browser_TitleChanged;
            Browser.AddressChanged += Browser_AddressChanged;
            Browser.DownloadHandler = new DownloadHandler();

            var lifespanHandler = new LifespanHandler();
            Browser.LifeSpanHandler = lifespanHandler;
            lifespanHandler.OpenInNewTab += LifespanHandler_OpenInNewTab;
            Browser.HandleCreated += Browser_HandleCreated;
            Browser.MouseMove += Browser_MouseMove;
            Browser.OnLoadingStateChanged += Browser_OnLoadingStateChanged;
            Controls.Add(Browser);

            Browser.Load(url);
        }
Пример #3
0
        public BrowserTab(string url, ToolStripComboBox addressBar)
        {
            this.addressBar = addressBar;

            Browser = new ExtendedBrowser {
                Dock = DockStyle.Fill
            };
            Browser.TitleChanged   += Browser_TitleChanged;
            Browser.AddressChanged += Browser_AddressChanged;

            var lifespanHandler = new LifespanHandler();

            Browser.LifeSpanHandler        = lifespanHandler;
            lifespanHandler.OpenInNewTab  += LifespanHandler_OpenInNewTab;
            Browser.HandleCreated         += Browser_HandleCreated;
            Browser.MouseMove             += Browser_MouseMove;
            Browser.OnLoadingStateChanged += Browser_OnLoadingStateChanged;


            Controls.Add(Browser);

            Browser.Load(url);
        }