void ShowMatchingRecordValues(List <LogRow> Records) { if (ConfigurePanel.InvokeRequired) { ShowMatchingRecordValues_d CALL_d = new ShowMatchingRecordValues_d(ShowMatchingRecordValues); ConfigurePanel.Invoke(CALL_d, new object[] { Records }); } else { FilterTree.Nodes.Clear(); FilterTree.Nodes.Add("Methods").Checked = true; FilterTree.Nodes.Add("File Extensions").Checked = true; FilterTree.Nodes.Add("Urls").Checked = true; CandidatesGrid.Rows.Clear(); foreach (LogRow LR in Records) { if (!FilterTree.Nodes[0].Nodes.ContainsKey(LR.Method)) { FilterTree.Nodes[0].Nodes.Add(LR.Method, LR.Method).Checked = true; } string File = LR.File; if (File.Trim().Length == 0) { File = " - NO EXTENSION - "; } if (!FilterTree.Nodes[1].Nodes.ContainsKey(File)) { FilterTree.Nodes[1].Nodes.Add(File, File).Checked = true; } if (!FilterTree.Nodes[2].Nodes.ContainsKey(LR.Host)) { FilterTree.Nodes[2].Nodes.Add(LR.Host, LR.Host).Checked = true; } TreeNode HostNode = FilterTree.Nodes[2].Nodes[LR.Host]; if (!HostNode.Nodes.ContainsKey("/")) { HostNode.Nodes.Add("/", "/").Checked = true; } Request Req = new Request(string.Format("http://{0}{1}", LR.Host, LR.Url)); for (int i = 0; i < Req.UrlPathParts.Count; i++) { string Path = Req.UrlPathParts[i]; string FullPath = ""; if (Req.UrlPathParts.Count > 0) { StringBuilder SB = new StringBuilder(); for (int j = 0; j <= i; j++) { SB.Append("/"); SB.Append(Req.UrlPathParts[j]); } FullPath = SB.ToString(); } else { FullPath = "/"; } if (!HostNode.Nodes.ContainsKey(FullPath)) { HostNode.Nodes.Add(FullPath, Path).Checked = true; if (!HostNode.Checked) { HostNode.Checked = true; } } HostNode = HostNode.Nodes[FullPath]; } } //Adding the rows after the tree population since every check on the tree node would trigger a filter application on the grids foreach (LogRow LR in Records) { object[] Fields = LR.ToLogAnalyzerGridRowObjectArray(); Fields[0] = true; CandidatesGrid.Rows.Add(Fields); } FilterTree.ExpandAll(); CandidatesStepProgressBar.Visible = false; CandidatesBaseSplit.Visible = true; TestCandidatesBtn.Visible = true; } }