Beispiel #1
0
        private static void OnGanttItemsSourceTreeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            GanttChartGridControl ganttChartGridControl = d as GanttChartGridControl;

            ObservableCollection <GanttProjectModel> ganttProjectModels = new ObservableCollection <GanttProjectModel>();

            GetTreeChildren(ganttProjectModels, ganttChartGridControl.GanttItemsSourceTree);
            ganttChartGridControl.GanttRowsItem = new ObservableCollection <GanttProjectModel>(ganttProjectModels);
        }
Beispiel #2
0
        private static void OnGanttItemsSourceHeaderChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            GanttChartGridControl ganttChartGridControl         = d as GanttChartGridControl;
            ObservableCollection <TimeItemModel> timeItemModels = new ObservableCollection <TimeItemModel>();

            foreach (var item in ganttChartGridControl.GanttItemsSourceHeader)
            {
                timeItemModels.Add(new TimeItemModel()
                {
                    TimeName = item.TimeName
                });
                foreach (var time in item.DateTimeList)
                {
                    timeItemModels.Add(new TimeItemModel()
                    {
                        TimeName = time
                    });
                }
            }
            ganttChartGridControl.GanttColumnsItem = new ObservableCollection <TimeItemModel>(timeItemModels);
        }