System.Windows.Forms.HtmlDocument.OpenNew(bool)

Here are the examples of the csharp api class System.Windows.Forms.HtmlDocument.OpenNew(bool) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

11 Examples 7

1. Example

Project: dp2
Source File: ReservationListForm.cs
public void ClearHtml()
        {
            string strCssUrl = Path.Combine(Program.MainForm.DataDir, "default\\charginghistory.css");
            string strLink = "<link href='" + strCssUrl + "' type='text/css' rel='stylesheet' />";
            string strJs = "";

            {
                HtmlDocument doc = this.webBrowser1.Document;

                if (doc == null)
                {
                    this.webBrowser1.Navigate("about:blank");
                    doc = this.webBrowser1.Document;
                }
                doc = doc.OpenNew(true);
            }

            Global.WriteHtml(this.webBrowser1,
                "<html><head>" + strLink + strJs + "</head><body>");
        }

2. Example

Project: dp2
Source File: ChatForm.cs
public void ClearHtml()
        {
            string strCssUrl = Path.Combine(Program.MainForm.DataDir, "message.css");
            string strLink = "<link href='" + strCssUrl + "' type='text/css' rel='stylesheet' />";
            string strJs = "";

            {
                HtmlDocument doc = webBrowser1.Document;

                if (doc == null)
                {
                    webBrowser1.Navigate("about:blank");
                    doc = webBrowser1.Document;
                }
                doc = doc.OpenNew(true);
            }

            Global.WriteHtml(this.webBrowser1,
                "<html><head>" + strLink + strJs + "</head><body>");
        }

3. Example

Project: dp2
Source File: Global.cs
public static void Clear(WebBrowser webBrowser)
        {
            HtmlDocument doc = webBrowser.Document;

            if (doc == null)
            {
                webBrowser.Navigate("about:blank");
                doc = webBrowser.Document;
            }

            doc = doc.OpenNew(true);
        }

4. Example

Project: dp2
Source File: WindowsUpdateDialog.cs
public static void ClearForPureTextOutputing(WebBrowser webBrowser)
        {
            HtmlDocument doc = webBrowser.Document;

            if (doc == null)
            {
                webBrowser.Navigate("about:blank");
                doc = webBrowser.Document;
            }

            string strHead = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head>"
    + "<style media='screen' type='text/css'>"
    + "body { font-family:Microsoft YaHei; background-color:#555555; color:#eeeeee; }"
    + "</style>"
    + "</head><body>";

            doc = doc.OpenNew(true);
            doc.Write(strHead + "<pre style=\"font-family:Consolas; \">");  // Calibri
        }

5. Example

Project: dp2
Source File: OpenMarcFileDlg.cs
static void AppendHtml(WebBrowser webBrowser,
            string strHtml,
            bool bClear = false)
        {

            HtmlDocument doc = webBrowser.Document;

            if (doc == null)
            {
                webBrowser.Navigate("about:blank");
                doc = webBrowser.Document;
            }

            if (bClear == true)
                doc = doc.OpenNew(true);
            doc.Write(strHtml);

            // ??????
            // ScrollToEnd(webBrowser);
        }

6. Example

Project: dp2
Source File: MessageHub.cs
public void ClearHtml()
        {
            string strCssUrl = Path.Combine(Program.MainForm.DataDir, "history.css");
            string strLink = "<link href='" + strCssUrl + "' type='text/css' rel='stylesheet' />";
            string strJs = "";

            {
                HtmlDocument doc = webBrowser1.Document;

                if (doc == null)
                {
                    webBrowser1.Navigate("about:blank");
                    doc = webBrowser1.Document;
                }
                doc = doc.OpenNew(true);
            }

            Global.WriteHtml(this.webBrowser1,
                "<html><head>" + strLink + strJs + "</head><body>");
        }

7. Example

Project: dp2
Source File: TestSearchForm.cs
void ClearWebBrowser(WebBrowser webBrowser)
        {
            HtmlDocument doc = webBrowser.Document;

            if (doc == null)
            {
                webBrowser.Navigate("about:blank");
                doc = webBrowser.Document;
            }

            doc = doc.OpenNew(true);
            doc.Write("<pre>");
        }

8. Example

Project: dp2
Source File: BatchTaskForm.cs
void ClearWebBrowser(WebBrowser webBrowser,
            bool bRewind)
        {
            HtmlDocument doc = webBrowser.Document;

            if (doc == null)
            {
                webBrowser.Navigate("about:blank");
                doc = webBrowser.Document;
            }

            doc = doc.OpenNew(true);
            doc.Write("<pre>");
            if (bRewind == true)
                this.CurResultOffs = 0; // ???????
        }

9. Example

Project: migAz
Source File: MigAzForm.cs
private async void btnRefreshOutput_Click(object sender, EventArgs e)
        {
            Splitter/n ..... /n //View Source file for more details /n }

10. Example

Project: im-only-resting
Source File: MainForm.cs
private void updateResponseBodyOutput() {
            switch (Settings.Default.ResponseBodyOutput) {/n ..... /n //View Source file for more details /n }

11. Example

Project: babystepstimer
Source File: Program.cs
[STAThread]
        static void Main()
        {
            _mainForm = new Form
            {
    /n ..... /n //View Source file for more details /n }