Table of Contents

Class SearchManager

Namespace
Alternet.Editor.Wpf
Assembly
Alternet.Editor.Wpf.v9.dll

Represents properties and methods used to search and replace within a collection of control's text content.

public class SearchManager
Inheritance
SearchManager

Properties

DeclarationSearch
FirstSearch

Gets or sets a value indicating whether SearchManager launches text search at first.

GotoLineDialog

Gets or sets a dialog prompting for index of the line you need to locate.

InCycledSearch

Indicates whether SearchManager is in cycled search state.

InIncrementalSearch

Indicates whether SearchManager is in incremental search state.

IncrementalSearchString

Return text to search if SearchManager is in incremental search state; otherwise return empty string.

Search

Represents a search engine.

SearchDialog

Gets or sets a dialog box allowing to search for the text or replace it.

SearchLen

Represents length of the last found text.

SearchOptions

Gets or sets a value that defines search and replace options.

SearchPos

Gets or sets a value that represents position of the last found text.

Shared

Specifies if search should be shared across all documents.

SharedSearch

Returns SearchManager object shared to search and replace for all documents.

Methods

CanFindNext()

Indicates whether search engine can find next occurrence of the text specified by previous search or it is only first attempt to search.

CanFindNextSelected()

Indicates whether search engine can find next occurrence of the selected text or it is the first attempt to search.

CanFindPrevious()

Indicates whether search engine can find previous occurrence of the text specified to search or it is the first attempt to search.

CanFindPreviousSelected()

Indicates whether search engine can find previous occurrence of the selected text or it is the first attempt to search.

CanSearchSelection(out string)

Returns whether search can be performed inside selection.

DoFind(string, SearchOptions, Regex, bool, bool)

Searches for given text within the search engine content with specified options using specified regular expression.

Done(ISearch)

Stops search process.

Find(ISearch, string, SearchOptions, Regex)

Searches for all occurrences of given text by specified parameters.

Find(string, SearchOptions, Regex, IList<IRange>)

Searches for all occurrences of given text by specified parameters.

Find(string, SearchOptions, Regex, ref Point, out int, out Match)

Searches for all occurrences of given text by specified parameters.

FindNext()

Searches for the next occurrence of the text specified by previous search.

FindNext(string)
FindNextSelected()

Searches for the next occurrence of the selected text.

FindPrevious()

Searches for the previous occurrence of the text specified by previous search.

FindPrevious(string)
FindPreviousSelected()

Searches for the previous occurrence of the selected text.

FindText(string, string, SearchOptions, Regex, out ISearch)

Searches text by specified parameters.

FinishIncrementalSearch()

Leaves control from the incremental search state.

GetSearchFromFile(string)
GetSourceFileNameFromSearch(ISearch)
GetTextToSearchAtCursor()

Returns word at the cursor position.

IncrementalSearch(string, bool)

Finds given text incrementally.

Init(ref ISearch, SearchOptions)

Initializes a new search process.

InitSearchList(ref ISearch, SearchOptions)

Raises InitSearch event.

MarkAll(ISearch, string, SearchOptions, Regex, bool)

Marks all occurrences of specified string found by specified parameters.

NeedReplaceCurrent(out Match)

Indicates whether search engine need to replace successfully found and selected text.

NextSearch(SearchOptions, ref string, ref ISearch)
OnSearchChanged(ISearch, ISearch)
OnTextFound(ISearch)

Occurs when search text found.

OnTextFound(string, string, SearchOptions, Regex, Match, Point, int, bool, out ISearch)

Occurs when search text found.

Replace(string, string)

Searches for the first occurrence of given text within the text content and if succeed replaces it by specified string.

Replace(string, string, SearchOptions)

Searches for first occurrence given text within the text content with specified options and if succeed replaces it by specified string.

Replace(string, string, SearchOptions, Regex)

Searches for first occurrence given text within the text content with specified options using specified regular expression and if succeed replaces it by specified string.

ReplaceAll(ISearch, string, string, SearchOptions, Regex, out int, out bool)

Replaces all occurrences of given text found by specified parameters.

ReplaceCurrent(string, SearchOptions, Match)

Replaces currently selected text.

SearchCycled(string, SearchOptions, Regex, bool)

Performs cycled search.

ShowNotFound(ISearch, string)

Displays "searched text not found" message box.

StartIncrementalSearch()

Enters search engine to the incremental search state.

StartIncrementalSearch(bool)

Enters search engine to the incremental search state.

UpdateSearch(ISearch, bool)

Updates specified search.

Events

GetSearch

Occurs when SearchManager try to get search engine appropriate to specified parameters.

InitSearch

Occurs when search process is being initialized.

SearchChanged
TextFound

Occurs when search text found.