public HtmlViewPane(bool showNavigation) { Dock = DockStyle.Fill; Size = new Size(500, 500); webBrowser = new ExtendedWebBrowser(); webBrowser.Dock = DockStyle.Fill; webBrowser.Navigating += WebBrowserNavigating; webBrowser.NewWindowExtended += NewWindow; webBrowser.Navigated += WebBrowserNavigated; webBrowser.StatusTextChanged += WebBrowserStatusTextChanged; webBrowser.DocumentCompleted += WebBrowserDocumentCompleted; PictureBox pictureBox = new PictureBox(); //pictureBox.Dock = DockStyle.Right; pictureBox.SizeMode = PictureBoxSizeMode.StretchImage; pictureBox.Size = new Size(400, 300); int x = SystemInformation.WorkingArea.Width - pictureBox.Size.Width - 200; int y = SystemInformation.WorkingArea.Height - pictureBox.Size.Height - 40; pictureBox.Location = new Point(x, y); Assembly assm = Assembly.GetExecutingAssembly(); System.IO.Stream istr = assm.GetManifestResourceStream("FanHai.Gui.Framework.Resources.home.jpg"); pictureBox.Image = Image.FromStream(istr); Controls.Add(pictureBox); if (showNavigation) { toolStrip = ToolbarService.CreateToolStrip(this, "/FanHaiFramework/ViewContent/Browser/Toolbar"); toolStrip.GripStyle = ToolStripGripStyle.Hidden; Controls.Add(toolStrip); } }
public WebBrowserExtendedEvents(ExtendedWebBrowser browser) { this.browser = browser; }