本文整理匯總了C#中System.Windows.Forms.TreeView.populateWithHtmlPageScripts方法的典型用法代碼示例。如果您正苦於以下問題:C# TreeView.populateWithHtmlPageScripts方法的具體用法?C# TreeView.populateWithHtmlPageScripts怎麽用?C# TreeView.populateWithHtmlPageScripts使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Forms.TreeView
的用法示例。
在下文中一共展示了TreeView.populateWithHtmlPageScripts方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: buildGui
//bool putJavaScriptCodeViewerOnTheLeft,
public ascx_Javascript_AST buildGui( bool addUrlLoadTextBox)
{
var mainGui = this.add_1x1("Files or ScriptBlocks","Javascript Source (you can edit this code and see the results in realtime)");
var splitContainer = this.controls<SplitContainer>();
if (addUrlLoadTextBox)
{
showJavascriptsFromUrl =
splitContainer.insert_Above<Panel>(25)
.add_LabelAndComboBoxAndButton("Enter Url to load Javascripts","","Open", loadJavascriptsFromUrl)
.controls<ComboBox>();
}
/*if (putJavaScriptCodeViewerOnTheLeft)
{
splitContainer.splitterDistance(this.width()/3);
javascriptCode = mainGui[1].add_TreeView().showSelection().sort();
sourceCode = mainGui[0].add_SourceCodeViewer();
}
else
{*/
javascriptCode = mainGui[0].add_TreeView().showSelection().sort();
sourceCode = mainGui[1].add_SourceCodeViewer();
//}
pagesVisited = javascriptCode.insert_Above<ComboBox>(25).dropDownList();
codeSnippet = sourceCode.insert_Below<TextBox>(100).multiLine().scrollBars();
tabControl = javascriptCode.insert_Below<TabControl>();
jsAST = tabControl.add_Tab("Javascript - View Ast Tree")
.add_TreeView()
.showSelection();
jsFunctions = tabControl.add_Tab("JScript: Functions")
.add_TreeView()
.showSelection()
.sort();
jsIdentifiers = tabControl.add_Tab("JScript: Identifiers")
.add_TreeView()
.showSelection()
.sort();
jsValues = tabControl.add_Tab("JScript: Values")
.add_TreeView()
.showSelection()
.sort();
allAST = tabControl.add_Tab("Javascript - View Ast Elements")
.add_TreeView()
.showSelection()
.sort();
var searchTab = tabControl.add_Tab("Search in Code")
.add_LabelAndComboBoxAndButton("search for (case sensitive)","","show",
(text)=> {
sourceCode.editor().invoke("searchForTextInTextEditor_findNext", text);
});
//tabControl.select_Tab(searchTab);
javaScriptLoadMessage = javascriptCode.insert_Below<Panel>(20);
allAST.insert_Below<Panel>(25)
.add_CheckBox("Render this view (some performace impact on large scripts)", 0,0,
(value)=>{
RenderViewAstElementsTreeView = value;
processJavascript();
})
.autoSize();
allAST.jint_configure_showSelectionDetails(sourceCode, codeSnippet);
jsFunctions.jint_configure_showSelectionDetails(sourceCode, codeSnippet);
jsIdentifiers.jint_configure_showSelectionDetails(sourceCode, codeSnippet);
jsValues.jint_configure_showSelectionDetails(sourceCode, codeSnippet);
javascriptCode.afterSelect<string>(
(jsCode) => {
sourceCode.editor().clearBookmarksAndMarkers();
sourceCode.set_Text(jsCode,"*.js");
sourceCode.editor().refresh();
});
sourceCode.onTextChanged(processJavascript);
pagesVisited.onSelection<IE_HtmlPage>(
(htmlPage)=>{
var allScriptsCompiledOk = javascriptCode.populateWithHtmlPageScripts(htmlPage);
javascriptCode.add_Node("zzz [Original Html Code for: {0}]".format(htmlPage.PageUri.str()),htmlPage.PageSource);
handleCompilationResult(allScriptsCompiledOk);
});
pagesVisited.onSelection<Jint_Wrapper>(
(jintWrapper)=>{
var allScriptsCompiledOk = javascriptCode.populateWithHtmlPageScripts(jintWrapper.JavaScripts);
javascriptCode.add_Node("zzz_[Original Code for: {0}]".format(jintWrapper.Uri.str()),jintWrapper.Html);
handleCompilationResult(allScriptsCompiledOk);
});
javascriptCode.onDrop(
//.........這裏部分代碼省略.........