Exemplo n.º 1
0
        private ObservableCollection<IGanttTask> GetTasks()
		{
            var collection = new ObservableCollection<IGanttTask>();
            var today = DateTime.Today;

            var recurrenceTask1 = new GanttTask(today.AddHours(1), today.AddHours(4), "Reccurence 1");
            var recurrenceTask2 = new GanttTask(today.AddHours(8), today.AddHours(12), "Reccurence 2");
            var recurrenceTask3 = new GanttTask(today.AddHours(16), today.AddHours(20), "Reccurence 3");
            var recurrenceSeriesTask = new RecurrenceTask(today, today.AddHours(20), "Recurrence Series")
            {
                Recurrences = { recurrenceTask1, recurrenceTask2, recurrenceTask3 }
            };
            collection.Add(recurrenceSeriesTask);
            var taskWithoutRecurrence = new GanttTask(today.AddHours(8), today.AddHours(13), "Task Without Recurrence");
            taskWithoutRecurrence.Children.Add(new GanttTask(today.AddHours(9), today.AddHours(12), "Child Task"));
            collection.Add(taskWithoutRecurrence);

            return collection;
		}
Exemplo n.º 2
0
        private ObservableCollection <IGanttTask> GetTasks()
        {
            var collection = new ObservableCollection <IGanttTask>();
            var today      = DateTime.Today;

            var recurrenceTask1      = new GanttTask(today.AddHours(1), today.AddHours(4), "Reccurence 1");
            var recurrenceTask2      = new GanttTask(today.AddHours(8), today.AddHours(12), "Reccurence 2");
            var recurrenceTask3      = new GanttTask(today.AddHours(16), today.AddHours(20), "Reccurence 3");
            var recurrenceSeriesTask = new RecurrenceTask(today, today.AddHours(20), "Recurrence Series")
            {
                Recurrences = { recurrenceTask1, recurrenceTask2, recurrenceTask3 }
            };

            collection.Add(recurrenceSeriesTask);
            var taskWithoutRecurrence = new GanttTask(today.AddHours(8), today.AddHours(13), "Task Without Recurrence");

            taskWithoutRecurrence.Children.Add(new GanttTask(today.AddHours(9), today.AddHours(12), "Child Task"));
            collection.Add(taskWithoutRecurrence);

            return(collection);
        }