/// <summary>
        /// Set the browser instance for the control to work with
        /// </summary>
        /// <param name="instance">The GEWebBrowser instance</param>
        /// <example>Example: GEToolStrip.SetBrowserInstance(GEWebBrowser)</example>
        public void SetBrowserInstance(GEWebBrowser instance)
        {
            this.browser = instance;

            if (!this.browser.PluginIsReady)
            {
                return;
            }

            this.Enabled = true;
            this.options = new GEOptions(this.browser.Plugin);
            this.control = new GENavigationControl(this.browser.Plugin);
            this.SynchronizeOptions();

            this.browser.PropertyChanged += (o, e) =>
            {
                if (e.PropertyName == "PluginIsReady")
                {
                    this.Enabled = this.browser.PluginIsReady;
                }
            };
        }
Пример #2
0
        /// <summary>
        /// Set the browser instance for the control to work with
        /// </summary>
        /// <param name="instance">The GEWebBrowser instance</param>
        /// <example>Example: GEToolStrip.SetBrowserInstance(GEWebBrowser)</example>
        public void SetBrowserInstance(GEWebBrowser instance)
        {
            this.browser = instance;

            if (this.browser.PluginIsReady)
            {
                this.options = new GEOptions(this.browser.Plugin);
                this.control = new GENavigationControl(this.browser.Plugin);
                this.SynchronizeOptions();
                this.Enabled = true;
            }
        }
        /// <summary>
        /// Set the browser instance for the control to work with
        /// </summary>
        /// <param name="instance">The GEWebBrowser instance</param>
        /// <example>Example: GEToolStrip.SetBrowserInstance(GEWebBrowser)</example>
        public void SetBrowserInstance(GEWebBrowser instance)
        {
            this.browser = instance;

            if (!this.browser.PluginIsReady)
            {
                return;
            }

            this.Enabled = true;
            this.options = new GEOptions(this.browser.Plugin);
            this.control = new GENavigationControl(this.browser.Plugin);
            this.SynchronizeOptions();

            this.browser.PropertyChanged += (o, e) =>
            {
                if (e.PropertyName == "PluginIsReady")
                {
                    this.Enabled = this.browser.PluginIsReady;
                }
            };
        }