コード例 #1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Makes a call to MakeSubordinateView, to add a view containing footnotes.
        /// </summary>
        /// <param name="div">The division layout manager</param>
        /// ------------------------------------------------------------------------------------
        public virtual void ConfigureSubordinateViews(DivisionLayoutMgr div)
        {
            int hvoScripture = m_fdoCache.LangProject.TranslatedScriptureOA.Hvo;

            ISilDataAccess decorator;

            if (m_divisionPortion != PrintLayoutPortion.AllContent)
            {
                decorator = new PrintLayoutDataByFlidDecorator(m_fdoCache, m_bookFilterInstance,
                                                               m_divisionPortion == PrintLayoutPortion.TitleAndIntro);
            }
            else
            {
                decorator = new ScrBookFilterDecorator(m_fdoCache, m_bookFilterInstance);
            }
            NLevelOwnerSvd ownerSvd = new NLevelOwnerSvd(2, decorator, hvoScripture);

            if (m_sharedStream == null)
            {
                FootnoteVc footnoteVc = new FootnoteVc(TeStVc.LayoutViewTarget.targetPrint,
                                                       div.FilterInstance);
                footnoteVc.DefaultWs          = DefaultWs;
                footnoteVc.Cache              = m_fdoCache;
                footnoteVc.DisplayTranslation = (m_viewType & TeViewType.BackTranslation) != 0;

                div.AddSubordinateStream(hvoScripture, (int)FootnoteFrags.kfrScripture,
                                         footnoteVc, ownerSvd);
            }
            else
            {
                int hvoRoot;
                IVwViewConstructor vc;
                int           frag;
                IVwStylesheet stylesheet;
                ((IVwRootBox)m_sharedStream).GetRootObject(out hvoRoot, out vc, out frag, out stylesheet);
                div.AddSharedSubordinateStream(m_sharedStream, vc, ownerSvd);
            }
        }
コード例 #2
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Makes a call to MakeSubordinateView, to add a view containing footnotes.
		/// </summary>
		/// <param name="div">The division layout manager</param>
		/// ------------------------------------------------------------------------------------
		public virtual void ConfigureSubordinateViews(DivisionLayoutMgr div)
		{
			int hvoScripture = m_fdoCache.LangProject.TranslatedScriptureOA.Hvo;

			ISilDataAccess decorator;
			if (m_divisionPortion != PrintLayoutPortion.AllContent)
				decorator = new PrintLayoutDataByFlidDecorator(m_fdoCache, m_bookFilterInstance,
					m_divisionPortion == PrintLayoutPortion.TitleAndIntro);
			else
				decorator = new ScrBookFilterDecorator(m_fdoCache, m_bookFilterInstance);
			NLevelOwnerSvd ownerSvd = new NLevelOwnerSvd(2, decorator, hvoScripture);

			if (m_sharedStream == null)
			{
				FootnoteVc footnoteVc = new FootnoteVc(TeStVc.LayoutViewTarget.targetPrint,
					div.FilterInstance);
				footnoteVc.DefaultWs = DefaultWs;
				footnoteVc.Cache = m_fdoCache;
				footnoteVc.DisplayTranslation = (m_viewType & TeViewType.BackTranslation) != 0;

				div.AddSubordinateStream(hvoScripture, (int)FootnoteFrags.kfrScripture,
					footnoteVc, ownerSvd);
			}
			else
			{
				int hvoRoot;
				IVwViewConstructor vc;
				int frag;
				IVwStylesheet stylesheet;
				((IVwRootBox)m_sharedStream).GetRootObject(out hvoRoot, out vc, out frag, out stylesheet);
				div.AddSharedSubordinateStream(m_sharedStream, vc, ownerSvd);
			}
		}