/// ------------------------------------------------------------------------------------ /// <summary> /// Gets a instance of the EditingHelper used to process editing requests. /// </summary> /// ------------------------------------------------------------------------------------ protected override RootSiteEditingHelper GetInternalEditingHelper() { // Create a new virtual property - we don't need it here, but we use it in the view! m_publication.Cache.ServiceLocator.GetInstance<IFilteredScrBookRepository>().GetFilterInstance(0); m_locationTracker = new LocationTrackerImpl(m_publication.Cache, 0); return new TeEditingHelper(this, m_publication.Cache, 0, TeViewType.PrintLayout, null); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Gets a instance of the EditingHelper used to process editing requests. /// </summary> /// ------------------------------------------------------------------------------------ protected override RootSiteEditingHelper GetInternalEditingHelper() { // Create a new virtual property - we don't need it here, but we use it in the view! m_publication.Cache.ServiceLocator.GetInstance <IFilteredScrBookRepository>().GetFilterInstance(0); m_locationTracker = new LocationTrackerImpl(m_publication.Cache, 0); return(new TeEditingHelper(this, m_publication.Cache, 0, TeViewType.PrintLayout, null)); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Gets a instance of the EditingHelper used to process editing requests. /// </summary> /// ------------------------------------------------------------------------------------ protected override EditingHelper GetInternalEditingHelper() { CheckDisposed(); // Create a new virtual property - we don't need it here, but we use it in the view! new FilteredScrBooks(m_publication.Cache, 0); m_locationTracker = new LocationTrackerImpl(m_publication.Cache, 0); return(new TeEditingHelper(this, m_publication.Cache, 0, TeViewType.PrintLayout)); }
/// -------------------------------------------------------------------------------- /// <summary> /// /// </summary> /// -------------------------------------------------------------------------------- public DummyTeFootnoteView(FdoCache cache) : base() { // Add virtual property to cache if (FilteredScrBooks.GetFilterInstance(cache, 0) == null) { new FilteredScrBooks(cache, 0); } m_locationTracker = new LocationTrackerImpl(cache, 0); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Gets a instance of the EditingHelper used to process editing requests. /// </summary> /// ------------------------------------------------------------------------------------ protected override EditingHelper GetInternalEditingHelper() { CheckDisposed(); // Create a new virtual property - we don't need it here, but we use it in the view! new FilteredScrBooks(m_publication.Cache, 0); m_locationTracker = new LocationTrackerImpl(m_publication.Cache, 0); return new TeEditingHelper(this, m_publication.Cache, 0, TeViewType.PrintLayout); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the FootnoteView class /// </summary> /// <param name="cache"></param> /// <param name="filterInstance">The special tag for the book filter</param> /// <param name="draftView">The corresponding draftview pane</param> /// <param name="btWs">The HVO of the writing system to display in this view if it is /// a back translation view; otherwise less than or equal to 0</param> /// ------------------------------------------------------------------------------------ public FootnoteView(FdoCache cache, int filterInstance, FwRootSite draftView, int btWs) : base(cache) { InitializeComponent(); m_filterInstance = filterInstance; m_draftView = draftView; m_btWs = btWs; m_isBackTranslation = (btWs > 0); BackColor = EditableColor; //AutoScroll = false; // Enhance JohnT: probably footnote view needs to support the three ContentTypes, too. m_locationTracker = new LocationTrackerImpl(cache, m_filterInstance, ContentType); DoSpellCheck = (EditingHelper as TeEditingHelper).ShowSpellingErrors; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the <see cref="DraftViewBase"/> class. /// </summary> /// <param name="cache">The cache.</param> /// <param name="filterInstance">The tag that identifies the book filter instance.</param> /// <param name="app">The application.</param> /// <param name="viewName">The name of the view.</param> /// <param name="fEditable"><c>true</c> if view is to be editable.</param> /// <param name="viewType">Bit-flags indicating type of view.</param> /// <param name="btWs">The back translation writing system (if needed).</param> /// ------------------------------------------------------------------------------------ public DraftViewBase(FdoCache cache, int filterInstance, IApp app, string viewName, bool fEditable, TeViewType viewType, int btWs) : base(cache) { InitializePersistence(); m_filterInstance = filterInstance; m_app = app; AccessibleName = Name = viewName; m_initialEditableState = fEditable; m_viewType = viewType; m_initialBtWs = btWs; m_locationTracker = new LocationTrackerImpl(cache, m_filterInstance, ContentType); m_bookFilter = cache.ServiceLocator.GetInstance<IFilteredScrBookRepository>().GetFilterInstance(m_filterInstance); BackColor = EditableColor; DoSpellCheck = TeProjectSettings.ShowSpellingErrors; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the <see cref="DraftViewBase"/> class. /// </summary> /// <param name="cache">The cache.</param> /// <param name="filterInstance">The tag that identifies the book filter instance.</param> /// <param name="app">The application.</param> /// <param name="viewName">The name of the view.</param> /// <param name="fEditable"><c>true</c> if view is to be editable.</param> /// <param name="viewType">Bit-flags indicating type of view.</param> /// <param name="btWs">The back translation writing system (if needed).</param> /// ------------------------------------------------------------------------------------ public DraftViewBase(FdoCache cache, int filterInstance, IApp app, string viewName, bool fEditable, TeViewType viewType, int btWs) : base(cache) { InitializePersistence(); m_filterInstance = filterInstance; m_app = app; AccessibleName = Name = viewName; m_initialEditableState = fEditable; m_viewType = viewType; m_initialBtWs = btWs; m_locationTracker = new LocationTrackerImpl(cache, m_filterInstance, ContentType); m_bookFilter = cache.ServiceLocator.GetInstance <IFilteredScrBookRepository>().GetFilterInstance(m_filterInstance); BackColor = EditableColor; DoSpellCheck = TeProjectSettings.ShowSpellingErrors; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Helper used for processing editing requests. /// </summary> /// ------------------------------------------------------------------------------------ protected override EditingHelper CreateEditingHelper() { m_locationTracker = new LocationTrackerImpl(m_fdoCache, 0); // Strange side-effect! return new DummyTeEditingHelper(this, m_fdoCache, 0, TeViewType.DraftView | TeViewType.Scripture); }
/// -------------------------------------------------------------------------------- /// <summary> /// /// </summary> /// -------------------------------------------------------------------------------- public DummyTeFootnoteView(FdoCache cache) : base() { m_fdoCache = cache; m_locationTracker = new LocationTrackerImpl(cache, 0); }
/// -------------------------------------------------------------------------------- /// <summary> /// /// </summary> /// -------------------------------------------------------------------------------- public DummyTeFootnoteView(FdoCache cache) : base() { // Add virtual property to cache if (FilteredScrBooks.GetFilterInstance(cache, 0) == null) new FilteredScrBooks(cache, 0); m_locationTracker = new LocationTrackerImpl(cache, 0); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the <see cref="DummySimpleRootSite"/> class. /// </summary> /// <param name="cache">The cache.</param> /// ------------------------------------------------------------------------------------ public DummySimpleRootSite(FdoCache cache) { // Add virtual property to cache if (FilteredScrBooks.GetFilterInstance(cache, 0) == null) new FilteredScrBooks(cache, 0); m_locationTracker = new LocationTrackerImpl(cache, 0); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the <see cref="DummySimpleRootSite"/> class. /// </summary> /// <param name="cache">The cache.</param> /// ------------------------------------------------------------------------------------ public DummySimpleRootSite(FdoCache cache) { m_locationTracker = new LocationTrackerImpl(cache, 0); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Creates the view constructor. /// </summary> /// <param name="flid">The flid - ignored here.</param> /// <returns>The view constructor</returns> /// ------------------------------------------------------------------------------------ protected override VwBaseVc CreateVc(int flid) { // Create a new virtual property - we don't need it here, but we use it in the view! new FilteredScrBooks(m_fdoCache, Handle.ToInt32()); m_locationTracker = new LocationTrackerImpl(m_fdoCache, Handle.ToInt32()); DraftViewVc vc = new DraftViewVc(TeStVc.LayoutViewTarget.targetDraft, Handle.ToInt32(), m_styleSheet, false); vc.Cache = m_fdoCache; return vc; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the DraftView class as a draft view editing pane, /// for either vernacular or back translation. /// </summary> /// <param name="cache">The cache.</param> /// <param name="contentType">specifies normal or some kind of BT</param> /// <param name="showInTable">True to show the text layed out in a table, false /// otherwise</param> /// <param name="makeRootAutomatically">attempt to construct the rootbox automatically /// when the window handle is created</param> /// <param name="persistSettings">true to save and load settings for the window</param> /// <param name="viewType">Type of the view.</param> /// <param name="filterInstance"></param> /// ------------------------------------------------------------------------------------ public DraftView(FdoCache cache, StVc.ContentTypes contentType, bool showInTable, bool makeRootAutomatically, bool persistSettings, TeViewType viewType, int filterInstance) : base(cache) { if (contentType == StVc.ContentTypes.kctSegmentBT) LexEntryUi.EnsureFlexVirtuals(Cache, Mediator); AutoScroll = false; m_contentType = contentType; m_fShowInTable = showInTable; m_fMakeRootWhenHandleIsCreated = makeRootAutomatically; m_persistSettings = persistSettings; m_filterInstance = filterInstance; m_bookFilter = FilteredScrBooks.GetFilterInstance(cache, m_filterInstance); // if the filter is still null then make one for testing if (m_bookFilter == null && TheMainWnd == null) m_bookFilter = new FilteredScrBooks(cache, m_filterInstance); m_locationTracker = new LocationTrackerImpl(cache, m_filterInstance, m_contentType); // This call is required by the Windows.Forms Form Designer. InitializeComponent(); BackColor = EditableColor; m_viewType = viewType; DoSpellCheck = (EditingHelper as TeEditingHelper).ShowSpellingErrors; }