C# Класс SIL.FieldWorks.TE.ScripturePublication

Наследование: SIL.FieldWorks.Common.PrintLayout.PublicationControl, IxCoreColleague, ILocationTracker, ITeView, IBtAwareView
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
m_BackTranslationWS int
m_app IApp
m_bookFilter SIL.FieldWorks.FDO.DomainServices.FilteredScrBooks
m_filterInstance int
m_footnoteVc SIL.FieldWorks.TE.FootnoteVc
m_viewType TeViewType

Private Properties

Свойство Тип Описание
GetSectionLevel int
GetSharedSubstream IVwLayoutStream
UpdateFindReplaceMenuItem bool

Открытые методы

Метод Описание
ActivateView ( ) : void

Perform TE-specific user view activation.

GetBook ( SelectionHelper selHelper, SelectionHelper selLimitType ) : IScrBook

Gets the current book, or null if there is no current book (e.g. no selection or empty view).

GetBookIndex ( SelectionHelper selHelper, SelectionHelper selLimitType ) : int

Get the index of the current book (relative to book filter), or -1 if there is no current book (e.g. no selection or empty view).

The returned value is suitable for making a selection.

GetLevelCount ( int tag ) : int

Gets the number of levels for the given tag.

GetLevelIndex ( int tag ) : int

Gets the index of the level for the given tag based on the current selection.

GetMessageTargets ( ) : IxCoreColleague[]

Get the possible message targets, i.e. the view(s) we are showing

GetSection ( SelectionHelper selHelper, SelectionHelper selLimitType ) : IScrSection

Gets the current section, or null if we're not in a section (e.g. the IP is in a title).

GetSectionIndexInBook ( SelectionHelper selHelper, SelectionHelper selLimitType ) : int

Gets the index of the section relative to the book, or -1 if we're not in a section.

GetSectionIndexInView ( SelectionHelper selHelper, SelectionHelper selLimitType ) : int

Get the index of the section (relative to RootBox), or -1 if we're not in a section (e.g. the IP is in a title).

The returned value is suitable for making a selection.

GetWritingSystemForHvo ( int hvo ) : int

Gets the writing system for the HVO. This could either be the vernacular or analysis writing system.

Init ( XCore.Mediator mediator, System configurationParameters ) : void

Not used

OnInsertDiffPara ( IVwRootBox rootBox, ITsTextProps ttpDest, ITsTextProps ttpSrc, ITsString tssParas, ITsString tssTrailing ) : VwInsertDiffParaResponse

see OnInsertDiffParas

OnInsertDiffParas ( IVwRootBox rootBox, ITsTextProps ttpDest, int cPara, ITsTextProps ttpSrcArray, ITsString tssParas, ITsString tssTrailing ) : VwInsertDiffParaResponse

Handle insertion of paragraphs (i.e., from clipboard) with properties that don't match the properties of the paragraph where they are being inserted. This gives us the opportunity to create/modify the DB structure to recieve the paragraphs being inserted and to reject certain types of paste operations (such as attempting to paste a book).

OnProblemDeletion ( IVwSelection sel, VwDelProbType dpt ) : VwDelProbResponse

Override to pass handling of problem deletion on to editing helper.

ScripturePublication ( FwStyleSheet stylesheet, int filterInstance, IPublication publication, TeViewType viewType, System.DateTime printDateTime, IHelpTopicProvider helpTopicProvider, IApp app, int btWs ) : System

Constructs a general-purpose publication for printing Scripture

SetBookAndSection ( SelectionHelper selHelper, SelectionHelper selLimitType, int iBook, int iSection ) : void

Set both book and section. Don't make a selection; typically the caller will proceed to do that.

This method should change only the book and section levels of the selection, but not any other level.

ShowContextMenu ( Point loc ) : void

Shows the context menu.

Защищенные методы

Метод Описание
AddDivisionsForBooks ( ) : void

Adds the divisions for books.

ApplyBookFilterAndCreateDivisions ( ) : void

Applies the book filter and creates divisions.

Dispose ( bool disposing ) : void

Executes in two distinct scenarios. 1. If disposing is true, the method has been called directly or indirectly by a user's code via the Dispose method. Both managed and unmanaged resources can be disposed. 2. If disposing is false, the method has been called by the runtime from inside the finalizer and you should not reference (access) other managed objects, as they already have been garbage collected. Only unmanaged resources can be disposed.

If any exceptions are thrown, that is fine. If the method is being done in a finalizer, it will be ignored. If it is thrown by client code calling Dispose, it needs to be handled by fixing the bug. If subclasses override this method, they should call the base implementation.

