private void FilterTextOrRegex_TextChanged(object sender, TextChangedEventArgs e)
        {
            if (StringMatcher == null)
            {
                return;
            }

            bool matchesMatchesTitle = StringMatcher.Matches(
                PostTitleTextBox.Text, FilterTextOrRegex.Text);

            if (matchesMatchesTitle)
            {
                PostTitleTextBox.Foreground =
                    new SolidColorBrush(Colors.Green);
            }
            else
            {
                PostTitleTextBox.Foreground =
                    new SolidColorBrush(Colors.Black);
            }
        }
Example #2
0
 bool StringMatchesAny(string str, IEnumerable <string> matchers)
 {
     return(matchers.Any(m => StringMatcher.Matches(str, m)));
 }