Exemple #1
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="DraftViewWrapper"/> class.
 /// </summary>
 /// <param name="name">The name of the split grid</param>
 /// <param name="parent">The parent of the split wrapper (can be null). Will be replaced
 /// with real parent later.</param>
 /// <param name="cache">The cache.</param>
 /// <param name="styleSheet">The style sheet.</param>
 /// <param name="settingsRegKey">The settings reg key.</param>
 /// <param name="draftView">The Scripture draft view proxy.</param>
 /// <param name="stylebar">The Scripture stylebar proxy.</param>
 /// <param name="footnoteDraftView">The footnote draft view proxy.</param>
 /// <param name="footnoteStylebar">The footnote stylebar proxy</param>
 /// ------------------------------------------------------------------------------------
 internal ViewWrapper(string name, Control parent, FdoCache cache, IVwStylesheet styleSheet,
                      RegistryKey settingsRegKey, TeScrDraftViewProxy draftView, DraftStylebarProxy stylebar,
                      TeFootnoteDraftViewProxy footnoteDraftView, DraftStylebarProxy footnoteStylebar)
     : this(name, parent, cache, styleSheet, settingsRegKey, draftView, stylebar,
            footnoteDraftView, footnoteStylebar, 2, 2)
 {
 }
Exemple #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);
        }
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="SimpleDraftViewWrapper"/> class.
		/// </summary>
		/// <param name="name">The name of the split grid</param>
		/// <param name="parent">The parent of the split wrapper (can be null). Will be replaced
		/// with real parent later.</param>
		/// <param name="cache">The cache.</param>
		/// <param name="styleSheet">The style sheet.</param>
		/// <param name="settingsRegKey">The settings reg key.</param>
		/// <param name="draftViewInfo">The Scripture draft view proxy.</param>
		/// <param name="draftStylebarInfo">The Scripture draft stylebar proxy.</param>
		/// <param name="footnoteViewInfo">The footnote draft view proxy.</param>
		/// <param name="footnoteStylebarInfo">The footnote stylebar proxy.</param>
		/// ------------------------------------------------------------------------------------
		internal SimpleDraftViewWrapper(string name, Control parent, FdoCache cache,
			IVwStylesheet styleSheet, RegistryKey settingsRegKey, TeScrDraftViewProxy draftViewInfo,
			DraftStylebarProxy draftStylebarInfo, TeFootnoteDraftViewProxy footnoteViewInfo,
			DraftStylebarProxy footnoteStylebarInfo)
			: base(name, parent, cache, styleSheet, settingsRegKey, draftViewInfo, draftStylebarInfo,
			footnoteViewInfo, footnoteStylebarInfo, 2, 2)
		{
		}
