Example #1
0
        /// <summary>
        /// 속성들을 Xml Attribute로 생성합니다.
        /// </summary>
        /// <param name="writer">Attribute를 쓸 Writer</param>
        public override void GenerateXmlAttributes(System.Xml.XmlWriter writer)
        {
            writer.ShouldNotBeNull("writer");

            // Chart의 기본 Attribute 를 쓴다.
            base.GenerateXmlAttributes(writer);

            if (DateFormat.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("DateFormat", DateFormat);
            }
            if (OutputDateFormat.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("OutputDateFormat", OutputDateFormat);
            }
            if (GanttPaneDuration.HasValue)
            {
                writer.WriteAttributeString("ganttPaneDuration", GanttPaneDuration.Value.ToString());
            }
            if (GanttPaneDurationUnit.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("ganttPaneDurationUnit", GanttPaneDurationUnit);
            }
            if (GanttWidthPercent.HasValue)
            {
                writer.WriteAttributeString("GanttWidthPercent", GanttWidthPercent.Value.ToString());
            }
            if (ForceGanttWitdthPercent.HasValue)
            {
                writer.WriteAttributeString("ForceGanttWitdthPercent", ForceGanttWitdthPercent.Value.GetHashCode().ToString());
            }

            if (ShowTaskStartDate.HasValue)
            {
                writer.WriteAttributeString("ShowTaskStartDate", ShowTaskStartDate.Value.GetHashCode().ToString());
            }
            if (ShowTaskEndDate.HasValue)
            {
                writer.WriteAttributeString("ShowTaskEndDate", ShowTaskEndDate.Value.GetHashCode().ToString());
            }
            if (ShowTaskLabels.HasValue)
            {
                writer.WriteAttributeString("ShowTaskLabels", ShowTaskLabels.Value.GetHashCode().ToString());
            }
            if (ShowPercentLabel.HasValue)
            {
                writer.WriteAttributeString("ShowPercentLabel", ShowPercentLabel.Value.GetHashCode().ToString());
            }
            if (ShowSlackAsFill.HasValue)
            {
                writer.WriteAttributeString("ShowSlackAsFill", ShowSlackAsFill.Value.GetHashCode().ToString());
            }

            if (SlackFillColor.HasValue)
            {
                writer.WriteAttributeString("SlackFillColor", SlackFillColor.Value.ToHexString());
            }

            if (ExtendCategoryBg.HasValue)
            {
                writer.WriteAttributeString("ExtendCategoryBg", ExtendCategoryBg.Value.GetHashCode().ToString());
            }

            //if (_cosmeticAttr != null)
            //    _cosmeticAttr.GenerateXmlAttributes(writer);

            if (GanttLineColor.HasValue)
            {
                writer.WriteAttributeString("GanttLineColor", GanttLineColor.Value.ToHexString());
            }
            if (GanttLineAlpha.HasValue)
            {
                writer.WriteAttributeString("GanttLineAlpha", GanttLineAlpha.Value.ToString());
            }
            if (GridBorderColor.HasValue)
            {
                writer.WriteAttributeString("GridBorderColor", GridBorderColor.Value.ToHexString());
            }
            if (GridBorderAlpha.HasValue)
            {
                writer.WriteAttributeString("GridBorderAlpha", GridBorderAlpha.Value.ToString());
            }
            if (GridResizeBarColor.HasValue)
            {
                writer.WriteAttributeString("GridResizeBarColor", GridResizeBarColor.Value.ToHexString());
            }
            if (GridResizeBarAlpha.HasValue)
            {
                writer.WriteAttributeString("GridResizeBarAlpha", GridResizeBarAlpha.Value.ToString());
            }

            if (TaskBarRoundRadius.HasValue)
            {
                writer.WriteAttributeString("TaskBarRoundRadius", TaskBarRoundRadius.Value.ToString());
            }
            if (TaskBarFillMix.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("TaskBarFillMix", TaskBarFillMix);
            }
            if (TaskBarFillRatio.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("TaskBarFillRatio", TaskBarFillRatio);
            }

            if (TaskDatePadding.HasValue)
            {
                writer.WriteAttributeString("TaskDatePadding", TaskDatePadding.Value.ToString());
            }
        }