-
Notifications
You must be signed in to change notification settings - Fork 16
/
Util - View and search WebPage code.h2
35 lines (30 loc) · 1.24 KB
/
Util - View and search WebPage code.h2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//panel.clear();
//var topPanel = panel.add_Panel();
var topPanel = O2Gui.open<Panel>("View and search WebPage code", 800,600);
var htmlTagViewer = topPanel.insert_Right<ascx_HtmlTagViewer>(topPanel.width()/2);
var historyList = htmlTagViewer.insert_Above<TreeView>(100).showSelection();;
var pageProperties = historyList.insert_Right<Panel>(topPanel.width()/2).add_PropertyGrid();
historyList.afterSelect<IO2HtmlPage>(
(htmlPage)=>{
"loaded page: {0}".info(htmlPage.PageUri);
htmlTagViewer.show(htmlPage.html());
pageProperties.show(htmlPage);
});
htmlTagViewer.buildGui(false, true);
htmlTagViewer.HtmlNodeFilter.set_Text("//*[contains(text(),'A')]");
htmlTagViewer.ViewAsXml = true;
var browser= topPanel.add_WebBrowserWithLocationBar();
//browser.onDocumentCompleted += (htmlPage)=>htmlTagViewer.show(htmlPage.html());
browser.onDocumentCompleted += (htmlPage)=>
{
historyList.add_Node(htmlPage.str(),htmlPage).selected();
//show.info(htmlPage);
};
//using O2.XRules.Database.Utils
//O2File:WatiN_IE_ExtensionMethods.cs
//O2File:ascx_HtmlTagViewer.cs
//O2Ref:O2_External_IE.dll
//O2Ref:Microsoft.mshtml.dll
//using O2.External.IE.ExtensionMethods
//using O2.External.IE.Interfaces
//O2Ref:O2_Misc_Microsoft_MPL_Libs.dll