Ejemplo n.º 1
0
        public Page RunPageNew(Pages pgs, Page p)
        {
            if (p.IsEmpty())                                    // if the page is empty it won't help to create another one
            {
                return(p);
            }

            // Do we need a new page or have should we fill out more body columns
            Body b    = OwnerReport.Body;
            int  ccol = b.IncrCurrentColumn(pgs.Report);        // bump to next column

            float top = OwnerReport.TopOfPage;                  // calc top of page

            if (ccol < b.Columns)
            {                           // Stay on same page but move to new column
                p.XOffset =
                    ((OwnerReport.Width.Points + b.ColumnSpacing.Points) * ccol);
                p.YOffset = top;
                p.SetEmpty();                                   // consider this page empty
            }
            else
            {                           // Go to new page
                b.SetCurrentColumn(pgs.Report, 0);
                pgs.NextOrNew();
                p         = pgs.CurrentPage;
                p.YOffset = top;
                p.XOffset = 0;
            }

            return(p);
        }
Ejemplo n.º 2
0
		public void NextOrNew()
		{
			if (_currentPage == this.LastPage)
				AddPage(new Page(PageCount+1));
			else
			{
				_currentPage = _pages[_currentPage.PageNumber];  
				_currentPage.SetEmpty();			
			}
		}
Ejemplo n.º 3
0
 public void NextOrNew()
 {
     if (_currentPage == this.LastPage)
     {
         AddPage(new Page(PageCount + 1));
     }
     else
     {
         _currentPage = _pages[_currentPage.PageNumber];
         _currentPage.SetEmpty();
     }
 }
Ejemplo n.º 4
0
		public Page RunPageNew(Pages pgs, Page p)
		{
			if (p.IsEmpty())			// if the page is empty it won't help to create another one
				return p;

			// Do we need a new page or have should we fill out more body columns
			Body b = OwnerReport.Body;
			int ccol = b.IncrCurrentColumn(pgs.Report);	// bump to next column

			float top = OwnerReport.TopOfPage;	// calc top of page

			if (ccol < b.Columns)
			{		// Stay on same page but move to new column
				p.XOffset = 
					((OwnerReport.Width.Points + b.ColumnSpacing.Points) * ccol);
				p.YOffset = top;
				p.SetEmpty();			// consider this page empty
			}
			else
			{		// Go to new page
				b.SetCurrentColumn(pgs.Report, 0);
				pgs.NextOrNew();
				p = pgs.CurrentPage;
				p.YOffset = top;
				p.XOffset = 0;
			}

			return p;
		}