Exemplo n.º 1
0
        public MyViewModel()
        {
            var date     = DateTime.Now;
            var ganttAPI = new GanttDeadlineTask()
            {
                Start         = date,
                End           = date.AddDays(2),
                Title         = "Design public API",
                Description   = "Description: Design public API",
                GanttDeadLine = date.AddDays(1)
            };
            var ganttRendering = new GanttDeadlineTask()
            {
                Start         = date.AddDays(2).AddHours(8),
                End           = date.AddDays(4),
                Title         = "Gantt Rendering",
                Description   = "Description: Gantt Rendering",
                GanttDeadLine = date.AddDays(5)
            };
            var ganttDemos = new GanttDeadlineTask()
            {
                Start         = date.AddDays(4.5),
                End           = date.AddDays(7),
                Title         = "Gantt Demos",
                Description   = "Description: Gantt Demos",
                GanttDeadLine = date.AddDays(7)
            };
            var milestone = new GanttDeadlineTask()
            {
                Start         = date.AddDays(7),
                End           = date.AddDays(7).AddHours(1),
                Title         = "Review",
                Description   = "Review",
                GanttDeadLine = date.AddDays(8),
                IsMilestone   = true
            };

            ganttRendering.Dependencies.Add(new Dependency()
            {
                FromTask = ganttAPI
            });
            ganttDemos.Dependencies.Add(new Dependency()
            {
                FromTask = ganttRendering
            });
            var iterationTask = new GanttTask(date, date.AddDays(7), "Iteration 1")
            {
                Children = { ganttAPI, ganttRendering, ganttDemos, milestone }
            };

            this.tasks = new ObservableCollection <GanttTask>()
            {
                iterationTask
            };
            this.visibleTime = new DateRange(date.AddDays(-1), date.AddDays(9));
            this.timeLineDeadlineBehavior = new TimeLineDeadlineBehavior();
        }
Exemplo n.º 2
0
		public MyViewModel()
		{
			var date = DateTime.Now;
			var ganttAPI = new GanttDeadlineTask()
			{
				Start = date,
				End = date.AddDays(2),
				Title = "Design public API",
				Description = "Description: Design public API",
				GanttDeadLine = date.AddDays(1)
			};
			var ganttRendering = new GanttDeadlineTask()
			{
				Start = date.AddDays(2).AddHours(8),
				End = date.AddDays(4),
				Title = "Gantt Rendering",
				Description = "Description: Gantt Rendering",
				GanttDeadLine = date.AddDays(5)
			};
			var ganttDemos = new GanttDeadlineTask()
			{
				Start = date.AddDays(4.5),
				End = date.AddDays(7),
				Title = "Gantt Demos",
				Description = "Description: Gantt Demos",
				GanttDeadLine = date.AddDays(7)
			};
			var milestone = new GanttDeadlineTask()
			{
				Start = date.AddDays(7),
				End = date.AddDays(7).AddHours(1),
				Title = "Review",
				Description = "Review",
				GanttDeadLine = date.AddDays(8),
				IsMilestone = true
			};
			ganttRendering.Dependencies.Add(new Dependency() { FromTask = ganttAPI });
			ganttDemos.Dependencies.Add(new Dependency() { FromTask = ganttRendering });
			var iterationTask = new GanttTask(date, date.AddDays(7), "Iteration 1")
			{
				Children = { ganttAPI, ganttRendering, ganttDemos, milestone }
			};
			this.tasks = new ObservableCollection<GanttTask>() { iterationTask };
			this.visibleTime = new DateRange(date.AddDays(-1), date.AddDays(9));
			this.timeLineDeadlineBehavior = new TimeLineDeadlineBehavior();
		}