public override void TestSetup()
		{
			base.TestSetup();
			m_ktVwWrapper = new KeyTermsViewWrapper(null, Cache, null, null, 0, "Dummy Project", null, null);

			m_stylesToRemove = new List<string>();
			m_stylesToRemove.Add("Chapter Number");
			m_stylesToRemove.Add("Verse Number");
		}
		/// <summary/>
		public override void TestTearDown()
		{
			if (m_ktVwWrapper != null)
			{
				m_ktVwWrapper.Dispose();
				m_ktVwWrapper = null;
			}

			base.TestTearDown();
		}
Exemple #3
0
		public void InitTest()
		{
			CheckDisposed();
			base.Initialize();
			m_inMemoryCache.InitializeWritingSystemEncodings();
			m_cache = Cache;
			m_ktVwWrapper = new KeyTermsViewWrapper(null, m_cache, null, null, 0, "Dummy Project");

			m_stylesToRemove = new List<string>();
			m_stylesToRemove.Add("Chapter Number");
			m_stylesToRemove.Add("Verse Number");
		}
Exemple #4
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates the key terms view when the user switches to it.
		/// </summary>
		/// <param name="viewName">Name of the view.</param>
		/// <param name="viewType">Type of the view.</param>
		/// <param name="tabItem">The tab item.</param>
		/// <returns></returns>
		/// ------------------------------------------------------------------------------------
		protected virtual ISelectableView CreateKeyTermsView(string viewName,
			TeViewType viewType, SBTabItemProperties tabItem)
		{
			Debug.Assert(TheKeyTermsWrapper == null);

			// Construct a key terms view (client window)
			CheckingViewProxy checkingViewProxy = new CheckingViewProxy(this, "BiblicalTermsDraftView");

			KeyTermsViewWrapper keyTermsViewWrapper = new KeyTermsViewWrapper(this, m_cache,
				checkingViewProxy, m_app.ProjectSpecificSettingsKey, Handle.ToInt32(),
				m_delegate.GetProjectName(m_cache), m_StyleSheet, m_app);
			((ISelectableView)keyTermsViewWrapper).BaseInfoBarCaption = viewName;

			if (tabItem != null)
			{
				tabItem.Tag = keyTermsViewWrapper;
				tabItem.Update = true;
			}

			ClientControls.Add(keyTermsViewWrapper);
			// Bring the key terms view to the top of the z-order, so that
			// (if it is the active view) it fills only the remaining space
			ClientControls.SetChildIndex(keyTermsViewWrapper, 0);
			m_rgClientViews.Add(TeEditingHelper.ViewTypeString(TeViewType.KeyTerms),
				keyTermsViewWrapper as IRootSite);
			m_uncreatedViews.Remove(TeViewType.KeyTerms);

			return keyTermsViewWrapper;
		}
Exemple #5
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates the key terms view when the user switches to it.
		/// </summary>
		/// <param name="userView">The user view.</param>
		/// <param name="viewType">Type of the view.</param>
		/// <param name="tabItem">The tab item.</param>
		/// <returns></returns>
		/// ------------------------------------------------------------------------------------
		protected virtual ISelectableView CreateKeyTermsView(UserView userView,
			TeViewType viewType, SBTabItemProperties tabItem)
		{
			Debug.Assert(TheKeyTermsWrapper == null);

			m_cache.MapType(typeof(ChkRef), typeof(KeyTermRef));

			// Construct a key terms view (client window)
			ChecksDraftViewCreateInfo keyTermsCreateInfo = new ChecksDraftViewCreateInfo(
				"KeyTermsDraftView", true);
			KeyTermsViewWrapper keyTermsViewWrapper = new KeyTermsViewWrapper(this, m_cache,
				keyTermsCreateInfo, SettingsKey, Handle.ToInt32(), m_delegate.GetProjectName(m_cache));
			((ISelectableView)keyTermsViewWrapper).BaseInfoBarCaption = userView.ViewNameShort;

			if (tabItem != null)
			{
				tabItem.Tag = keyTermsViewWrapper;
				tabItem.Update = true;
			}

			ClientControls.Add(keyTermsViewWrapper);
			// Bring the key terms view to the top of the z-order, so that
			// (if it is the active view) it fills only the remaining space
			ClientControls.SetChildIndex(keyTermsViewWrapper, 0);
			ClientWindows.Add(TeEditingHelper.ViewTypeString(TeViewType.KeyTerms),
				keyTermsViewWrapper as IRootSite);
			m_uncreatedViews.Remove(TeViewType.KeyTerms);

			return keyTermsViewWrapper;
		}