Ejemplo n.º 1
0
        public void ShowSource()
        {
            Wait();
            string clean   = wBrowser.DocumentText;
            int    bodyidx = clean.IndexOf("<body>");

            if (bodyidx < 0)
            {
                bodyidx = clean.IndexOf("<BODY>");
            }

            if (bodyidx < 0)
            {
                MessageBox.Show(FindForm(),
                                LangPack.TranslateString("Nothing found"),
                                Constants.AppName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            clean = clean.Substring(0, bodyidx);
            HtmlSourceViewForm form = new HtmlSourceViewForm();

            form.Source = clean + WebBrowserHelper.GetDocument(wBrowser).Body.OuterHtml + "\r\n</html>";
            form.Text   = wBrowser.Url.ToString();
            form.Show();
        }
Ejemplo n.º 2
0
        public void ShowSource()
        {
            Wait();
            string clean = wBrowser.DocumentText;
            int bodyidx = clean.IndexOf("<body>");
            if(bodyidx < 0)
                bodyidx = clean.IndexOf("<BODY>");

            if(bodyidx < 0)
            {
                MessageBox.Show(FindForm(),
                    LangPack.TranslateString("Nothing found"),
                    Constants.AppName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            clean = clean.Substring(0, bodyidx);
            HtmlSourceViewForm form = new HtmlSourceViewForm();
            form.Source = clean + WebBrowserHelper.GetDocument(wBrowser).Body.OuterHtml + "\r\n</html>";
            form.Text = wBrowser.Url.ToString();
            form.Show();
        }