Beispiel #1
0
 protected virtual void BuildNewPage()
 {
     this.singlePage = this.InitNewPage();
     PrintHelper.InitPage(this.singlePage, this.reportModel.ReportSettings);
     this.singlePage.CalculatePageBounds(this.ReportModel);
     this.pageFull = false;
 }
Beispiel #2
0
 public BaseConverter(IDataNavigator dataNavigator, ExporterPage singlePage,
                      IExportItemsConverter exportItemsConverter, ILayouter layouter)
 {
     if (dataNavigator == null)
     {
         throw new ArgumentNullException("dataNavigator");
     }
     if (singlePage == null)
     {
         throw new ArgumentNullException("singlePage");
     }
     if (exportItemsConverter == null)
     {
         throw new ArgumentNullException("exportItemsConverter");
     }
     if (layouter == null)
     {
         throw new ArgumentNullException("layouter");
     }
     this.singlePage           = singlePage;
     this.dataNavigator        = dataNavigator;
     this.sectionBounds        = this.singlePage.SectionBounds;
     this.exportItemsConverter = exportItemsConverter;
     this.layouter             = layouter;
 }
Beispiel #3
0
		protected virtual void BuildNewPage ()
		{
			this.singlePage = this.InitNewPage();
			PrintHelper.InitPage(this.singlePage,this.reportModel.ReportSettings);			
			this.singlePage.CalculatePageBounds(this.ReportModel);
			this.pageFull = false;
		}
Beispiel #4
0
		public static ExporterPage CreateInstance (SectionBounds sectionBounds,int pageNumber)
		{
			if (sectionBounds == null) {
				throw new ArgumentNullException("sectionBounds");
			}
			ExporterPage instance = new ExporterPage(sectionBounds,pageNumber);
			return instance;
		}
Beispiel #5
0
        public static ExporterPage CreateInstance(SectionBounds sectionBounds, int pageNumber)
        {
            if (sectionBounds == null)
            {
                throw new ArgumentNullException("sectionBounds");
            }
            ExporterPage instance = new ExporterPage(sectionBounds, pageNumber);

            return(instance);
        }
Beispiel #6
0
		protected override void AddPage (ExporterPage page) {
			if (page == null) {
				throw new ArgumentNullException("page");
			}
			lock (addLock) {
				base.Pages.Add(page);
				
			}
			base.FirePageCreated(page);
		}
Beispiel #7
0
 protected override void AddPage(ExporterPage page)
 {
     if (page == null)
     {
         throw new ArgumentNullException("page");
     }
     lock (addLock) {
         base.Pages.Add(page);
     }
     base.FirePageCreated(page);
 }
		public static IBaseConverter CreateConverter (BaseReportItem itemToConvert,IDataNavigator dataNavigator,
		                                             ExporterPage singlePage,IExportItemsConverter exportItemsConverter,ILayouter layouter)
		{

			Type t = itemToConvert.GetType();
			if (t.Equals(typeof(BaseTableItem))) {
				return new TableConverter(dataNavigator,singlePage,exportItemsConverter,layouter);
			}
			
			if (t.Equals(typeof(BaseRowItem))) {
				return new RowConverter (dataNavigator,singlePage,exportItemsConverter,layouter);
			}
			
			return null;
		}
Beispiel #9
0
		public BaseConverter(IReportModel reportModel,IDataNavigator dataNavigator,ExporterPage singlePage)
		{
			if (dataNavigator == null) {
				throw new ArgumentNullException("dataNavigator");
			}
			if (singlePage == null) {
				throw new ArgumentNullException("singlePage");
			}
			this.ReportModel = reportModel;

			this.SinglePage = singlePage;
			this.DataNavigator = dataNavigator;
			this.Layouter =  (ILayouter)ServiceContainer.GetService(typeof(ILayouter));
			this.Evaluator = EvaluationHelper.CreateEvaluator(this.SinglePage,this.DataNavigator);
		}
		public BaseConverter(IReportModel reportModel,IDataNavigator dataNavigator,ExporterPage singlePage)
		{
			if (dataNavigator == null) {
				throw new ArgumentNullException("dataNavigator");
			}
			if (singlePage == null) {
				throw new ArgumentNullException("singlePage");
			}
			this.ReportModel = reportModel;

			this.SinglePage = singlePage;
			this.DataNavigator = dataNavigator;
			this.Layouter =  (ILayouter)ServiceContainer.GetService(typeof(ILayouter));
			this.Evaluator = EvaluationHelper.CreateEvaluator(this.SinglePage,this.DataNavigator);
		}
