示例#1
0
        public MyViewModel()
        {
            var date = DateTime.Now;
            var ganttAPI = new GanttTask(date, date.AddDays(2), "Design public API") { Description = "Description: Design public API" };

            var ganttRendering = new GanttTask(date.AddDays(2).AddHours(8), date.AddDays(4), "Gantt Rendering") { Description = "Description: Gantt Rendering" };

            var ganttDemos = new GanttTask(date.AddDays(4.5), date.AddDays(7), "Gantt Demos") { Description = "Description: Gantt Demos" };

            var milestone = new GanttTask(date.AddDays(7), date.AddDays(7).AddHours(1), "Review") { Description = "Review", 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();

            this.ProjectDeadline = date.AddDays(8);
        }
示例#2
0
        public MyViewModel()
        {
            this._TimeLineResourceBehavior = new ResourceTimeLineVisualizationBehavior();

            var resources = new ObservableCollection<GanttResource>()
            {
                new GanttResource("Thomas Hardy", Colors.Red),
                new GanttResource("Elizabeth Lincoln", Colors.Blue),
                new GanttResource("Christina Berglung", Colors.Orange)
            };

            var date = DateTime.Now;
            var ganttAPI = new GanttResourceTask()
            {
                Start = date,
                End = date.AddDays(2),
                Title = "Design public API",
                Description = "Description: Design public API",
                GanttResource = resources[0]
            };
            var ganttRendering = new GanttResourceTask()
            {
                Start = date.AddDays(2).AddHours(8),
                End = date.AddDays(4),
                Title = "Gantt Rendering",
                Description = "Description: Gantt Rendering",
                GanttResource = resources[1]
            };
            var ganttDemos = new GanttResourceTask()
            {
                Start = date.AddDays(4.5),
                End = date.AddDays(7),
                Title = "Gantt Demos",
                Description = "Description: Gantt Demos",
                GanttResource = resources[2]
            };
            var milestone = new GanttResourceTask()
            {
                Start = date.AddDays(7),
                End = date.AddDays(7).AddHours(1),
                Title = "Review",
                Description = "Review",
                GanttResource = resources[2],
                IsMilestone = true
            };
            ganttRendering.Dependencies.Add(new Dependency() { FromTask = ganttAPI });
            ganttDemos.Dependencies.Add(new Dependency() { FromTask = ganttRendering });
            var iterationTask = new GanttResourceTask()
            {
                Start = date,
                End = date.AddDays(7),
                Title = "Iteration 1",
                Children = { ganttAPI, ganttRendering, ganttDemos, milestone }
            };
            this._Tasks = new ObservableCollection<GanttResourceTask>() { iterationTask };

            this._VisibleTime = new DateRange(date.AddDays(-1), date.AddDays(12));
        }
示例#3
0
 public ViewModel()
 {
     this.visibleRange = new VisibleRange()
     {
         Start = DateTime.Today, End = DateTime.Today.AddDays(3)
     };
     this.tasks = this.GetTasks();
     this.timeLineRecurrenceBehavior = new TimeLineRecurrenceBehavior();
 }
示例#4
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();
        }
示例#5
0
		public ViewModel()
		{
			var date = DateTime.Now;

			this.tasks = GetTasks(date);

			this.visibleTime = new DateRange(date.AddDays(-1), date.AddDays(11));

			this.timeLineBaselineBehavior = new TimeLineBaselineBehavior();
		}
示例#6
0
        public ViewModel()
        {
            var date = DateTime.Now;

            this.tasks = GetTasks(date);

            this.visibleTime = new DateRange(date.AddDays(-1), date.AddDays(11));

            this.timeLineBaselineBehavior = new TimeLineBaselineBehavior();
        }
