Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Class: RT.Lingo.LanguageHelperWinForms<TTranslation>

Summary

Helps an application using Lingo to display language selection UI using WinForms controls.

Generic type parameters

TTranslation
  • Must derive from: RT.Lingo.TranslationBase.
  • Must have a default constructor.
The type of the class holding the program’s translation.

Constructors

LanguageHelperWinForms<TTranslation>(string programTitle, string moduleName, bool editable, TranslationForm<TTranslation>.Settings settings, Icon icon, Func<Language> getCurrentLanguage)
Constructor.

Instance methods

voidCloses the translation dialog (if it is visible) without any prompts regarding unsaved changes.
void
MakeLanguageComboBox(ComboBox comboBox)
Initialises the combo box to list all available languages and change the application translation when one gets selected. (see also remarks)
void
MakeLanguageMenu(ToolStripMenuItem menuItem)
Initialises the menu item to provide language selection UI and any translation editing UI. (see also remarks)
boolReturns a value indicating whether it is okay to close the application. The user is asked if there are any unsaved changes.
voidChanges the currently selected language in exactly the same way as using one of the UI elements would.
void
ShowContextMenu(Control positionControl, Point position)
Displays a context menu listing all available languages, and optionally controls to edit the translations.

Events

SetTranslation<TTranslation> Occurs whenever the translation has been changed. The application must respond by updating *all* visible UI and storing the language of the selected translation for use on next program start.