Пример #1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Call this static method to Import Scripture
		/// </summary>
		/// <param name="settings">Import settings object (filled in by wizard)</param>
		/// <param name="cache">The cache used to import to and get misc. info. from.</param>
		/// <param name="styleSheet">Stylesheet from which to get scripture styles.</param>
		/// <param name="undoManager">The undo import manager (which is responsible for creating
		/// and maintaining the saved version (archive) of original books being overwritten and
		/// maintaining the book filter).</param>
		/// <param name="importCallbacks">The import callbacks.</param>
		/// <param name="segmentList">The segment list.</param>
		/// <returns></returns>
		/// ------------------------------------------------------------------------------------
		public static ScrReference Import(IScrImportSet settings, FdoCache cache,
			FwStyleSheet styleSheet, UndoImportManager undoManager,
			TeImportUi importCallbacks, List<SegmentInfo> segmentList)
		{
			using (MockTeImporter importer = new MockTeImporter(settings, cache, styleSheet, undoManager,
				importCallbacks))
			{
				importer.m_segmentList = segmentList;
				importer.Import();
				return ReflectionHelper.GetField(importer, "m_firstImportedRef") as ScrReference;
			}	// Dispose() releases any hold on ICU character properties.
		}
Пример #2
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="T:MockScrObjWrapper"/> class.
		/// </summary>
		/// <param name="importer">The importer.</param>
		/// <param name="segmentList">The segment list.</param>
		/// ------------------------------------------------------------------------------------
		public MockScrObjWrapper(MockTeImporter importer, List<SegmentInfo> segmentList)
			: base()
		{
			m_importer = importer;
			m_segmentList = segmentList;
			m_curSeg = 0;
		}