/** * Writes the text provided to the output window. The text * will be appended below any existing text already in the * window. */ private void WriteOutputText(string prefix, string outputText, WebBrowser activeBrowser) { try { this.UIThreadInvoke(delegate { if (activeBrowser == null) { activeBrowser = _defaulBrowser; } if (activeBrowser.Tag == null) { activeBrowser.Tag = ""; } var s = activeBrowser.Tag as string; string bodyText = s + string.Format(LINE_TEMPLATE, prefix, DateTime.Now, outputText); activeBrowser.Tag = bodyText; activeBrowser.NavigateToString(string.Format(TEMPLATE, bodyText)); }); } catch (Exception e) { Console.Write(e.Message); } }
private void ClearOutputBrowser(WebBrowser browser) { if (browser != null) { browser.NavigateToString(string.Format(TEMPLATE, "")); browser.Tag = ""; } }
private static void ChangeHtml(WebBrowser webBrowser, IList <IList <IDictionary <string, object> > > items) { var htmlBuilder = new StringBuilder(); using var stringWriter = new StringWriter(htmlBuilder); var xhtmlDumpHelper = new XhtmlDumpHelper(stringWriter); xhtmlDumpHelper.WriteBody(items); webBrowser.NavigateToString(htmlBuilder.ToString()); }
/** * Writes the text provided to the output window. The text * will be appended below any existing text already in the * window. */ private void WriteOutputText( string prefix, string outputText, WebBrowser activeBrowser ) { try { this.UIThreadInvoke( delegate { if (activeBrowser == null) activeBrowser = _defaulBrowser; if (activeBrowser.Tag == null) activeBrowser.Tag = ""; var s = activeBrowser.Tag as string; string bodyText = s + string.Format( LINE_TEMPLATE, prefix, DateTime.Now, outputText ); activeBrowser.Tag = bodyText; activeBrowser.NavigateToString( string.Format( TEMPLATE, bodyText ) ); } ); } catch (Exception e) { Console.Write( e.Message ); } }
private void ClearOutputBrowser( WebBrowser browser ) { if (browser != null) { browser.NavigateToString( string.Format( TEMPLATE, "" ) ); browser.Tag = ""; } }
private void FillWebBrowser(System.Windows.Controls.WebBrowser webBrowser, string body) { webBrowser.NavigateToString(body); }