Example #1
0
        void synchronizer_Synced(object sender, SyncEventArgs <MapperHierarchyNode, object> args)
        {
            switch (args.Action)
            {
            case CollectionAction.Added:
                FViewer.UpdateView();
                break;

            case CollectionAction.Removed:
                FViewer.UpdateView();
                break;

            case CollectionAction.Cleared:
                FViewer.UpdateView();
                break;

            case CollectionAction.OrderChanged:
                FViewer.UpdateView();
                break;

            case CollectionAction.Updating:
                FViewer.BeginUpdate();
                break;

            case CollectionAction.Updated:
                FViewer.EndUpdate();
                break;
            }
        }
Example #2
0
        private void UpdateView()
        {
            string query = FSearchTextBox.Text.ToLower();

            FHierarchyViewer.BeginUpdate();
            try
            {
                FNodeView.Dispose();

                if (NodeFilter.IsGlobalSearchScope(query))
                {
                    FNodeView = FNodeFilter.UpdateFilter(query, FHDEHost.RootNode);
                    FHierarchyViewer.ShowRoot = false;
                }
                else
                {
                    FNodeView = FNodeFilter.UpdateFilter(query, FActivePatchNode);
                    FHierarchyViewer.ShowRoot = true;
                }

                FHierarchyViewer.Input = FNodeView;
            }
            finally
            {
                FHierarchyViewer.EndUpdate();
            }
        }