public override string getMyHtmlContent() { iframeForm form = new iframeForm(); if (form.ShowDialog() != System.Windows.Forms.DialogResult.OK) { return(""); } string url = form.textBox2.Text; if (!url.StartsWith("http://")) { url = "http://" + url; } string title = form.textBox1.Text; if (title.Equals("")) { title = url; } // string html = "<label style='font-size:12;font-weight:bold'>引用网页:" + title + "</label><br/><br/><iframe id='eframe_" + new Random().Next().ToString() + "' style='width:90%;height:100%' src='"+url+"'></iframe>"; string html = "<label style='font-size:12;font-weight:bold'>引用网页:" + title + "</label><br/><br/><iframe id='eframe_" + new Random().Next().ToString() + "' style='width:90%;height:90%' src='" + url + "'/> "; return(html); }
public override string getMyHtmlContent() { iframeForm form = new iframeForm(); if (form.ShowDialog() != System.Windows.Forms.DialogResult.OK) return ""; string url = form.textBox2.Text; if (!url.StartsWith("http://")) url = "http://" + url; string title = form.textBox1.Text; if (title.Equals("")) title = url; // string html = "<label style='font-size:12;font-weight:bold'>引用网页:" + title + "</label><br/><br/><iframe id='eframe_" + new Random().Next().ToString() + "' style='width:90%;height:100%' src='"+url+"'></iframe>"; string html = "<label style='font-size:12;font-weight:bold'>引用网页:" + title + "</label><br/><br/><iframe id='eframe_" + new Random().Next().ToString() + "' style='width:90%;height:90%' src='" + url + "'/> "; return html; }
override public IfacesEnumsStructsClasses.IHTMLElement loadInfoFromElement(IfacesEnumsStructsClasses.IHTMLElement e) { if (e == null) { return(null); } IfacesEnumsStructsClasses.IHTMLElement2 e2 = (IfacesEnumsStructsClasses.IHTMLElement2)e; IfacesEnumsStructsClasses.IHTMLElementCollection c = (e2.getElementsByTagName("label")) as IfacesEnumsStructsClasses.IHTMLElementCollection; if (c == null) { return(null); } foreach (IfacesEnumsStructsClasses.IHTMLElement ce in c) { e = ce; break; } IfacesEnumsStructsClasses.IHTMLElement titlee = (IfacesEnumsStructsClasses.IHTMLElement)e; iframeForm form = new iframeForm(); form.textBox1.Text = e.innerText; c = (e2.getElementsByTagName("iframe")) as IfacesEnumsStructsClasses.IHTMLElementCollection; if (c == null) { return(null); } foreach (IfacesEnumsStructsClasses.IHTMLElement ce in c) { e = ce; break; } if (e.getAttribute("src", 1) != null) { string http = e.getAttribute("src", 1).ToString();; http = http.Replace("http://", ""); form.textBox2.Text = http; } if (form.ShowDialog() != System.Windows.Forms.DialogResult.OK) { return(null); } string url = form.textBox2.Text; if (!url.StartsWith("http://")) { url = "http://" + url; } string title = form.textBox1.Text; if (title.Equals("")) { title = url; } e.setAttribute("src", url, 1); titlee.innerText = title; return(e); //IfacesEnumsStructsClasses.IHTMLDocument2 doc = (IfacesEnumsStructsClasses.IHTMLDocument2)e.document; // doc.foc }
public override IfacesEnumsStructsClasses.IHTMLElement loadInfoFromElement(IfacesEnumsStructsClasses.IHTMLElement e) { if (e == null) return null ; IfacesEnumsStructsClasses.IHTMLElement2 e2 = (IfacesEnumsStructsClasses.IHTMLElement2)e; IfacesEnumsStructsClasses.IHTMLElementCollection c = (e2.getElementsByTagName("label")) as IfacesEnumsStructsClasses.IHTMLElementCollection; if (c == null) return null; foreach (IfacesEnumsStructsClasses.IHTMLElement ce in c) { e = ce; break; } IfacesEnumsStructsClasses.IHTMLElement titlee = (IfacesEnumsStructsClasses.IHTMLElement)e; iframeForm form = new iframeForm(); form.textBox1.Text = e.innerText; c = (e2.getElementsByTagName("iframe")) as IfacesEnumsStructsClasses.IHTMLElementCollection; if (c == null) return null ; foreach (IfacesEnumsStructsClasses.IHTMLElement ce in c) { e = ce; break; } if (e.getAttribute("src", 1) != null) { string http = e.getAttribute("src", 1).ToString(); ; http = http.Replace("http://", ""); form.textBox2.Text = http; } if (form.ShowDialog() != System.Windows.Forms.DialogResult.OK) return null ; string url = form.textBox2.Text; if (!url.StartsWith("http://")) url = "http://" + url; string title = form.textBox1.Text; if (title.Equals("")) title = url; e.setAttribute("src", url, 1); titlee.innerText = title; return e; //IfacesEnumsStructsClasses.IHTMLDocument2 doc = (IfacesEnumsStructsClasses.IHTMLDocument2)e.document; // doc.foc }