GetDivisionLayoutMgr ( PrintLayoutPortion divisionPortion, int hvoBook ) : SIL.FieldWorks.Common.PrintLayout.DivisionLayoutMgr

Gets a DivisionLayoutMgr for a division.

Allows sub classes to override the type of DivisionLayoutMgr that is created.

GetInternalEditingHelper ( ) : SIL.FieldWorks.Common.RootSites.RootSiteEditingHelper

Gets a instance of the EditingHelper used to process editing requests.

GetNonFocusedSelectionState ( Control windowGainingFocus ) : VwSelectionState

If the annotations window is gaining focus, then we don't want the print layout's range selections to be hidden.

GetPrintLayoutConfigurer ( PrintLayoutPortion divisionPortion, int hvoBook, IVwLayoutStream sharedStream, int ws ) : SIL.FieldWorks.TE.TePrintLayoutConfig

Gets the print layout configurer.

OnKeyPress ( System e ) : void

Override to restore prompt selection if relevant (for segmented BT).

OnMouseUp ( MouseEventArgs e ) : void

Process mouse button up event

OnPaint ( PaintEventArgs e ) : void

Override of UserControl.OnPaint

OnUpdateEditFind ( object args ) : bool

Determine if Edit Find menu item should be enabled.

OnUpdateEditFindNext ( object args ) : bool

Determine if Edit Find Next menu item should be enabled.

OnUpdateEditFindPrev ( object args ) : bool

Determine if Edit Find Prev menu item should be enabled.

OnUpdateEditReplace ( object args ) : bool

Determine if Edit Replace menu item should be enabled.

OnUpdateInformationBar ( object args ) : bool

RefreshDisplay ( bool fPreserveSelection ) : void

Refreshes the display.

Приватные методы

Метод Описание
GetSectionLevel ( SelectionHelper selHelper, SelectionHelper selLimitType ) : int

Gets the level for the section tag.

GetSharedSubstream ( ) : IVwLayoutStream

Gets the shared substream.

UpdateFindReplaceMenuItem ( SIL.FieldWorks.Common.UIAdapters.TMItemProperties itemProps ) : bool

Updates any of the Edit/Find,replace menu items based on the selected view

Описание методов

ActivateView() публичный метод

Perform TE-specific user view activation.
public ActivateView ( ) : void
Результат void

AddDivisionsForBooks() защищенный метод

Adds the divisions for books.
protected AddDivisionsForBooks ( ) : void
Результат void

ApplyBookFilterAndCreateDivisions() защищенный метод

Applies the book filter and creates divisions.
protected ApplyBookFilterAndCreateDivisions ( ) : void
Результат void

Dispose() защищенный метод

Executes in two distinct scenarios. 1. If disposing is true, the method has been called directly or indirectly by a user's code via the Dispose method. Both managed and unmanaged resources can be disposed. 2. If disposing is false, the method has been called by the runtime from inside the finalizer and you should not reference (access) other managed objects, as they already have been garbage collected. Only unmanaged resources can be disposed.
If any exceptions are thrown, that is fine. If the method is being done in a finalizer, it will be ignored. If it is thrown by client code calling Dispose, it needs to be handled by fixing the bug. If subclasses override this method, they should call the base implementation.
protected Dispose ( bool disposing ) : void
disposing bool
Результат void

GetBook() публичный метод

Gets the current book, or null if there is no current book (e.g. no selection or empty view).
public GetBook ( SelectionHelper selHelper, SelectionHelper selLimitType ) : IScrBook
selHelper SIL.FieldWorks.Common.RootSites.SelectionHelper The selection helper.
selLimitType SIL.FieldWorks.Common.RootSites.SelectionHelper Which end of the selection
Результат IScrBook

GetBookIndex() публичный метод

Get the index of the current book (relative to book filter), or -1 if there is no current book (e.g. no selection or empty view).
The returned value is suitable for making a selection.
public GetBookIndex ( SelectionHelper selHelper, SelectionHelper selLimitType ) : int
selHelper SIL.FieldWorks.Common.RootSites.SelectionHelper The selection helper.
selLimitType SIL.FieldWorks.Common.RootSites.SelectionHelper Which end of the selection
Результат int

GetDivisionLayoutMgr() защищенный метод

Gets a DivisionLayoutMgr for a division.
Allows sub classes to override the type of DivisionLayoutMgr that is created.
protected GetDivisionLayoutMgr ( PrintLayoutPortion divisionPortion, int hvoBook ) : SIL.FieldWorks.Common.PrintLayout.DivisionLayoutMgr
divisionPortion PrintLayoutPortion portion of book to be layed out in divsion
hvoBook int The hvo of the book.
Результат SIL.FieldWorks.Common.PrintLayout.DivisionLayoutMgr

