public bool SelectTargetNode(List <string> LeafPath) { TreeNode first = TreeNodes.Where(e => e.DisplayName.ToUpper() == LeafPath[0].ToUpper()).FirstOrDefault(); if (first == null) { return(false); } TreeNode second = first.ChildNodes.Where(e => e.DisplayName.ToUpper() == LeafPath[1].ToUpper()).FirstOrDefault(); if (second == null) { return(false); } TreeNode third = second.ChildNodes.Where(e => e.DisplayName.ToUpper() == LeafPath[2].ToUpper()).FirstOrDefault(); if (third == null) { return(false); } third.IsExpanded = true; third.IsSelected = true; ASFRootPath = _asfRootPath; ComponentName = second.DisplayName; SequenceName = third.DisplayName; string EnvFile = Directory.EnumerateFiles(third.FullPath, "Sequence*_Env.xml").FirstOrDefault(); // SequenceSelectedMessageSetter.SetSequenceSelected(new SequenceSelectedMessage(Directory.EnumerateFiles(third.FullPath, "Sequence*_Env.xml").FirstOrDefault(), ASFRootPath + @"\Tests\environments\Setup\Config\Template.xml")); return(true); }