Esempio n. 1
0
        private static GanttView CreateGanttView(DateTime startDate, bool vastScale, DayOfWeek firstDayOfWeek, float headerItemHeight, float itemHeight)
        {
            GanttView gantt = new GanttView(headerItemHeight, itemHeight);

            gantt.CreateDataElement(startDate);

            AxisElement topAxis    = gantt.CreateAxisElement(ScaleLevel.Week, 1, string.Empty, firstDayOfWeek);
            AxisElement bottomAxis = gantt.CreateAxisElement(ScaleLevel.Day, 1, string.Empty, null);

            if (vastScale)
            {
                topAxis.TitleType = TitleType.StartEnd;
                topAxis.Format    = "d MMMM yyyy";

                bottomAxis.TitleType = TitleType.Start;
                bottomAxis.Format    = "ddd, d MMM";
                bottomAxis.Width     = 72;
            }
            else
            {
                topAxis.TitleType = TitleType.Start;
                topAxis.Format    = "d MMMM yyyy";

                bottomAxis.TitleType = TitleType.Start;
                bottomAxis.Format    = "dd";
                bottomAxis.Width     = 24;
            }

            return(gantt);
        }
Esempio n. 2
0
        private static GanttView CreateGanttView(DateTime startDate, DayOfWeek firstDayOfWeek, float headerItemHeight, float itemHeight)
        {
            GanttView gantt = new GanttView(headerItemHeight, itemHeight);

            gantt.CreateDataElement(startDate);
            gantt.CreateAxisElement(ScaleLevel.Week, 1, "dd MMMM yyyy", firstDayOfWeek);
            gantt.CreateAxisElement(ScaleLevel.Day, 1, "dd", null);

            return(gantt);
        }