コード例 #1
0
ファイル: GanttManager.cs プロジェクト: 0anion0/IBN
        private static void AddMilestone(GanttView gantt, Element parent, DateTime date, DateTime? basePlanDate, string id, string tag)
        {
            string type = "Milestone";

            gantt.CreatePointElement(parent, date, id, type, tag);

            if (basePlanDate != null && basePlanDate.Value != date)
            {
                string direction = basePlanDate.Value > date ? "Right" : "Left";

                PointElement small = gantt.CreatePointElement(parent, date, null, type, "BasePlanSmall");
                small.AddAttribute("direction", direction);

                PointElement large = gantt.CreatePointElement(parent, basePlanDate.Value, null, type, "BasePlanLarge");
                large.AddAttribute("direction", direction);
            }
        }
コード例 #2
0
ファイル: GanttManager.cs プロジェクト: 0anion0/IBN
        private static Element AddInterval2(GanttView gantt, Element parent, DateTime? start, DateTime? finish, string id, string type, string tag)
        {
            Element child = null;

            if (start != null && finish != null)
            {
                child = gantt.CreateIntervalElement(parent, start.Value, finish.Value, id, type, tag);
                if (type == "Summary")
                {
                    gantt.CreatePointElement(child, start.Value, null, type + "Start", tag);
                    gantt.CreatePointElement(child, finish.Value, null, type + "Finish", tag);
                }
            }
            else
            {
                if (start != null)
                {
                    child = gantt.CreatePointElement(parent, start.Value, id, type + "Start", tag);
                }
                if (finish != null)
                {
                    child = gantt.CreatePointElement(parent, finish.Value, id, type + "Finish", tag);
                }
            }

            return child;
        }