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

            if (Id.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("Id", Id);
            }
            if (Value.HasValue)
            {
                writer.WriteAttributeString("Value", Value.ToString());
            }
            if (ShowValue.HasValue)
            {
                writer.WriteAttributeString("ShowValue", ShowValue.GetHashCode().ToString());
            }
            if (EditMode.HasValue)
            {
                writer.WriteAttributeString("EditMode", EditMode.GetHashCode().ToString());
            }
            if (Color.HasValue)
            {
                writer.WriteAttributeString("Color", Color.Value.ToHexString());
            }
            if (Alpha.HasValue)
            {
                writer.WriteAttributeString("Alpha", Alpha.ToString());
            }

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

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

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

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

            if (ShowValue.HasValue)
            {
                writer.WriteAttributeString("showValue", ShowValue.GetHashCode().ToString());
            }
            if (ValueBelowPivot.HasValue)
            {
                writer.WriteAttributeString("valueBelowPivot", ValueBelowPivot.GetHashCode().ToString());
            }

            if (ShowGagueLabels.HasValue)
            {
                writer.WriteAttributeString("ShowGagueLabels", ShowGagueLabels.GetHashCode().ToString());
            }
            if (GaugeFillMix.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("GaugeFillMix", GaugeFillMix);
            }
            if (GaugeFillRatio.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("GaugeFillRatio", GaugeFillRatio);
            }

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

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

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

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

            if (ShowValue.HasValue)
            {
                writer.WriteAttributeString("ShowValue", ShowValue.GetHashCode().ToString());
            }
            if (ValueX.HasValue)
            {
                writer.WriteAttributeString("ValueX", ValueX.ToString());
            }
            if (ValueY.HasValue)
            {
                writer.WriteAttributeString("ValueY", ValueY.ToString());
            }
            if (EditMode.HasValue)
            {
                writer.WriteAttributeString("EditMode", EditMode.GetHashCode().ToString());
            }

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

            if (BgColor.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("BgColor", BgColor);
            }
            if (Radius.HasValue)
            {
                writer.WriteAttributeString("Radius", Radius.ToString());
            }
            if (BaseWidth.HasValue)
            {
                writer.WriteAttributeString("BaseWidth", BaseWidth.ToString());
            }
            if (TopWidth.HasValue)
            {
                writer.WriteAttributeString("TopWidth", TopWidth.ToString());
            }
            if (RearExtension.HasValue)
            {
                writer.WriteAttributeString("RearExtension", RearExtension.ToString());
            }
            if (ToolText.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("ToolText", ToolText);
            }

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