Exemple #4
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Initializes a new instance of the <see cref="T:DraftViewWrapper"/> class.
        /// </summary>
        /// <param name="name">The name of the split grid</param>
        /// <param name="parent">The parent of the split wrapper (can be null). Will be replaced
        /// with real parent later.</param>
        /// <param name="cache">The cache.</param>
        /// <param name="styleSheet">The style sheet.</param>
        /// <param name="settingsRegKey">The settings reg key.</param>
        /// <param name="draftView">The vernacular Scripture draft view proxy.</param>
        /// <param name="stylebar">The Scripture stylebar proxy.</param>
        /// <param name="btDraftView">The BT Scripture draft view proxy.</param>
        /// <param name="footnoteDraftView">The vernacular footnote draft view proxy.</param>
        /// <param name="footnoteStylebar">The footnote stylebar proxy.</param>
        /// <param name="footnoteBtDraftView">The BT footnote draft view proxy.</param>
        /// ------------------------------------------------------------------------------------
        internal BtDraftSplitWrapper(string name, Control parent, FdoCache cache,
                                     IVwStylesheet styleSheet, RegistryKey settingsRegKey, TeScrDraftViewProxy draftView,
                                     DraftStylebarProxy stylebar, TeScrDraftViewProxy btDraftView,
                                     TeFootnoteDraftViewProxy footnoteDraftView, DraftStylebarProxy footnoteStylebar,
                                     TeFootnoteDraftViewProxy footnoteBtDraftView)
            : base(name, parent, cache, styleSheet, settingsRegKey, draftView, stylebar,
                   footnoteDraftView, footnoteStylebar, 2, 3)
        {
            m_settingsRegKey = settingsRegKey;

            IRootSiteGroup group = GetGroup(kDraftRow, kDraftViewColumn);

            AddControl(group, kDraftRow, kBackTransColumn, btDraftView, true,
                       !ChangeSides);

            group = GetGroup(kFootnoteRow, kDraftViewColumn);
            AddControl(group, kFootnoteRow, kBackTransColumn, footnoteBtDraftView, false,
                       !ChangeSides);

            DataGridViewControlColumn frontTransColumn = GetColumn(kDraftViewColumn);

            frontTransColumn.FillWeight    = 100;
            frontTransColumn.MaxPercentage = 0.9f;
            frontTransColumn.MinimumWidth  = 60;
            frontTransColumn.IsCollapsible = false;
            frontTransColumn.Visible       = true;

            DataGridViewControlColumn backTransColumn = GetColumn(kBackTransColumn);

            backTransColumn.FillWeight    = 100;
            backTransColumn.MaxPercentage = 0.9f;
            backTransColumn.MinimumWidth  = 60;
            backTransColumn.IsCollapsible = false;
            backTransColumn.Visible       = true;

            // Now set up a persistence object for loading. This will be disposed automatically
            // when we dispose m_Container.
            m_Container = new FwContainer();
            Persistence persistence = new Persistence(m_Container, this);

            persistence.LoadSettings += new Persistence.Settings(OnLoadSettings);

            // Retrieve the parent's Persistence service. We use that for saving rather then
            // our own because otherwise some things like the FDO cache might already be disposed
            // when we try to save the settings.
            if (parent.Site != null)
            {
                persistence = (Persistence)parent.Site.GetService(typeof(Persistence));
                if (persistence != null)
                {
                    persistence.SaveSettings += new Persistence.Settings(OnSaveSettings);
                }
            }

            m_leftPaneWeight  = new RegistryFloatSetting(settingsRegKey, Name + "LeftPaneWeight", -1.0f);
            m_rightPaneWeight = new RegistryFloatSetting(settingsRegKey, Name + "RightPaneWeight", -1.0f);
        }
		internal BtDraftSplitWrapper(string name, Control parent, FdoCache cache,
			IVwStylesheet styleSheet, RegistryKey settingsRegKey, TeScrDraftViewProxy draftView,
			DraftStylebarProxy stylebar, TeScrDraftViewProxy btDraftView,
			TeFootnoteDraftViewProxy footnoteDraftView, DraftStylebarProxy footnoteStylebar,
			TeFootnoteDraftViewProxy footnoteBtDraftView)
			: base(name, parent, cache, styleSheet, settingsRegKey, draftView, stylebar,
			footnoteDraftView, footnoteStylebar, 2, 3)
		{
			m_settingsRegKey = settingsRegKey;

			IRootSiteGroup group = GetGroup(kDraftRow, kDraftViewColumn);
			AddControl(group, kDraftRow, kBackTransColumn, btDraftView, true,
				!ChangeSides);

			group = GetGroup(kFootnoteRow, kDraftViewColumn);
			AddControl(group, kFootnoteRow, kBackTransColumn, footnoteBtDraftView, false,
				!ChangeSides);

			DataGridViewControlColumn frontTransColumn = GetColumn(kDraftViewColumn);
			frontTransColumn.FillWeight = 100;
			frontTransColumn.MaxPercentage = 0.9f;
			frontTransColumn.MinimumWidth = 60;
			frontTransColumn.IsCollapsible = false;
			frontTransColumn.Visible = true;

			DataGridViewControlColumn backTransColumn = GetColumn(kBackTransColumn);
			backTransColumn.FillWeight = 100;
			backTransColumn.MaxPercentage = 0.9f;
			backTransColumn.MinimumWidth = 60;
			backTransColumn.IsCollapsible = false;
			backTransColumn.Visible = true;

			// Now set up a persistence object for loading. This will be disposed automatically
			// when we dispose m_Container.
			m_Container = new FwContainer();
			Persistence persistence = new Persistence(m_Container, this);
			persistence.LoadSettings += new Persistence.Settings(OnLoadSettings);

			// Retrieve the parent's Persistence service. We use that for saving rather then
			// our own because otherwise some things like the FDO cache might already be disposed
			// when we try to save the settings.
			if (parent.Site != null)
			{
				persistence = (Persistence)parent.Site.GetService(typeof(Persistence));
				if (persistence != null)
					persistence.SaveSettings += new Persistence.Settings(OnSaveSettings);
			}

			m_leftPaneWeight = new RegistryFloatSetting(settingsRegKey, Name + "LeftPaneWeight", -1.0f);
			m_rightPaneWeight = new RegistryFloatSetting(settingsRegKey, Name + "RightPaneWeight", -1.0f);
		}
