コード例 #1
0
 /// <summary>
 /// Adds a horizontal line to the top of the page footer,
 /// to separate the footer from the body.
 /// </summary>
 /// <remarks>
 /// In reality, the line goes into the top margin of the footer's
 /// LayeredSections. This isn't completely desirable, but it's the
 /// easiest solution.
 /// </remarks>
 /// <returns>The SectionLine added.  Update the returned
 /// value to set pen, length, magins, etc.</returns>
 public SectionLine AddPageFooterLine()
 {
     SectionLine line = new SectionLine (Direction.Horizontal, CurrentDocument.NormalPen);
     line.VerticalAlignment = VerticalAlignment.Top;
     // a negative margin puts the line into the margin of the surrounding box
     line.MarginTop = -horizLineMargins;
     PageFooter.AddSection (line);
     PageFooter.MarginTop = 2 * horizLineMargins;
     return line;
 }
コード例 #2
0
        /// <summary>
        /// Starts a layout of columns.
        /// </summary>
        /// <param name="columnWidth">The width of each column, in inches</param>
        /// <param name="spaceBetween">The distance between columns, in inches</param>
        /// <param name="lineDivider">Pen to use as a line divider</param>
        public void StartColumnLayout(float columnWidth, float spaceBetween,  Pen lineDivider)
        {
            this.columnLayoutMode = true;
            LinearRepeatableSections colSections =
                new LinearRepeatableSections(Direction.Horizontal);
            this.StartContainer (colSections);
            if (lineDivider != null)
            {
                SectionLine line = new SectionLine (Direction.Vertical, lineDivider);
                if (spaceBetween < lineDivider.Width)
                    spaceBetween = lineDivider.Width;
                line.MarginLeft = (spaceBetween - lineDivider.Width) / 2;
                line.MarginRight = (spaceBetween - lineDivider.Width) / 2;
                colSections.Divider = line;
            }
            else
            {
                colSections.SkipAmount = spaceBetween;
            }

            LinearSections sections;
            sections = this.StartLinearLayout(Direction.Vertical);
            sections.MaxWidth = columnWidth;
            sections.UseFullWidth = true;
        }
コード例 #3
0
 //        /// <summary>
 //        /// Adds a line break at this point in the report
 //        /// </summary>
 //        /// <returns>SectionBreak added</returns>
 //        public SectionBreak AddLineBreak ()
 //        {
 //            return (SectionBreak) AddSection (new SectionBreak (false));
 //        }
 /// <summary>
 /// Adds a horizontal line
 /// </summary>
 /// <param name="pen">Pen to use for the line</param>
 /// <returns>SectionLine added</returns>
 public SectionLine AddHorizontalLine(Pen pen)
 {
     SectionLine sectionLine = new SectionLine (Direction.Horizontal, pen);
     sectionLine.MarginTop = HorizLineMargins;
     sectionLine.MarginBottom = HorizLineMargins;
     AddSection (sectionLine);
     return sectionLine;
 }
コード例 #4
0
 /// <summary>
 /// Adds a horizontal line to the bottom of the page header,
 /// to separate the header from the body.
 /// </summary>
 /// <remarks>
 /// In reality, the line goes into the bottom margin of the header's
 /// LayeredSections. This isn't completely desirable, but it's the
 /// easiest solution.
 /// </remarks>
 /// <returns>The SectionLine added.  Update the returned
 /// value to set pen, length, magins, etc.</returns>
 public SectionLine AddPageHeaderLine()
 {
     SectionLine line = new SectionLine (Direction.Horizontal, CurrentDocument.NormalPen);
     line.VerticalAlignment = VerticalAlignment.Bottom;
     line.MarginBottom = -horizLineMargins;
     PageHeader.MarginBottom = 2 * horizLineMargins;
     PageHeader.AddSection (line);
     return line;
 }