コード例 #1
0
 public AppSettingsTextClassifierContext(SearchMatcher searchMatcher, string text, string tag, bool colorize, IReadOnlyCollection <SpanData <object> > colors = null)
     : base(text, tag, colorize, colors)
 {
     if (searchMatcher == null)
     {
         throw new ArgumentNullException(nameof(searchMatcher));
     }
     SearchMatcher = searchMatcher;
 }
コード例 #2
0
 public AppSettingsTreeViewNodeClassifierContext(SearchMatcher searchMatcher, string text, ITreeView treeView, ITreeNodeData node, bool isToolTip, bool colorize, IReadOnlyCollection <SpanData <object> > colors = null)
     : base(text, treeView, node, isToolTip, colorize, colors)
 {
     if (searchMatcher == null)
     {
         throw new ArgumentNullException(nameof(searchMatcher));
     }
     SearchMatcher = searchMatcher;
 }
コード例 #3
0
ファイル: ShowAppSettingsDialog.cs プロジェクト: xon00z/dnSpy
        void FilterChildren(AppSettingsPageVM page, SearchMatcher matcher)
        {
            bool atLeastOneChildVisible = false;

            foreach (var child in page.Children)
            {
                FilterChildren(child, matcher);
                atLeastOneChildVisible |= !child.TreeNode.IsHidden;
            }
            bool isVisible = atLeastOneChildVisible || IsVisible(page, matcher);

            page.TreeNode.IsHidden = !isVisible;
            if (isVisible)
            {
                page.TreeNode.IsExpanded = true;
            }
        }
コード例 #4
0
        bool IsVisible(AppSettingsPageVM page, SearchMatcher matcher)
        {
            matchList.Clear();
            var p = page;

            // Don't include the root
            while (p.Parent != null)
            {
                matchList.Add(p.Page.Title);
                p = p.Parent;
            }
            foreach (var s in page.GetSearchableStrings(appSettingsDlg))
            {
                matchList.Add(s);
            }
            bool res = matcher.IsMatchAll(matchList);

            matchList.Clear();
            return(res);
        }
コード例 #5
0
		public AppSettingsTreeViewNodeClassifierContext(SearchMatcher searchMatcher, string text, ITreeView treeView, TreeNodeData node, bool isToolTip, bool colorize, IReadOnlyCollection<SpanData<object>> colors = null)
			: base(text, treeView, node, isToolTip, colorize, colors) {
			if (searchMatcher == null)
				throw new ArgumentNullException(nameof(searchMatcher));
			SearchMatcher = searchMatcher;
		}
コード例 #6
0
		public AppSettingsTextClassifierContext(SearchMatcher searchMatcher, string text, string tag, bool colorize, IReadOnlyCollection<SpanData<object>> colors = null)
			: base(text, tag, colorize, colors) {
			if (searchMatcher == null)
				throw new ArgumentNullException(nameof(searchMatcher));
			SearchMatcher = searchMatcher;
		}