C# Класс SIL.FieldWorks.FwCoreDlgs.FindCollectorEnv

Handles finding text
The current implementation doesn't work for different styles, tags, and WSs that are applied by the VC.
Наследование: FindReplaceCollectorEnvBase
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
m_LimitLocation LocationInfo
m_LocationFound LocationInfo
m_StartLocation LocationInfo
m_fHaveWrapped bool
m_fHitLimit bool

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

Метод Описание
AddString ( ITsString tss ) : void

Adds the string. Overridden to check for strings that were added inside of an open property.

AddStringAltMember ( int tag, int ws, IVwViewConstructor _vwvc ) : void

Member AddStringAltMember

AddStringProp ( int tag, IVwViewConstructor _vwvc ) : void

Member AddStringProp

FindCollectorEnv ( IVwViewConstructor vc, ISilDataAccess sda, int hvoRoot, int frag, IVwPattern vwPattern, IVwSearchKiller searchKiller ) : System

Initializes a new instance of the T:FindCollectorEnv class.

If the base environment is not null, it is used for various things, such as obtaining 'outer object' information.

FindNext ( LocationInfo startLocation ) : LocationInfo

Finds the next occurence.

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

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

Override to check whether the start location or the limit location is in a literal string or some other added property.

CheckForStartLocationAndLimit ( int tag ) : void

Checks to see if the current location is the starting location. It will also check to see if the current location is the limit (or passed the limit). NOTE: This method doesn't check any character position as it should only be used for properties that won't be searched (i.e. that the find will skip over)

CurrentLocationIsStartLocation ( int tag ) : bool

Returns whether or not the property at the current location is the starting location. NOTE: This method will return false if there is no start location

CurrentStackIsSameAsLocationInfo ( LocationInfo info, int tag ) : bool

Determines if the current stack loacation and the specified tag match the location specified in the given LocationInfo

DisplayThisObject ( int hvoItem, int tag ) : bool

Determines whether to search this object based on whether we've reached our start location yet.

DoFind ( ITsString tss, int tag ) : void

Does the find.

PassedLimit ( int tag, int testIch ) : bool

Check to see whether we have passed the limit so we can stop searching and not just go on and on endlessly in an infinite loop forever and ever until the user gets fed up and throws the computer out the window.

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

AddString() публичный Метод

Adds the string. Overridden to check for strings that were added inside of an open property.
public AddString ( ITsString tss ) : void
tss ITsString The TSS.
Результат void

AddStringAltMember() публичный Метод

Member AddStringAltMember
public AddStringAltMember ( int tag, int ws, IVwViewConstructor _vwvc ) : void
tag int tag
ws int ws
_vwvc IVwViewConstructor _vwvc
Результат void

AddStringProp() публичный Метод

Member AddStringProp
public AddStringProp ( int tag, IVwViewConstructor _vwvc ) : void
tag int tag
_vwvc IVwViewConstructor _vwvc
Результат void

CheckForNonPropInfo() защищенный Метод

Override to check whether the start location or the limit location is in a literal string or some other added property.
protected CheckForNonPropInfo ( ) : void
Результат void

CheckForStartLocationAndLimit() защищенный Метод

Checks to see if the current location is the starting location. It will also check to see if the current location is the limit (or passed the limit). NOTE: This method doesn't check any character position as it should only be used for properties that won't be searched (i.e. that the find will skip over)
protected CheckForStartLocationAndLimit ( int tag ) : void
tag int The tag of the current object.
Результат void

CurrentLocationIsStartLocation() защищенный Метод

Returns whether or not the property at the current location is the starting location. NOTE: This method will return false if there is no start location
protected CurrentLocationIsStartLocation ( int tag ) : bool
tag int The tag of the property.
Результат bool

CurrentStackIsSameAsLocationInfo() защищенный Метод

Determines if the current stack loacation and the specified tag match the location specified in the given LocationInfo
protected CurrentStackIsSameAsLocationInfo ( LocationInfo info, int tag ) : bool
info LocationInfo The LocationInfo to check.
tag int The tag of the current property.
Результат bool

DisplayThisObject() защищенный Метод

Determines whether to search this object based on whether we've reached our start location yet.
protected DisplayThisObject ( int hvoItem, int tag ) : bool
hvoItem int The hvo item.
tag int The tag.
Результат bool

DoFind() защищенный Метод

Does the find.
protected DoFind ( ITsString tss, int tag ) : void
tss ITsString The original string.
tag int Tag
Результат void

FindCollectorEnv() публичный Метод

Initializes a new instance of the T:FindCollectorEnv class.
If the base environment is not null, it is used for various things, such as obtaining 'outer object' information.
public FindCollectorEnv ( IVwViewConstructor vc, ISilDataAccess sda, int hvoRoot, int frag, IVwPattern vwPattern, IVwSearchKiller searchKiller ) : System
vc IVwViewConstructor The view constructor.
sda ISilDataAccess Date access to get prop values etc.
hvoRoot int The root object to display.
frag int The fragment.
vwPattern IVwPattern The find/replace pattern.
searchKiller IVwSearchKiller Used to interrupt a find/replace
Результат System

FindNext() публичный Метод

Finds the next occurence.
public FindNext ( LocationInfo startLocation ) : LocationInfo
startLocation LocationInfo The selection level information, property tag and /// character offset that represent the location where the search should start.
Результат LocationInfo

PassedLimit() защищенный Метод

Check to see whether we have passed the limit so we can stop searching and not just go on and on endlessly in an infinite loop forever and ever until the user gets fed up and throws the computer out the window.
protected PassedLimit ( int tag, int testIch ) : bool
tag int The tag of the property whose string is being searched
testIch int The character offset position being tested. May be -1 if /// no match was found in this string, in which case we treat it as being beyond the /// limit if this string is the string that contains the limit.
Результат bool

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

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

Location where find next should stop because it has wrapped around
protected LocationInfo m_LimitLocation
Результат LocationInfo

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

Found match location
protected LocationInfo m_LocationFound
Результат LocationInfo

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

Location to start current find next
protected LocationInfo m_StartLocation
Результат LocationInfo

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

True if the find has already wrapped, false otherwise
protected bool m_fHaveWrapped
Результат bool

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

True if we have passed the limit, false otherwise
protected bool m_fHitLimit
Результат bool