Esempio n. 1
0
		//private Form m_form;
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates the division and publication.
		/// </summary>
		/// <param name="columns">The number of columns.</param>
		/// <param name="fSharedSubStreams">if set to <c>true</c> configure the print layout
		/// view using shared sub streams; otherwise, each division will create an owned
		/// substream.</param>
		/// ------------------------------------------------------------------------------------
		private void CreateDivisionAndPublication(int columns, bool fSharedSubStreams)
		{
			if (m_firstDivision != null)
				m_firstDivision.Dispose();
			if (m_pub != null)
				m_pub.Dispose();
			m_subStream = null;
			if (fSharedSubStreams)
				m_subStream = VwLayoutStreamClass.Create();
			m_firstDivision = new DummyDivision(new DummyPrintConfigurer(Cache, m_subStream),
				columns);
			IPublication pub =
				Cache.LangProject.TranslatedScriptureOA.PublicationsOC.ToArray()[0];
			m_pub = new DummyPublication(pub, m_firstDivision, DateTime.Now);
			if (fSharedSubStreams)
			{
				m_subViewVc = new DummyFirstSubViewVc();
				int hvoScr = Cache.LangProject.TranslatedScriptureOA.Hvo;
				IVwRootBox rootbox = (IVwRootBox)m_subStream;
				rootbox.DataAccess = Cache.MainCacheAccessor;
				rootbox.SetRootObject(hvoScr, m_subViewVc,
					DummyFirstSubViewVc.kfragScrFootnotes, null);

				m_pub.AddSharedSubstream(m_subStream);
			}

		}
Esempio n. 2
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Shuts down the FDO cache
		/// </summary>
		/// ------------------------------------------------------------------------------------
		public override void TestTearDown()
		{
			if (m_firstDivision != null)
			{
				m_firstDivision.m_hPagesBroken.Clear();
				m_firstDivision.Dispose();
				m_firstDivision = null;
			}

			// Make sure we close all the rootboxes
			if (m_pub != null)
			{
				m_pub.Dispose();
				m_pub = null;
			}

			m_subViewVc = null;
			m_subStream = null;

			base.TestTearDown();
		}