示例#7
0
        public ViewModel()
        {
            var startDate = new DateTime(2013, 1, 1);
            var endDate = new DateTime(2013, 12, 31);

            var bulgaria = new CustomGanttTask()
            {
                Start = startDate,
                End = startDate.AddDays(1.5),
                Title = "Bulgaria",
                Description = "Bulgaria's national holidays",
                CustomDeadLines = new List<DateRange>() 
                { 
                    new DateRange(new DateTime(2013, 3, 3), new DateTime(2013, 3, 4)),
                    new DateRange(new DateTime(2013, 5, 1), new DateTime(2013, 5, 1)),
                    new DateRange(new DateTime(2013, 5, 6), new DateTime(2013, 5, 7)),
                    new DateRange(new DateTime(2013, 5, 24), new DateTime(2013, 5, 25)),
                    new DateRange(new DateTime(2013, 9, 6), new DateTime(2013, 9, 7)),
                    new DateRange(new DateTime(2013, 9, 22), new DateTime(2013, 9, 23)),
                    new DateRange(new DateTime(2013, 11, 1), new DateTime(2013, 11, 2)),
                    new DateRange(new DateTime(2013, 12, 24), new DateTime(2013, 12, 25)),
                    new DateRange(new DateTime(2013, 12, 26), new DateTime(2013, 12, 27)),
                    new DateRange(new DateTime(2013, 1, 2), new DateTime(2013, 1, 3))
                }
            };
            var england = new CustomGanttTask()
            {
                Start = startDate,
                End = startDate.AddDays(1.5),
                Title = "England",
                Description = "England's national holidays",
                CustomDeadLines = new List<DateRange>() 
                { 
                    new DateRange(new DateTime(2013, 3, 17), new DateTime(2013, 3, 18)),
                    new DateRange(new DateTime(2013, 5, 6), new DateTime(2013, 5, 7)),
                    new DateRange(new DateTime(2013, 5, 27), new DateTime(2013, 5, 28)),
                    new DateRange(new DateTime(2013, 7, 12), new DateTime(2013, 7, 13)),
                    new DateRange(new DateTime(2013, 8, 26), new DateTime(2013, 8, 27)),
                    new DateRange(new DateTime(2013, 12, 26), new DateTime(2013, 12, 28)),
                }
            };
            var usa = new CustomGanttTask()
            {
                Start = startDate,
                End = startDate.AddDays(1.5),
                Title = "USA",
                Description = "USA's national holidays",
                CustomDeadLines = new List<DateRange>() 
                { 
                    new DateRange(new DateTime(2013, 1, 21), new DateTime(2013, 1, 22)),
                    new DateRange(new DateTime(2013, 2, 18), new DateTime(2013, 2, 19)),
                    new DateRange(new DateTime(2013, 5, 27), new DateTime(2013, 5, 28)),
                    new DateRange(new DateTime(2013, 7, 4), new DateTime(2013, 7, 5)),
                    new DateRange(new DateTime(2013, 9, 2), new DateTime(2013, 9, 3)),
                    new DateRange(new DateTime(2013, 10, 14), new DateTime(2013, 10, 15)),
                    new DateRange(new DateTime(2013, 11, 11), new DateTime(2013, 11, 11)),
                    new DateRange(new DateTime(2013, 11, 29), new DateTime(2013, 11, 28)),
                }
            };


            var europe = new CustomGanttTask()
            {
                Start = startDate,
                End = endDate,
                Title = "Europe",
                Children = { bulgaria, england }
            };

            var unitedStates = new CustomGanttTask()
            {
                Start = startDate,
                End = startDate.AddDays(1.5),
                Title = "United States",
                Children = { usa }
            };
            this.tasks = new ObservableCollection<CustomGanttTask>() { europe, unitedStates };
            this.visibleRange = new DateRange(startDate, endDate);
            this.timeLineDeadlineBehavior = new EventsTimeLineVisualizationBehavior();

            this.GlobalDeadLines = new List<DateRange>() 
            { 
                new DateRange(new DateTime(2013, 1, 1), new DateTime(2013, 1, 2)),
                new DateRange(new DateTime(2013, 12, 25), new DateTime(2013, 12, 26)),
            };
            this.sliderValue = 1.0d;
            this.pixelLenght = TimeSpan.FromMinutes(36);
            this.VisibleArea = 1050;
        }
示例#8
0
 public ViewModel()
 {
     this.visibleRange = new VisibleRange() { Start = DateTime.Today, End = DateTime.Today.AddDays(1) };
     this.tasks = this.GetTasks();
     this.timeLineRecurrenceBehavior = new TimeLineRecurrenceBehavior();
 }
示例#9
0
        public MyViewModel()
        {
            this._TimeLineResourceBehavior = new ResourceTimeLineVisualizationBehavior();

            var resources = new ObservableCollection <GanttResource>()
            {
                new GanttResource("Thomas Hardy", Colors.Red),
                new GanttResource("Elizabeth Lincoln", Colors.Blue),
                new GanttResource("Christina Berglung", Colors.Orange)
            };

            var date     = DateTime.Now;
            var ganttAPI = new GanttResourceTask()
            {
                Start         = date,
                End           = date.AddDays(2),
                Title         = "Design public API",
                Description   = "Description: Design public API",
                GanttResource = resources[0]
            };
            var ganttRendering = new GanttResourceTask()
            {
                Start         = date.AddDays(2).AddHours(8),
                End           = date.AddDays(4),
                Title         = "Gantt Rendering",
                Description   = "Description: Gantt Rendering",
                GanttResource = resources[1]
            };
            var ganttDemos = new GanttResourceTask()
            {
                Start         = date.AddDays(4.5),
                End           = date.AddDays(7),
                Title         = "Gantt Demos",
                Description   = "Description: Gantt Demos",
                GanttResource = resources[2]
            };
            var milestone = new GanttResourceTask()
            {
                Start         = date.AddDays(7),
                End           = date.AddDays(7).AddHours(1),
                Title         = "Review",
                Description   = "Review",
                GanttResource = resources[2],
                IsMilestone   = true
            };

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

            this._Tasks = new ObservableCollection <GanttResourceTask>()
            {
                iterationTask
            };

            this._VisibleTime = new DateRange(date.AddDays(-1), date.AddDays(12));
        }
