C# Класс SIL.FieldWorks.FwCoreDlgs.WritingSystemPropertiesDialog

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

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

Свойство Тип Описание
btnAdd System.Windows.Forms.Button
btnCancel System.Windows.Forms.Button
btnCopy System.Windows.Forms.Button
btnModifyEthnologueInfo System.Windows.Forms.Button
btnOk System.Windows.Forms.Button
cbEncodingConverter SIL.FieldWorks.Common.Controls.FwOverrideComboBox
m_LanguageCode System.Windows.Forms.Label
m_ShortWsName System.Windows.Forms.TextBox
m_defaultFontsControl SIL.FieldWorks.FwCoreDlgControls.DefaultFontsControl
m_deleteButton System.Windows.Forms.Button
m_listBoxRelatedWSs System.Windows.Forms.ListBox
m_regionVariantControl SIL.FieldWorks.FwCoreDlgControls.RegionVariantControl
m_sortLanguageComboBox System.Windows.Forms.ComboBox
m_sortRulesTextBox SIL.FieldWorks.Common.Widgets.FwTextBox
m_sortUsingComboBox System.Windows.Forms.ComboBox
m_tbLanguageName System.Windows.Forms.TextBox
m_wsManager IWritingSystemManager
rbRightToLeft System.Windows.Forms.RadioButton
tabControl System.Windows.Forms.TabControl

Private Properties

Свойство Тип Описание
AddWritingSystem void
CheckEncodingConverter bool
CheckIfSortingIsOK bool
CheckWsIdChange bool
GetDictionaryName string
InitializeComponent void
IsNew bool
IsWritingSystemHidden bool
LoadShortWsNameFromCurrentWritingSystem void
LoadSortLanguageComboBox void
LoadSortUsingComboBox void
OnOk void
PopulateRelatedWSsListBox void
PopulateSpellingDictionaryComboBox void
SelectWritingSystem void
Select_cbEncodingConverter void
SetFullNameLabels void
SetLabelParams void
SetLanguageCodeLabels void
SetLanguageNameLabels void
Set_regionVariantControl void
Set_tbLanguageName void
SetupDialog void
SetupDialogFromCurrentWritingSystem void
SetupEthnologueCode void
SetupSortTab void
UpdateDialogWithChangesToLanguageName void
UpdateLanguageNameAndWSsFromTextBox void
UpdateListBoxButtons void
WritingSystemPropertiesDialog System
btnAdd_Click void
btnEncodingConverter_Click void
btnHelp_Click void
btnPunctuation_Click void
btnValidChars_Click void
cbDictionaries_SelectedIndexChanged void
cbEncodingConverter_SelectedIndexChanged void
linkToEthnologue_LinkClicked void
m_ShortWsName_TextChanged void
m_ampersandButton_Click void
m_angleBracketButton_Click void
m_listBoxRelatedWSs_DrawItem void
m_listBoxRelatedWSs_SelectedIndexChanged void
m_regionVariantControl_ScriptRegionVariantChanged void
m_similarWsButton_LocaleSelected void
m_sortLanguageComboBox_SelectedIndexChanged void
m_sortRulesTextBox_TextChanged void
m_sortUsingComboBox_SelectedIndexChanged void
m_tbLanguageName_TextChanged void
rbLeftToRight_CheckedChanged void

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

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

Adds a new writing system based on the selected language.

CheckDisposed ( ) : void

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

SetupDialog ( IWritingSystem selectedWs, bool displayRelatedWss ) : void

Set writing system and initialize some values for the dialog

SetupDialog ( LanguageSubtag languageSubtag, bool displayRelatedWss ) : void

Setups the dialog.

ShowModifyDialog ( Form owner, IWritingSystem selectedWs, bool addNewForLangOfSelectedWs, SIL.FieldWorks.FDO.FdoCache cache, IWritingSystemContainer wsContainer, IHelpTopicProvider helpTopicProvider, IApp app, IVwStylesheet stylesheet, IEnumerable &newWritingSystems ) : bool