Exemple #6
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Initializes a new instance of the <see cref="DraftViewWrapper"/> class.
        /// </summary>
        /// <param name="name">The name of the split grid</param>
        /// <param name="parent">The parent of the split wrapper (can be null). Will be replaced
        /// with real parent later.</param>
        /// <param name="cache">The cache.</param>
        /// <param name="styleSheet">The style sheet.</param>
        /// <param name="settingsRegKey">The settings reg key.</param>
        /// <param name="draftView">The Scripture draft view proxy.</param>
        /// <param name="stylebar">The Scripture stylebar proxy.</param>
        /// <param name="footnoteDraftView">The footnote draft view proxy.</param>
        /// <param name="footnoteStylebar">The footnote stylebar proxy</param>
        /// <param name="rows">The number of rows.</param>
        /// <param name="columns">The number of columns.</param>
        /// <remarks>If the view wrapper does not have a stylebar, then override the
        /// kStyleColumn property to a negative value so that it will be ignored.</remarks>
        /// ------------------------------------------------------------------------------------
        internal ViewWrapper(string name, Control parent, FdoCache cache, IVwStylesheet styleSheet,
                             RegistryKey settingsRegKey, TeScrDraftViewProxy draftView, DraftStylebarProxy stylebar,
                             TeFootnoteDraftViewProxy footnoteDraftView, DraftStylebarProxy footnoteStylebar,
                             int rows, int columns) : base(cache, styleSheet, rows, columns)
        {
            Dock             = DockStyle.Fill;
            Name             = name;
            m_stylePaneWidth = new RegistryIntSetting(settingsRegKey, name + "StyleWidth", 0);
            if (parent != null)
            {
                Site = parent.Site;
            }

            IRootSiteGroup group = CreateGroup((int)TeViewGroup.Scripture);

            if (kStyleColumn >= 0)
            {
                AddControl(group, kDraftRow, kStyleColumn, stylebar);
            }
            AddControl(group, kDraftRow, kDraftViewColumn, draftView, true, true);
            group = CreateGroup((int)TeViewGroup.Footnote);
            if (kStyleColumn >= 0)
            {
                AddControl(group, kFootnoteRow, kStyleColumn, footnoteStylebar);
            }
            AddControl(group, kFootnoteRow, kDraftViewColumn, footnoteDraftView, false, true);

            GetRow(kFootnoteRow).FillWeight          = 18;
            m_grid.Rows[kDraftRow].Visible           = true;
            m_grid.Columns[kDraftViewColumn].Visible = true;
            m_grid.ColumnWidthChanged += new DataGridViewColumnEventHandler(OnColumnWidthChanged);
            m_grid.RowHeightChanged   += new DataGridViewRowEventHandler(OnRowHeightChanged);

            if (kStyleColumn >= 0)
            {
                DataGridViewControlColumn styleColumn = GetColumn(kStyleColumn);
                styleColumn.ThresholdWidth = 20;
                styleColumn.StandardWidth  = 100;
                styleColumn.MaxPercentage  = 0.5f;
                styleColumn.IsCollapsible  = true;
                styleColumn.AutoSizeMode   = DataGridViewAutoSizeColumnMode.None;
                if (m_stylePaneWidth.Value > 0)
                {
                    styleColumn.Width   = Math.Max(m_stylePaneWidth.Value, styleColumn.ThresholdWidth);
                    styleColumn.Visible = true;
                }
            }
        }
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="DraftViewWrapper"/> class.
		/// </summary>
		/// <param name="name">The name of the split grid</param>
		/// <param name="parent">The parent of the split wrapper (can be null). Will be replaced
		/// with real parent later.</param>
		/// <param name="cache">The cache.</param>
		/// <param name="styleSheet">The style sheet.</param>
		/// <param name="settingsRegKey">The settings reg key.</param>
		/// <param name="topDraftView">The top Scripture draft view proxy.</param>
		/// <param name="topStylebar">The top Scripture stylebar proxy.</param>
		/// <param name="bottomDraftView">The bottom Scripture draft view proxy.</param>
		/// <param name="bottomStylebar">The bottom Scripture stylebar proxy.</param>
		/// <param name="footnoteDraftView">The footnote draft view proxy.</param>
		/// <param name="footnoteStylebar">The footnote stylebar proxy.</param>
		/// ------------------------------------------------------------------------------------
		internal DraftViewWrapper(string name, Control parent, FdoCache cache,
			IVwStylesheet styleSheet, RegistryKey settingsRegKey, TeScrDraftViewProxy topDraftView,
			DraftStylebarProxy topStylebar, TeScrDraftViewProxy bottomDraftView,
			DraftStylebarProxy bottomStylebar, TeFootnoteDraftViewProxy footnoteDraftView,
			DraftStylebarProxy footnoteStylebar)
			: base(name, parent, cache, styleSheet, settingsRegKey, bottomDraftView, bottomStylebar,
			footnoteDraftView, footnoteStylebar, 3, 2)
		{
			IRootSiteGroup group = CreateGroup((int)TeViewGroup.Scripture);
			AddControl(group, kUpperDraftRow, kStyleColumn, topStylebar);
			AddControl(group, kUpperDraftRow, kDraftViewColumn, topDraftView, false, true);
			GetRow(kUpperDraftRow).Visible = false;

			m_colSplit = new CollapsibleSplitter(this);
			m_colSplit.SplitterMoved += OnCollapsibleSplitterMoved;
		}
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Initializes a new instance of the <see cref="DraftViewWrapper"/> class.
        /// </summary>
        /// <param name="name">The name of the split grid</param>
        /// <param name="parent">The parent of the split wrapper (can be null). Will be replaced
        /// with real parent later.</param>
        /// <param name="cache">The cache.</param>
        /// <param name="styleSheet">The style sheet.</param>
        /// <param name="settingsRegKey">The settings reg key.</param>
        /// <param name="topDraftView">The top Scripture draft view proxy.</param>
        /// <param name="topStylebar">The top Scripture stylebar proxy.</param>
        /// <param name="bottomDraftView">The bottom Scripture draft view proxy.</param>
        /// <param name="bottomStylebar">The bottom Scripture stylebar proxy.</param>
        /// <param name="footnoteDraftView">The footnote draft view proxy.</param>
        /// <param name="footnoteStylebar">The footnote stylebar proxy.</param>
        /// ------------------------------------------------------------------------------------
        internal DraftViewWrapper(string name, Control parent, FdoCache cache,
                                  IVwStylesheet styleSheet, RegistryKey settingsRegKey, TeScrDraftViewProxy topDraftView,
                                  DraftStylebarProxy topStylebar, TeScrDraftViewProxy bottomDraftView,
                                  DraftStylebarProxy bottomStylebar, TeFootnoteDraftViewProxy footnoteDraftView,
                                  DraftStylebarProxy footnoteStylebar)
            : base(name, parent, cache, styleSheet, settingsRegKey, bottomDraftView, bottomStylebar,
                   footnoteDraftView, footnoteStylebar, 3, 2)
        {
            IRootSiteGroup group = CreateGroup((int)TeViewGroup.Scripture);

            AddControl(group, kUpperDraftRow, kStyleColumn, topStylebar);
            AddControl(group, kUpperDraftRow, kDraftViewColumn, topDraftView, false, true);
            GetRow(kUpperDraftRow).Visible = false;

            m_colSplit = new CollapsibleSplitter(this);
            m_colSplit.SplitterMoved += OnCollapsibleSplitterMoved;
        }
