Esempio n. 1
0
        ////public void SetGridLinesTimeline(TimeLine timeline)
        ////{
        ////    if (!ganttChartData.TimeLines.Contains(timeline))
        ////        throw new Exception("Invalid timeline");

        ////    //gridLineTimeLine = timeline;
        ////}

        ////public void SetGridLinesTimeline(TimeLine timeline, BackgroundFormatter backgroundFormatter)
        ////{
        ////    if (!ganttChartData.TimeLines.Contains(timeline))
        ////        throw new Exception("Invalid timeline");

        ////    foreach (var item in timeline.Items)
        ////        item.BackgroundColor = backgroundFormatter(item);

        ////    gridLineTimeLines.Clear();
        ////    gridLineTimeLines.Add(timeline);
        ////    //gridLineTimeLine = timeline;
        ////}
        public HeaderedGanttRowGroup CreateGanttRowGroup(string name)
        {
            var rowGroup = new HeaderedGanttRowGroup()
            {
                Name = name
            };

            ganttChartData.RowGroups.Add(rowGroup);
            return(rowGroup);
        }
Esempio n. 2
0
        private void CreateData(HeaderedGanttRowGroup rowgroup, ImportModel item)
        {
            // Create and data
            var row1 = gant_grid.CreateGanttRow(rowgroup, item.Name);

            System.Windows.Media.Brush brush = Brushes.Green;
            gant_grid.AddGanttTask(row1, new GanttTask()
            {
                Start = item.date_start, End = item.date_end, Name = item.responsible
            });
        }