コード例 #1
0
        private void SaveFilter(string filter)
        {
            if (string.IsNullOrEmpty(filter))
            {
                this.filterString     = string.Empty;
                this.doesPatternMatch = null;
            }
            else
            {
                this.filterString = filter;

                if (Utils.DoesNameContainWildCards(this.filterString))
                {
                    this.doesPatternMatch = doesWildcardPatternMatch;
                }
                else
                {
                    this.doesPatternMatch = NameMatchesNoWildcardFilter;
                }

                if (this.IsCurrentValid && this.IsCurrentHidden())
                {
                    this.MoveNext();
                }
            }
        }
コード例 #2
0
 /// <summary>
 /// Sets the pattern matching delegate that will be used for file name comparisons
 /// </summary>
 /// <param name="patternMatcher">FileNamePatternMatcher to be used by ActiveEnumeration</param>
 public static void SetPatternMatcher(FileNamePatternMatcher patternMatcher)
 {
     doesPatternMatch = patternMatcher;
 }
コード例 #3
0
 /// <summary>
 /// Sets the pattern matching delegate that will be used for file name comparisons when the filter
 /// contains wildcards.
 /// </summary>
 /// <param name="patternMatcher">FileNamePatternMatcher to be used by ActiveEnumeration</param>
 public static void SetWildcardPatternMatcher(FileNamePatternMatcher patternMatcher)
 {
     doesWildcardPatternMatch = patternMatcher;
 }