C# Class SIL.FieldWorks.FwCoreDlgs.HelperMenu

Context menu to help build text expressions. Subclassed to provide regex and morpheme break building help
Inheritance: System.Windows.Forms.ContextMenu, IFWDisposable
显示文件 Open project: sillsdev/FieldWorks

Protected Properties

Property Type Description
m_helpTopicProvider IHelpTopicProvider
m_textbox SIL.FieldWorks.Common.Widgets.FwTextBox

Public Methods

Method Description
CheckDisposed ( ) : void

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

GroupText ( string leftText, string rightText ) : void

Attempts to group text. Defaults to not requiring any selected text

GroupText ( string leftText, string rightText, bool requireSel ) : void

Attempts to group text.

HelperMenu ( FwTextBox textbox, IHelpTopicProvider helpTopicProvider ) : System

Constructor for Helper Context Menu.

InsertText ( string text ) : void

Insert text. Assumes that if text is selected it is meant to be replaced.

InsertText ( string text, bool replaceSelection ) : void

Insert text. Assumes that if selected text is not replaced, the new text should be inserted at the left of the selection.

InsertText ( string text, bool replaceSelection, bool insertAtRight ) : void

Insert text.

Method Details

CheckDisposed() public method

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.
public CheckDisposed ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

GroupText() protected method

Attempts to group text. Defaults to not requiring any selected text
protected GroupText ( string leftText, string rightText ) : void
leftText string Text to insert before the highlighted region
rightText string Text to insert after the highlighted region
return void

GroupText() protected method

Attempts to group text.
protected GroupText ( string leftText, string rightText, bool requireSel ) : void
leftText string Text to insert before the highlighted region
rightText string Text to insert after the highlighted region
requireSel bool Determines if a selection is required or not. If a selection is required but none /// is present, a warning message will be shown and the text will not be altered.
return void

HelperMenu() protected method

Constructor for Helper Context Menu.
protected HelperMenu ( FwTextBox textbox, IHelpTopicProvider helpTopicProvider ) : System
textbox SIL.FieldWorks.Common.Widgets.FwTextBox the textbox to insert regex characters into
helpTopicProvider IHelpTopicProvider usually IHelpTopicProvider.App
return System

InsertText() protected method

Insert text. Assumes that if text is selected it is meant to be replaced.
protected InsertText ( string text ) : void
text string Text to insert
return void

InsertText() protected method

Insert text. Assumes that if selected text is not replaced, the new text should be inserted at the left of the selection.
protected InsertText ( string text, bool replaceSelection ) : void
text string Text to insert
replaceSelection bool Determines if selected text should be replaced or not
return void

InsertText() protected method

Insert text.
protected InsertText ( string text, bool replaceSelection, bool insertAtRight ) : void
text string Text to insert
replaceSelection bool Determines if selected text should be replaced or not
insertAtRight bool If true and replaceSelection is false, the inserted text will be inserted at the right /// boundary of the selection instead of the left boundary.
return void

Property Details

m_helpTopicProvider protected_oe property

For providing help
protected IHelpTopicProvider m_helpTopicProvider
return IHelpTopicProvider

m_textbox protected_oe property

The textbox to insert text into
protected FwTextBox,SIL.FieldWorks.Common.Widgets m_textbox
return SIL.FieldWorks.Common.Widgets.FwTextBox