Ejemplo n.º 1
0
 public static ascx_FindingsViewer set_CodeEditor(this ascx_FindingsViewer findingsViewer, ascx_SourceCodeEditor codeEditor)
 {
     findingsViewer._onTraceSelected +=
         (trace) => {
         codeEditor.show(trace);
         findingsViewer.controls <ascx_TraceTreeView>().focus();
     };
     findingsViewer._onFindingSelected +=
         (finding) => {
         findingsViewer.invokeOnThread(
             () => {
             codeEditor.textEditor().LineViewerStyle = ICSharpCode.TextEditor.Document.LineViewerStyle.None;
             codeEditor.open(finding.file);
             //"Going to line: {0}".info(finding.lineNumber);
             codeEditor.editor().gotoLine((int)finding.lineNumber);
         });
         O2Thread.mtaThread(
             () => {
             findingsViewer.sleep(100, false);
             findingsViewer.getResultsTreeView().focus();
         });
     };
     return(findingsViewer);
 }
Ejemplo n.º 2
0
 public static List <TreeNode> findingsNodes(this ascx_FindingsViewer findingsViewer)
 {
     return(findingsViewer.getResultsTreeView().nodes());
 }