public async void ShowDlg(CHtml p_owner) { Title = p_owner.Title; Show(); // WebView事件无法捕捉到初始化html的时机,延时 await Task.Delay(500); var val = p_owner.GetVal(); await _wv.InvokeScriptAsync("setHtml", new string[] { (val != null) ? val.ToString() : "" }); }
public static string CleanHtml(CHtml html, ref bool startNL, ref bool endNL) { bool _start = startNL, _end = endNL; String s = startTrim.Replace(html.HtmlString, delegate(Match m) { _start = m.Value.Contains(("\n")); return " "; }); s = endTrim.Replace(s, delegate(Match m) { _end = m.Value.Contains(("\n")); return " "; }); s = interHTMLnewlines.Replace(s, "> <"); s = newlines.Replace(s, "\n"); s = s.Replace("\r\n", "\n"); startNL = _start; endNL = _end; return s; }
public static string CleanHtml(CHtml html, ref bool startNL, ref bool endNL) { bool _start = startNL, _end = endNL; String s = startTrim.Replace(html.HtmlString, delegate(Match m) { _start = m.Value.Contains(("\n")); return(" "); }); s = endTrim.Replace(s, delegate(Match m) { _end = m.Value.Contains(("\n")); return(" "); }); s = interHTMLnewlines.Replace(s, "> <"); s = newlines.Replace(s, "\n"); s = s.Replace("\r\n", "\n"); startNL = _start; endNL = _end; return(s); }
public void VisitHtml(CHtml html) { visitor.VisitHtml(html); }