示例#10
0
        public ViewModel()
        {
            var startDate = new DateTime(2013, 1, 1);
            var endDate   = new DateTime(2013, 12, 31);

            var bulgaria = new CustomGanttTask()
            {
                Start           = startDate,
                End             = startDate.AddDays(1.5),
                Title           = "Bulgaria",
                Description     = "Bulgaria's national holidays",
                CustomDeadLines = new List <DateRange>()
                {
                    new DateRange(new DateTime(2013, 3, 3), new DateTime(2013, 3, 4)),
                    new DateRange(new DateTime(2013, 5, 1), new DateTime(2013, 5, 1)),
                    new DateRange(new DateTime(2013, 5, 6), new DateTime(2013, 5, 7)),
                    new DateRange(new DateTime(2013, 5, 24), new DateTime(2013, 5, 25)),
                    new DateRange(new DateTime(2013, 9, 6), new DateTime(2013, 9, 7)),
                    new DateRange(new DateTime(2013, 9, 22), new DateTime(2013, 9, 23)),
                    new DateRange(new DateTime(2013, 11, 1), new DateTime(2013, 11, 2)),
                    new DateRange(new DateTime(2013, 12, 24), new DateTime(2013, 12, 25)),
                    new DateRange(new DateTime(2013, 12, 26), new DateTime(2013, 12, 27)),
                    new DateRange(new DateTime(2013, 1, 2), new DateTime(2013, 1, 3))
                }
            };
            var england = new CustomGanttTask()
            {
                Start           = startDate,
                End             = startDate.AddDays(1.5),
                Title           = "England",
                Description     = "England's national holidays",
                CustomDeadLines = new List <DateRange>()
                {
                    new DateRange(new DateTime(2013, 3, 17), new DateTime(2013, 3, 18)),
                    new DateRange(new DateTime(2013, 5, 6), new DateTime(2013, 5, 7)),
                    new DateRange(new DateTime(2013, 5, 27), new DateTime(2013, 5, 28)),
                    new DateRange(new DateTime(2013, 7, 12), new DateTime(2013, 7, 13)),
                    new DateRange(new DateTime(2013, 8, 26), new DateTime(2013, 8, 27)),
                    new DateRange(new DateTime(2013, 12, 26), new DateTime(2013, 12, 28)),
                }
            };
            var usa = new CustomGanttTask()
            {
                Start           = startDate,
                End             = startDate.AddDays(1.5),
                Title           = "USA",
                Description     = "USA's national holidays",
                CustomDeadLines = new List <DateRange>()
                {
                    new DateRange(new DateTime(2013, 1, 21), new DateTime(2013, 1, 22)),
                    new DateRange(new DateTime(2013, 2, 18), new DateTime(2013, 2, 19)),
                    new DateRange(new DateTime(2013, 5, 27), new DateTime(2013, 5, 28)),
                    new DateRange(new DateTime(2013, 7, 4), new DateTime(2013, 7, 5)),
                    new DateRange(new DateTime(2013, 9, 2), new DateTime(2013, 9, 3)),
                    new DateRange(new DateTime(2013, 10, 14), new DateTime(2013, 10, 15)),
                    new DateRange(new DateTime(2013, 11, 11), new DateTime(2013, 11, 11)),
                    new DateRange(new DateTime(2013, 11, 29), new DateTime(2013, 11, 28)),
                }
            };


            var europe = new CustomGanttTask()
            {
                Start    = startDate,
                End      = endDate,
                Title    = "Europe",
                Children = { bulgaria, england }
            };

            var unitedStates = new CustomGanttTask()
            {
                Start    = startDate,
                End      = startDate.AddDays(1.5),
                Title    = "United States",
                Children = { usa }
            };

            this.tasks = new ObservableCollection <CustomGanttTask>()
            {
                europe, unitedStates
            };
            this.visibleRange             = new DateRange(startDate, endDate);
            this.timeLineDeadlineBehavior = new EventsTimeLineVisualizationBehavior();

            this.GlobalDeadLines = new List <DateRange>()
            {
                new DateRange(new DateTime(2013, 1, 1), new DateTime(2013, 1, 2)),
                new DateRange(new DateTime(2013, 12, 25), new DateTime(2013, 12, 26)),
            };
            this.sliderValue = 1.0d;
            this.pixelLenght = TimeSpan.FromMinutes(36);
            this.VisibleArea = 1050;
        }