コード例 #1
0
ファイル: GanttManager.cs プロジェクト: 0anion0/IBN
        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;
        }
コード例 #2
0
ファイル: ResourceChart.cs プロジェクト: 0anion0/IBN
        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;
        }