C# Class SIL.FieldWorks.FwCoreDlgs.AddCnvtrDlg

The dialog for adding/configuring encoding converters
Inheritance: System.Windows.Forms.Form, IFWDisposable
Mostra file Open project: sillsdev/FieldWorks Class Usage Examples

Public Properties

Property Type Description
m_cnvtrPropertiesCtrl CnvtrPropertiesCtrl
m_msg string

Private Properties

Property Type Description
AbortInstallDueToOverwrite bool
AddCnvtrDlg_Load void
AddCnvtrTabCtrl_SelectedIndexChanged void
GetNewConverterName int
InitializeComponent void
JumpToHomeTab void
RefreshTabs void
SetFieldsForAdd void
SetFieldsForCopy void
SetStates void
UserDesiresDiscard bool
availableCnvtrsListBox_SelectedIndexChanged void
cnvtrPropertiesCtrl_ConverterFileChanged void
cnvtrPropertiesCtrl_ConverterListChanged void
cnvtrPropertiesCtrl_ConverterSaved void
launchAddTransduceProcessorDlg void

Public Methods

Method Description
AddCnvtrDlg ( IHelpTopicProvider helpTopicProvider, IApp app, EncConverters encConverters, Set wsInUse ) : System

Constructor.

AddCnvtrDlg ( IHelpTopicProvider helpTopicProvider, IApp app, EncConverters encConverters, Set wsInUse, bool onlyUnicodeCnvtrs ) : System

Constructor.

AddCnvtrDlg ( IHelpTopicProvider helpTopicProvider, IApp app, EncConverters encConverters, string selectConv, Set wsInUse, bool onlyUnicodeCnvtrs ) : System

This is the most comprehensive constructor.

AddCnvtrDlg ( IHelpTopicProvider helpTopicProvider, IApp app, Set wsInUse ) : System

Constructor.

AutoSave ( ) : bool