Exemple #9
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="DraftViewWrapper"/> class.
		/// </summary>
		/// <param name="name">The name of the split grid</param>
		/// <param name="parent">The parent of the split wrapper (can be null). Will be replaced
		/// with real parent later.</param>
		/// <param name="cache">The cache.</param>
		/// <param name="styleSheet">The style sheet.</param>
		/// <param name="settingsRegKey">The settings reg key.</param>
		/// <param name="draftView">The Scripture draft view proxy.</param>
		/// <param name="stylebar">The Scripture stylebar proxy.</param>
		/// <param name="footnoteDraftView">The footnote draft view proxy.</param>
		/// <param name="footnoteStylebar">The footnote stylebar proxy</param>
		/// <param name="rows">The number of rows.</param>
		/// <param name="columns">The number of columns.</param>
		/// <remarks>If the view wrapper does not have a stylebar, then override the
		/// kStyleColumn property to a negative value so that it will be ignored.</remarks>
		/// ------------------------------------------------------------------------------------
		internal ViewWrapper(string name, Control parent, FdoCache cache, IVwStylesheet styleSheet,
			RegistryKey settingsRegKey, TeScrDraftViewProxy draftView, DraftStylebarProxy stylebar,
			TeFootnoteDraftViewProxy footnoteDraftView, DraftStylebarProxy footnoteStylebar,
			int rows, int columns) : base(cache, styleSheet, rows, columns)
		{
			Dock = DockStyle.Fill;
			Name = name;
			m_stylePaneWidth = new RegistryIntSetting(settingsRegKey, name + "StyleWidth", 0);
			if (parent != null)
				Site = parent.Site;

			IRootSiteGroup group = CreateGroup((int)TeViewGroup.Scripture);
			if (kStyleColumn >= 0)
				AddControl(group, kDraftRow, kStyleColumn, stylebar);
			AddControl(group, kDraftRow, kDraftViewColumn, draftView, true, true);
			group = CreateGroup((int)TeViewGroup.Footnote);
			if (kStyleColumn >= 0)
				AddControl(group, kFootnoteRow, kStyleColumn, footnoteStylebar);
			AddControl(group, kFootnoteRow, kDraftViewColumn, footnoteDraftView, false, true);

			GetRow(kFootnoteRow).FillWeight = 18;
			m_grid.Rows[kDraftRow].Visible = true;
			m_grid.Columns[kDraftViewColumn].Visible = true;
			m_grid.ColumnWidthChanged += new DataGridViewColumnEventHandler(OnColumnWidthChanged);
			m_grid.RowHeightChanged += new DataGridViewRowEventHandler(OnRowHeightChanged);

			if (kStyleColumn >= 0)
			{
				DataGridViewControlColumn styleColumn = GetColumn(kStyleColumn);
				styleColumn.ThresholdWidth = 20;
				styleColumn.StandardWidth = 100;
				styleColumn.MaxPercentage = 0.5f;
				styleColumn.IsCollapsible = true;
				styleColumn.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
				if (m_stylePaneWidth.Value > 0)
				{
					styleColumn.Width = Math.Max(m_stylePaneWidth.Value, styleColumn.ThresholdWidth);
					styleColumn.Visible = true;
				}
			}
		}
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="SimpleDraftViewWrapper"/> class.
 /// </summary>
 /// <param name="name">The name of the split grid</param>
 /// <param name="parent">The parent of the split wrapper (can be null). Will be replaced
 /// with real parent later.</param>
 /// <param name="cache">The cache.</param>
 /// <param name="styleSheet">The style sheet.</param>
 /// <param name="settingsRegKey">The settings reg key.</param>
 /// <param name="draftViewInfo">The Scripture draft view proxy.</param>
 /// <param name="draftStylebarInfo">The Scripture draft stylebar proxy.</param>
 /// <param name="footnoteViewInfo">The footnote draft view proxy.</param>
 /// <param name="footnoteStylebarInfo">The footnote stylebar proxy.</param>
 /// ------------------------------------------------------------------------------------
 internal SimpleDraftViewWrapper(string name, Control parent, FdoCache cache,
                                 IVwStylesheet styleSheet, RegistryKey settingsRegKey, TeScrDraftViewProxy draftViewInfo,
                                 DraftStylebarProxy draftStylebarInfo, TeFootnoteDraftViewProxy footnoteViewInfo,
                                 DraftStylebarProxy footnoteStylebarInfo)
     : base(name, parent, cache, styleSheet, settingsRegKey, draftViewInfo, draftStylebarInfo,
            footnoteViewInfo, footnoteStylebarInfo, 2, 2)
 {
 }
