/// <summary> /// Set the browser instance for the control to work with /// </summary> /// <param name="browser">The GEWebBrowser instance</param> /// <example>GEToolStrip.SetBrowserInstance(GEWebBrowser)</example> public void SetBrowserInstance(GEWebBrowser browser) { this.gewb = browser; this.geplugin = browser.GetPlugin(); this.Enabled = true; if (this.gewb.PluginIsReady) { this.Enabled = true; this.timer = new Timer(); this.timer.Interval = this.interval; this.timer.Start(); this.timer.Tick += new EventHandler(this.Timer_Tick); try { this.browserVersionStatusLabel.Text = "ie " + this.gewb.Version.ToString(); this.apiVersionStatusLabel.Text = "api " + this.geplugin.getApiVersion(); this.pluginVersionStatusLabel.Text = "plugin " + this.geplugin.getPluginVersion(); } catch (RuntimeBinderException ex) { Debug.WriteLine("SetBrowserInstance: " + ex.ToString(), "StatusStrip"); ////throw; } } }
/// <summary> /// Set the browser instance for the control to work with /// </summary> /// <param name="browser">The GEWebBrowser instance</param> public void SetBrowserInstance(GEWebBrowser browser) { this.gewb = browser; this.geplugin = browser.GetPlugin(); this.htmlDocument = browser.Document; this.Nodes.Clear(); this.Enabled = true; }
/// <summary> /// Set the browser instance for the control to work with /// </summary> /// <param name="browser">The GEWebBrowser instance</param> /// <example>GEToolStrip.SetBrowserInstance(GEWebBrowser)</example> public void SetBrowserInstance(GEWebBrowser browser) { this.gewb = browser; this.geplugin = browser.GetPlugin(); if (this.gewb.PluginIsReady) { this.SynchronizeOptions(); this.htmlDocument = browser.Document; this.Enabled = true; this.gewb.PluginReady += new GEWebBrowserEventHandler(this.Gewb_PluginReady); } }