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

This class handles importing of Scripture, back translations, and notes.
Note: this class runs on a background thread. It can't call any UI methods directly!
Наследование: IFWDisposable
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
m_BTStrBldrs ITsStrBldr>.Dictionary
m_CurrFootnote IScrFootnote
m_DefaultIntroParaProxy SIL.FieldWorks.TE.ImportStyleProxy
m_DefaultIntroSectionHeadParaProxy SIL.FieldWorks.TE.ImportStyleProxy
m_DefaultScrParaProxy SIL.FieldWorks.TE.ImportStyleProxy
m_ParaBldr SIL.FieldWorks.FDO.Cellar.StTxtParaBldr
m_SavedParaBldr SIL.FieldWorks.FDO.Cellar.StTxtParaBldr
m_ScrSectionHeadParaProxy SIL.FieldWorks.TE.ImportStyleProxy
m_Title IStText
m_cache SIL.FieldWorks.FDO.FdoCache
m_currBtPictureInfo BTPictureInfo
m_currPictureInfo ToolboxPictureInfo
m_currSection IScrSection
m_currentRef SILUBS.SharedScrUtils.BCVRef
m_existingAnnotations IScrScriptureNote>.Dictionary
m_fCurrentSectionIsIntro bool
m_fFoundABook bool
m_fInBookTitle bool
m_fInFootnote bool
m_fInScriptureText bool
m_fInSectionHeading bool
m_fInVerseTextParagraph bool
m_firstImportedRef ScrReference
m_iCurrFootnote int
m_iCurrSection int
m_importCallbacks TeImportUi
m_isDisposed bool
m_nBookNumber int
m_prevRef SILUBS.SharedScrUtils.BCVRef
m_sPrevBook string
m_savedVersionDescription string
m_scr IScripture
m_scrBook IScrBook
m_sectionContent IStText
m_sectionHeading IStText
m_styleSheet FwStyleSheet
m_ttpChapterNumber ITsTextProps
m_undoManager SIL.FieldWorks.TE.UndoImportManager
m_wsAnal int
m_wsVern int

Private Properties

Свойство Тип Описание
Pause void
Resume void

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

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

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.

Dispose ( ) : void

Must not be virtual.

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

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

Checks to see if a pause has been requested.

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.

EndFootnote ( ) : void

TeSfmImporter needs to do something for this, but TeXmlImporter doesn't.

FinalizePrevSection ( ) : void

Finalizes section references and checks if the current section has any heading text and content. If not, a single blank paragraph is written for whatever is missing.

FindOrCreateAnnotation ( ScrAnnotationInfo info, ICmObject annotatedObj ) : IScrScriptureNote

Finds or creates an annotation.

GetAnnotDiscussionParaBldr ( ScrAnnotationInfo info ) : SIL.FieldWorks.FDO.Cellar.StTxtParaBldr

Gets a paragraph builder for a simple, single-paragraph Scripture annotation discussion field. The base implementation just returns null, but this is virtual to allow subclasses to return something useful if they don't handle complex annotations.

MakeSection ( ) : void

Add a section, with empty heading and contents. Sets the following members: m_currSection, m_hvoSectionHeading, m_hvoSectionContent

PrepareToImportNewBook ( ) : void

Creates a new book having the "canonical" book number m_nBookNumber. The new book is stored in the saved version. It also creates a title object for the book and puts he hvo of the title in m_hvoTitle.

ResetStateVariablesForNewBook ( ) : void

Resets importer state variables for the new book

SetBookAnnotations ( ) : void

Store the set of annotations that exist for the given book before importing.

StartBookTitle ( ) : void

Set everything up for processing a book title.

StartingNewBook ( ) : void

Updates the previous book name.

UpdateProgressDlgForBook ( string stid ) : void

Update the message in the progress dialog box to reflect the book being imported

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

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

Pauses the import.

Resume ( ) : void

Resumes the import.

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

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

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.
public CheckDisposed ( ) : void
Результат void

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

Checks to see if a pause has been requested.
protected CheckPause ( ) : void
Результат void

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

Must not be virtual.
public Dispose ( ) : 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

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

TeSfmImporter needs to do something for this, but TeXmlImporter doesn't.
protected EndFootnote ( ) : void
Результат void

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

Finalizes section references and checks if the current section has any heading text and content. If not, a single blank paragraph is written for whatever is missing.
protected FinalizePrevSection ( ) : void
Результат void

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

Finds or creates an annotation.
protected FindOrCreateAnnotation ( ScrAnnotationInfo info, ICmObject annotatedObj ) : IScrScriptureNote
info ScrAnnotationInfo The information about a annotation being imported.
annotatedObj ICmObject The annotated object (a book or paragraph).
Результат IScrScriptureNote

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

Gets a paragraph builder for a simple, single-paragraph Scripture annotation discussion field. The base implementation just returns null, but this is virtual to allow subclasses to return something useful if they don't handle complex annotations.
protected GetAnnotDiscussionParaBldr ( ScrAnnotationInfo info ) : SIL.FieldWorks.FDO.Cellar.StTxtParaBldr
info ScrAnnotationInfo The information about a annotation being imported.
Результат SIL.FieldWorks.FDO.Cellar.StTxtParaBldr

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

Add a section, with empty heading and contents. Sets the following members: m_currSection, m_hvoSectionHeading, m_hvoSectionContent
protected MakeSection ( ) : void
Результат void

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

Creates a new book having the "canonical" book number m_nBookNumber. The new book is stored in the saved version. It also creates a title object for the book and puts he hvo of the title in m_hvoTitle.
protected PrepareToImportNewBook ( ) : void
Результат void

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

Resets importer state variables for the new book
protected ResetStateVariablesForNewBook ( ) : void
Результат void

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

