コード例 #1
0
ファイル: ExporterPage.cs プロジェクト: Rpinski/SharpDevelop
		public static ExporterPage CreateInstance (SectionBounds sectionBounds,int pageNumber)
		{
			if (sectionBounds == null) {
				throw new ArgumentNullException("sectionBounds");
			}
			ExporterPage instance = new ExporterPage(sectionBounds,pageNumber);
			return instance;
		}
コード例 #2
0
ファイル: TestHelper.cs プロジェクト: hpsa/SharpDevelop
		public static SinglePage CreateSinglePage ()
		{
			SectionBounds sb = new SectionBounds(new ReportSettings(),false);
			SinglePage p = new SinglePage(sb,15);
		
			p.TotalPages = 25;
			p.ReportName = "SharpTestReport.srd";
			p.ReportFileName =@"c:\testreports\SharpTestReport.srd";
			p.ExecutionTime = new DateTime(2009,12,24,23,59,59);
			return p;
		}
コード例 #3
0
ファイル: SinglePage.cs プロジェクト: Rpinski/SharpDevelop
		public SinglePage(SectionBounds sectionBounds, int pageNumber):base(pageNumber)
			
		{
			if (sectionBounds == null) {
				throw new ArgumentNullException("sectionBounds");
			}
			if (pageNumber < 0) {
				throw new ArgumentNullException("pageNumber");
			}
			this.sectionBounds = sectionBounds;
			this.PageNumber = pageNumber;
		}
コード例 #4
0
ファイル: BasePager.cs プロジェクト: hpsa/SharpDevelop
		protected ExporterPage InitNewPage ()
		{
			bool firstPage;
			this.ReportModel.ReportSettings.LeftMargin = this.ReportModel.ReportSettings.LeftMargin;
			if (this.Pages.Count == 0) {
				firstPage = true;
			} else {
				firstPage = false;
			}
			SectionBounds sectionBounds  = new SectionBounds (this.ReportModel.ReportSettings,firstPage);
			ExporterPage sp = ExporterPage.CreateInstance(sectionBounds,this.pages.Count + 1);
			return sp;
		}
コード例 #5
0
        public SinglePage(SectionBounds sectionBounds, int pageNumber) : base(pageNumber)

        {
            if (sectionBounds == null)
            {
                throw new ArgumentNullException("sectionBounds");
            }
            if (pageNumber < 0)
            {
                throw new ArgumentNullException("pageNumber");
            }
            this.sectionBounds = sectionBounds;
            this.PageNumber    = pageNumber;
        }
コード例 #6
0
ファイル: BaseConverter.cs プロジェクト: ootsby/SharpDevelop
		public BaseConverter(IDataNavigator dataNavigator,ExporterPage singlePage,
		                     ILayouter layouter)
		{
			if (dataNavigator == null) {
				throw new ArgumentNullException("dataNavigator");
			}
			if (singlePage == null) {
				throw new ArgumentNullException("singlePage");
			}

			if (layouter == null) {
				throw new ArgumentNullException("layouter");
			}
			this.singlePage = singlePage;
			this.dataNavigator = dataNavigator;
			this.sectionBounds = this.singlePage.SectionBounds;
			this.layouter = layouter;
			this.evaluator = StandardPrinter.CreateEvaluator(this.singlePage,this.dataNavigator);
		}
コード例 #7
0
ファイル: BasePager.cs プロジェクト: OmerRaviv/SharpDevelop
		protected void InitNewPage ()
		{
			bool firstPage;
			
			if (this.Pages.Count == 0) {
				firstPage = true;
			} else {
				firstPage = false;
			}
			
			this.ReportModel.ReportSettings.LeftMargin = this.ReportModel.ReportSettings.LeftMargin;
			var sectionBounds  = new SectionBounds (this.ReportModel.ReportSettings,firstPage);
			
			this.SinglePage = ExporterPage.CreateInstance(sectionBounds,this.pages.Count + 1);
			
			if (this.EvaluatorFacade == null)
			{
				EvaluatorFacade = EvaluationHelper.CreateEvaluator(SinglePage,SinglePage.IDataNavigator);
			}
			EvaluatorFacade.SinglePage = this.SinglePage;
		}
コード例 #8
0
		public void Calculate_Page_If_Firstpage ()
		{
			Size defSize = new Size (727,60);
			IReportModel model = ReportModel.Create();
			model.ReportHeader.Size = defSize;
			model.ReportHeader.Location = new Point(50,50);
			
			
			model.PageHeader.Size = defSize;
			model.PageHeader.Location = new Point(50,125);
			
			model.DetailSection.Size = defSize;
			model.DetailSection.Location = new Point(50,200);
			
			model.PageFooter.Size = defSize;
			model.ReportFooter.Location = new Point(50,275);
			
			model.ReportFooter.Size = defSize;
			model.ReportFooter.Location = new Point(50,350);
			
			var  s = new SectionBounds(new ReportSettings(),true);
			SinglePage sp = new SinglePage(s,0);
			
			sp.CalculatePageBounds(model);
			Console.WriteLine();
			Console.WriteLine("ReportHeader {0} - {1}",sp.SectionBounds.ReportHeaderRectangle,sp.SectionBounds.ReportHeaderRectangle.Location.Y + sp.SectionBounds.ReportHeaderRectangle.Height);
			Console.WriteLine("PageHeader {0} - {1}",sp.SectionBounds.PageHeaderRectangle,sp.SectionBounds.PageHeaderRectangle.Location.Y +sp.SectionBounds.PageHeaderRectangle.Height );
			Console.WriteLine("DetailSection {0} - {1} ",sp.SectionBounds.DetailSectionRectangle,sp.SectionBounds.DetailSectionRectangle.Location.Y + sp.SectionBounds.DetailSectionRectangle.Height);
			
			Console.WriteLine("\tDetailStart {0} ",sp.SectionBounds.DetailStart);
			Console.WriteLine("\tDetailEnd {0} ",sp.SectionBounds.DetailEnds);
			Console.WriteLine("\tDetailArea {0} ",sp.SectionBounds.DetailArea);
			Console.WriteLine("PageFooter {0} - {1} ",sp.SectionBounds.PageFooterRectangle,sp.SectionBounds.PageFooterRectangle.Location.Y + sp.SectionBounds.PageFooterRectangle.Height);
			Console.WriteLine("ReportFooter {0} - {1}",sp.SectionBounds.ReportFooterRectangle,sp.SectionBounds.ReportFooterRectangle.Location.Y + sp.SectionBounds.ReportFooterRectangle.Height);
	Console.WriteLine();
		}
コード例 #9
0
		public void Init()
		{
			this.sectionBounds = new SectionBounds(new ReportSettings(),false);
		}
コード例 #10
0
		ISinglePage CreateSinglePage(IReportModel model,int pageNumber)
		{
			Size defaultSectionSize = new Size (727,60);
			var  s = new SectionBounds(model.ReportSettings,true);
			
			SinglePage sp = new SinglePage(s,0);
			sp.CalculatePageBounds(model);
			return sp;
		}
コード例 #11
0
		public NewPageEventArgs(ExporterCollection itemsList,SectionBounds sectionBounds)
		{
			this.itemsList = itemsList;
			SectionBounds = sectionBounds;
		}
コード例 #12
0
ファイル: ExporterPage.cs プロジェクト: Rpinski/SharpDevelop
		private ExporterPage (SectionBounds sectionBounds,int pageNumber):base(sectionBounds,pageNumber)
		{	
		}