C# Класс SIL.FieldWorks.Common.Controls.LanguageSetup

Summary description for LanguageSetup.
Наследование: System.Windows.Forms.UserControl, IFWDisposable
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
btnFind System.Windows.Forms.Button
cboLookup SIL.FieldWorks.Common.Controls.FwOverrideComboBox
lblOtherNamesList System.Windows.Forms.Label
lvFindResult System.Windows.Forms.ListView
m_lastSearchText string
m_messageFilter TrapEnterFilter
m_testing bool
txtFindPattern System.Windows.Forms.TextBox

Открытые методы

Метод Описание
CheckDisposed ( ) : void

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

LanguageSetup ( ) : System

Initializes a new instance of the LanguageSetup class.

PerformInitialSearch ( string target ) : void

This is called just before ShowDialog. It sets up the target string as a language name and performs an initial search for this language as the dialog comes up.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Clean up any resources being used.

DoInitialSearch ( ) : void

Do the initial search requested if m_initialTarget has been set.

LoadList ( string searchText ) : void

LoadList ( string searchText, bool fShowErrorMessage ) : void

Fill the controls based on the current search, and (if requested) display an error message if not found.

LoadOtherNames ( ) : void

OnHandleDestroyed ( EventArgs e ) : void

OnLoad ( EventArgs e ) : void

Do the initial search when we bring up the control

SelectClosestMatch ( ) : void

Select the first exact match in the language column, or if none found, select the first item.

SettingsForNoLanguage ( ) : void

Fix the settings for either a search failure or clicking on the "None of the above" item.

btnFind_Click ( object sender, System e ) : void

When we get here, it means there was a long enough pause while typing in the search for text box that a search should be kicked off.

lvFindResult_SelectedIndexChanged ( object sender, EventArgs e ) : void

Приватные методы

Метод Описание
CompareCountryFirst ( Ethnologue x, Ethnologue y ) : int

Implements sorting by country name, then by language name.

CompareEthnoCodeFirst ( Ethnologue x, Ethnologue y ) : int

Implements sorting by ethnologue code, then by language name, then by country name.

GetSearchResultSet ( string searchText ) : List

Get the requested data from the Ethnologue.

InitializeComponent ( ) : void

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

StartFind ( ) : void

cboLookup_Enter ( object sender, System e ) : void

We want to have the focus initially in txtFindPattern. We do it here and then remove the event handler. We can't change the Tab order because then Shift-Tab goes to the Help button instead of "Search for" field (TE-753)

cboLookup_SelectedIndexChanged ( object sender, System e ) : void

lblOtherNamesList_Paint ( object sender, System e ) : void

lvFindResult_ColumnClick ( object sender, System.Windows.Forms.ColumnClickEventArgs e ) : void

lvFindResult_Enter ( object sender, System e ) : void

When we enter the list view we have to set the focused item to match the selected item.

txtCurrentLangName_TextChanged ( object sender, System e ) : void

txtFindPattern_Enter ( object sender, System e ) : void

txtFindPattern_KeyPress ( object sender, System e ) : void

txtFindPattern_Leave ( object sender, System e ) : void

txtFindPattern_TextChanged ( object sender, System e ) : void

Restarts the timer everytime the text box text changes.

Описание методов

CheckDisposed() публичный Метод

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.
public CheckDisposed ( ) : void
Результат void

Dispose() защищенный Метод

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged /// resources; false to release only unmanaged resources. ///
Результат void

DoInitialSearch() защищенный Метод

Do the initial search requested if m_initialTarget has been set.
protected DoInitialSearch ( ) : void
Результат void

LanguageSetup() публичный Метод

Initializes a new instance of the LanguageSetup class.
public LanguageSetup ( ) : System
Результат System

LoadList() защищенный Метод

protected LoadList ( string searchText ) : void
searchText string
Результат void

LoadList() защищенный Метод

Fill the controls based on the current search, and (if requested) display an error message if not found.
protected LoadList ( string searchText, bool fShowErrorMessage ) : void
searchText string
fShowErrorMessage bool
Результат void

LoadOtherNames() защищенный Метод

protected LoadOtherNames ( ) : void
Результат void

OnHandleDestroyed() защищенный Метод

protected OnHandleDestroyed ( EventArgs e ) : void
e System.EventArgs
Результат void

OnLoad() защищенный Метод

Do the initial search when we bring up the control
protected OnLoad ( EventArgs e ) : void
e System.EventArgs
Результат void

PerformInitialSearch() публичный Метод

This is called just before ShowDialog. It sets up the target string as a language name and performs an initial search for this language as the dialog comes up.
public PerformInitialSearch ( string target ) : void
target string The target.
Результат void

SelectClosestMatch() защищенный Метод

Select the first exact match in the language column, or if none found, select the first item.
protected SelectClosestMatch ( ) : void
Результат void

SettingsForNoLanguage() защищенный Метод

Fix the settings for either a search failure or clicking on the "None of the above" item.
protected SettingsForNoLanguage ( ) : void
Результат void

btnFind_Click() защищенный Метод

When we get here, it means there was a long enough pause while typing in the search for text box that a search should be kicked off.
protected btnFind_Click ( object sender, System e ) : void
sender object
e System
Результат void

lvFindResult_SelectedIndexChanged() защищенный Метод

protected lvFindResult_SelectedIndexChanged ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void

Описание свойств

btnFind защищенное свойство

protected Button,System.Windows.Forms btnFind
Результат System.Windows.Forms.Button

cboLookup защищенное свойство

protected FwOverrideComboBox,SIL.FieldWorks.Common.Controls cboLookup
Результат SIL.FieldWorks.Common.Controls.FwOverrideComboBox

lblOtherNamesList защищенное свойство

protected Label,System.Windows.Forms lblOtherNamesList
Результат System.Windows.Forms.Label

lvFindResult защищенное свойство

protected ListView,System.Windows.Forms lvFindResult
Результат System.Windows.Forms.ListView

m_lastSearchText защищенное свойство

protected string m_lastSearchText
Результат string

m_messageFilter защищенное свойство

protected TrapEnterFilter m_messageFilter
Результат TrapEnterFilter

m_testing защищенное свойство

Overriding testing instances of this class should set this so the DB connection doesn't get created.
protected bool m_testing
Результат bool

txtFindPattern защищенное свойство

protected TextBox,System.Windows.Forms txtFindPattern
Результат System.Windows.Forms.TextBox