Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ChromiumWebBrowser"/> class.
        /// </summary>
        /// <param name="address">The address.</param>
        /// <exception cref="System.InvalidOperationException">Cef::Initialize() failed</exception>
        public ChromiumWebBrowser(string address)
        {
            if (!Cef.IsInitialized && !Cef.Initialize())
            {
                throw new InvalidOperationException("Cef::Initialize() failed");
            }

            Cef.AddDisposable(this);
            Address = address;

            Dock = DockStyle.Fill;

            FocusHandler = new DefaultFocusHandler(this);
            ResourceHandlerFactory = new DefaultResourceHandlerFactory();
            BrowserSettings = new BrowserSettings();

            managedCefBrowserAdapter = new ManagedCefBrowserAdapter(this, false);
        }
Ejemplo n.º 2
0
		protected void Initialize()
		{
			Application.ApplicationExit += OnApplicationExit;
			Cef.AddDisposable(this);
			// Dock = DockStyle.Fill;

			FocusHandler = new DefaultFocusHandler(this);
			ResourceHandler = new DefaultResourceHandler();

			managedCefBrowserAdapter = new ManagedCefBrowserAdapter(this);
		}