public void setSearchOnAlINodes(string value)
 {
     AllINodesFilter_TextBox.set_Text(value);
     INodeValueFilter = value;
     showINodes(AstData.iNodes());
 }
        public void buildGui()
        {
            //..clear();
            var topPanel = this.add_1x1("AST INode Value", "Source Code", true, 400);

            CodeViewer = topPanel[1].add_SourceCodeViewer();

            AstValueTreeView = topPanel[0].add_TreeView()
                               .sort()
                               .showSelection()
                               .beforeExpand <List <INode> >(
                (selectedNode, nodes) => {
                selectedNode.add_Nodes(nodes);
            });


            AstTypeTreeView = topPanel[0].insert_Left <GroupBox>(200)
                              .set_Text("AST INode Type")
                              .add_TreeView()
                              .sort()
                              .showSelection()
                              .afterSelect <List <INode> >(
                (iNodes) => {
                showINodes(iNodes);
            });


            INodeFilter_TextBox = AstTypeTreeView.insert_Above(40, "Filter").add_TextBox("Filter", "")
                                  .onTextChange_AlertOnRegExFail()
                                  .onEnter((value) => {
                INodeTypeFilter = value;
                loadDataInGui();
            });

            //nodeFilterTextBox.onTextChange_AlertOnRegExFail();
            //nodeTypeTextBox.onTextChange_AlertOnRegExFail();

            SelectedINodeFilter_TextBox = AstValueTreeView.insert_Above(40, "Search on selected INode Type").add_TextBox("Filter", "")
                                          .onTextChange_AlertOnRegExFail()
                                          .onEnter(
                (value) => {
                INodeValueFilter = value;
                showINodes(null);
            });
            AllINodesFilter_TextBox = AstValueTreeView.insert_Above(40, "Search on ALL INodes Type").add_TextBox("Filter", "")
                                      .onTextChange_AlertOnRegExFail()
                                      .onEnter(
                (value) => {
                INodeValueFilter = value;
                showINodes(AstData.iNodes());
            });



            AstTypeTreeView.onDrop(
                (fileOrFolder) => {
                if (fileOrFolder.fileExists())
                {
                    AstData.loadFile(fileOrFolder);
                }
                else
                {
                    AstData.loadFiles(fileOrFolder.files(true, "*.cs", "*.vb"));
                }
                loadDataInGui();
            });

            SourceCodeLines = CodeViewer.insert_Below(200, "Source Code Lines").add_TreeView().sort();

            AstData.afterSelect_ShowInSourceCodeEditor(AstValueTreeView, CodeViewer.editor());
            AstData.afterSelect_ShowInSourceCodeEditor(SourceCodeLines, CodeViewer.editor());
            AstValueTreeView.afterSelect <List <INode> >(
                (iNodes) => {
                SourceCodeLines.clear();
                var addedLines = new List <string>();
                foreach (var iNode in iNodes)
                {
                    var line = iNode.StartLocation.Line;
                    if (line > 0)
                    {
                        var file = AstData.file(iNode);
                        if (file.valid())
                        {
                            var addedLine = "{0}:{1}".format(file, line);
                            if (addedLines.contains(addedLine).isFalse())
                            {
                                addedLines.add(addedLine);
                                var fileContents = file.fileContents();
                                if (fileContents.valid())
                                {
                                    var lineText = fileContents.split_onLines()[line - 1];
                                    var location = "[{0}:{1}]      {2} ".format(file.fileName(), line, file);
                                    SourceCodeLines.add_Node(lineText, iNode)
                                    .add_Node(location);
                                }
                            }
                        }
                    }
                }
                //show.info(iNodes[0]);
                //SourceCodeLines.add_Nodes(iNodes, (iNode)=>iNode.sourceCode);
                //.showDetails();
                //"treeNode selected: {0}".info(tag.typeFullName());
            });
        }