/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.explorerBrowserControl = new OpenLiveWriter.BrowserControl.ExplorerBrowserControl(); this.SuspendLayout(); // // explorerBrowserControl // this.explorerBrowserControl.Dock = System.Windows.Forms.DockStyle.Fill; this.explorerBrowserControl.Location = new System.Drawing.Point(1, 1); this.explorerBrowserControl.Name = "explorerBrowserControl"; this.explorerBrowserControl.Silent = true; this.explorerBrowserControl.Size = new System.Drawing.Size(326, 278); this.explorerBrowserControl.TabIndex = 0; this.explorerBrowserControl.TextSize = OpenLiveWriter.BrowserControl.TextSize.Medium; this.explorerBrowserControl.WorkOffline = false; // // MapControl // this.Controls.Add(this.explorerBrowserControl); this.DockPadding.All = 1; this.Name = "MapControl"; this.Size = new System.Drawing.Size(328, 280); this.Controls.SetChildIndex(this.explorerBrowserControl, 0); this.ResumeLayout(false); }
/// <summary> /// Constructs a new WebPageDownloader, permits script execution by default /// </summary> public WebPageDownloader(Control parentControl, WinInetCredentialsContext credentialsContext) { // create the undelrying control browserControl = new ExplorerBrowserControl(); if (parentControl != null) browserControl.Parent = parentControl; browserControl.DownloadOptions = GetDownloadOptions(); CredentialsContext = credentialsContext; // configure options browserControl.Silent = true; }
public BrowserMiniForm(string url, int downloadOptions, WinInetCredentialsContext credentialsContext) { // record url to navigate to _url = url; // standard "flyout" form behavior DismissOnDeactivate = true; // dock inset for drawing of border DockPadding.All = 1; // background color is white to minimize flashing problem when dismissing BackColor = Color.White; // initialize browser control _explorerBrowserControl = new ExplorerBrowserControl(); _explorerBrowserControl.Dock = DockStyle.Fill; Controls.Add(_explorerBrowserControl); // install download options if requested if (downloadOptions > 0) { _explorerBrowserControl.DownloadOptions = downloadOptions; } // install network credential if requested if (credentialsContext != null) { if (credentialsContext.NetworkCredential != null) { _explorerBrowserControl.NetworkCredential = credentialsContext.NetworkCredential; } if (credentialsContext.CookieString != null) { _explorerBrowserControl.SetCookies(credentialsContext.CookieString.Url, credentialsContext.CookieString.Cookies); } } // other options _explorerBrowserControl.Silent = true; // Navigate to about:blank for installation of ui customizations. Note that this step is CRITICAL // to ensuring that not only our custom ui hooks get installed but also to ensure that our DLCTL // options (which control security) are registered prior to the fectching of the content. _explorerBrowserControl.DocumentComplete += new BrowserDocumentEventHandler(_explorerBrowserControl_AboutBlankDocumentComplete); _explorerBrowserControl.Navigate("about:blank"); }
public BrowserMiniForm(string url, int downloadOptions, WinInetCredentialsContext credentialsContext) { // record url to navigate to _url = url; // standard "flyout" form behavior DismissOnDeactivate = true; // dock inset for drawing of border DockPadding.All = 1; // background color is white to minimize flashing problem when dismissing BackColor = Color.White; // initialize browser control _explorerBrowserControl = new ExplorerBrowserControl(); _explorerBrowserControl.Dock = DockStyle.Fill; Controls.Add(_explorerBrowserControl); // install download options if requested if (downloadOptions > 0) { _explorerBrowserControl.DownloadOptions = downloadOptions; } // install network credential if requested if (credentialsContext != null) { if (credentialsContext.NetworkCredential != null) _explorerBrowserControl.NetworkCredential = credentialsContext.NetworkCredential; if (credentialsContext.CookieString != null) _explorerBrowserControl.SetCookies(credentialsContext.CookieString.Url, credentialsContext.CookieString.Cookies); } // other options _explorerBrowserControl.Silent = true; // Navigate to about:blank for installation of ui customizations. Note that this step is CRITICAL // to ensuring that not only our custom ui hooks get installed but also to ensure that our DLCTL // options (which control security) are registered prior to the fectching of the content. _explorerBrowserControl.DocumentComplete += new BrowserDocumentEventHandler(_explorerBrowserControl_AboutBlankDocumentComplete); _explorerBrowserControl.Navigate("about:blank"); }
/// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose(bool disposing) { if (disposing) { if (explorerBrowserControl != null) { explorerBrowserControl.DocumentComplete -= new BrowserDocumentEventHandler(explorerBrowserControl_DocumentComplete); explorerBrowserControl.Dispose(); explorerBrowserControl = null; } if (MapActiveObject != null) { MapActiveObject = null; } if (components != null) { components.Dispose(); } } base.Dispose(disposing); }
public HtmlScreenCaptureForm(HtmlScreenCaptureCore htmlScreenCaptureCore) { // save reference to parent object _htmlScreenCaptureCore = htmlScreenCaptureCore; // set the timeout time _timeoutTime = DateTime.Now.AddMilliseconds(_htmlScreenCaptureCore.TimeoutMs); // create and add the underlying browser control _browserControl = new ExplorerBrowserControl(); _browserControl.Silent = true; Controls.Add(_browserControl); }