Exemplo n.º 1
0
        public void OnGroupChanged(GroupBase group, ChangeType changeType)
        {
            if (_noGroupChanged > 0 || group == null)
            {
                return;
            }
            Log.Write("OnGroupChanged({1}) {0}", group.Text, changeType);
            HashSet <RdcTreeNode> set = new HashSet <RdcTreeNode>();

            if (group == RootNode)
            {
                if (changeType.HasFlag(ChangeType.PropertyChanged))
                {
                    base.Nodes.VisitNodes(delegate(RdcTreeNode n)
                    {
                        set.Add(n);
                    });
                }
            }
            else
            {
                group.CollectNodesToInvalidate(recurseChildren: true, set);
                group.VisitParents(delegate(RdcTreeNode parent)
                {
                    parent.CollectNodesToInvalidate(recurseChildren: false, set);
                });
            }
            InvalidateNodes(set);
            this.GroupChanged?.Invoke(new GroupChangedEventArgs(group, changeType));
        }
Exemplo n.º 2
0
 private static void RefreshScope(GroupBase scope, Action <SmartGroup> process)
 {
     scope?.VisitParents(delegate(RdcTreeNode parent)
     {
         foreach (SmartGroup item in parent.Nodes.OfType <SmartGroup>())
         {
             process(item);
         }
     });
 }