예제 #1
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 ///
 /// </summary>
 /// <param name="parent">The parent.</param>
 /// <param name="cache">The Fdo Cache</param>
 /// <param name="viewTypeId">An identifier for a group of views that share the same
 /// height estimates</param>
 /// ------------------------------------------------------------------------------------
 public SyncedRootSiteGroup(SplitGrid parent, FdoCache cache, int viewTypeId)
     : base(parent)
 {
     // NOTE: This ParagraphCounter is shared among multiple views (i.e. references to
     // the same counter will be used in each RootSiteGroup with the same cache and
     // viewTypeId)
     m_paraCounter = ParagraphCounterManager.GetParaCounter(cache, viewTypeId);
 }
예제 #2
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 ///
 /// </summary>
 /// <param name="parent">The parent.</param>
 /// <param name="cache">The Fdo Cache</param>
 /// <param name="viewTypeId">An identifier for a group of views that share the same
 /// height estimates</param>
 /// ------------------------------------------------------------------------------------
 public SyncedRootSiteGroup(SplitGrid parent, FdoCache cache, int viewTypeId)
     : base(parent)
 {
     // NOTE: This ParagraphCounter is shared among multiple views (i.e. references to
     // the same counter will be used in each RootSiteGroup with the same cache and
     // viewTypeId)
     m_paraCounter = cache.ServiceLocator.GetInstance <IParagraphCounterRepository>().GetParaCounter(viewTypeId);
 }
예제 #3
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Constructs a TePrintLayoutConfig to configure the main print layout
        /// </summary>
        /// <param name="cache">The cache.</param>
        /// <param name="styleSheet">The style sheet.</param>
        /// <param name="publication">The publication.</param>
        /// <param name="viewType">Type of the view.</param>
        /// <param name="filterInstance">the book filter instance in effect</param>
        /// <param name="printDateTime">printing date and time</param>
        /// <param name="divisionPortion">portion of the book to be layed out in this division</param>
        /// <param name="hvoBook">The hvo of the book we're displaying.</param>
        /// <param name="sharedStream">A layout stream used for footnotes which is shared across
        /// multiple divisions</param>
        /// <param name="ws">The writing system to use for the view.</param>
        /// ------------------------------------------------------------------------------------
        public TePrintLayoutConfig(FdoCache cache, IVwStylesheet styleSheet,
                                   IPublication publication, TeViewType viewType, int filterInstance,
                                   DateTime printDateTime, PrintLayoutPortion divisionPortion, int hvoBook, IVwLayoutStream sharedStream,
                                   int ws)
        {
            m_fdoCache           = cache;
            m_scr                = m_fdoCache.LangProject.TranslatedScriptureOA;
            m_styleSheet         = styleSheet;
            m_pub                = publication;
            m_viewType           = viewType;
            m_bookFilterInstance = filterInstance;
            m_printDateTime      = printDateTime;
            m_divisionPortion    = divisionPortion;
            m_hvoBook            = hvoBook;
            m_sharedStream       = sharedStream;
            m_ws = ws;

            m_paraCounter = cache.ServiceLocator.GetInstance <IParagraphCounterRepository>().GetParaCounter((int)TeViewGroup.Scripture);
        }
예제 #4
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        ///
        /// </summary>
        /// <param name="cache">The Fdo cache</param>
        /// <param name="viewTypeId">An identifier for a group of views that share the same
        /// height estimator</param>
        /// <returns></returns>
        /// ------------------------------------------------------------------------------------
        public static IParagraphCounter GetParaCounter(FdoCache cache, int viewTypeId)
        {
            ParaCounterKey    key     = new ParaCounterKey(cache, viewTypeId);
            IParagraphCounter counter = null;

            if (!s_paraCounters.ContainsKey(key) && s_paraCounterType != null)
            {
                counter = (IParagraphCounter)Activator.CreateInstance(s_paraCounterType,
                                                                      new object[] { cache });
                Debug.Assert(counter != null);
                s_paraCounters[key] = counter;
            }
            // May need another try to get it, since it may not get created, above.
            if (counter == null)
            {
                s_paraCounters.TryGetValue(key, out counter);
            }
            return(counter);
        }
예제 #5
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Constructs a TePrintLayoutConfig to configure the main print layout
        /// </summary>
        /// <param name="cache">The cache.</param>
        /// <param name="styleSheet">The style sheet.</param>
        /// <param name="publication">The publication.</param>
        /// <param name="viewType">Type of the view.</param>
        /// <param name="filterInstance">the book filter instance in effect</param>
        /// <param name="printDateTime">printing date and time</param>
        /// <param name="fIntroDivision">set to <c>true</c> for a division that displays book
        /// title and introduction material, <c>false</c> for a division that displays main
        /// scripture text.</param>
        /// <param name="hvoBook">The hvo of the book we're displaying.</param>
        /// <param name="sharedStream">A layout stream used for footnotes which is shared across
        /// multiple divisions</param>
        /// <param name="ws">The writing system to use for the view.</param>
        /// ------------------------------------------------------------------------------------
        public TePrintLayoutConfig(FdoCache cache, IVwStylesheet styleSheet,
                                   IPublication publication, TeViewType viewType, int filterInstance,
                                   DateTime printDateTime, bool fIntroDivision, int hvoBook, IVwLayoutStream sharedStream,
                                   int ws)
        {
            m_fdoCache           = cache;
            m_scr                = m_fdoCache.LangProject.TranslatedScriptureOA;
            m_styleSheet         = styleSheet;
            m_pub                = publication;
            m_viewType           = viewType;
            m_bookFilterInstance = filterInstance;
            m_printDateTime      = printDateTime;
            m_fIntroDivision     = fIntroDivision;
            m_hvoBook            = hvoBook;
            m_sharedStream       = sharedStream;
            m_ws = ws;

            m_sectionFilterInstance = g_nextSectionFilterInstance++;
            m_sectionFilter         = new FilteredSequenceHandler(cache, ScrBook.kClassId,
                                                                  m_sectionFilterInstance, this, this,
                                                                  new SimpleFlidProvider((int)ScrBook.ScrBookTags.kflidSections));

            m_paraCounter = ParagraphCounterManager.GetParaCounter(cache, (int)TeViewGroup.Scripture);
        }