Shows the modify writing system properties dialog.

ShowNewDialog ( Form owner, SIL.FieldWorks.FDO.FdoCache cache, IWritingSystemManager wsManager, IWritingSystemContainer wsContainer, IHelpTopicProvider helpTopicProvider, IApp app, IVwStylesheet stylesheet, bool displayRelatedWss, string defaultName, IEnumerable &newWritingSystems ) : bool

Shows the new writing system properties dialog.

SwitchTab ( int index ) : void

handles cases for tabControl.SelectedIndex = index, and allows tests to override so that it can trigger events tabControl_Deselecting() and tabControl_SelectedIndexChanged() since for some reason those events aren't getting triggered in the tests.

WritingSystemPropertiesDialog ( SIL.FieldWorks.FDO.FdoCache cache, IWritingSystemManager wsManager, IWritingSystemContainer wsContainer, IHelpTopicProvider helpTopicProvider, IApp app, IVwStylesheet stylesheet ) : System

Initializes a new instance of the T:WritingSystemPropertiesDialog class.

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

Метод Описание
CallShowDialog ( SIL.FieldWorks.FwCoreDlgs.LanguageSelectionDlg dlg ) : DialogResult

Calls the ShowDialog of the LanguageSelectionDlg. Used for tests.

CheckOkToChangeContext ( ) : bool

