C# Class SIL.FieldWorks.IText.ConcordanceControl

Mostra file Open project: sillsdev/FieldWorks Class Usage Examples

Protected Properties

Property Type Description
m_cbSearchText SIL.FieldWorks.Common.Widgets.TreeCombo
m_cbWritingSystem System.Windows.Forms.ComboBox
m_chkMatchCase System.Windows.Forms.CheckBox
m_chkMatchDiacritics System.Windows.Forms.CheckBox
m_tbSearchText SIL.FieldWorks.Common.Widgets.FwTextBox

Private Properties

Property Type Description
AddUnparsedParagraphs void
ClearResults void
CurrentSelectedWs int
DisableDetailedSearchControls void
EnableDetailedSearchControls void
FillLineComboList void
FillSearchComboList void
FillWritingSystemCombo void
FindMatchingItems List
FirstPassFilterString string
GetHvoOfListItemToMatch int
GetHvoOfMsaPartOfSpeech List
GetMatchObject ICmObject
GetMatcher IMatcher
GetOccurrencesOfAnalyses List
GetParaFragmentsOfTags List
GetReferenceBeginOffsetInPara int
GetReferenceEndOffsetInPara int
GetSearchText ITsString
InitializeComponent void
InitializeConcordanceSearch bool
InitializeConcordanceSearch bool
InitializeConcordanceSearch bool
InitializeConcordanceSearchWordPOS bool
LoadSettings void
MakeOccurrence IParaFragment
POSAfterSelect void
SaveSettings void
SetConcordanceLine void
SetDefaultButtonState void
SetDefaultVisibilityOfItems void
SetWritingSystem void
SetupSearchPattern void
ShowRegExpMatcherError void
SyncWritingSystemComboToSelectedLine void
UpdateButtonState void
UpdateConcordanceForBaseline List
UpdateConcordanceForFreeTranslation List
UpdateConcordanceForGramInfo List
UpdateConcordanceForLexEntry List
UpdateConcordanceForLexGloss List
UpdateConcordanceForLiteralTranslation List
UpdateConcordanceForMorphemes List
UpdateConcordanceForNote List
UpdateConcordanceForTag List
UpdateConcordanceForWord List
UpdateConcordanceForWordCategory List
UpdateConcordanceForWordGloss List
m_btnHelp_Click void
m_btnRegExp_Click void
m_btnSearch_Click void
m_cbLine_SelectedIndexChanged void
m_cbWritingSystem_SelectedIndexChanged void
m_lnkSpecify_LinkClicked void
m_rbtnUseRegExp_CheckedChanged void
m_tbSearchText_KeyDown void
m_tbSearchText_TextChanged void

Public Methods

Method Description
ConcordanceControl ( ) : System
Init ( XCore.Mediator mediator, XmlNode configurationParameters ) : void
MaxConcordanceMatches ( ) : int
OnConsideringClosing ( object sender, System.CancelEventArgs arg ) : bool

This is called when the main window is closing.

OnJumpToRecord ( object argument ) : bool

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

GetConcordanceOption ( ) : string
OnLeave ( EventArgs e ) : void
SearchForMatches ( ) : List
SetConcordanceOption ( string sConcordanceOption ) : void
SyncWritingSystemComboToSelectedLine ( ) : void

Private Methods

Method Description
AddUnparsedParagraphs ( IStText text, List collectUnparsed, HashSet collectUsefulParas ) : void
ClearResults ( ) : void

Instead of reloading the list, clear the results if we are needing a reload. This will force the user to hit 'Search' explicitly, to prevent automatic reloading when the search might take a long time. LT-6967

CurrentSelectedWs ( ) : int
DisableDetailedSearchControls ( ) : void

Don't want all the radio buttons and checkboxes active when searching by possibility list item.

EnableDetailedSearchControls ( ) : void
FillLineComboList ( ) : void
FillSearchComboList ( ConcordanceLines line ) : void
FillWritingSystemCombo ( int wsMagic ) : void
FindMatchingItems ( ) : List
FirstPassFilterString ( string sMatch ) : string

If we're not matching diacritics, then our first pass has to allow for diacritics in the baseline text, but we can at least filter on all the non-diacritic chars in sequence to maybe eliminate some paragraphs at this initial stage.

GetHvoOfListItemToMatch ( int ws ) : int
GetHvoOfMsaPartOfSpeech ( IMoMorphSynAnalysis msa ) : List

Get the hvo(s) for the Part of Speech for the various subclasses of MSA. N.B. If we add new subclasses or rearrange the class hierarchy, this will need to change.

GetMatchObject ( ) : ICmObject
GetMatcher ( int ws ) : IMatcher
GetOccurrencesOfAnalyses ( IEnumerable analyses ) : List
GetParaFragmentsOfTags ( IEnumerable matchedTags ) : List
GetReferenceBeginOffsetInPara ( IAnalysisReference refToAnalyses ) : int
GetReferenceEndOffsetInPara ( IAnalysisReference refToAnalyses ) : int
GetSearchText ( ) : ITsString
InitializeComponent ( ) : void
InitializeConcordanceSearch ( ICmObject cmo ) : bool
InitializeConcordanceSearch ( ICmObject cmo, ITsString tssObj ) : bool
InitializeConcordanceSearch ( string sMatch, int ws, ConcordanceLines line ) : bool
InitializeConcordanceSearchWordPOS ( ICmObject target ) : bool

