Пример #1
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;
		}
Пример #2
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates the editorial checks 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 CreateEditorialChecksView(string viewName,
			TeViewType viewType, SBTabItemProperties tabItem)
		{
			// Construct a editorial checks view (client window)
			var checkingViewProxy = new CheckingViewProxy(this, "EditorialChecksDraftView");

			EditorialChecksViewWrapper viewWrapper = new EditorialChecksViewWrapper(this,
				m_cache, m_bookFilter, checkingViewProxy, m_app.ProjectSpecificSettingsKey,
				m_delegate.GetProjectName(m_cache), m_app, m_app);

			((ISelectableView)viewWrapper).BaseInfoBarCaption = viewName;

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

			ClientControls.Add(viewWrapper);
			// 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(viewWrapper, 0);
			m_rgClientViews.Add(TeEditingHelper.ViewTypeString(TeViewType.EditorialChecks),
				viewWrapper);
			m_uncreatedViews.Remove(TeViewType.EditorialChecks);

			return viewWrapper;
		}