Beispiel #1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Method to create the view when needed
        /// </summary>
        /// <param name="host">The control that will host (or "wrap") the view (can be
        /// <c>null</c>)</param>
        /// <returns>The created view</returns>
        /// ------------------------------------------------------------------------------------
        public override Control CreateView(Control host)
        {
            var draftViewProxy = new TeScrDraftViewProxy(m_mainWnd, m_name, m_editable, false,
                                                         false, TeViewType.DraftView);

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

            // ENHANCE: If users ever request it, we could also make it possible to show the
            // style pane for Editorial Checks and Biblical Terms views.
            //var draftStylebarProxy = new DraftStylebarProxy(m_mainWnd, name + "DraftStyles", false);

            var footnoteViewProxy = new TeFootnoteDraftViewProxy(m_mainWnd, name + "FootnoteView",
                                                                 m_editable, false);

            //var footnoteStylebarInfo = new DraftStylebarProxy(m_mainWnd, name + "FootnoteStyles", true);

            SimpleDraftViewWrapper checkingDraftView = new SimpleDraftViewWrapper(
                TeMainWnd.kDraftViewWrapperName, m_mainWnd, m_mainWnd.Cache, m_mainWnd.StyleSheet,
                m_mainWnd.SettingsKey, draftViewProxy, null /*draftStylebarProxy*/,
                footnoteViewProxy, null /*footnoteStylebarInfo*/);

            checkingDraftView.Name           = m_name + "Wrapper";
            checkingDraftView.AccessibleName = m_name;
            return(checkingDraftView);
        }
Beispiel #2
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Method to create the view when needed
		/// </summary>
		/// <param name="host">The control that will host (or "wrap") the view (can be
		/// <c>null</c>)</param>
		/// <returns>The created view</returns>
		/// ------------------------------------------------------------------------------------
		public override Control CreateView(Control host)
		{
			var draftViewProxy = new TeScrDraftViewProxy(m_mainWnd, m_name, m_editable, false,
				false, TeViewType.DraftView);

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

			// ENHANCE: If users ever request it, we could also make it possible to show the
			// style pane for Editorial Checks and Biblical Terms views.
			//var draftStylebarProxy = new DraftStylebarProxy(m_mainWnd, name + "DraftStyles", false);

			var footnoteViewProxy = new TeFootnoteDraftViewProxy(m_mainWnd, name + "FootnoteView",
				m_editable, false);

			//var footnoteStylebarInfo = new DraftStylebarProxy(m_mainWnd, name + "FootnoteStyles", true);

			SimpleDraftViewWrapper checkingDraftView = new SimpleDraftViewWrapper(
				TeMainWnd.kDraftViewWrapperName, m_mainWnd, m_mainWnd.Cache, m_mainWnd.StyleSheet,
				m_mainWnd.SettingsKey, draftViewProxy, null /*draftStylebarProxy*/,
				footnoteViewProxy, null /*footnoteStylebarInfo*/);

			checkingDraftView.Name = m_name + "Wrapper";
			checkingDraftView.AccessibleName = m_name;
			return checkingDraftView;
		}
Beispiel #3
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;
		}