GetInternalEditingHelper() защищенный метод

Gets a instance of the EditingHelper used to process editing requests.
protected GetInternalEditingHelper ( ) : SIL.FieldWorks.Common.RootSites.RootSiteEditingHelper
Результат SIL.FieldWorks.Common.RootSites.RootSiteEditingHelper

GetLevelCount() публичный метод

Gets the number of levels for the given tag.
public GetLevelCount ( int tag ) : int
tag int The tag.
Результат int

GetLevelIndex() публичный метод

Gets the index of the level for the given tag based on the current selection.
public GetLevelIndex ( int tag ) : int
tag int The tag.
Результат int

GetMessageTargets() публичный метод

Get the possible message targets, i.e. the view(s) we are showing
public GetMessageTargets ( ) : IxCoreColleague[]
Результат IxCoreColleague[]

GetNonFocusedSelectionState() защищенный метод

If the annotations window is gaining focus, then we don't want the print layout's range selections to be hidden.
protected GetNonFocusedSelectionState ( Control windowGainingFocus ) : VwSelectionState
windowGainingFocus System.Windows.Forms.Control
Результат VwSelectionState

GetPrintLayoutConfigurer() защищенный метод

Gets the print layout configurer.
protected GetPrintLayoutConfigurer ( PrintLayoutPortion divisionPortion, int hvoBook, IVwLayoutStream sharedStream, int ws ) : SIL.FieldWorks.TE.TePrintLayoutConfig
divisionPortion PrintLayoutPortion portion of book to be layed out in division
hvoBook int The hvo of the book.
sharedStream IVwLayoutStream A layout stream used for footnotes which is shared across /// multiple divisions
ws int The writing system.
Результат SIL.FieldWorks.TE.TePrintLayoutConfig

GetSection() публичный метод

Gets the current section, or null if we're not in a section (e.g. the IP is in a title).
public GetSection ( SelectionHelper selHelper, SelectionHelper selLimitType ) : IScrSection
selHelper SIL.FieldWorks.Common.RootSites.SelectionHelper The selection helper.
selLimitType SIL.FieldWorks.Common.RootSites.SelectionHelper Which end of the selection
Результат IScrSection

GetSectionIndexInBook() публичный метод

Gets the index of the section relative to the book, or -1 if we're not in a section.
public GetSectionIndexInBook ( SelectionHelper selHelper, SelectionHelper selLimitType ) : int
selHelper SIL.FieldWorks.Common.RootSites.SelectionHelper The selection helper.
selLimitType SIL.FieldWorks.Common.RootSites.SelectionHelper Which end of the selection
Результат int

GetSectionIndexInView() публичный метод

Get the index of the section (relative to RootBox), or -1 if we're not in a section (e.g. the IP is in a title).
The returned value is suitable for making a selection.
public GetSectionIndexInView ( SelectionHelper selHelper, SelectionHelper selLimitType ) : int
selHelper SIL.FieldWorks.Common.RootSites.SelectionHelper The selection helper.
selLimitType SIL.FieldWorks.Common.RootSites.SelectionHelper Which end of the selection
Результат int

GetWritingSystemForHvo() публичный метод

Gets the writing system for the HVO. This could either be the vernacular or analysis writing system.
public GetWritingSystemForHvo ( int hvo ) : int
hvo int HVO
Результат int

Init() публичный метод

Not used
public Init ( XCore.Mediator mediator, System configurationParameters ) : void
mediator XCore.Mediator
configurationParameters System
Результат void

OnInsertDiffPara() публичный метод

see OnInsertDiffParas
public OnInsertDiffPara ( IVwRootBox rootBox, ITsTextProps ttpDest, ITsTextProps ttpSrc, ITsString tssParas, ITsString tssTrailing ) : VwInsertDiffParaResponse
rootBox IVwRootBox
ttpDest ITsTextProps
ttpSrc ITsTextProps
tssParas ITsString
tssTrailing ITsString
Результат VwInsertDiffParaResponse

OnInsertDiffParas() публичный метод

