Created
October 2, 2012 08:54
-
-
Save DinisCruz/3817500 to your computer and use it in GitHub Desktop.
O2 Script - Simple File Viewer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var treeView = "C# files in a a path".popupWindow() | |
.add_TreeView(); | |
var codeViewer = treeView.insert_Right("Source Code") | |
.add_TextArea(); | |
treeView.afterSelect<string>((file) => codeViewer.set_Text(file)) | |
.onDrop((path)=>{ | |
treeView.clear(); | |
foreach(var file in path.files("*.cs",true)) | |
treeView.add_Node(file.fileName(),file); | |
}); | |
treeView.add_Node("Drop path here to load files"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var treeView = "C# files in a a path".popupWindow() | |
.add_TreeView(); | |
var codeViewer = treeView.insert_Right("Source Code") | |
.add_SourceCodeViewer(); | |
treeView.afterSelect<string>((file) => codeViewer.open(file)) | |
.onDrop((path)=>{ | |
treeView.clear(); | |
foreach(var file in path.files("*.cs",true)) | |
treeView.add_Node(file.fileName(),file); | |
}); | |
treeView.add_Node("Drop path here to load files"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment