Beispiel #1
0
 private object CoerceDisplayText(object value)
 {
     return($"({ValueX.ToString("F3")}, {ValueY.ToString("F3")})");
 }
Beispiel #2
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);
            }
        }