Handle insertion of paragraphs (i.e., from clipboard) with properties that don't match the properties of the paragraph where they are being inserted. This gives us the opportunity to create/modify the DB structure to recieve the paragraphs being inserted and to reject certain types of paste operations (such as attempting to paste a book).
public OnInsertDiffParas ( IVwRootBox rootBox, ITsTextProps ttpDest, int cPara, ITsTextProps ttpSrcArray, ITsString tssParas, ITsString tssTrailing ) : VwInsertDiffParaResponse
rootBox IVwRootBox the sender
ttpDest ITsTextProps properties of destination paragraph
cPara int number of paragraphs to be inserted
ttpSrcArray ITsTextProps Array of props of each para to be inserted
tssParas ITsString Array of TsStrings for each para to be inserted
tssTrailing ITsString Text of an incomplete paragraph to insert at end (with /// the properties of the destination paragraph.
Результат VwInsertDiffParaResponse

OnKeyPress() защищенный метод

Override to restore prompt selection if relevant (for segmented BT).
protected OnKeyPress ( System e ) : void
e System
Результат void

OnMouseUp() защищенный метод

Process mouse button up event
protected OnMouseUp ( MouseEventArgs e ) : void
e MouseEventArgs
Результат void

OnPaint() защищенный метод

Override of UserControl.OnPaint
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs Info needed to paint
Результат void

OnProblemDeletion() публичный метод

Override to pass handling of problem deletion on to editing helper.
public OnProblemDeletion ( IVwSelection sel, VwDelProbType dpt ) : VwDelProbResponse
sel IVwSelection The sel.
dpt VwDelProbType The DPT.
Результат VwDelProbResponse

OnUpdateEditFind() защищенный метод

Determine if Edit Find menu item should be enabled.
protected OnUpdateEditFind ( object args ) : bool
args object The menu item properties
Результат bool

OnUpdateEditFindNext() защищенный метод

Determine if Edit Find Next menu item should be enabled.
protected OnUpdateEditFindNext ( object args ) : bool
args object The menu item properties
Результат bool

OnUpdateEditFindPrev() защищенный метод

Determine if Edit Find Prev menu item should be enabled.
protected OnUpdateEditFindPrev ( object args ) : bool
args object The menu item properties
Результат bool

OnUpdateEditReplace() защищенный метод

Determine if Edit Replace menu item should be enabled.
protected OnUpdateEditReplace ( object args ) : bool
args object The menu item properties
Результат bool

OnUpdateInformationBar() защищенный метод

protected OnUpdateInformationBar ( object args ) : bool
args object
Результат bool

RefreshDisplay() защищенный метод

Refreshes the display.
protected RefreshDisplay ( bool fPreserveSelection ) : void
fPreserveSelection bool True to save the selection and restore it afterwards, /// false otherwise
Результат void

ScripturePublication() публичный метод

Constructs a general-purpose publication for printing Scripture
public ScripturePublication ( FwStyleSheet stylesheet, int filterInstance, IPublication publication, TeViewType viewType, System.DateTime printDateTime, IHelpTopicProvider helpTopicProvider, IApp app, int btWs ) : System
stylesheet FwStyleSheet The stylesheet.
filterInstance int number used to make filters unique per main window
publication IPublication The publication to get the information from (or /// null to keep the defaults)
viewType TeViewType Type of the view.
printDateTime System.DateTime Date/Time of the printing
helpTopicProvider IHelpTopicProvider The help topic provider.
app IApp The app.
btWs int Backtranslation WS
Результат System

SetBookAndSection() публичный метод

Set both book and section. Don't make a selection; typically the caller will proceed to do that.
This method should change only the book and section levels of the selection, but not any other level.
public SetBookAndSection ( SelectionHelper selHelper, SelectionHelper selLimitType, int iBook, int iSection ) : void
selHelper SIL.FieldWorks.Common.RootSites.SelectionHelper The selection helper.
selLimitType SIL.FieldWorks.Common.RootSites.SelectionHelper Which end of the selection
iBook int The index of the book (in the book filter).
iSection int The index of the section (relative to /// ), or -1 for a selection that is not in a section (e.g. /// title).
Результат void

ShowContextMenu() публичный метод

Shows the context menu.
public ShowContextMenu ( Point loc ) : void
loc Point The loc.
Результат void

Описание свойств

m_BackTranslationWS защищенное свойство

The back translation WS
protected int m_BackTranslationWS
Результат int

m_app защищенное свойство

protected IApp m_app
Результат IApp

m_bookFilter защищенное свойство

protected FilteredScrBooks,SIL.FieldWorks.FDO.DomainServices m_bookFilter
Результат SIL.FieldWorks.FDO.DomainServices.FilteredScrBooks

m_filterInstance защищенное свойство

protected int m_filterInstance
Результат int

m_footnoteVc защищенное свойство

protected FootnoteVc,SIL.FieldWorks.TE m_footnoteVc
Результат SIL.FieldWorks.TE.FootnoteVc

m_viewType защищенное свойство

protected TeViewType m_viewType
Результат TeViewType