C# Class SIL.FieldWorks.LexText.Controls.BaseGoDlg

Summary description for BaseGoDlg.
Inheritance: System.Windows.Forms.Form, IFWDisposable
Mostra file Open project: sillsdev/FieldWorks

Protected Properties

Property Type Description
m_analHvos HashSet
m_btnClose System.Windows.Forms.Button
m_btnHelp System.Windows.Forms.Button
m_btnInsert System.Windows.Forms.Button
m_btnOK System.Windows.Forms.Button
m_cache SIL.FieldWorks.FDO.FdoCache
m_cbWritingSystems SIL.FieldWorks.Common.Controls.FwOverrideComboBox
m_formLabel Label
m_fwTextBoxBottomMsg FwTextBox
m_hasBeenActivated bool
m_helpProvider HelpProvider
m_helpTopic string
m_helpTopicProvider IHelpTopicProvider
m_matchingObjectsBrowser MatchingObjectsBrowser
m_mediator Mediator
m_objectsLabel Label
m_oldSearchKey string
m_panel1 Panel
m_searchAnimation SearchingAnimation
m_selObject ICmObject
m_skipCheck bool
m_tbForm FwTextBox
m_tsf ITsStrFactory
m_vernHvos HashSet
m_wsLabel Label

Public Methods

Method Description
BaseGoDlg ( ) : System

Constructor.

CheckDisposed ( ) : void

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

SetDlgInfo ( SIL.FieldWorks.FDO.FdoCache cache, SIL.FieldWorks.LexText.Controls.WindowParams wp, XCore.Mediator mediator ) : void

Set up the dlg in preparation to showing it.

SetDlgInfo ( SIL.FieldWorks.FDO.FdoCache cache, SIL.FieldWorks.LexText.Controls.WindowParams wp, XCore.Mediator mediator, ITsString tssform ) : void

SetDlgInfo ( SIL.FieldWorks.FDO.FdoCache cache, SIL.FieldWorks.LexText.Controls.WindowParams wp, XCore.Mediator mediator, string form ) : void

Set up the dlg in preparation to showing it.

SetHelpTopic ( string helpTopic ) : void

Sets the help topic ID for the window. This is used in both the Help button and when the user hits F1

SetOkButtonText ( string text ) : void

Set the text for the OK button.

Protected Methods

Method Description
AdjustText ( int &addToSelection ) : string
Dispose ( bool disposing ) : void

Clean up any resources being used.

FocusTbFormTheFirstTime ( ) : void

The first time it becomes possible, focus m_tbForm. Depending for some obscure reason on the DPI, events occur in different orders, and it may not be possible to focus this control at various points where we would like to. Do it (once) as soon as we can. Not more than that, lest we move the focus back here from somewhere else the user put it.

HandleMatchingSelectionChanged ( ) : void
HandleMatchingSelectionChanged ( FwObjectSelectionEventArgs e ) : void
InitializeMatchingObjects ( SIL.FieldWorks.FDO.FdoCache cache, XCore.Mediator mediator ) : void
LoadWritingSystemCombo ( ) : void
OnLoad ( EventArgs e ) : void

Overridden to defeat the standard .NET behavior of adjusting size by screen resolution. That is bad for this dialog because we remember the size, and if we remember the enlarged size, it just keeps growing. If we defeat it, it may look a bit small the first time at high resolution, but at least it will stay the size the user sets. This also ensures that m_tbForm has the focus when the dialog box first comes up, even for 120dpi fonts.

OnShown ( EventArgs e ) : void
ResetForm ( ) : void
ResetMatches ( string searchKey ) : void

Reset the list of matching items. This is not abstract so that this form can be opened in the Windows Forms Designer.

SetBottomMessage ( ) : void

Subclasses should override this, if they have special behavior for messages.

SetCbWritingSystemsSize ( ) : void

Increase the width of the writing systems combobox if needed to display the names. (This fixes FWNX-795.)

SetDlgInfo ( SIL.FieldWorks.FDO.FdoCache cache, SIL.FieldWorks.LexText.Controls.WindowParams wp, XCore.Mediator mediator, int ws ) : void
SetDlgInfo ( SIL.FieldWorks.FDO.FdoCache cache, SIL.FieldWorks.LexText.Controls.WindowParams wp, XCore.Mediator mediator, string form, int ws ) : void
SetupBottomMsg ( ) : int

Sets various proerties on the m_fwTextBoxBottomMsg control.

ShowControlsBasedOnPanel1Position ( ) : void
StartSearchAnimation ( ) : void
m_btnHelp_Click ( object sender, EventArgs e ) : void

Display help for this dialog.

m_btnInsert_Click ( object sender, EventArgs e ) : void
m_cbWritingSystems_SelectedIndexChanged ( object sender, EventArgs e ) : void
m_tbForm_KeyDown ( object sender, KeyEventArgs e ) : void