some user actions (e.g. Add ("Define New...") involve switching tabs to a context (e.g. General tab)that will allow the user the opportunity to make it Ok to change context. In that case, m_fSkipCheckOkToChangeContext should be set to true, so that switching tabs does not prematurely detect we're in an invalid state.

Dispose ( bool disposing ) : void
LoadAvailableConverters ( ) : void

Load the Available Encoding Converters.

SaveChanges ( ) : void

Saves the changes to the writing system manager.

ShowMsgBoxCantCreateDuplicateWs ( IWritingSystem tempWs, IWritingSystem origWs ) : void

Shows the "cannnot create duplicate writing system" message.

ShowMsgCantChangeUserWs ( IWritingSystem tempWs, IWritingSystem origWs ) : void

Shows the "cannot change user writing system" message.

btnAddWsItemClicked ( object sender, EventArgs e ) : void

Handles the Click event of the add writing system menu item.

btnCopy_Click ( object sender, EventArgs e ) : void

Handles the Click event of the btnCopy control.

btnModifyEthnologueInfo_Click ( object sender, EventArgs e ) : void

Handles the Click event of the btnModifyEthnologueInfo control.

btnNewWsItemClicked ( object sender, EventArgs e ) : void

Handles the Click event of the new writing system menu item.

m_deleteButton_Click ( object sender, EventArgs e ) : void

Handles the Click event of the btnRemove control.

tabControl_Deselecting ( object sender, System.Windows.Forms.TabControlCancelEventArgs e ) : void

Handles the Deselecting event of the tabControl control.

tabControl_SelectedIndexChanged ( object sender, EventArgs e ) : void

Handles the SelectedIndexChanged event of the tabControl control.

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

Метод Описание
AddWritingSystem ( IWritingSystem tempWs, IWritingSystem origWs, bool fSwitchToGeneralTab ) : void
CheckEncodingConverter ( ) : bool
CheckIfSortingIsOK ( ) : bool
CheckWsIdChange ( ) : bool

Checks to see if the user writing system identifier is being changed, or if a writing system is using an identifier that already exists.

GetDictionaryName ( String languageId ) : string
InitializeComponent ( ) : void
IsNew ( IWritingSystem ws ) : bool
IsWritingSystemHidden ( IWritingSystem ws ) : bool
LoadShortWsNameFromCurrentWritingSystem ( ) : void
LoadSortLanguageComboBox ( ) : void
LoadSortUsingComboBox ( ) : void
OnOk ( object sender, EventArgs e ) : void

User clicked the OK button - persist the changes

PopulateRelatedWSsListBox ( IWritingSystem selectedWs ) : void

Display WS's that are related to the 'ws' parameter of SetupDialog()

PopulateSpellingDictionaryComboBox ( ) : void

Load the Spelling Dictionaries ComboBox

SelectWritingSystem ( IWritingSystem ws ) : void

ListBox.SelectedItem actually selects the item by finding the index of the item in the Items collection and then setting the SelectedIndex. It searches through the Items collection using the the Equals() method. Writing systems implement the Equals() method to perform a value equality check instead of a reference equality check. Because of this, it is possible for the wrong item to be selected if there are multiple writing systems in the ListBox that have the same property values. This method avoids that problem by searching through the Items collection using reference equality and then setting the selected index.

Select_cbEncodingConverter ( ) : void

Select the encoding converty for the currently selected writing system.

SetFullNameLabels ( string fullName ) : void
SetLabelParams ( Label lbl ) : void
SetLanguageCodeLabels ( String str ) : void
SetLanguageNameLabels ( ) : void
Set_regionVariantControl ( IWritingSystem ws ) : void
Set_tbLanguageName ( string languageName ) : void

When changing the text of m_tbLanguageName we need to set a flag so that the TextChanged event handler will return without performing any changes.

SetupDialog ( IWritingSystem tempWs, IWritingSystem origWs, bool displayRelatedWss ) : void
SetupDialogFromCurrentWritingSystem ( ) : void
SetupEthnologueCode ( IWritingSystem ws ) : void
SetupSortTab ( IWritingSystem ws ) : void
UpdateDialogWithChangesToLanguageName ( ) : void
UpdateLanguageNameAndWSsFromTextBox ( ) : void
UpdateListBoxButtons ( ) : void
WritingSystemPropertiesDialog ( ) : System

Initializes a new instance of the T:WritingSystemPropertiesDialog class.

btnAdd_Click ( object sender, EventArgs e ) : void
btnEncodingConverter_Click ( object sender, EventArgs e ) : void
btnHelp_Click ( object sender, EventArgs e ) : void

Open the appropriate Help file for selected tab (Name or Attributes).

btnPunctuation_Click ( object sender, EventArgs e ) : void
btnValidChars_Click ( object sender, EventArgs e ) : void
cbDictionaries_SelectedIndexChanged ( object sender, EventArgs e ) : void
cbEncodingConverter_SelectedIndexChanged ( object sender, EventArgs e ) : void
linkToEthnologue_LinkClicked ( object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e ) : void
m_ShortWsName_TextChanged ( object sender, EventArgs e ) : void
m_ampersandButton_Click ( object sender, EventArgs e ) : void
m_angleBracketButton_Click ( object sender, EventArgs e ) : void
m_listBoxRelatedWSs_DrawItem ( object sender, DrawItemEventArgs e ) : void
m_listBoxRelatedWSs_SelectedIndexChanged ( object sender, EventArgs e ) : void
m_regionVariantControl_ScriptRegionVariantChanged ( object sender, EventArgs e ) : void
m_similarWsButton_LocaleSelected ( object sender, EventArgs e ) : void
m_sortLanguageComboBox_SelectedIndexChanged ( object sender, EventArgs e ) : void
m_sortRulesTextBox_TextChanged ( object sender, EventArgs e ) : void
m_sortUsingComboBox_SelectedIndexChanged ( object sender, EventArgs e ) : void
m_tbLanguageName_TextChanged ( object sender, EventArgs e ) : void
rbLeftToRight_CheckedChanged ( object sender, EventArgs e ) : void

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

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

Adds a new writing system based on the selected language.
public AddNewWsForLanguage ( ) : void
Результат void

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

Calls the ShowDialog of the LanguageSelectionDlg. Used for tests.
protected CallShowDialog ( SIL.FieldWorks.FwCoreDlgs.LanguageSelectionDlg dlg ) : DialogResult
dlg SIL.FieldWorks.FwCoreDlgs.LanguageSelectionDlg The language selection dialog.
Результат DialogResult

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

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

some user actions (e.g. Add ("Define New...") involve switching tabs to a context (e.g. General tab)that will allow the user the opportunity to make it Ok to change context. In that case, m_fSkipCheckOkToChangeContext should be set to true, so that switching tabs does not prematurely detect we're in an invalid state.
protected CheckOkToChangeContext ( ) : bool
Результат bool

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

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

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

Load the Available Encoding Converters.
protected LoadAvailableConverters ( ) : void
Результат void

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

Saves the changes to the writing system manager.
protected SaveChanges ( ) : void
Результат void

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

Set writing system and initialize some values for the dialog
public SetupDialog ( IWritingSystem selectedWs, bool displayRelatedWss ) : void
selectedWs IWritingSystem The writing system.
displayRelatedWss bool if set to true related writing systems will be displayed.
Результат void

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

Setups the dialog.
public SetupDialog ( LanguageSubtag languageSubtag, bool displayRelatedWss ) : void
languageSubtag LanguageSubtag The language subtag.
displayRelatedWss bool if set to true related writing systems will be displayed.
Результат void

ShowModifyDialog() публичный статический Метод

Shows the modify writing system properties dialog.
public static ShowModifyDialog ( Form owner, IWritingSystem selectedWs, bool addNewForLangOfSelectedWs, SIL.FieldWorks.FDO.FdoCache cache, IWritingSystemContainer wsContainer, IHelpTopicProvider helpTopicProvider, IApp app, IVwStylesheet stylesheet, IEnumerable &newWritingSystems ) : bool
owner System.Windows.Forms.Form The owner.
selectedWs IWritingSystem The selected writing system.
addNewForLangOfSelectedWs bool if set to true a new writing system with the /// same language as the selected writing system will be added.
cache SIL.FieldWorks.FDO.FdoCache The cache.
wsContainer IWritingSystemContainer The ws container.
helpTopicProvider IHelpTopicProvider The help topic provider.
app IApp The app.
stylesheet IVwStylesheet The stylesheet.
newWritingSystems IEnumerable The new writing systems.
Результат bool

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

Shows the "cannnot create duplicate writing system" message.
protected ShowMsgBoxCantCreateDuplicateWs ( IWritingSystem tempWs, IWritingSystem origWs ) : void
tempWs IWritingSystem The temp writing system.
origWs IWritingSystem The original writing system.
Результат void

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

Shows the "cannot change user writing system" message.
protected ShowMsgCantChangeUserWs ( IWritingSystem tempWs, IWritingSystem origWs ) : void
tempWs IWritingSystem The temp writing system.
origWs IWritingSystem The original writing system.
Результат void

ShowNewDialog() публичный статический Метод

Shows the new writing system properties dialog.
public static ShowNewDialog ( Form owner, SIL.FieldWorks.FDO.FdoCache cache, IWritingSystemManager wsManager, IWritingSystemContainer wsContainer, IHelpTopicProvider helpTopicProvider, IApp app, IVwStylesheet stylesheet, bool displayRelatedWss, string defaultName, IEnumerable &newWritingSystems ) : bool
owner System.Windows.Forms.Form The owner.
cache SIL.FieldWorks.FDO.FdoCache The cache.
wsManager IWritingSystemManager The ws manager.
wsContainer IWritingSystemContainer The ws container.
helpTopicProvider IHelpTopicProvider The help topic provider.
app IApp The app.
stylesheet IVwStylesheet The stylesheet.
displayRelatedWss bool if set to true related writing systems will be displayed.
defaultName string The default language name for the new writing system.
newWritingSystems IEnumerable The new writing systems.
Результат bool

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

handles cases for tabControl.SelectedIndex = index, and allows tests to override so that it can trigger events tabControl_Deselecting() and tabControl_SelectedIndexChanged() since for some reason those events aren't getting triggered in the tests.
public SwitchTab ( int index ) : void
index int The index.
Результат void

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

Initializes a new instance of the T:WritingSystemPropertiesDialog class.
public WritingSystemPropertiesDialog ( SIL.FieldWorks.FDO.FdoCache cache, IWritingSystemManager wsManager, IWritingSystemContainer wsContainer, IHelpTopicProvider helpTopicProvider, IApp app, IVwStylesheet stylesheet ) : System
cache SIL.FieldWorks.FDO.FdoCache The cache.
wsManager IWritingSystemManager The ws manager.
wsContainer IWritingSystemContainer The ws container.
helpTopicProvider IHelpTopicProvider The help topic provider.
app IApp The app.
stylesheet IVwStylesheet The stylesheet.
Результат System

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

Handles the Click event of the add writing system menu item.
protected btnAddWsItemClicked ( object sender, EventArgs e ) : void
sender object The sender.
e System.EventArgs The instance containing the event data.
Результат void

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

Handles the Click event of the btnCopy control.
protected btnCopy_Click ( object sender, EventArgs e ) : void
sender object The source of the event.
e System.EventArgs The instance containing the event data.
Результат void

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

Handles the Click event of the btnModifyEthnologueInfo control.
protected btnModifyEthnologueInfo_Click ( object sender, EventArgs e ) : void
sender object The source of the event.
e System.EventArgs The instance containing the event data.
Результат void

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

Handles the Click event of the new writing system menu item.
protected btnNewWsItemClicked ( object sender, EventArgs e ) : void
sender object The sender.
e System.EventArgs The instance containing the event data.
Результат void

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

Handles the Click event of the btnRemove control.
protected m_deleteButton_Click ( object sender, EventArgs e ) : void
sender object The source of the event.
e System.EventArgs The instance containing the event data.
Результат void

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

Handles the Deselecting event of the tabControl control.
protected tabControl_Deselecting ( object sender, System.Windows.Forms.TabControlCancelEventArgs e ) : void
sender object The source of the event.
e System.Windows.Forms.TabControlCancelEventArgs The instance containing the event data.
Результат void

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

Handles the SelectedIndexChanged event of the tabControl control.
protected tabControl_SelectedIndexChanged ( object sender, EventArgs e ) : void
sender object The source of the event.
e System.EventArgs The instance containing the event data.
Результат void

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Abbreviation: #
protected TextBox,System.Windows.Forms m_ShortWsName
Результат System.Windows.Forms.TextBox

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

protected DefaultFontsControl,SIL.FieldWorks.FwCoreDlgControls m_defaultFontsControl
Результат SIL.FieldWorks.FwCoreDlgControls.DefaultFontsControl

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

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

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

protected ListBox,System.Windows.Forms m_listBoxRelatedWSs
Результат System.Windows.Forms.ListBox

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

protected RegionVariantControl,SIL.FieldWorks.FwCoreDlgControls m_regionVariantControl
Результат SIL.FieldWorks.FwCoreDlgControls.RegionVariantControl

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

protected for tests
protected ComboBox,System.Windows.Forms m_sortLanguageComboBox
Результат System.Windows.Forms.ComboBox

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

protected for tests
protected FwTextBox,SIL.FieldWorks.Common.Widgets m_sortRulesTextBox
Результат SIL.FieldWorks.Common.Widgets.FwTextBox

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

protected for tests
protected ComboBox,System.Windows.Forms m_sortUsingComboBox
Результат System.Windows.Forms.ComboBox

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

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

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

protected IWritingSystemManager m_wsManager
Результат IWritingSystemManager

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

Direction : () (#)
protected RadioButton,System.Windows.Forms rbRightToLeft
Результат System.Windows.Forms.RadioButton

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

protected TabControl,System.Windows.Forms tabControl
Результат System.Windows.Forms.TabControl