public void InsertNewItemButton_Click(object sender, EventArgs e)
        {
            if (ScheduleChartView.SelectedItem == null)
            {
                return;
            }
            var item = new ScheduleChartItem
            {
                Content         = "New resource",
                GanttChartItems = new List <GanttChartItem>
                {
                    new GanttChartItem {
                        Content = "Task X (New resource)", Start = new DateTime(year, month, 2, 8, 0, 0), Finish = new DateTime(year, month, 5, 16, 0, 0)
                    },
                    new GanttChartItem {
                        Content = "Task Y (New resource)", Start = new DateTime(year, month, 7, 8, 0, 0), Finish = new DateTime(year, month, 8, 16, 0, 0)
                    }
                }
            };

            ScheduleChartView.InsertItem(ScheduleChartView.SelectedIndex, item);
            ScheduleChartView.SelectedItem = item;
            ScheduleChartView.ScrollTo(item);
            ScheduleChartView.ScrollTo(new DateTime(year, month, 1));
        }
        public void SetCustomBarColorToItemButton_Click(object sender, EventArgs e)
        {
            var resource = ScheduleChartView.SelectedItem;

            if (resource == null)
            {
                return;
            }
            foreach (GanttChartItem item in resource.GanttChartItems)
            {
                item.BarStroke = Color.Green;
                item.BarFill   = Color.YellowGreen;
            }
            ScheduleChartView.ScrollTo(resource);
        }