Select the Word Category line to search on and then select the part of speech to match the target then search based on those selections.

LoadSettings ( ) : void
MakeOccurrence ( IStTxtPara para, int ichMin, int ichLim ) : IParaFragment
POSAfterSelect ( object sender, TreeViewEventArgs e ) : void
SaveSettings ( ) : void
SetConcordanceLine ( ConcordanceLines line ) : void
SetDefaultButtonState ( ) : void
SetDefaultVisibilityOfItems ( bool fDefault, string sConcordedOn ) : void
SetWritingSystem ( int ws ) : void
SetupSearchPattern ( int ws ) : void
ShowRegExpMatcherError ( IMatcher matcher ) : void
SyncWritingSystemComboToSelectedLine ( ConcordLine sel ) : void
UpdateButtonState ( ) : void
UpdateConcordanceForBaseline ( int ws ) : List
UpdateConcordanceForFreeTranslation ( int ws ) : List

Here the match is a complete segment, if the requested free translation matches.

UpdateConcordanceForGramInfo ( int ws ) : List

In the concordance the user selects the Lex Gram Info line along with a particular part of speech. This method finds each Wordform analysis with a morpheme that has the part of speech matching the selected part of speech.

UpdateConcordanceForLexEntry ( int ws ) : List

Concordance contains all occurrences of analyses which contain the specified lex entry, in the sense that they point to an MoForm whose owner's LexemeForm matches the pattern. Enhance JohnT: the VC will show the citation form, in the (unlikely? impossible?) event that the LexemeForm doesn't have a form. Should we search there too?

UpdateConcordanceForLexGloss ( int ws ) : List

This one matches on the gloss of the morph bundle's sense.

UpdateConcordanceForLiteralTranslation ( int ws ) : List

Here the match is a complete segment, if the requested literal translation matches.

UpdateConcordanceForMorphemes ( int ws ) : List

Concordance contains all occurrences of analyses which contain exactly the specified morpheme. A match may be either on the Form of the morph bundle, or on the form of the MoForm it points to.

UpdateConcordanceForNote ( int ws ) : List

Here the match is a complete segment, if one of its notes matches.

UpdateConcordanceForTag ( int ws ) : List

This one matches on the Tags from the Tagging tab.

UpdateConcordanceForWord ( int ws ) : List
UpdateConcordanceForWordCategory ( int ws ) : List
UpdateConcordanceForWordGloss ( int ws ) : List

Here we're looking for ones that match on the word gloss.

m_btnHelp_Click ( object sender, EventArgs e ) : void
m_btnRegExp_Click ( object sender, EventArgs e ) : void
m_btnSearch_Click ( object sender, EventArgs e ) : void
m_cbLine_SelectedIndexChanged ( object sender, EventArgs e ) : void
m_cbWritingSystem_SelectedIndexChanged ( object sender, EventArgs e ) : void
m_lnkSpecify_LinkClicked ( object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e ) : void
m_rbtnUseRegExp_CheckedChanged ( object sender, EventArgs e ) : void
m_tbSearchText_KeyDown ( object sender, KeyEventArgs e ) : void
m_tbSearchText_TextChanged ( object sender, EventArgs e ) : void

Method Details

ConcordanceControl() public method

public ConcordanceControl ( ) : System
return System

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

GetConcordanceOption() protected method

protected GetConcordanceOption ( ) : string
return string

Init() public method

public Init ( XCore.Mediator mediator, XmlNode configurationParameters ) : void
mediator XCore.Mediator
configurationParameters XmlNode
return void

MaxConcordanceMatches() public static method

public static MaxConcordanceMatches ( ) : int
return int

OnConsideringClosing() public method

This is called when the main window is closing.
public OnConsideringClosing ( object sender, System.CancelEventArgs arg ) : bool
sender object
arg System.CancelEventArgs
return bool

OnJumpToRecord() public method

public OnJumpToRecord ( object argument ) : bool
argument object
return bool

OnLeave() protected method

protected OnLeave ( EventArgs e ) : void
e System.EventArgs
return void

SearchForMatches() protected method

protected SearchForMatches ( ) : List
return List

SetConcordanceOption() protected method

protected SetConcordanceOption ( string sConcordanceOption ) : void
sConcordanceOption string
return void

SyncWritingSystemComboToSelectedLine() protected method

protected SyncWritingSystemComboToSelectedLine ( ) : void
return void

Property Details

m_cbSearchText protected_oe property

protected TreeCombo,SIL.FieldWorks.Common.Widgets m_cbSearchText
return SIL.FieldWorks.Common.Widgets.TreeCombo

m_cbWritingSystem protected_oe property

protected ComboBox,System.Windows.Forms m_cbWritingSystem
return System.Windows.Forms.ComboBox

m_chkMatchCase protected_oe property

protected CheckBox,System.Windows.Forms m_chkMatchCase
return System.Windows.Forms.CheckBox

m_chkMatchDiacritics protected_oe property

protected CheckBox,System.Windows.Forms m_chkMatchDiacritics
return System.Windows.Forms.CheckBox

m_tbSearchText protected_oe property

protected FwTextBox,SIL.FieldWorks.Common.Widgets m_tbSearchText
return SIL.FieldWorks.Common.Widgets.FwTextBox