translate up and down arrow keys in the Find textbox into moving the selection in the matching entries list view.

m_tbForm_TextChanged ( object sender, EventArgs e ) : void

Private Methods

Method Description
AdjustControlsToTextResize ( ) : void
BaseGoDlg_Activated ( object sender, EventArgs e ) : void
BaseGoDlg_Closed ( object sender, EventArgs e ) : void
GrowDialogAndAdjustControls ( int delta, Control grower ) : void
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

SetHelpButtonEnabled ( ) : void
SetupBasicTextProperties ( SIL.FieldWorks.LexText.Controls.WindowParams wp ) : void
m_matchingObjectsBrowser_SearchCompleted ( object sender, EventArgs e ) : void
m_matchingObjectsBrowser_SelectionMade ( object sender, FwObjectSelectionEventArgs e ) : void
m_matchingObjects_SelectionChanged ( object sender, FwObjectSelectionEventArgs e ) : void

Method Details

AdjustText() protected method

protected AdjustText ( int &addToSelection ) : string
addToSelection int
return string

BaseGoDlg() public method

Constructor.
public BaseGoDlg ( ) : System
return System

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

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool
return void

FocusTbFormTheFirstTime() protected method

The first time it becomes possible, focus m_tbForm. Depending for some obscure reason on the DPI, events occur in different orders, and it may not be possible to focus this control at various points where we would like to. Do it (once) as soon as we can. Not more than that, lest we move the focus back here from somewhere else the user put it.
protected FocusTbFormTheFirstTime ( ) : void
return void

HandleMatchingSelectionChanged() protected method

protected HandleMatchingSelectionChanged ( ) : void
return void

HandleMatchingSelectionChanged() protected method

protected HandleMatchingSelectionChanged ( FwObjectSelectionEventArgs e ) : void
e FwObjectSelectionEventArgs
return void

InitializeMatchingObjects() protected method

protected InitializeMatchingObjects ( SIL.FieldWorks.FDO.FdoCache cache, XCore.Mediator mediator ) : void
cache SIL.FieldWorks.FDO.FdoCache
mediator XCore.Mediator
return void

LoadWritingSystemCombo() protected method

protected LoadWritingSystemCombo ( ) : void
return void

OnLoad() protected method

Overridden to defeat the standard .NET behavior of adjusting size by screen resolution. That is bad for this dialog because we remember the size, and if we remember the enlarged size, it just keeps growing. If we defeat it, it may look a bit small the first time at high resolution, but at least it will stay the size the user sets. This also ensures that m_tbForm has the focus when the dialog box first comes up, even for 120dpi fonts.
protected OnLoad ( EventArgs e ) : void
e System.EventArgs
return void

OnShown() protected method

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

ResetForm() protected method

protected ResetForm ( ) : void
return void

ResetMatches() protected method

Reset the list of matching items. This is not abstract so that this form can be opened in the Windows Forms Designer.
protected ResetMatches ( string searchKey ) : void
searchKey string
return void

SetBottomMessage() protected method

Subclasses should override this, if they have special behavior for messages.
protected SetBottomMessage ( ) : void
return void

SetCbWritingSystemsSize() protected method

Increase the width of the writing systems combobox if needed to display the names. (This fixes FWNX-795.)
protected SetCbWritingSystemsSize ( ) : void
return void

SetDlgInfo() public method

Set up the dlg in preparation to showing it.
public SetDlgInfo ( SIL.FieldWorks.FDO.FdoCache cache, SIL.FieldWorks.LexText.Controls.WindowParams wp, XCore.Mediator mediator ) : void
cache SIL.FieldWorks.FDO.FdoCache FDO cache.
wp SIL.FieldWorks.LexText.Controls.WindowParams Strings used for various items in this dialog.
mediator XCore.Mediator
return void

SetDlgInfo() public method

public SetDlgInfo ( SIL.FieldWorks.FDO.FdoCache cache, SIL.FieldWorks.LexText.Controls.WindowParams wp, XCore.Mediator mediator, ITsString tssform ) : void
cache SIL.FieldWorks.FDO.FdoCache
wp SIL.FieldWorks.LexText.Controls.WindowParams
mediator XCore.Mediator
tssform ITsString establishes the ws of the dialog.
return void

SetDlgInfo() protected method

protected SetDlgInfo ( SIL.FieldWorks.FDO.FdoCache cache, SIL.FieldWorks.LexText.Controls.WindowParams wp, XCore.Mediator mediator, int ws ) : void
cache SIL.FieldWorks.FDO.FdoCache
wp SIL.FieldWorks.LexText.Controls.WindowParams
mediator XCore.Mediator
ws int
return void

SetDlgInfo() public method