Autosave the converter. If enough changes have been made to justify spending the time to save (actually it's an install), then we'll save

CheckDisposed ( ) : void

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

InitWSInUse ( Set wsInUse ) : void

Informs this control of the writing systems which should not be deleted.

InstallConverter ( ) : bool

Try to install ("add" or "save") the converter.

RefreshListBox ( ) : void

Reloads contents of the Available Converters ListBox

RemoveConverter ( string converterToRemove ) : void

Remove the encoding converter.

SetUnchanged ( ) : void

Set that the fields have not been changed by the user since the last load/save.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

ShowMessage ( string sMessage, string sTitle, MessageBoxButtons buttons ) : DialogResult

Override this for testing without UI

btnAdd_Click ( object sender, EventArgs e ) : void

Handles the Click event of the btnAdd control.

btnClose_Click ( object sender, EventArgs e ) : void

Handles the Click event of the btnClose control.

btnCopy_Click ( object sender, EventArgs e ) : void

Handles the Click event of the btnCopy control.

btnDelete_Click ( object sender, EventArgs e ) : void

Handles the Click event of the btnDelete control.

btnHelp_Click ( object sender, System e ) : void

Open the appropriate Help file for selected tab.

Private Methods

Method Description
AbortInstallDueToOverwrite ( ) : bool

Check if an overwrite could occur and if the user wants to abort the overwrite.

AddCnvtrDlg_Load ( object sender, System e ) : void

Handles the Load event of the AddCnvtrDlg control.

AddCnvtrTabCtrl_SelectedIndexChanged ( object sender, EventArgs e ) : void

Handles the SelectedIndexChanged event of the AddCnvtrTabCtrl control.

GetNewConverterName ( string &strNewConvName ) : int

Gets a unique name for the new converter.

InitializeComponent ( ) : void

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

JumpToHomeTab ( ) : void

Selects the first tab of the tab control on this dialog.

RefreshTabs ( ) : void

Setup the dialog for the currently selected encoding converter.

SetFieldsForAdd ( ) : void

Sets the fields in the encoding converter for an Add.

SetFieldsForCopy ( ) : void

Sets the fields in the encoding converter for a Copy.

SetStates ( ) : void

Sets the enabled states for the buttons.

UserDesiresDiscard ( string sMessage, string sTitle ) : bool

Notify the user about a problem with the current encoding converter (unless the user has clicked Add or changed the name).

availableCnvtrsListBox_SelectedIndexChanged ( object sender, EventArgs e ) : void

Handles the SelectedIndexChanged event of the availableCnvtrsListBox control.

cnvtrPropertiesCtrl_ConverterFileChanged ( object sender, EventArgs e ) : void

Handles the ConverterFileChanged event of the cnvtrPropertiesCtrl control.

cnvtrPropertiesCtrl_ConverterListChanged ( object sender, EventArgs e ) : void

Handles the ConverterListChanged event of the cnvtrPropertiesCtrl control.

cnvtrPropertiesCtrl_ConverterSaved ( object sender, EventArgs e ) : void

Handles the ConverterSaved event of the cnvtrPropertiesCtrl control.

launchAddTransduceProcessorDlg ( ) : void

Launches the add transduce processor dialog.

Method Details

AddCnvtrDlg() public method

Constructor.
public AddCnvtrDlg ( IHelpTopicProvider helpTopicProvider, IApp app, EncConverters encConverters, Set wsInUse ) : System
helpTopicProvider IHelpTopicProvider help topic provider for the Help button
app IApp The app.
encConverters EncConverters The enc converters.
wsInUse Set The ws in use.
return System

AddCnvtrDlg() public method

Constructor.
public AddCnvtrDlg ( IHelpTopicProvider helpTopicProvider, IApp app, EncConverters encConverters, Set wsInUse, bool onlyUnicodeCnvtrs ) : System
helpTopicProvider IHelpTopicProvider help topic provider for the Help button
app IApp The app.
encConverters EncConverters The enc converters.
wsInUse Set The ws in use.
onlyUnicodeCnvtrs bool if set to true [only unicode CNVTRS].
return System

AddCnvtrDlg() public method

This is the most comprehensive constructor.
public AddCnvtrDlg ( IHelpTopicProvider helpTopicProvider, IApp app, EncConverters encConverters, string selectConv, Set wsInUse, bool onlyUnicodeCnvtrs ) : System
helpTopicProvider IHelpTopicProvider The help topic provider.
app IApp The app.
encConverters EncConverters The enc converters.
selectConv string Converter to be selected
wsInUse Set The ws in use.
onlyUnicodeCnvtrs bool If true, show and create only Unicode converters (both to and to/from).
return System

AddCnvtrDlg() public method

Constructor.
public AddCnvtrDlg ( IHelpTopicProvider helpTopicProvider, IApp app, Set wsInUse ) : System
helpTopicProvider IHelpTopicProvider help topic provider for the Help button
app IApp The app.
wsInUse Set The ws in use.
return System

AutoSave() public method

Autosave the converter. If enough changes have been made to justify spending the time to save (actually it's an install), then we'll save
public AutoSave ( ) : bool
return bool

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

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool
return void

InitWSInUse() public method

Informs this control of the writing systems which should not be deleted.
public InitWSInUse ( Set wsInUse ) : void
wsInUse Set The writing systems that are in use.
return void

InstallConverter() public method

Try to install ("add" or "save") the converter.
public InstallConverter ( ) : bool
return bool

RefreshListBox() public method

Reloads contents of the Available Converters ListBox
public RefreshListBox ( ) : void
return void

RemoveConverter() public method

Remove the encoding converter.
public RemoveConverter ( string converterToRemove ) : void
converterToRemove string
return void

SetUnchanged() public method

Set that the fields have not been changed by the user since the last load/save.
public SetUnchanged ( ) : void
return void

ShowMessage() protected method

Override this for testing without UI
protected ShowMessage ( string sMessage, string sTitle, MessageBoxButtons buttons ) : DialogResult
sMessage string
sTitle string
buttons MessageBoxButtons
return DialogResult

btnAdd_Click() protected method

Handles the Click event of the btnAdd control.
protected btnAdd_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

btnClose_Click() protected method

Handles the Click event of the btnClose control.
protected btnClose_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

btnCopy_Click() protected method

Handles the Click event of the btnCopy control.
protected btnCopy_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

btnDelete_Click() protected method

Handles the Click event of the btnDelete control.
protected btnDelete_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

btnHelp_Click() protected method

Open the appropriate Help file for selected tab.
protected btnHelp_Click ( object sender, System e ) : void
sender object
e System
return void

Property Details

m_cnvtrPropertiesCtrl public_oe property

properties tab
public CnvtrPropertiesCtrl,SIL.FieldWorks.FwCoreDlgs m_cnvtrPropertiesCtrl
return CnvtrPropertiesCtrl

m_msg public_oe property

For testing
public string m_msg
return string