示例#1
0
        private ObservableCollection <CustomGanttTask> GetTasks(DateTime date)
        {
            var ganttAPI = new CustomGanttTask()
            {
                Start                = date,
                End                  = date.AddDays(2),
                Title                = "Design public API",
                Description          = "Description: Design public API",
                IsDragReorderAllowed = true
            };
            var ganttRendering = new CustomGanttTask()
            {
                Start                = date.AddDays(3),
                End                  = date.AddDays(5),
                Title                = "Gantt Rendering",
                Description          = "Description: Gantt Rendering",
                IsDragReorderAllowed = false
            };
            var ganttDemos = new CustomGanttTask()
            {
                Start                = date.AddDays(4),
                End                  = date.AddDays(8),
                Title                = "Gantt Demos",
                Description          = "Description: Gantt Demos",
                IsDragReorderAllowed = true
            };
            var milestone = new CustomGanttTask()
            {
                Start                = date.AddDays(7),
                End                  = date.AddDays(7).AddHours(1),
                Title                = "Review",
                Description          = "Description: Review",
                IsMilestone          = true,
                IsDragReorderAllowed = false
            };

            ganttRendering.Dependencies.Add(new Dependency()
            {
                FromTask = ganttAPI
            });
            ganttDemos.Dependencies.Add(new Dependency()
            {
                FromTask = ganttRendering
            });
            var iterationTask = new CustomGanttTask()
            {
                Start                = date,
                End                  = date.AddDays(9),
                Title                = "Iteration 1",
                Children             = { ganttAPI, ganttRendering, ganttDemos, milestone },
                IsDragReorderAllowed = false
            };
            ObservableCollection <CustomGanttTask> tasks = new ObservableCollection <CustomGanttTask>()
            {
                iterationTask
            };

            return(tasks);
        }
示例#2
0
        private ObservableCollection<CustomGanttTask> GetTasks(DateTime date)
        {
            var ganttAPI = new CustomGanttTask()
            {
                Start = date,
                End = date.AddDays(2),
                Title = "Design public API",
                Description = "Description: Design public API",
                IsDragReorderAllowed = true
            };
            var ganttRendering = new CustomGanttTask()
            {
                Start = date.AddDays(3),
                End = date.AddDays(5),
                Title = "Gantt Rendering",
                Description = "Description: Gantt Rendering",
                IsDragReorderAllowed = false
            };
            var ganttDemos = new CustomGanttTask()
            {
                Start = date.AddDays(4),
                End = date.AddDays(8),
                Title = "Gantt Demos",
                Description = "Description: Gantt Demos",
                IsDragReorderAllowed = true
            };
            var milestone = new CustomGanttTask()
            {
                Start = date.AddDays(7),
                End = date.AddDays(7).AddHours(1),
                Title = "Review",
                Description = "Description: Review",
                IsMilestone = true,
                IsDragReorderAllowed = false
            };
            ganttRendering.Dependencies.Add(new Dependency() { FromTask = ganttAPI });
            ganttDemos.Dependencies.Add(new Dependency() { FromTask = ganttRendering });
            var iterationTask = new CustomGanttTask()
            {
                Start = date,
                End = date.AddDays(9),
                Title = "Iteration 1",
                Children = { ganttAPI, ganttRendering, ganttDemos, milestone },
                IsDragReorderAllowed = false
            };
            ObservableCollection<CustomGanttTask> tasks = new ObservableCollection<CustomGanttTask>() { iterationTask };

            return tasks;
        }