Inheritance: CoderForRent.Charting.Gantt.GanttNode
Beispiel #1
0
        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);
        }
Beispiel #2
0
        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;
        }