コード例 #1
0
        }       //	setPageCount

        /// <summary>
        /// Add Print element to page
        /// </summary>
        /// <param name="element">print element</param>
        public void AddElement(PrintElement element)
        {
            if (element != null)
            {
                m_elements.Add(element);
            }
        }       //	addElement
コード例 #2
0
        }       //	paint

        public Query GetDrillDown(Point relativePoint)
        {
            Query retValue = null;

            for (int i = 0; i < m_elements.Count() && retValue == null; i++)
            {
                PrintElement element = (PrintElement)m_elements[i];
                retValue = element.GetDrillDown(relativePoint, 1);
            }
            return(retValue);
        }       //	getDrillDown
コード例 #3
0
        }       //	getDrillDown

        /// <summary>
        /// Get DrillAcross value
        /// </summary>
        /// <param name="relativePoint">relative Point</param>
        /// <returns>if found Query or null</returns>
        public Query GetDrillAcross(Point relativePoint)
        {
            Query retValue = null;

            for (int i = 0; i < m_elements.Count() && retValue == null; i++)
            {
                PrintElement element = m_elements[i];
                retValue = element.GetDrillAcross(relativePoint, m_pageNo);
            }
            return(retValue);
        }       //	getDrillAcross
コード例 #4
0
        }       //	paint

        public void PaintPdf(XGraphics g2D, Rectangle bounds, bool isView, bool isCopy)
        {
            m_ctx.Put(CONTEXT_PAGE, m_pageInfo);
            //	log.finest( "PrintContext", CONTEXT_PAGE + "=" + m_pageInfo);
            //
            StringBuilder sb = new StringBuilder();

            if (m_pageCount != 1)               //	set to "Page 1 of 2"
            {
                sb.Append(Msg.GetMsg(m_ctx, "Page")).Append(" ")
                .Append(m_pageNo)
                .Append(" ").Append(Msg.GetMsg(m_ctx, "of")).Append(" ")
                .Append(m_pageCount);
            }
            sb.Append(" ");
            m_ctx.Put(CONTEXT_MULTIPAGE, sb.ToString());
            //	log.finest( "PrintContext", CONTEXT_MULTIPAGE + "=" + sb.toString());
            //
            sb = new StringBuilder();
            if (isCopy)                                 //	set to "(Copy)"
            {
                sb.Append("(")
                .Append(Msg.GetMsg(m_ctx, "DocumentCopy"))
                .Append(")");
            }
            sb.Append(" ");
            m_ctx.Put(CONTEXT_COPY, sb.ToString());
            //	log.finest( "PrintContext copy=" + isCopy, CONTEXT_COPY + "=" + sb.toString());

            //	Paint Background
            // Create solid brush.
            //XSolidBrush whiteBrush = new XSolidBrush(XColors.White);

            //g2D.DrawRectangle(whiteBrush, bounds.X, bounds.Y, bounds.Width, bounds.Height);
            //
            Point pageStart = new Point(bounds.X, bounds.Y);

            for (int i = 0; i < m_elements.Count(); i++)
            {
                //
                PrintElement e = m_elements[i];
                e.PaintPdf(g2D, m_pageNo, pageStart, m_ctx, isView);
            }
        }       //	paint