Store the set of annotations that exist for the given book before importing.
protected SetBookAnnotations ( ) : void
Результат void

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

Set everything up for processing a book title.
protected StartBookTitle ( ) : void
Результат void

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

Updates the previous book name.
protected StartingNewBook ( ) : void
Результат void

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

Update the message in the progress dialog box to reflect the book being imported
protected UpdateProgressDlgForBook ( string stid ) : void
stid string The resource id for the format string to use
Результат void

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

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

String builders to construct back-trans paragraph strings.
protected Dictionary m_BTStrBldrs
Результат ITsStrBldr>.Dictionary

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

The current footnote; null if m_fInFootnote is both false.
protected IScrFootnote m_CurrFootnote
Результат IScrFootnote

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

Default Background paragraph style proxy
protected ImportStyleProxy,SIL.FieldWorks.TE m_DefaultIntroParaProxy
Результат SIL.FieldWorks.TE.ImportStyleProxy

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

Background Section Head paragraph style proxy
protected ImportStyleProxy,SIL.FieldWorks.TE m_DefaultIntroSectionHeadParaProxy
Результат SIL.FieldWorks.TE.ImportStyleProxy

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

Default Scripture paragraph style proxy
protected ImportStyleProxy,SIL.FieldWorks.TE m_DefaultScrParaProxy
Результат SIL.FieldWorks.TE.ImportStyleProxy

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

String builder to construct paragraph strings.
protected StTxtParaBldr,SIL.FieldWorks.FDO.Cellar m_ParaBldr
Результат SIL.FieldWorks.FDO.Cellar.StTxtParaBldr

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

Used to save and restore an "outer" string builder when creating "nested" paragraphs, such as footnotes.
protected StTxtParaBldr,SIL.FieldWorks.FDO.Cellar m_SavedParaBldr
Результат SIL.FieldWorks.FDO.Cellar.StTxtParaBldr

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

Scripture Section Head paragraph style proxy
protected ImportStyleProxy,SIL.FieldWorks.TE m_ScrSectionHeadParaProxy
Результат SIL.FieldWorks.TE.ImportStyleProxy

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

ID of title
protected IStText m_Title
Результат IStText

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

The cache
protected FdoCache,SIL.FieldWorks.FDO m_cache
Результат SIL.FieldWorks.FDO.FdoCache

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

Information about the current BT picture being processed (for Toolbox-style markup)
protected BTPictureInfo,SIL.FieldWorks.TE m_currBtPictureInfo
Результат BTPictureInfo

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

Information about the current picture being processed (for Toolbox-style markup)
protected ToolboxPictureInfo m_currPictureInfo
Результат ToolboxPictureInfo

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

Current section we are adding to
protected IScrSection m_currSection
Результат IScrSection

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

Reference of current segment
protected BCVRef,SILUBS.SharedScrUtils m_currentRef
Результат SILUBS.SharedScrUtils.BCVRef

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

the set of annotations for the current book existing before import
protected Dictionary m_existingAnnotations
Результат IScrScriptureNote>.Dictionary

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

Indicates whether the current section being worked on is an intro section
protected bool m_fCurrentSectionIsIntro
Результат bool

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

Gets set to true if a book is found during the import
protected bool m_fFoundABook
Результат bool

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

Currently processing a book title
protected bool m_fInBookTitle
Результат bool

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

Currently processing a footnote
protected bool m_fInFootnote
Результат bool

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

We have begun processing actual Scripture text for the current book (as opposed to background materials, etc.) If true, the current section is a scripture text section. One implication of this distinction is that for Scripture sections, the caption bar will display the range of references.
protected bool m_fInScriptureText
Результат bool

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

Currently processing a section heading
protected bool m_fInSectionHeading
Результат bool

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

Currently processing a paragraph whose context is ContextValues.Text and structure is StructureValues.Body.
protected bool m_fInVerseTextParagraph
Результат bool

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

the first imported reference
protected ScrReference m_firstImportedRef
Результат ScrReference

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

The index of the next footnote to insert (for the current book)
protected int m_iCurrFootnote
Результат int

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

Index of current section (0-based).
protected int m_iCurrSection
Результат int

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

UI Callbacks
protected TeImportUi,SIL.FieldWorks.TE m_importCallbacks
Результат TeImportUi

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

True, if the object has been disposed.
protected bool m_isDisposed
Результат bool

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

Current book number, based on cannonical order (e.g., Gen = 1)
protected int m_nBookNumber
Результат int

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

Last (previous) reference found (typically equal to m_currentRef only at the start of the import process)
protected BCVRef,SILUBS.SharedScrUtils m_prevRef
Результат SILUBS.SharedScrUtils.BCVRef

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

Previous book number (in a string)
protected string m_sPrevBook
Результат string

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

The description to use if the user wants to make a saved version.
protected string m_savedVersionDescription
Результат string

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

The data model Scripture object
protected IScripture m_scr
Результат IScripture

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

Book we are currently adding to
protected IScrBook m_scrBook
Результат IScrBook

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

StText that is the section content
protected IStText m_sectionContent
Результат IStText

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

StText that is the section heading
protected IStText m_sectionHeading
Результат IStText

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

Stylesheet used for importing
protected FwStyleSheet m_styleSheet
Результат FwStyleSheet

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

Text props for chapter number character style
protected ITsTextProps m_ttpChapterNumber
Результат ITsTextProps

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

Info needed to undo, including the archived draft where we save existing books
protected UndoImportManager,SIL.FieldWorks.TE m_undoManager
Результат SIL.FieldWorks.TE.UndoImportManager

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

The writing system we use for all non-vernacular text.
protected int m_wsAnal
Результат int

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

The writing system we use for all vernacular text.
protected int m_wsVern
Результат int