Exemple #1
0
        public enTasks GetBiggestActionFromNodeAndDirectChildren()
        {
            enTasks action = AnyNodeActionThisNode;

            if (Children != null)
            {
                foreach (TaskNodeViewModel node in Children)
                {
                    action = (enTasks)Math.Max((int)node.biggestAction, (int)action);
                }
            }

            return(action);
        }
Exemple #2
0
        public void UpdateBiggestAction(int level, enTasks newAction)
        {
            if (level == 0)
            {
                biggestAction = GetBiggestActionFromNodeAndDirectChildren();
                newAction     = biggestAction;
            }
            else
            {
                biggestAction = (enTasks)Math.Max((int)biggestAction, (int)newAction);
            }

            if (Parent != null)
            {
                Parent.UpdateBiggestAction(++level, newAction);
            }
        }