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); }