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

            if (Label.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("label", Label);
            }
            if (DisplayValue.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("displayValue", DisplayValue);
            }
            if (Color.HasValue)
            {
                writer.WriteAttributeString("color", Color.Value.ToHexString());
            }
            if (Alpha.HasValue)
            {
                writer.WriteAttributeString("alpha", Alpha.ToString());
            }

            if (_link != null)
            {
                _link.GenerateXmlAttributes(writer);
            }

            if (ToolText.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("toolText", ToolText);
            }
            if (ShowLabel.HasValue)
            {
                writer.WriteAttributeString("showLabel", ShowLabel.GetHashCode().ToString());
            }
            if (Dashed.HasValue)
            {
                writer.WriteAttributeString("dashed", Dashed.GetHashCode().ToString());
            }

            if (_anchor != null)
            {
                _anchor.GenerateXmlAttributes(writer);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 속성들을 Xml Attribute로 생성합니다.
        /// </summary>
        /// <param name="writer">Attribute를 쓸 Writer</param>
        public override void GenerateXmlAttributes(XmlWriter writer)
        {
            base.GenerateXmlAttributes(writer);

            if (StartValue.HasValue)
            {
                writer.WriteAttributeString("StartValue", StartValue.ToString());
            }
            if (EndValue.HasValue)
            {
                writer.WriteAttributeString("EndValue", EndValue.ToString());
            }
            if (DisplayValue.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("DisplayValue", DisplayValue);
            }
            if (ValueInside.HasValue)
            {
                writer.WriteAttributeString("ValueInside", ValueInside.GetHashCode().ToString());
            }

            if (Color.HasValue)
            {
                writer.WriteAttributeString("Color", Color.Value.ToHexString());
            }
            if (Thickness.HasValue)
            {
                writer.WriteAttributeString("Thickness", Thickness.ToString());
            }

            if (ShowBorder.HasValue)
            {
                writer.WriteAttributeString("ShowBorder", ShowBorder.GetHashCode().ToString());
            }
            if (BorderColor.HasValue)
            {
                writer.WriteAttributeString("BorderColor", BorderColor.Value.ToHexString());
            }

            if (Radius.HasValue)
            {
                writer.WriteAttributeString("Radius", Radius.ToString());
            }
            if (InnerRadius.HasValue)
            {
                writer.WriteAttributeString("InnerRadius", InnerRadius.ToString());
            }

            if (Dashed.HasValue)
            {
                writer.WriteAttributeString("Dashed", Dashed.GetHashCode().ToString());
            }
            if (DashLen.HasValue)
            {
                writer.WriteAttributeString("DashLen", DashLen.ToString());
            }
            if (DashGap.HasValue)
            {
                writer.WriteAttributeString("DashGap", DashGap.ToString());
            }

            if (UseMarker.HasValue)
            {
                writer.WriteAttributeString("UseMarker", UseMarker.GetHashCode().ToString());
            }
            if (MarkerColor.HasValue)
            {
                writer.WriteAttributeString("MarkerColor", MarkerColor.Value.ToHexString());
            }
            if (MarkerBorderColor.HasValue)
            {
                writer.WriteAttributeString("MarkerBorderColor", MarkerBorderColor.Value.ToHexString());
            }
            if (MarkerRadius.HasValue)
            {
                writer.WriteAttributeString("MarkerRadius", MarkerRadius.ToString());
            }
            if (MarkerTooltext.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("MarkerTooltext", MarkerTooltext);
            }
        }