/// <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; } }; }
/// <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; } }