コード例 #1
0
		public override void Draw(Graphics graphics)
		{
			if (graphics == null) {
				throw new ArgumentNullException("graphics");
			}
			
			Rectangle rect = new Rectangle(this.ClientRectangle.Left,this.ClientRectangle.Top,
			                               this.ClientRectangle.Right -1,
			                               this.ClientRectangle.Bottom -1);
//			backgroundShape.FillShape(graphics,
//			                new SolidFillPattern(this.BackColor),
//			                rect);
			
			Border b = new Border(new BaseLine (this.ForeColor,System.Drawing.Drawing2D.DashStyle.Solid,1));
//			DrawFrame(graphics,b);
			BaseLine line = new BaseLine(base.ForeColor,DashStyle,Thickness,LineCap.Round,LineCap.Round,DashCap.Round);
			using (Pen pen = line.CreatePen(line.Thickness)){
				shape.CornerRadius = this.CornerRadius;
				GraphicsPath path1 = shape.CreatePath(rect);
				graphics.DrawPath(pen, path1);
				
			}
			
//			shape.DrawShape (graphics,
//			                 this.Baseline(),
//			                 rect);
			
		}
コード例 #2
0
		public override void Render(ReportPageEventArgs rpea)
		{	
			if (rpea == null) {
				throw new ArgumentNullException("rpea");
			}
			
			this.SetErrorLayout();
			Border b = new Border(new BaseLine (this.ForeColor,System.Drawing.Drawing2D.DashStyle.Solid,1));
			base.DrawFrame(rpea.PrintPageEventArgs.Graphics,b);
			Print (rpea,this.errMess,base.DrawingRectangle);
		}
コード例 #3
0
		public override void Render(ReportPageEventArgs rpea)
		{
			this.NotifyPrinting();
			base.Render(rpea);
			
			if (this.DrawBorder == true) {
				Border b = new Border(new BaseLine (this.FrameColor,System.Drawing.Drawing2D.DashStyle.Solid,1));
				Rectangle r = new Rectangle (this.Location,this.Size);
				b.DrawBorder(rpea.PrintPageEventArgs.Graphics,r);
			}
			this.NotifyPrinted();
		}
コード例 #4
0
		public override void Render(ReportPageEventArgs rpea) {
			
			if (rpea == null) {
				throw new ArgumentNullException("rpea");
			}
			
			base.Render(rpea);
			base.FillBackground(rpea.PrintPageEventArgs.Graphics);
			//Border b = new Border(new BaseLine (this.ForeColor,System.Drawing.Drawing2D.DashStyle.Solid,1));
			Border b = new Border(new BaseLine (this.FrameColor,System.Drawing.Drawing2D.DashStyle.Solid,1));
			base.DrawFrame(rpea.PrintPageEventArgs.Graphics,b);
			
			string formated = StandardFormatter.FormatOutput(this.text,this.FormatString,this.DataType,String.Empty);
			
			Print (rpea,formated,base.DrawingRectangle);
			base.NotifyAfterPrint (rpea.LocationAfterDraw);
		}
コード例 #5
0
		public override void Draw(Graphics graphics)
		{
			if (graphics == null) {
				throw new ArgumentNullException("graphics");
			}
			
			Rectangle rect = new Rectangle(this.ClientRectangle.Left,this.ClientRectangle.Top,
			                                this.ClientRectangle.Right -1,
			                                this.ClientRectangle.Bottom -1);
			backgroundShape.FillShape(graphics,
			                new SolidFillPattern(this.BackColor),
			                rect);
			Border b = new Border(new BaseLine (this.ForeColor,System.Drawing.Drawing2D.DashStyle.Solid,1));
			DrawFrame(graphics,b);
			
			shape.DrawShape (graphics,
			                 this.Baseline(),
			                 rect);
			
		}
コード例 #6
0
		public override void Render(ReportPageEventArgs rpea)
		{
			if (rpea == null) {
				throw new ArgumentNullException("rpea");
			}
			Point point = this.Location;
			base.Render(rpea);
			
			if (this.BackColor != GlobalValues.DefaultBackColor) {
				base.FillBackground(rpea.PrintPageEventArgs.Graphics);       
			}
			 
			
			Border b = new Border(new BaseLine (this.FrameColor,System.Drawing.Drawing2D.DashStyle.Solid,1));
			
			base.DrawFrame (rpea.PrintPageEventArgs.Graphics,b);
			
			this.Location = new Point(base.DrawingRectangle.Left,this.Location.Y);
			
			if ((this.items != null) && (this.items.Count > 0)) {
				foreach (BaseReportItem childItem in this.items) {
					childItem.Parent = this;
					
					Point saveloc = new Point (childItem.Location.X,childItem.Location.Y);
					
					childItem.Location = new Point(childItem.Location.X,
					                               base.DrawingRectangle.Top + childItem.Location.Y);
					
					
					if (this.BackColor != GlobalValues.DefaultBackColor) {
							childItem.BackColor = this.BackColor;
					}
					childItem.Render (rpea);
					childItem.Location = saveloc;
				}
			}
			this.Location = point;
			base.NotifyAfterPrint (rpea.LocationAfterDraw);
		}
コード例 #7
0
		public override void Render(ReportPageEventArgs rpea)
		{
			if (rpea == null) {
				throw new ArgumentNullException("rpea");
			}
//
			Point saveLocation = this.Location;
			Point currentPosition = new Point(this.startSection.Location.X,this.startSection.Location.Y);
			Point tableStart = currentPosition;
			base.Render(rpea);
			int defaultLeftPos = PrintHelper.DrawingAreaRelativeToParent(this.Parent,this).Left;
			this.Items.SortByLocation();
			rpea.SinglePage.StartRow  = this.dataNavigator.CurrentRow;
			foreach (BaseRowItem row in this.items)
			{
				if (row != null)
				{
					row.Parent = this;
					if (PrintHelper.IsTextOnlyRow(row) )
					{
						currentPosition = this.PrintTextRow (rpea,row,defaultLeftPos,currentPosition);
						this.Location = saveLocation;
					}
					else {
						do {
							if (PrintHelper.IsPageFull(new Rectangle(currentPosition,row.Size),sectionBounds)) {
								this.Location = saveLocation;
							
								rpea.SinglePage.EndRow = this.dataNavigator.CurrentRow;
								AbstractRenderer.PageBreak(rpea);
								return;
							}
							currentPosition = this.PrintDataRow (rpea,row,defaultLeftPos,currentPosition);
						}
						while (this.dataNavigator.MoveNext());
					}
				}
			}
			if (this.DrawBorder) {
				Border border = new Border(new BaseLine (this.ForeColor,System.Drawing.Drawing2D.DashStyle.Solid,1));
				border.DrawBorder(rpea.PrintPageEventArgs.Graphics,
				                  new Rectangle(this.Parent.Location.X,tableStart.Y,
				                                this.Parent.Size.Width,currentPosition.Y + 5));
			}
			rpea.LocationAfterDraw = new Point(rpea.LocationAfterDraw.X,rpea.LocationAfterDraw.Y + 20);
			base.NotifyAfterPrint (rpea.LocationAfterDraw);
		}
コード例 #8
0
		protected void DrawFrame (Graphics graphics,Border border) {
			if (this.DrawBorder == true) {
				border.DrawBorder(graphics,this.DisplayRectangle);
			}
		}