C# Class System.Globalization.FormLanguageSwitchSingleton

Afficher le fichier Open project: sillsdev/FieldWorks

Protected Properties

Свойство Type Description
m_instance FormLanguageSwitchSingleton

Méthodes publiques

Méthode Description
ChangeCurrentThreadUICulture ( System cultureInfo ) : void

Changes the current culture used by the Resource Manager to look up culture-specific resources at run time.

ChangeLanguage ( System form ) : void

Changes the language of the Form object provided to the currently selected language.

ChangeLanguage ( System form, System cultureInfo ) : void

Changes the language of the Form object provided and all its MDI children (in the case of MDI UI) to the currently selected language.

Méthodes protégées

Méthode Description
FormLanguageSwitchSingleton ( ) : System

Hidden constructor called during static member m_instance initialization.

ReloadControlCommonProperties ( System control, System resources ) : void

Reloads properties common to all controls (except the Text property).

ReloadControlSpecificProperties ( System control, System resources ) : void

Reloads properties specific to some controls.

ReloadListItems ( System control, System resources ) : void

Reloads items in following controls: ComboBox, ListBox, DomainUpDown. Method is made virtual so it can be overriden in derived class to redefine types.

ReloadTextForSelectedControls ( System control, System resources ) : void

Changes Text properties associated with following controls: AxHost, ButtonBase, GroupBox, Label, ScrollableControl, StatusBar, TabControl, ToolBar. Method is made virtual so it can be overriden in derived class to redefine types.

ScanNonControls ( System containerControl, System resources ) : void

Scans controls that are not contained by Controls collection, like MenuItems, StatusBarPanels and ColumnHeaders.

Private Methods

Méthode Description
ChangeFormLanguage ( System form ) : void

Changes the language of the form.

GetSafeValue ( System resources, string name, object currentValue ) : object

Gets resource value. If resource for new culture does not exists, leaves the current.

GetToolTip ( System control ) : ToolTip

Gets the ToolTip member of the control (Form or UserControl).

RecurControls ( System parent, System resources, System toolTip ) : void

Recurs Controls members of the control to change corresponding texts.

RecurUserControl ( System userControl ) : void

Recurs UserControl to change.

ReloadComboBoxItems ( System comboBox, System resources ) : void

Reloads items in the ComboBox. If items are not sorted, selection is kept.

ReloadFormProperties ( System form, System resources ) : void

Reloads resources specific to the Form type.

ReloadItems ( string controlName, IList list, int itemsNumber, System resources ) : void

Clears all items in the IList and reloads the list with items according to language settings.

ReloadListBoxItems ( System listBox, System resources ) : void

Reloads items in the ListBox. If items are not sorted, selections are kept.

ReloadScrollableControlProperties ( System control, System resources ) : void

Reloads resources specific to the ScrollableControl type.

ReloadTreeViewNodes ( System treeView, System resources ) : void

Reloads content of a TreeView.

ReloadUpDownItems ( System domainUpDown, System resources ) : void

Reloads items in the DomainUpDown control. If items are not sorted, selection is kept.

SetProperty ( System control, string propertyName, System resources ) : void

Reloads resources for a property.

Method Details

ChangeCurrentThreadUICulture() public méthode

Changes the current culture used by the Resource Manager to look up culture-specific resources at run time.
public ChangeCurrentThreadUICulture ( System cultureInfo ) : void
cultureInfo System
Résultat void

ChangeLanguage() public méthode

Changes the language of the Form object provided to the currently selected language.
public ChangeLanguage ( System form ) : void
form System /// Form object to apply changes to. ///
Résultat void

ChangeLanguage() public méthode

Changes the language of the Form object provided and all its MDI children (in the case of MDI UI) to the currently selected language.
public ChangeLanguage ( System form, System cultureInfo ) : void
form System /// Form object to apply changes to. ///
cultureInfo System /// CultureInfo to which language has to be changed. ///
Résultat void

FormLanguageSwitchSingleton() protected méthode

Hidden constructor called during static member m_instance initialization.
protected FormLanguageSwitchSingleton ( ) : System
Résultat System

ReloadControlCommonProperties() protected méthode

Reloads properties common to all controls (except the Text property).
protected ReloadControlCommonProperties ( System control, System resources ) : void
control System /// Control object for which resources should be reloaded. ///
resources System /// ResourceManager object. ///
Résultat void

ReloadControlSpecificProperties() protected méthode

Reloads properties specific to some controls.
protected ReloadControlSpecificProperties ( System control, System resources ) : void
control System /// Control object for which resources should be reloaded. ///
resources System /// ResourceManager object. ///
Résultat void

ReloadListItems() protected méthode

Reloads items in following controls: ComboBox, ListBox, DomainUpDown. Method is made virtual so it can be overriden in derived class to redefine types.
protected ReloadListItems ( System control, System resources ) : void
control System
resources System /// ResourceManager object. ///
Résultat void

ReloadTextForSelectedControls() protected méthode

Changes Text properties associated with following controls: AxHost, ButtonBase, GroupBox, Label, ScrollableControl, StatusBar, TabControl, ToolBar. Method is made virtual so it can be overriden in derived class to redefine types.
protected ReloadTextForSelectedControls ( System control, System resources ) : void
control System
resources System /// ResourceManager object. ///
Résultat void

ScanNonControls() protected méthode

Scans controls that are not contained by Controls collection, like MenuItems, StatusBarPanels and ColumnHeaders.
protected ScanNonControls ( System containerControl, System resources ) : void
containerControl System
resources System /// ResourceManager used to get localized resources. ///
Résultat void

Property Details

m_instance protected_oe static_oe property

Static read-only instance.
protected static FormLanguageSwitchSingleton,System.Globalization m_instance
Résultat FormLanguageSwitchSingleton