Beispiel #11
0
		public static IBaseConverter CreateConverter (BaseReportItem itemToConvert,IReportModel reportModel,
		                                              IDataNavigator dataNavigator,ExporterPage singlePage)
		                                             
		{
			Type t = itemToConvert.GetType();
			if (t.Equals(typeof(BaseTableItem))) {
				return new GroupedTableConverter(reportModel,dataNavigator,singlePage);
			}
			
			if (t.Equals(typeof(BaseRowItem))) {
				return new GroupedRowConverter (reportModel,dataNavigator,singlePage);
			}
			
			return null;
		}
        public static IBaseConverter CreateConverter(BaseReportItem itemToConvert, IDataNavigator dataNavigator,
                                                     ExporterPage singlePage, IExportItemsConverter exportItemsConverter, ILayouter layouter)
        {
            Type t = itemToConvert.GetType();

            if (t.Equals(typeof(BaseTableItem)))
            {
                return(new TableConverter(dataNavigator, singlePage, exportItemsConverter, layouter));
            }

            if (t.Equals(typeof(BaseRowItem)))
            {
                return(new RowConverter(dataNavigator, singlePage, exportItemsConverter, layouter));
            }

            return(null);
        }
Beispiel #13
0
        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);
        }
        public static IBaseConverter CreateConverter(BaseReportItem itemToConvert, IReportModel reportModel,
                                                     IDataNavigator dataNavigator, ExporterPage singlePage)

        {
            Type t = itemToConvert.GetType();

            if (t.Equals(typeof(BaseTableItem)))
            {
                return(new GroupedTableConverter(reportModel, dataNavigator, singlePage));
            }

            if (t.Equals(typeof(BaseRowItem)))
            {
                return(new GroupedRowConverter(reportModel, dataNavigator, singlePage));
            }

            return(null);
        }
Beispiel #15
0
		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;
			SectionBounds = this.SinglePage.SectionBounds;
			this.Layouter = layouter;
			this.Evaluator = StandardPrinter.CreateEvaluator(this.SinglePage,this.DataNavigator);
		}
		public BaseConverter(IDataNavigator dataNavigator,ExporterPage singlePage,
		                     IExportItemsConverter exportItemsConverter,ILayouter layouter)
		{
			if (dataNavigator == null) {
				throw new ArgumentNullException("dataNavigator");
			}
			if (singlePage == null) {
				throw new ArgumentNullException("singlePage");
			}
			if (exportItemsConverter == null) {
				throw new ArgumentNullException("exportItemsConverter");
			}
			if (layouter == null) {
				throw new ArgumentNullException("layouter");
			}
			this.singlePage = singlePage;
			this.dataNavigator = dataNavigator;
			this.sectionBounds = this.singlePage.SectionBounds;
			this.exportItemsConverter = exportItemsConverter;
			this.layouter = layouter;
		}
Beispiel #17
0
        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;
            SectionBounds      = this.SinglePage.SectionBounds;
            this.Layouter      = layouter;
            this.Evaluator     = StandardPrinter.CreateEvaluator(this.SinglePage, this.DataNavigator);
        }
Beispiel #18
0
        protected void FinishRendering(IDataNavigator navigator)
        {
            if (this.Pages.Count == 0)
            {
                return;
            }

            // set values known only end of reportcreation
            foreach (ExporterPage p in this.pages)
            {
                p.TotalPages = this.Pages.Count;
            }

            IExpressionEvaluatorFacade evaluatorFacade = new ExpressionEvaluatorFacade();

            foreach (ExporterPage p in this.pages)
            {
                this.singlePage            = p;
                evaluatorFacade.SinglePage = this.singlePage;
                evaluatorFacade.SinglePage.IDataNavigator = navigator;
                EvaluateRecursive(evaluatorFacade, p.Items);
            }
        }
Beispiel #19
0
        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;
        }
Beispiel #20
0
		protected virtual void AddPage (ExporterPage page)
		{
		}
		public GroupedRowConverter(IReportModel reportModel,IDataNavigator dataNavigator,
		                           ExporterPage singlePage):base(reportModel,dataNavigator,singlePage)
		{
		}