예제 #6
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		///
		/// </summary>
		/// <param name="parent">The parent.</param>
		/// <param name="cache">The Fdo Cache</param>
		/// <param name="viewTypeId">An identifier for a group of views that share the same
		/// height estimates</param>
		/// ------------------------------------------------------------------------------------
		public SyncedRootSiteGroup(SplitGrid parent, FdoCache cache, int viewTypeId)
			: base(parent)
		{
			// NOTE: This ParagraphCounter is shared among multiple views (i.e. references to
			// the same counter will be used in each RootSiteGroup with the same cache and
			// viewTypeId)
			m_paraCounter = cache.ServiceLocator.GetInstance<IParagraphCounterRepository>().GetParaCounter(viewTypeId);
		}
예제 #7
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		///
		/// </summary>
		/// <param name="parent">The parent.</param>
		/// <param name="cache">The Fdo Cache</param>
		/// <param name="viewTypeId">An identifier for a group of views that share the same
		/// height estimates</param>
		/// ------------------------------------------------------------------------------------
		public SyncedRootSiteGroup(SplitGrid parent, FdoCache cache, int viewTypeId)
			: base(parent)
		{
			// NOTE: This ParagraphCounter is shared among multiple views (i.e. references to
			// the same counter will be used in each RootSiteGroup with the same cache and
			// viewTypeId)
			m_paraCounter = ParagraphCounterManager.GetParaCounter(cache, viewTypeId);
		}
예제 #8
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Constructs a TePrintLayoutConfig to configure the main print layout
		/// </summary>
		/// <param name="cache">The cache.</param>
		/// <param name="styleSheet">The style sheet.</param>
		/// <param name="publication">The publication.</param>
		/// <param name="viewType">Type of the view.</param>
		/// <param name="filterInstance">the book filter instance in effect</param>
		/// <param name="printDateTime">printing date and time</param>
		/// <param name="divisionPortion">portion of the book to be layed out in this division</param>
		/// <param name="hvoBook">The hvo of the book we're displaying.</param>
		/// <param name="sharedStream">A layout stream used for footnotes which is shared across
		/// multiple divisions</param>
		/// <param name="ws">The writing system to use for the view.</param>
		/// ------------------------------------------------------------------------------------
		public TePrintLayoutConfig(FdoCache cache, IVwStylesheet styleSheet,
			IPublication publication, TeViewType viewType, int filterInstance,
			DateTime printDateTime, PrintLayoutPortion divisionPortion, int hvoBook, IVwLayoutStream sharedStream,
			int ws)
		{
			m_fdoCache = cache;
			m_scr = m_fdoCache.LangProject.TranslatedScriptureOA;
			m_styleSheet = styleSheet;
			m_pub = publication;
			m_viewType = viewType;
			m_bookFilterInstance = filterInstance;
			m_printDateTime = printDateTime;
			m_divisionPortion = divisionPortion;
			m_hvoBook = hvoBook;
			m_sharedStream = sharedStream;
			m_ws = ws;

			m_paraCounter = cache.ServiceLocator.GetInstance<IParagraphCounterRepository>().GetParaCounter((int)TeViewGroup.Scripture);
		}
예제 #9
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Constructs a TePrintLayoutConfig to configure the main print layout
		/// </summary>
		/// <param name="cache">The cache.</param>
		/// <param name="styleSheet">The style sheet.</param>
		/// <param name="publication">The publication.</param>
		/// <param name="viewType">Type of the view.</param>
		/// <param name="filterInstance">the book filter instance in effect</param>
		/// <param name="printDateTime">printing date and time</param>
		/// <param name="fIntroDivision">set to <c>true</c> for a division that displays book
		/// title and introduction material, <c>false</c> for a division that displays main
		/// scripture text.</param>
		/// <param name="hvoBook">The hvo of the book we're displaying.</param>
		/// <param name="sharedStream">A layout stream used for footnotes which is shared across
		/// multiple divisions</param>
		/// <param name="ws">The writing system to use for the view.</param>
		/// ------------------------------------------------------------------------------------
		public TePrintLayoutConfig(FdoCache cache, IVwStylesheet styleSheet,
			IPublication publication, TeViewType viewType, int filterInstance,
			DateTime printDateTime, bool fIntroDivision, int hvoBook, IVwLayoutStream sharedStream,
			int ws)
		{
			m_fdoCache = cache;
			m_scr = m_fdoCache.LangProject.TranslatedScriptureOA;
			m_styleSheet = styleSheet;
			m_pub = publication;
			m_viewType = viewType;
			m_bookFilterInstance = filterInstance;
			m_printDateTime = printDateTime;
			m_fIntroDivision = fIntroDivision;
			m_hvoBook = hvoBook;
			m_sharedStream = sharedStream;
			m_ws = ws;

			m_sectionFilterInstance = g_nextSectionFilterInstance++;
			m_sectionFilter = new FilteredSequenceHandler(cache, ScrBook.kClassId,
				m_sectionFilterInstance, this, this,
				new SimpleFlidProvider((int)ScrBook.ScrBookTags.kflidSections));

			m_paraCounter = ParagraphCounterManager.GetParaCounter(cache, (int)TeViewGroup.Scripture);
		}