예제 #1
0
        /// <summary>
        /// Converts TextFrame into DDL.
        /// </summary>
        internal override void Serialize(Serializer serializer)
        {
            serializer.WriteLine("\\textframe");
            int pos = serializer.BeginAttributes();

            base.Serialize(serializer);
            if (!_marginLeft.IsNull)
            {
                serializer.WriteSimpleAttribute("MarginLeft", MarginLeft);
            }
            if (!_marginRight.IsNull)
            {
                serializer.WriteSimpleAttribute("MarginRight", MarginRight);
            }
            if (!_marginTop.IsNull)
            {
                serializer.WriteSimpleAttribute("MarginTop", MarginTop);
            }
            if (!_marginBottom.IsNull)
            {
                serializer.WriteSimpleAttribute("MarginBottom", MarginBottom);
            }
            if (!_orientation.IsNull)
            {
                serializer.WriteSimpleAttribute("Orientation", Orientation);
            }
            serializer.EndAttributes(pos);

            serializer.BeginContent();
            if (_elements != null)
            {
                _elements.Serialize(serializer);
            }
            serializer.EndContent();
        }
예제 #2
0
        /// <summary>
        /// Converts Cell into DDL.
        /// </summary>
        internal override void Serialize(Serializer serializer)
        {
            serializer.WriteComment(_comment.Value);
            serializer.WriteLine("\\cell");

            int pos = serializer.BeginAttributes();

            if (_style.Value != String.Empty)
            {
                serializer.WriteSimpleAttribute("Style", Style);
            }

            if (!IsNull("Format"))
            {
                _format.Serialize(serializer, "Format", null);
            }

            if (!_mergeDown.IsNull)
            {
                serializer.WriteSimpleAttribute("MergeDown", MergeDown);
            }

            if (!_mergeRight.IsNull)
            {
                serializer.WriteSimpleAttribute("MergeRight", MergeRight);
            }

            if (!_verticalAlignment.IsNull)
            {
                serializer.WriteSimpleAttribute("VerticalAlignment", VerticalAlignment);
            }

            if (!IsNull("Borders"))
            {
                _borders.Serialize(serializer, null);
            }

            if (!IsNull("Shading"))
            {
                _shading.Serialize(serializer);
            }

            if (_roundedCorner != RoundedCorner.None)
            {
                serializer.WriteSimpleAttribute("RoundedCorner", RoundedCorner);
            }

            serializer.EndAttributes(pos);

            pos = serializer.BeginContent();
            if (!IsNull("Elements"))
            {
                _elements.Serialize(serializer);
            }
            serializer.EndContent(pos);
        }
예제 #3
0
        /// <summary>
        /// Converts TextArea into DDL.
        /// </summary>
        internal override void Serialize(Serializer serializer)
        {
            Chart chartObject = _parent as Chart;

            serializer.WriteLine("\\" + chartObject.CheckTextArea(this));
            int pos = serializer.BeginAttributes();

            if (!_style.IsNull)
            {
                serializer.WriteSimpleAttribute("Style", Style);
            }
            if (!IsNull("Format"))
            {
                _format.Serialize(serializer, "Format", null);
            }

            if (!_topPadding.IsNull)
            {
                serializer.WriteSimpleAttribute("TopPadding", TopPadding);
            }
            if (!_leftPadding.IsNull)
            {
                serializer.WriteSimpleAttribute("LeftPadding", LeftPadding);
            }
            if (!_rightPadding.IsNull)
            {
                serializer.WriteSimpleAttribute("RightPadding", RightPadding);
            }
            if (!_bottomPadding.IsNull)
            {
                serializer.WriteSimpleAttribute("BottomPadding", BottomPadding);
            }

            if (!_width.IsNull)
            {
                serializer.WriteSimpleAttribute("Width", Width);
            }
            if (!_height.IsNull)
            {
                serializer.WriteSimpleAttribute("Height", Height);
            }

            if (!_verticalAlignment.IsNull)
            {
                serializer.WriteSimpleAttribute("VerticalAlignment", VerticalAlignment);
            }

            if (!IsNull("LineFormat"))
            {
                _lineFormat.Serialize(serializer);
            }
            if (!IsNull("FillFormat"))
            {
                _fillFormat.Serialize(serializer);
            }

            serializer.EndAttributes(pos);

            serializer.BeginContent();
            if (_elements != null)
            {
                _elements.Serialize(serializer);
            }
            serializer.EndContent();
        }