/// ------------------------------------------------------------------------------------ /// <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; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Creates the editorial checks 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 CreateEditorialChecksView(UserView userView, TeViewType viewType, SBTabItemProperties tabItem) { // Construct a editorial checks view (client window) ChecksDraftViewCreateInfo checkingViewInfo = new ChecksDraftViewCreateInfo( "EditorialChecksDraftView", true); EditorialChecksViewWrapper viewWrapper = new EditorialChecksViewWrapper(this, m_cache, m_bookFilter, checkingViewInfo, SettingsKey, m_delegate.GetProjectName(m_cache)); ((ISelectableView)viewWrapper).BaseInfoBarCaption = userView.ViewNameShort; 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); ClientWindows.Add(TeEditingHelper.ViewTypeString(TeViewType.EditorialChecks), viewWrapper as IRootSite); m_uncreatedViews.Remove(TeViewType.EditorialChecks); return viewWrapper; }