Beispiel #1
0
        /// <summary>
        /// Fill the Background and draw a (Rectangle)Frame around the Control
        /// </summary>
        /// <param name="graphics"></param>

        protected virtual void Decorate(Graphics graphics)
        {
            if (graphics == null)
            {
                throw new ArgumentNullException("graphics");
            }
            RectangleShape shape = new RectangleShape();

            this.FillShape(graphics, shape);
            StandardPrinter.DrawBorder(graphics, this.StyleDecorator as BaseStyleDecorator);
        }
Beispiel #2
0
        public override void Render(ReportPageEventArgs rpea)
        {
            if (rpea == null)
            {
                throw new ArgumentNullException("rpea");
            }

            base.Render(rpea);

            StandardPrinter.FillBackground(rpea.PrintPageEventArgs.Graphics, this.BaseStyleDecorator);

            StandardPrinter.DrawBorder(rpea.PrintPageEventArgs.Graphics, this.BaseStyleDecorator);

            string formated = StandardFormatter.FormatOutput(this.text, this.FormatString, this.DataType, String.Empty);

            Print(rpea, formated, base.DisplayRectangle);

            base.NotifyAfterPrint(rpea.LocationAfterDraw);
        }
        public override void Render(ReportPageEventArgs rpea)
        {
            if (rpea == null)
            {
                throw new ArgumentNullException("rpea");
            }
            Point point = this.Location;

            base.Render(rpea);

            StandardPrinter.AdjustBackColor(this);

            StandardPrinter.FillBackground(rpea.PrintPageEventArgs.Graphics, this.BaseStyleDecorator);

            StandardPrinter.DrawBorder(rpea.PrintPageEventArgs.Graphics, this.BaseStyleDecorator);

            rpea.LocationAfterDraw = new Point(rpea.LocationAfterDraw.X, this.Location.Y + this.Size.Height);
            this.Location          = point;
            base.NotifyAfterPrint(rpea.LocationAfterDraw);
        }
        protected virtual Point RenderSection(ReportPageEventArgs rpea)
        {
            Point currentPosition = Point.Empty;

            this.CurrentSection.Render(rpea);

            Evaluator.SinglePage = this.reportDocument.SinglePage;

            if (this.CurrentSection.Items.Count > 0)
            {
                Rectangle desiredRectangle = Layout.Layout(rpea.PrintPageEventArgs.Graphics, this.CurrentSection);

                Rectangle sectionRectangle = new Rectangle(this.CurrentSection.Location.X,
                                                           this.CurrentSection.Location.Y,
                                                           this.CurrentSection.Size.Width,
                                                           this.CurrentSection.Size.Height);


                if (desiredRectangle.Height >= sectionRectangle.Height)
                {
                    this.CurrentSection.Size = new Size(this.CurrentSection.Size.Width, desiredRectangle.Height + 10);
                }

                if (this.CurrentSection.DrawBorder)
                {
                    StandardPrinter.DrawBorder(rpea.PrintPageEventArgs.Graphics, this.CurrentSection.BaseStyleDecorator);
                }


//					PrintHelper.DebugRectangle(rpea.PrintPageEventArgs.Graphics,Pens.Blue,new Rectangle(CurrentSection.Location,CurrentSection.Size));
            }

            Rectangle r = StandardPrinter.RenderPlainCollection(this.CurrentSection,
                                                                this.CurrentSection.Items,
                                                                Evaluator,
                                                                new Point(this.CurrentSection.Location.X, this.CurrentSection.SectionOffset),
                                                                rpea);

            return(PrintHelper.ConvertRectangleToCurentPosition(r));
        }