Exemple #11
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;
		}
Exemple #12
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates the Back Translation/Draft View
		/// </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 ISelectableView CreateBackTransDraftView(string viewName, TeViewType viewType,
			SBTabItemProperties tabItem)
		{
			TeScrDraftViewProxy draftView = new TeScrDraftViewProxy(this, kDraftViewName, true,
				true, false, TeViewType.DraftView);
			TeScrDraftViewProxy btDraftView = new TeScrDraftViewProxy(this, kBackTransView, true,
				true, false, TeViewType.BackTranslationDraft);
			DraftStylebarProxy stylebar = new DraftStylebarProxy(this, "BTSplit", false);

			TeFootnoteDraftViewProxy footnoteDraftView = new TeFootnoteDraftViewProxy(this,
				kDraftFootnoteViewName, true, false);
			TeFootnoteDraftViewProxy footnoteBtDraftView = new TeFootnoteDraftViewProxy(this,
				kBackTransFootnoteView, true, true);
			DraftStylebarProxy footnoteStylebar = new DraftStylebarProxy(this,
				"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 = viewName;

			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(m_rgClientViews.Count >= 1);
			m_rgClientViews.Add(TeEditingHelper.ViewTypeString(TeViewType.BackTranslationDraft), btWrap);
			m_uncreatedViews.Remove(TeViewType.BackTranslationDraft);
			return btWrap;
		}
Exemple #13
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates the Back Translation Review view
		/// </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 ISelectableView CreateBackTransConsultantCheckView(string viewName,
			TeViewType viewType, SBTabItemProperties tabItem)
		{
			TeScrDraftViewProxy topDraftView = new TeScrDraftViewProxy(this, "BTReviewDraftView",
				false, false, false, TeViewType.BackTranslationConsultantCheck);
			DraftStylebarProxy topStylebar = new DraftStylebarProxy(this, "BTReview", false);

			TeFootnoteDraftViewProxy footnoteDraftView = new TeFootnoteDraftViewProxy(this,
				"BTReviewFootnoteView", false, true);
			DraftStylebarProxy footnoteStylebar = new DraftStylebarProxy(this,
				"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 = viewName;

			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();
			m_rgClientViews.Add(TeEditingHelper.ViewTypeString(TeViewType.BackTranslationConsultantCheck),
				reviewWrap);
			m_uncreatedViews.Remove(TeViewType.BackTranslationConsultantCheck);
			return reviewWrap;
		}
Exemple #14
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates the Scripture/Draft View
		/// </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 ISelectableView CreateDraftView(string viewName, TeViewType viewType,
			SBTabItemProperties tabItem)
		{
			TeScrDraftViewProxy topDraftView = new TeScrDraftViewProxy(this, "TopDraftView",
				true, false, false, TeViewType.DraftView);
			DraftStylebarProxy topStylebar = new DraftStylebarProxy(this, "Top", false);
			TeScrDraftViewProxy bottomDraftView = new TeScrDraftViewProxy(this, "BottomDraftView",
				true, false, false, TeViewType.DraftView);
			DraftStylebarProxy bottomStylebar = new DraftStylebarProxy(this, "Bottom", false);

			TeFootnoteDraftViewProxy footnoteDraftView = new TeFootnoteDraftViewProxy(this,
				"DraftFootnoteView", true, false);
			DraftStylebarProxy footnoteStylebar = new DraftStylebarProxy(this, "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 = viewName;
			draftViewWrap.ResumeLayout();

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

			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();
			m_rgClientViews.Add(TeEditingHelper.ViewTypeString(viewType), draftViewWrap);
			m_uncreatedViews.Remove(viewType);
			return draftViewWrap;
		}
Exemple #15
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="DraftViewWrapper"/> class.
		/// </summary>
		/// <param name="name">The name of the split grid</param>
		/// <param name="parent">The parent of the split wrapper (can be null). Will be replaced
		/// with real parent later.</param>
		/// <param name="cache">The cache.</param>
		/// <param name="styleSheet">The style sheet.</param>
		/// <param name="settingsRegKey">The settings reg key.</param>
		/// <param name="draftView">The Scripture draft view proxy.</param>
		/// <param name="stylebar">The Scripture stylebar proxy.</param>
		/// <param name="footnoteDraftView">The footnote draft view proxy.</param>
		/// <param name="footnoteStylebar">The footnote stylebar proxy</param>
		/// ------------------------------------------------------------------------------------
		internal ViewWrapper(string name, Control parent, FdoCache cache, IVwStylesheet styleSheet,
			RegistryKey settingsRegKey, TeScrDraftViewProxy draftView, DraftStylebarProxy stylebar,
			TeFootnoteDraftViewProxy footnoteDraftView, DraftStylebarProxy footnoteStylebar)
			: this(name, parent, cache, styleSheet, settingsRegKey, draftView, stylebar,
				footnoteDraftView, footnoteStylebar, 2, 2)
		{
		}