private ExampleGanttNode ConvertTaskToNode(MyTask t) { ExampleGanttNode result = new ExampleGanttNode { TaskName = t.TaskName, StartDate = t.StartDate, EndDate = t.EndDate, Resources = t.Resources, PercentComplete = t.PercentComplete, Expanded = false }; //Example of how to keep the time between sections equal... not necessary if (t.Children != null) { foreach (MyTask child in t.Children) { result.ChildNodes.Add(ConvertTaskToNode(child)); } } return(result); }
private ExampleGanttNode ConvertTaskToNode(MyTask t) { ExampleGanttNode result = new ExampleGanttNode { TaskName = t.TaskName, StartDate = t.StartDate, EndDate = t.EndDate, Resources = t.Resources, PercentComplete = t.PercentComplete, Expanded = false }; //Example of how to keep the time between sections equal... not necessary if (t.Children != null) { foreach (MyTask child in t.Children) { result.ChildNodes.Add(ConvertTaskToNode(child)); } } return result; }