Set up the dlg in preparation to showing it.
public SetDlgInfo ( SIL.FieldWorks.FDO.FdoCache cache, SIL.FieldWorks.LexText.Controls.WindowParams wp, XCore.Mediator mediator, string form ) : void
cache SIL.FieldWorks.FDO.FdoCache FDO cache.
wp SIL.FieldWorks.LexText.Controls.WindowParams Strings used for various items in this dialog.
mediator XCore.Mediator
form string Form to use in main text edit box.
return void

SetDlgInfo() protected method

protected SetDlgInfo ( SIL.FieldWorks.FDO.FdoCache cache, SIL.FieldWorks.LexText.Controls.WindowParams wp, XCore.Mediator mediator, string form, int ws ) : void
cache SIL.FieldWorks.FDO.FdoCache
wp SIL.FieldWorks.LexText.Controls.WindowParams
mediator XCore.Mediator
form string
ws int
return void

SetHelpTopic() public method

Sets the help topic ID for the window. This is used in both the Help button and when the user hits F1
public SetHelpTopic ( string helpTopic ) : void
helpTopic string
return void

SetOkButtonText() public method

Set the text for the OK button.
public SetOkButtonText ( string text ) : void
text string
return void

SetupBottomMsg() protected method

Sets various proerties on the m_fwTextBoxBottomMsg control.
protected SetupBottomMsg ( ) : int
return int

ShowControlsBasedOnPanel1Position() protected method

protected ShowControlsBasedOnPanel1Position ( ) : void
return void

StartSearchAnimation() protected method

protected StartSearchAnimation ( ) : void
return void

m_btnHelp_Click() protected method

Display help for this dialog.
protected m_btnHelp_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

m_btnInsert_Click() protected method

protected m_btnInsert_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

m_cbWritingSystems_SelectedIndexChanged() protected method

protected m_cbWritingSystems_SelectedIndexChanged ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

m_tbForm_KeyDown() protected method

translate up and down arrow keys in the Find textbox into moving the selection in the matching entries list view.
protected m_tbForm_KeyDown ( object sender, KeyEventArgs e ) : void
sender object
e KeyEventArgs
return void

m_tbForm_TextChanged() protected method

protected m_tbForm_TextChanged ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void

Property Details

m_analHvos protected_oe property

protected HashSet m_analHvos
return HashSet

m_btnClose protected_oe property

protected Button,System.Windows.Forms m_btnClose
return System.Windows.Forms.Button

m_btnHelp protected_oe property

protected Button,System.Windows.Forms m_btnHelp
return System.Windows.Forms.Button

m_btnInsert protected_oe property

protected Button,System.Windows.Forms m_btnInsert
return System.Windows.Forms.Button

m_btnOK protected_oe property

protected Button,System.Windows.Forms m_btnOK
return System.Windows.Forms.Button

m_cache protected_oe property

protected FdoCache,SIL.FieldWorks.FDO m_cache
return SIL.FieldWorks.FDO.FdoCache

m_cbWritingSystems protected_oe property

protected FwOverrideComboBox,SIL.FieldWorks.Common.Controls m_cbWritingSystems
return SIL.FieldWorks.Common.Controls.FwOverrideComboBox

m_formLabel protected_oe property

protected Label m_formLabel
return Label

m_fwTextBoxBottomMsg protected_oe property

protected FwTextBox m_fwTextBoxBottomMsg
return FwTextBox

m_hasBeenActivated protected_oe property

protected bool m_hasBeenActivated
return bool

m_helpProvider protected_oe property

protected HelpProvider m_helpProvider
return HelpProvider

m_helpTopic protected_oe property

protected string m_helpTopic
return string

m_helpTopicProvider protected_oe property

protected IHelpTopicProvider m_helpTopicProvider
return IHelpTopicProvider

m_matchingObjectsBrowser protected_oe property

protected MatchingObjectsBrowser m_matchingObjectsBrowser
return MatchingObjectsBrowser

m_mediator protected_oe property

protected Mediator m_mediator
return Mediator

m_objectsLabel protected_oe property

protected Label m_objectsLabel
return Label

m_oldSearchKey protected_oe property

protected string m_oldSearchKey
return string

m_panel1 protected_oe property

protected Panel m_panel1
return Panel

m_searchAnimation protected_oe property

protected SearchingAnimation m_searchAnimation
return SearchingAnimation

m_selObject protected_oe property

protected ICmObject m_selObject
return ICmObject

m_skipCheck protected_oe property

Optional configuration parameters.
protected bool m_skipCheck
return bool

m_tbForm protected_oe property

protected FwTextBox m_tbForm
return FwTextBox

m_tsf protected_oe property

protected ITsStrFactory m_tsf
return ITsStrFactory

m_vernHvos protected_oe property

protected HashSet m_vernHvos
return HashSet

m_wsLabel protected_oe property

protected Label m_wsLabel
return Label