private void PropagateMatchPercentages_( IEnumerable <IFuzzySearchResult <ZFileNode> > matches) { foreach (var match in matches) { ZFileTreeView.SetMatchPercentage_(match.AssociatedData, match.MatchPercentage); } }
private static void SetMatchPercentage_( ZFileNode zFileNode, double matchPercentage) { if (matchPercentage <= zFileNode.MatchPercentage) { return; } zFileNode.MatchPercentage = matchPercentage; var parentZFileNode = zFileNode.Parent; if (parentZFileNode == null) { return; } ZFileTreeView.SetMatchPercentage_(parentZFileNode, matchPercentage); }