C# Class SIL.FieldWorks.FwCoreDlgs.ReplaceAllCollectorEnv

Handles replacing text
The current implementation doesn't work for different styles, tags, and WSs that are applied by the VC.
Inheritance: FindReplaceCollectorEnvBase
显示文件 Open project: sillsdev/FieldWorks Class Usage Examples

Public Methods

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

Member AddStringAltMember

AddStringProp ( int tag, IVwViewConstructor _vwvc ) : void

Member AddStringProp

ReplaceAll ( ) : int

Replaces all.

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

Initializes a new instance of the T:FindReplaceCollectorEnvBase class.

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

ReplaceString ( ITsStrBldr tsbBuilder, ITsString tssInput, int ichMinInput, int ichLimInput, ITsString tssReplace, int delta, bool fEmptySearch, bool fUseWs ) : int

Replaces the string.

set_IntProperty ( int tpt, int tpv, int nValue ) : void

Protected Methods

Method Description
CloseTheObject ( ) : void

Closes the object.

OpenTheObject ( int hvo, int ihvo ) : void

Opens the object.

Private Methods

Method Description
DoReplace ( ITsString tss ) : ITsString

Does the find or replace.

IsEditable ( ITsString tss, int ichMin, int ichLim ) : bool

Determines whether the specified string is editable.

Method Details

AddStringAltMember() public method

Member AddStringAltMember
public AddStringAltMember ( int tag, int ws, IVwViewConstructor _vwvc ) : void
tag int tag
ws int ws
_vwvc IVwViewConstructor _vwvc
return void

AddStringProp() public method

Member AddStringProp
public AddStringProp ( int tag, IVwViewConstructor _vwvc ) : void
tag int tag
_vwvc IVwViewConstructor _vwvc
return void

CloseTheObject() protected method

Closes the object.
protected CloseTheObject ( ) : void
return void

OpenTheObject() protected method

Opens the object.
protected OpenTheObject ( int hvo, int ihvo ) : void
hvo int The hvo.
ihvo int The ihvo.
return void

ReplaceAll() public method

Replaces all.
public ReplaceAll ( ) : int
return int

ReplaceAllCollectorEnv() public method

Initializes a new instance of the T:FindReplaceCollectorEnvBase class.
If the base environment is not null, it is used for various things, such as obtaining 'outer object' information.
public ReplaceAllCollectorEnv ( 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
return System

ReplaceString() public static method

Replaces the string.
public static ReplaceString ( ITsStrBldr tsbBuilder, ITsString tssInput, int ichMinInput, int ichLimInput, ITsString tssReplace, int delta, bool fEmptySearch, bool fUseWs ) : int
tsbBuilder ITsStrBldr The string builder for the text to be replaced.
tssInput ITsString The input string to be replaced.
ichMinInput int The start in the input string.
ichLimInput int The lim in the input string.
tssReplace ITsString The replacement text. This should come from VwPattern.ReplacementText, /// NOT VwPattern.ReplaceWith. The former includes any ORCs that need to be saved from the input, as well as /// properly handling $1, $2 etc. in regular expressions.
delta int length difference between tssInput and tsbBuilder from previous /// replacements.
fEmptySearch bool true if search text is empty (irun.e. we're searching /// for a style or Writing System)
fUseWs bool if set to true use the writing system used in the /// replace string of the Find/Replace dialog.
return int

set_IntProperty() public method

public set_IntProperty ( int tpt, int tpv, int nValue ) : void
tpt int
tpv int
nValue int
return void