C# Класс SIL.FieldWorks.XWorks.InterestingTextList

The interesting texts list is responsible for maintaining a list of the texts that should be displayed in the Interlinear Texts tool and searched in the various concordance tools. Currently this is all the StTexts owned by Texts (that is, the main collection of interlinear texts in the language project), and selected sections of Scripture. The list is persisted in the mediator's property table, being thus specific to one user, and possibly a particular window. It implements IVwNotifyChange and updates the list when various relevant properties change.
Наследование: IVwNotifyChange
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AddChapterToInterestingTexts ( IStText newText ) : bool

This is invoked when TE (or some other program) invokes a link, typically to a Scripture Section text not in our filter. If possible, add it to the filter and return true. Also add any other sections in the same chapter. Also when jumping from Notebook to a text that is excluded. Todo JohnT: get it called from TE and test it; not currently used by TE (ported from parts of old InterlinearTextsVirtualHandler)

InterestingTextList ( PropertyTable propertyTable, ITextRepository repo, IStTextRepository stTextRepo ) : System
InterestingTextList ( PropertyTable propertyTable, ITextRepository repo, IStTextRepository stTextRepo, bool includeScripture ) : System
IsInterestingText ( IStText text ) : bool
MakeIdList ( IEnumerable objects ) : string

Make a string that corresponds to a list of guids.

MakeIdList ( IEnumerable objects ) : string

Make a string that corresponds to a list of objects.

PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void
SetInterestingTexts ( IEnumerable stTexts ) : void

This routine is where InterlinMaster sends the results of running the IFilterTextsDialog. The list may include regular as well as scripture texts. We persist them separately because Scripture is excluded by default and regular texts are included by default. Thus, storing a list of the INCLUDED scripture means that originally, or if we clear all saved settings, NO scripture is included, and any newly created Scripture is also excluded until manually added. Storing a lis of EXCLUDED regular texts means that originally, or if we clear all saved settings, ALL regular texts are included, and if we add a new one, it is automatically included.

SetScriptureTextsInPropertyTable ( PropertyTable propertyTable, IEnumerable texts ) : void

Store in the property table what needs to be there so that we will use the specified set of scripture texts as 'interesting'.

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

Метод Описание
AddAfter ( int indexAfter, IStText item ) : int
AddBefore ( int index, IStText item ) : int
BookPosition ( IScrBook book ) : int
ClearInvalidObjects ( List listToSearch, int offset, bool raiseChangeNotification ) : bool
ExcludedCoreTextIdList ( ) : HashSet
GetCache ( ) : void
GetCoreTexts ( ) : List

Get the "core" (non-scripture) texts that we want to display. This is all the ones not on the excluded list.

GetRelatedClerkIds ( string id ) : IEnumerable
GetScriptureTexts ( ) : List
InvalidateRelatedSortSequences ( ) : void
RaiseInterestingTextsChanged ( int insertAt, int inserted, int deleted ) : void
RemoveSortSequenceFile ( string filename ) : void
TextPosition ( IStText text ) : int

Return an index we can use to order StTexts in Scripture. Take the book index * 10,000. if not in the title, add (section index + 1)*2. If in contents add 1.

UpdateExcludedCoreTexts ( HashSet excludedGuids ) : void
UpdateInterestingTexts ( ) : void
UpdatePropertyTable ( ) : void

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

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

This is invoked when TE (or some other program) invokes a link, typically to a Scripture Section text not in our filter. If possible, add it to the filter and return true. Also add any other sections in the same chapter. Also when jumping from Notebook to a text that is excluded. Todo JohnT: get it called from TE and test it; not currently used by TE (ported from parts of old InterlinearTextsVirtualHandler)
public AddChapterToInterestingTexts ( IStText newText ) : bool
newText IStText
Результат bool

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

public InterestingTextList ( PropertyTable propertyTable, ITextRepository repo, IStTextRepository stTextRepo ) : System
propertyTable XCore.PropertyTable
repo ITextRepository
stTextRepo IStTextRepository
Результат System

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

public InterestingTextList ( PropertyTable propertyTable, ITextRepository repo, IStTextRepository stTextRepo, bool includeScripture ) : System
propertyTable XCore.PropertyTable
repo ITextRepository
stTextRepo IStTextRepository
includeScripture bool
Результат System

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

public IsInterestingText ( IStText text ) : bool
text IStText
Результат bool

MakeIdList() публичный статический метод

Make a string that corresponds to a list of guids.
public static MakeIdList ( IEnumerable objects ) : string
objects IEnumerable
Результат string

MakeIdList() публичный статический метод

Make a string that corresponds to a list of objects.
public static MakeIdList ( IEnumerable objects ) : string
objects IEnumerable
Результат string

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

public PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void
hvo int
tag int
ivMin int
cvIns int
cvDel int
Результат void

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

This routine is where InterlinMaster sends the results of running the IFilterTextsDialog. The list may include regular as well as scripture texts. We persist them separately because Scripture is excluded by default and regular texts are included by default. Thus, storing a list of the INCLUDED scripture means that originally, or if we clear all saved settings, NO scripture is included, and any newly created Scripture is also excluded until manually added. Storing a lis of EXCLUDED regular texts means that originally, or if we clear all saved settings, ALL regular texts are included, and if we add a new one, it is automatically included.
public SetInterestingTexts ( IEnumerable stTexts ) : void
stTexts IEnumerable
Результат void

SetScriptureTextsInPropertyTable() публичный статический метод

Store in the property table what needs to be there so that we will use the specified set of scripture texts as 'interesting'.
public static SetScriptureTextsInPropertyTable ( PropertyTable propertyTable, IEnumerable texts ) : void
propertyTable XCore.PropertyTable
texts IEnumerable
Результат void