/// <summary> /// /// </summary> /// <param name="ATask"></param> /// <returns></returns> public TaskNode FindTaskNodeForTask(List <TaskNode> Nodes, ProjectTask ATask) { TaskNode Value = null; foreach (TaskNode ANode in Nodes) { Value = ANode.FindNodeForTask(ATask); if (Value != null) { break; } } return(Value); }
/// <summary> /// /// </summary> /// <param name="ATask"></param> /// <returns></returns> public TaskNode FindNodeForTask(ProjectTask ATask) { TaskNode Value = null; if (_Task == ATask) { return(this); } foreach (TaskNode ANode in _Children) { Value = ANode.FindNodeForTask(ATask); if (Value != null) { break; } } return(Value); }