C# Class SIL.FieldWorks.FwCoreDlgControls.RegionVariantControl

Summary description for RegionVariantControl.
Inheritance: System.Windows.Forms.UserControl, IFWDisposable
ファイルを表示 Open project: sillsdev/FieldWorks Class Usage Examples

Private Properties

Property Type Description
CheckValid bool
DoSideEffectsOfChangingScriptTag void
EnableLangTagSideEffects void
GetValidAbbr string
HandleAudioVariant void
HandleKeyPress void
InitializeComponent void
IsValidAbbrChar bool
LoadControlsFromWritingSystem void
PopulateVariantCombo void
m_regionCode_KeyPress void
m_regionCode_TextChanged void
m_regionName_TextChanged void
m_scriptCode_KeyPress void
m_scriptCode_TextChanged void
m_scriptName_TextChanged void
m_variantCode_KeyPress void
m_variantCode_TextChanged void
m_variantName_TextChanged void

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.

RegionVariantControl ( ) : System

Constructor.

Protected Methods

Method Description
OnScriptRegionVariantChanged ( EventArgs e ) : void

Raises the T:ScriptRegionVariantChanged event.

Select ( bool directed, bool forward ) : void

Activates a child control.

Private Methods

Method Description
CheckValid ( ) : bool
DoSideEffectsOfChangingScriptTag ( ) : void
EnableLangTagSideEffects ( bool enable ) : void

Turn on or off certain side effects of changing the various components of the language tag. Turning on runs the code that normally does the side effects at once.

GetValidAbbr ( string name, int maxLen ) : string
HandleAudioVariant ( ) : void

Deal with special Audio handling

HandleKeyPress ( KeyPressEventArgs e ) : void
InitializeComponent ( ) : void

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

IsValidAbbrChar ( char ch ) : bool

Identify characters allowed in the abbreviation fields: upper case or numeric plus hyphen. Strictly ASCII characters are used to name locales. Review: do we need to allow backspace, del, arrow keys?

LoadControlsFromWritingSystem ( ) : void

Load the controls from the writing system, if it is not null. If it is null, clear all controls. If the combo boxes are not populated, do nothing...the method will get called again when the form loads.

PopulateVariantCombo ( bool fPreserve ) : void
m_regionCode_KeyPress ( object sender, KeyPressEventArgs e ) : void

Suppress entering invalid characters. Note that, for incomprehensible reasons, Backspace and returns come through this validator, while Delete and arrow keys don't, so we have to allow Backspace/return explicitly but can ignore the others.

m_regionCode_TextChanged ( object sender, EventArgs e ) : void
m_regionName_TextChanged ( object sender, EventArgs e ) : void

This is also called when the selection changes. If the user types the exact name of an existing item, we may get both notifications, and the order we get them is not certain (In fact, it appears that it is somewhat unpredictable(!) whether the index changed happens at all!). However, whatever the order, we make the behavior depend only on whether what's in the text matches one of the items. We do this continuously, not just when the user leaves the control, because the natural place to go when leaving is the abbreviation, but that might be disabled when the user starts editing this box.

m_scriptCode_KeyPress ( object sender, KeyPressEventArgs e ) : void

Suppress entering invalid characters. Note that, for incomprehensible reasons, Backspace and returns come through this validator, while Delete and arrow keys don't, so we have to allow Backspace/return explicitly but can ignore the others.

m_scriptCode_TextChanged ( object sender, EventArgs e ) : void
m_scriptName_TextChanged ( object sender, EventArgs e ) : void

This is also called when the selection changes. If the user types the exact name of an existing item, we may get both notifications, and the order we get them is not certain (In fact, it appears that it is somewhat unpredictable(!) whether the index changed happens at all!). However, whatever the order, we make the behavior depend only on whether what's in the text matches one of the items. We do this continuously, not just when the user leaves the control, because the natural place to go when leaving is the abbreviation, but that might be disabled when the user starts editing this box.

m_variantCode_KeyPress ( object sender, KeyPressEventArgs e ) : void

Suppress entering invalid characters.

m_variantCode_TextChanged ( object sender, EventArgs e ) : void
m_variantName_TextChanged ( object sender, EventArgs e ) : void

This is also called when the selection changes. If the user types the exact name of an existing item, we may get both notifications, and the order we get them is not certain. However, we expect that whatever the order, the last notification will have a correct SelectedIndex and so should produce the right effects. We do this continuously, not just when the user leaves the control, because the natural place to go when leaving is the abbreviation, but that might be disabled when the user starts editing this box.

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

OnScriptRegionVariantChanged() protected method

Raises the T:ScriptRegionVariantChanged event.
protected OnScriptRegionVariantChanged ( EventArgs e ) : void
e System.EventArgs The instance containing the event data.
return void

RegionVariantControl() public method

Constructor.
public RegionVariantControl ( ) : System
return System

Select() protected method

Activates a child control.
protected Select ( bool directed, bool forward ) : void
directed bool true to specify the direction of the control to select; otherwise, false.
forward bool true to move forward in the tab order; false to move backward in the tab order.
return void