/// -------------------------------------------------------------------------------------
		/// <summary>
		/// Creates and returns the footer view construtor for the layout.
		/// </summary>
		/// <param name="page">Page info</param>
		/// <returns>the footer view constructor</returns>
		/// -------------------------------------------------------------------------------------
		public override IVwViewConstructor MakeFooterVc(IPageInfo page)
		{
			TeHeaderFooterVc vc = new TeHeaderFooterVc(m_fdoCache, page, m_wsDefault,
				m_printDateTime, m_filterInstance, m_sectionTag);
			vc.SetDa(m_fdoCache.MainCacheAccessor);
			return vc;
		}
Example #2
0
        /// -------------------------------------------------------------------------------------
        /// <summary>
        /// Creates and returns the footer view construtor for the layout.
        /// </summary>
        /// <param name="page">Page info</param>
        /// <returns>the footer view constructor</returns>
        /// -------------------------------------------------------------------------------------
        public override IVwViewConstructor MakeFooterVc(IPageInfo page)
        {
            TeHeaderFooterVc vc = new TeHeaderFooterVc(m_fdoCache, page, m_wsDefault,
                                                       m_printDateTime, m_filterInstance, m_sectionTag);

            vc.SetDa(m_fdoCache.MainCacheAccessor);
            return(vc);
        }
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Configures the publication.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		protected void ConfigurePublication()
		{
			m_division = new DummyDivision(new DummyLazyPrintConfigurer(Cache, false,
				true), 1);
			Publication pub = new Publication(Cache,
				Cache.LangProject.TranslatedScriptureOA.PublicationsOC.HvoArray[0]);
			pub.BaseFontSize = 12;
			pub.BaseLineSpacing = 15;
			PubDivision pubDiv = new PubDivision();
			pub.DivisionsOS.Append(pubDiv);
			pubDiv.PageLayoutOA = new PubPageLayout();
			pubDiv.NumColumns = 1;
			pubDiv.StartAt = DivisionStartOption.NewPage;

			FwStyleSheet styleSheet = new FwStyleSheet();
			styleSheet.Init(Cache, Cache.LangProject.TranslatedScriptureOAHvo,
				(int)Scripture.ScriptureTags.kflidStyles);
			m_pubCtrl = new DummyScripturePublicationNoDb(pub, styleSheet,
				m_division, DateTime.Now, m_filterInstance);
			m_pubCtrl.Configure();
			m_pubCtrl.BookHvo = m_genesis.Hvo;

			m_pageInfo = new DummyPageInfo();
			m_pageInfo.m_publication = m_pubCtrl;
			int filterInstance = 123456789;
			FilteredScrBooks bookFilter = new FilteredScrBooks(Cache, filterInstance);
			m_vc = new TeHeaderFooterVc(Cache, m_pageInfo, Cache.DefaultVernWs,
				DateTime.Now, filterInstance, (int)ScrBook.ScrBookTags.kflidSections);
		}
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Configures the publication.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		protected void ConfigurePublication()
		{
			m_division = new DummyDivision(new DummyLazyPrintConfigurer(Cache, false,
				true), 1);
			IPublication pub = Cache.LangProject.TranslatedScriptureOA.PublicationsOC.ToArray()[0];
			pub.BaseFontSize = 12000;
			pub.BaseLineSpacing = 15;
			IPubDivision pubDiv = Cache.ServiceLocator.GetInstance<IPubDivisionFactory>().Create();
			pub.DivisionsOS.Add(pubDiv);
			pubDiv.PageLayoutOA = Cache.ServiceLocator.GetInstance<IPubPageLayoutFactory>().Create();
			pubDiv.NumColumns = 1;
			pubDiv.StartAt = DivisionStartOption.NewPage;

			FwStyleSheet styleSheet = new FwStyleSheet();
			styleSheet.Init(Cache, Cache.LangProject.TranslatedScriptureOA.Hvo,
				ScriptureTags.kflidStyles);
			m_pubCtrl = new DummyScripturePublicationNoDb(pub, styleSheet,
				m_division, DateTime.Now, m_filterInstance);
			m_pubCtrl.Configure();
			m_pubCtrl.BookHvo = m_genesis.Hvo;

			m_pageInfo = new DummyPageInfo();
			m_pageInfo.m_publication = m_pubCtrl;
			Cache.ServiceLocator.GetInstance<IFilteredScrBookRepository>().GetFilterInstance(m_filterInstance);  // this creates the book filter!
			m_vc = new TeHeaderFooterVc(Cache, m_pageInfo, Cache.DefaultVernWs,
				DateTime.Now, m_filterInstance);
		}