Ejemplo n.º 1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates the draft views for Scripture checking.
		/// </summary>
		/// <param name="createInfo">The create info for the view.</param>
		/// <returns></returns>
		/// ------------------------------------------------------------------------------------
		private Control CreateCheckingDraftView(object createInfo)
		{
			ChecksDraftViewCreateInfo checksViewInfo = (ChecksDraftViewCreateInfo)createInfo;

			DraftViewCreateInfo draftViewInfo = new DraftViewCreateInfo(checksViewInfo.Name,
				false, false, false, true, true, TeViewType.DraftView);

			string name = checksViewInfo.Name.Replace("DraftView", string.Empty);

			StylebarCreateInfo draftStylebarInfo =
				new StylebarCreateInfo(name + "DraftStyles", false);

			FootnoteCreateInfo footnoteViewInfo =
				new FootnoteCreateInfo(name + "FootnoteView", false, true);

			StylebarCreateInfo footnoteStylebarInfo =
				new StylebarCreateInfo(name + "FootnoteStyles", false);

			SimpleDraftViewWrapper checkingDraftView = new SimpleDraftViewWrapper(
				kDraftViewWrapperName, this, m_cache, StyleSheet, SettingsKey, draftViewInfo,
				draftStylebarInfo, footnoteViewInfo, footnoteStylebarInfo);

			checkingDraftView.Name = checksViewInfo.Name + "Wrapper";
			checkingDraftView.AccessibleName = checksViewInfo.Name;
			return checkingDraftView;
		}
Ejemplo n.º 2
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates the Back Translation Review view
		/// </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 ISelectableView CreateBackTransConsultantCheckView(UserView userView,
			TeViewType viewType, SBTabItemProperties tabItem)
		{
			DraftViewCreateInfo topDraftView = new DraftViewCreateInfo("BTReviewDraftView", true,
				false, false, true, false, TeViewType.BackTranslationConsultantCheck);
			StylebarCreateInfo topStylebar = new StylebarCreateInfo("BTReview", false);

			FootnoteCreateInfo footnoteDraftView = new FootnoteCreateInfo("BTReviewFootnoteView", true,
				false);
			StylebarCreateInfo footnoteStylebar = new StylebarCreateInfo("BTReviewFootnote", true);

			// Construct the one view wrapper (client window)
			ViewWrapper reviewWrap = new ViewWrapper(kBTReviewWrapperName, this, m_cache,
				StyleSheet, SettingsKey, topDraftView, topStylebar, footnoteDraftView,
				footnoteStylebar);
			((ISelectableView)reviewWrap).BaseInfoBarCaption = userView.ViewNameShort;

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

			ClientControls.Add(reviewWrap);
			// Bring the draftView to the top of the z-order, so that
			// (if it is the active view) it fills only the remaining space
			reviewWrap.BringToFront();
			ClientWindows.Add(TeEditingHelper.ViewTypeString(TeViewType.BackTranslationConsultantCheck),
				reviewWrap);
			m_uncreatedViews.Remove(TeViewType.BackTranslationConsultantCheck);
			return reviewWrap;
		}
Ejemplo n.º 3
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates the Back Translation/Draft View
		/// </summary>
		/// <param name="userView">The user view.</param>
		/// <param name="viewType">Type of the view.</param>
		/// <param name="tabItem">The tab item.</param>
		/// ------------------------------------------------------------------------------------
		protected ISelectableView CreateBackTransDraftView(UserView userView, TeViewType viewType,
			SBTabItemProperties tabItem)
		{
			DraftViewCreateInfo draftView = new DraftViewCreateInfo(kDraftViewName, false,
				true, false, true, true, TeViewType.DraftView);
				// REVIEW (EberhardB): Do we need to or the Scripture and BT flags like this?   true, false, true, true, TeViewType.Scripture | TeViewType.BackTranslationDraft);
			DraftViewCreateInfo btDraftView = new DraftViewCreateInfo(kBackTransView, true,
				true, false, true, true, TeViewType.BackTranslationDraft);
			StylebarCreateInfo stylebar = new StylebarCreateInfo("BTSplit", false);

			FootnoteCreateInfo footnoteDraftView = new FootnoteCreateInfo(kDraftFootnoteViewName,
				false, true);
			FootnoteCreateInfo footnoteBtDraftView = new FootnoteCreateInfo(kBackTransFootnoteView,
				true, true);
			StylebarCreateInfo footnoteStylebar = new StylebarCreateInfo("BackTransFootnote", true);

			// Construct the one view wrapper
			BtDraftSplitWrapper btWrap = new BtDraftSplitWrapper(kBtDraftSplitView, this,
				m_cache, StyleSheet, SettingsKey, draftView, stylebar, btDraftView,
				footnoteDraftView, footnoteStylebar, footnoteBtDraftView);
			((ISelectableView)btWrap).BaseInfoBarCaption = userView.ViewNameShort;

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

			ClientControls.Add(btWrap);
			// Bring the wrapper to the top of the z-order, so that
			// (if it is the active view) it fills only the remaining space
			btWrap.BringToFront();
			//Debug.Assert(ClientWindows.Count >= 1);
			ClientWindows.Add(TeEditingHelper.ViewTypeString(TeViewType.BackTranslationDraft), btWrap);
			m_uncreatedViews.Remove(TeViewType.BackTranslationDraft);
			return btWrap;
		}
Ejemplo n.º 4
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates the Scripture/Draft View
		/// </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 ISelectableView CreateDraftView(UserView userView, TeViewType viewType,
			SBTabItemProperties tabItem)
		{
			DraftViewCreateInfo topDraftView = new DraftViewCreateInfo("TopDraftView", false,
				false, false, true, true, TeViewType.DraftView);
			StylebarCreateInfo topStylebar = new StylebarCreateInfo("Top", false);
			DraftViewCreateInfo bottomDraftView = new DraftViewCreateInfo("BottomDraftView", false,
				false, false, true, true, TeViewType.DraftView);
			StylebarCreateInfo bottomStylebar = new StylebarCreateInfo("Bottom", false);

			FootnoteCreateInfo footnoteDraftView = new FootnoteCreateInfo("DraftFootnoteView", false,
				true);
			StylebarCreateInfo footnoteStylebar = new StylebarCreateInfo("Footnote", true);

			// Construct the one draft view wrapper (client window)
			DraftViewWrapper draftViewWrap = new DraftViewWrapper(kDraftViewWrapperName, this,
				m_cache, StyleSheet, SettingsKey, topDraftView, topStylebar, bottomDraftView,
				bottomStylebar, footnoteDraftView, footnoteStylebar);
			((ISelectableView)draftViewWrap).BaseInfoBarCaption = userView.ViewNameShort;
			draftViewWrap.ResumeLayout();

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

			Debug.Assert(m_scrDraftView == null, "Shouldn't try to create a draft view if one already exists");
			m_scrDraftView = draftViewWrap;
			ClientControls.Add(draftViewWrap);
			// Bring the draftView to the top of the z-order, so that
			// (if it is the active view) it fills only the remaining space
			draftViewWrap.BringToFront();
			ClientWindows.Add(TeEditingHelper.ViewTypeString(viewType), draftViewWrap);
			m_uncreatedViews.Remove(viewType);
			return draftViewWrap;
		}