Exemplo n.º 1
0
        internal SummaryNode Execute()
        {
            m_result = SummaryCategoryNode.Create("Search Results", ChangeCategory.SearchResults);

            switch (m_searchStyle)
            {
                case SearchStyle.ChangesOnly:
                    SearchChangedTextOnly();
                    break;
                case SearchStyle.ChangesAndSurroundingText:
                    SearchChangedTextAndSurroundings();
                    break;
                case SearchStyle.OriginalDocumentText:
                    SearchRedlineText(Utils.IsInOriginalDocument);
                    break;
                case SearchStyle.ModifiedDocumentText:
                    SearchRedlineText(Utils.IsInModifiedDocument);
                    break;
                case SearchStyle.AllText:
                    SearchRedlineText(Utils.IsInEitherDocument);
                    break;
                default:
                    break;
            }

            if (m_result.ChildNodes.Count == 0)
                m_result.ChildNodes.Add(new MockSummaryNode("No matches found."));

            return m_result;
        }
Exemplo n.º 2
0
        protected StatusViewSource(SummaryNode node)
		{
             _internalNodeCollection = new ObservableCollection<SummaryNode>();
			_viewSource = new CollectionViewSource()
			{
                Source = _internalNodeCollection
			};

            ApplySortGroupFilter();
		}
Exemplo n.º 3
0
		public ReviewStatusViewSource(SummaryNode node, ReviewStatus revStatus)
			: base(node)
		{
            _allChanges = node;    // Reference to "All Changes node"
            FilterState = revStatus;
			node.PropertyChanged += new PropertyChangedEventHandler(node_PropertyChanged);
            
            var nodes = from o in node.ChildNodes
                        where o.SummaryItem.ReviewState == revStatus
                        select o;
            foreach (var n in nodes)
            {
                _internalNodeCollection.Add(n);
            }
		}
Exemplo n.º 4
0
        public ReviewStatusViewModel(SummaryNode allNode)
        {
            AllChangesNode = allNode;
            ViewSourceCollection = new List<ReviewStatusViewSource>();

            foreach( ReviewStatus enumValue in Enum.GetValues(typeof(ReviewStatus)))
            {
                ViewSourceCollection.Add(new ReviewStatusViewSource(AllChangesNode, enumValue));
            }
        }