示例#1
0
        /// <summary>
        /// Converts Section into DDL.
        /// </summary>
        internal override void Serialize(Serializer serializer)
        {
            serializer.WriteComment(_comment.Value);
            serializer.WriteLine("\\section");

            int pos = serializer.BeginAttributes();

            if (!IsNull("PageSetup"))
            {
                PageSetup.Serialize(serializer);
            }
            serializer.EndAttributes(pos);

            serializer.BeginContent();
            if (!IsNull("headers"))
            {
                _headers.Serialize(serializer);
            }
            if (!IsNull("footers"))
            {
                _footers.Serialize(serializer);
            }
            if (!IsNull("elements"))
            {
                _elements.Serialize(serializer);
            }

            serializer.EndContent();
        }
示例#2
0
        /// <summary>
        /// Converts Footnote into DDL.
        /// </summary>
        internal override void Serialize(Serializer serializer)
        {
            serializer.WriteLine("\\footnote");

            int pos = serializer.BeginAttributes();

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

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

            serializer.EndAttributes(pos);

            pos = serializer.BeginContent();
            if (!IsNull("Elements"))
            {
                _elements.Serialize(serializer);
            }
            serializer.EndContent(pos);
        }
示例#3
0
        /// <summary>
        /// Converts HeaderFooter into DDL.
        /// </summary>
        internal void Serialize(Serializer serializer, string prefix)
        {
            serializer.WriteComment(_comment.Value);
            serializer.WriteLine("\\" + prefix + (IsHeader ? "header" : "footer"));

            int pos = serializer.BeginAttributes();

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

            serializer.BeginContent();
            if (!IsNull("Elements"))
            {
                _elements.Serialize(serializer);
            }
            serializer.EndContent();
        }