Beispiel #22
0
 public PageCreatedEventArgs(ExporterPage page)
 {
     this.singlePage = page;
 }
		public GroupedRowConverter(IDataNavigator dataNavigator,
		                           ExporterPage singlePage, ILayouter layouter):base(dataNavigator,singlePage,layouter)
		{
		}
Beispiel #24
0
		protected void FinishRendering (IDataNavigator navigator)
		{
			if (this.Pages.Count == 0) {
				return;
			}
			
			// set values known only end of reportcreation
			foreach (ExporterPage p in this.pages)
			{
				p.TotalPages = this.Pages.Count;
			}

			IExpressionEvaluatorFacade evaluatorFacade = new ExpressionEvaluatorFacade();
			
			foreach (ExporterPage p in this.pages)
			{
				this.singlePage = p;
				evaluatorFacade.SinglePage = this.singlePage;
				evaluatorFacade.SinglePage.IDataNavigator = navigator;
				EvaluateRecursive(evaluatorFacade,p.Items);
			}
		}
		public FixedPage CreatePage(ExporterPage exporterPage)
		{
			FixedPage page = new FixedPage();
			CreatePageInternal (page,exporterPage.Items);
			return page;
		}
Beispiel #26
0
 public TableConverter(IDataNavigator dataNavigator,
                       ExporterPage singlePage,
                       IExportItemsConverter exportItemsConverter,
                       ILayouter layouter) : base(dataNavigator, singlePage, exportItemsConverter, layouter)
 {
 }
Beispiel #27
0
 protected void FirePageCreated(ExporterPage page)
 {
     EventHelper.Raise <PageCreatedEventArgs>(PageCreated, this,
                                              new PageCreatedEventArgs(page));
 }
Beispiel #28
0
 protected virtual void AddPage(ExporterPage page)
 {
 }
		public TableConverter(IDataNavigator dataNavigator,
		                      ExporterPage singlePage,
		                      
		                      ILayouter layouter ):base(dataNavigator,singlePage,layouter)
		{
		}
Beispiel #30
0
		protected void FirePageCreated(ExporterPage page)
		{
			EventHelper.Raise<PageCreatedEventArgs>(PageCreated,this,
			                                        new PageCreatedEventArgs(page));
		}
		public RowConverter(IDataNavigator dataNavigator,
		                    ExporterPage singlePage,
		                    IExportItemsConverter exportItemsConverter,
		                    ILayouter layouter):base(dataNavigator,singlePage,exportItemsConverter,layouter)
		{
		}
		public PageCreatedEventArgs(ExporterPage page)
		{
			this.singlePage = page;
		}
		public PageNavigationEventArgs(ExporterPage page, int pageNumber)
		{
			this.page = page;
			this.pageNumber = pageNumber;
		}
Beispiel #34
0
        public GroupedTableConverter(IDataNavigator dataNavigator,
                                     ExporterPage singlePage, ILayouter layouter) : base(dataNavigator, singlePage, layouter)

        {
        }
 public GroupedRowConverter(IReportModel reportModel, IDataNavigator dataNavigator,
                            ExporterPage singlePage) : base(reportModel, dataNavigator, singlePage)
 {
 }
Beispiel #36
0
		private Bitmap CreateBitmap (ExporterPage page)
		{
			Bitmap bm = new Bitmap(this.drawingPanel.ClientSize.Width,this.drawingPanel.ClientSize.Height,System.Drawing.Imaging.PixelFormat.Format24bppRgb);
			
			using (Graphics gr = Graphics.FromImage(bm)) {

				// Reset Transform to org. Value
				gr.Clear(this.drawingPanel.BackColor);
				//	this.Invalidate();
				gr.ScaleTransform(1F,1F);
				gr.Clear(this.drawingPanel.BackColor);
				gr.ScaleTransform(this.zoom,this.zoom);

				gr.TextRenderingHint = TextRenderingHint.AntiAlias;
				gr.PixelOffsetMode = PixelOffsetMode.HighQuality;
				gr.InterpolationMode = InterpolationMode.High;
				
				previewRenderer.Graphics = gr;
				previewRenderer.Page = page;
				previewRenderer.RenderOutput();
			}
			return bm;
		}