C# Класс SIL.FieldWorks.TE.ImportWizard

The ImportWizard class guides the user through the process of establishing import settings for TE and/or for defining the project settings for shadowing or converting a Standard Format project for access by ScriptureObjects.
Наследование: System.Windows.Forms.Form, IFWDisposable
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
cboPTBackTrans SIL.FieldWorks.Common.Controls.FwOverrideComboBox
cboPTLangProj SIL.FieldWorks.Common.Controls.FwOverrideComboBox
cboPTTransNotes SIL.FieldWorks.Common.Controls.FwOverrideComboBox
lvScrMappings SIL.FieldWorks.Common.Controls.FwListView
m_MappingDialog SIL.FieldWorks.TE.ModifyMapping
m_PTLangProjects List
m_ScriptureText ISCScriptureText
m_StyleSheet FwStyleSheet
m_btnAddNoteMapping System.Windows.Forms.Button
m_btnAddScrMapping System.Windows.Forms.Button
m_btnBack System.Windows.Forms.Button
m_btnCurrentAddButton System.Windows.Forms.Button
m_btnCurrentDeleteButton System.Windows.Forms.Button
m_btnCurrentModifyButton System.Windows.Forms.Button
m_btnDeleteNoteMapping System.Windows.Forms.Button
m_btnDeleteScrMapping System.Windows.Forms.Button
m_btnModifyNoteMapping System.Windows.Forms.Button
m_btnModifyScrMapping System.Windows.Forms.Button
m_btnNext System.Windows.Forms.Button
m_cache SIL.FieldWorks.FDO.FdoCache
m_fShowAllMappings bool
m_inlineMappingDialog SIL.FieldWorks.TE.CharacterMappingSettings
m_lvCurrentMappingList SIL.FieldWorks.Common.Controls.FwListView
m_projectType ProjectTypes
m_scr IScripture
m_settings IScrImportSet
rbOther System.Windows.Forms.RadioButton
rbParatext5 System.Windows.Forms.RadioButton
rbParatext6 System.Windows.Forms.RadioButton
sfFileListBuilder SIL.FieldWorks.Common.Controls.SFFileListBuilder

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

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

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

DisplayMappingDialog ( Form dlg ) : void

Shows the dlg modally. This is a public virtual so that test code can override it.

ImportWizard ( string langProjName, IScripture scr, FwStyleSheet styleSheet, IHelpTopicProvider helpTopicProvider, IApp app ) : System

Constructor for runtime.

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

Метод Описание
DisplayInlineMappingDialog ( SIL.FieldWorks.FDO.DomainServices.ImportMappingInfo mapping ) : void

Creates (if necessary) and shows the CharacterMappingSettings dialog. This is a public virtual so that test code can override it.

Dispose ( bool disposing ) : void

Clean up any resources being used.

IsDup ( string beginMarker ) : bool

Handles the CharacterMappingsettings.IsDuplicateMapping event. Checks for duplicate begin marker, unless we're just modifying other properties of an existing one. ///

LoadMappingsFromSettings ( ) : void

This method gets all the mappings from the ScrImportSet and loads them into a list view so the user can modify them if necessary.

LoadMappingsFromSettings ( SIL.FieldWorks.Common.Controls.FwListView lv, MappingSet mappingSet ) : void

This method gets all the mappings from the ScrImportSet and loads them into a list view so the user can modify them if necessary.

OnClosing ( CancelEventArgs e ) : void

Save in the registry the dialog's location and size along with the widths of the list view columns.

OnFilesChanged ( ) : void

If there aren't any files for SFM import, this event handler prevents the user from continuing in the wizard.

OnLoad ( EventArgs e ) : void

OnPaint ( PaintEventArgs e ) : void

This will draw the the etched line that separates the dialog's buttons at the bottom from the rest of the dialog.

btnAdd_Click ( object sender, EventArgs e ) : void

Display the Add Character Mapping Settings dialog box

btnDelete_Click ( object sender, EventArgs e ) : void

lvMappings_SelectedIndexChanged ( object sender, EventArgs e ) : void

Prevent user from changing mapping for chapter and verse markers. If there are no markers at all disable modify button as well.

m_btnBack_Click ( object sender, EventArgs e ) : void

Handles the Click event of the m_btnBack control.

m_btnModify_Click ( object sender, EventArgs e ) : void

m_btnNext_Click ( object sender, EventArgs e ) : void

Handles the Click event of the m_btnNext control.

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

Метод Описание
CheckProjectCombo ( string projName, SIL.FieldWorks.Common.Controls.FwOverrideComboBox projCombo, ImportDomain domain ) : void

Checks the contents of the project combo. We call this after we attempt to assign the projName in the import settings to the current selection in the project combo box.

DefineImportSettings ( TypeOfImport importType ) : void

Defines the import settings given a type of import (Paratext5, Paratext6 or Other). Either we find import settings in the database or create a new set.

FindParatextProjects ( ) : bool

Loads a list with the Paratext projects on a user's system.

GetMappingDetailsAsString ( SIL.FieldWorks.FDO.DomainServices.ImportMappingInfo mapping ) : string

For the given mapping, compute a string to display in the details column of the mapping list.

GetPTShortName ( SIL.FieldWorks.Common.Controls.FwOverrideComboBox cbo ) : string

Gets the selected ParaText project short name from the selected item in a combo box list.

ImportWizard ( ) : System

Initializes the ImportWizard class.

InitializeComponent ( ) : void

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

InitializeScrImportSettings ( ) : void

Initializes the Scripture import settings object. This should be called whenever m_settings is reassigned to a new instance of the ScrImportSet class.

LoadLVMappingItem ( SIL.FieldWorks.Common.Controls.FwListView lv, SIL.FieldWorks.FDO.DomainServices.ImportMappingInfo mapping ) : System.Windows.Forms.ListViewItem

This method will add or modify a single mapping to the list view.

LoadLVMappingItem ( SIL.FieldWorks.Common.Controls.FwListView lv, System.Windows.Forms.ListViewItem item, SIL.FieldWorks.FDO.DomainServices.ImportMappingInfo mapping ) : System.Windows.Forms.ListViewItem

This method will add or modify a single mapping in the list view.

LoadParatextProjectCombo ( SIL.FieldWorks.Common.Controls.FwOverrideComboBox cbo, string selectedProj ) : void

Load the given combobox and select the selected project, if any.

LoadParatextProjectCombos ( ) : void
MappingContextMenu_Click ( object sender, EventArgs e ) : void

Process a menu item click on the context menu

MappingStyleNameAsUIString ( SIL.FieldWorks.FDO.DomainServices.ImportMappingInfo mapping ) : string

PrepareToGetOtherProjectSettings ( ) : void

This method is called after the user has chosen to import a non Paratext project (e.g. a standard format project). Prepare to get the settings for that import.

PrepareToGetParatextProjectSettings ( ) : bool

This method is called after the user has chosen to import a Paratext project. Prepare to get the settings for that import by first, making sure there are Paratext projects on the system, and if there is, loading misc. information about the projects in order for the user to specify the import settings.

RestoreWindowsSettings ( ) : void

Get, from the registry, the dialog's location and size along with the widths of the list view columns.

SetParatextProjectIds ( ) : bool

Store in the settings the Paratext projects selected in the combo boxes from the project location step, provided they are valid projects.

UpdateStepLabel ( ) : void

ValidToGoForward ( ) : bool
cboShowMappings_SelectedIndexChanged ( object sender, EventArgs e ) : void

Handles the SelectedIndexChanged event of the cboShowMappings control.

lvMappings_DoubleClick ( object sender, EventArgs e ) : void

Handles the double click on the listview. It will make it modify the item double-clicked.

lvMappings_DrawSubItem ( object sender, DrawListViewSubItemEventArgs e ) : void

Handles the DrawSubItem event of the lvMappings control.

m_btnHelp_Click ( object sender, EventArgs e ) : void

Open the help window when the help button is pressed.

m_cmMappings_Popup ( object sender, EventArgs e ) : void

Set the context menu's checked properties appropriately before showing the menu.

panStep1_VisibleChanged ( object sender, EventArgs e ) : void

panStep2_Other_VisibleChanged ( object sender, EventArgs e ) : void

Make sure the next button is disabled when the file list is empty.

panStep2_PT_VisibleChanged ( object sender, EventArgs e ) : void

Make sure the next button is disabled when there are no paratext projects available

panStep3_VisibleChanged ( object sender, EventArgs e ) : void

Fill the mappings listview with all mappings from the Paratext project(s) or SF files.

rbOther_CheckedChanged ( object sender, EventArgs e ) : void

Handles the CheckedChanged event of the rbOther control (Other USFM radio button).

rbParatext5_CheckedChanged ( object sender, EventArgs e ) : void

Handles the CheckedChanged event of the rbParatext5 control (Paratext 5 radio button).

rbParatext6_CheckedChanged ( object sender, EventArgs e ) : void

Handles the CheckedChanged event of the rbParatext6 control (Paratext 6 radio button).

tabCtrlMappings_SelectedIndexChanged ( object sender, EventArgs e ) : void

Handles the SelectedIndexChanged event of the tabCtrlMappings control.

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

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

DisplayInlineMappingDialog() защищенный метод

Creates (if necessary) and shows the CharacterMappingSettings dialog. This is a public virtual so that test code can override it.
protected DisplayInlineMappingDialog ( SIL.FieldWorks.FDO.DomainServices.ImportMappingInfo mapping ) : void
mapping SIL.FieldWorks.FDO.DomainServices.ImportMappingInfo Provides intial values displayed in dialog.
Результат void

DisplayMappingDialog() публичный метод

Shows the dlg modally. This is a public virtual so that test code can override it.
public DisplayMappingDialog ( Form dlg ) : void
dlg System.Windows.Forms.Form The dialog to show
Результат void

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

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool
Результат void

ImportWizard() публичный метод

Constructor for runtime.
public ImportWizard ( string langProjName, IScripture scr, FwStyleSheet styleSheet, IHelpTopicProvider helpTopicProvider, IApp app ) : System
langProjName string Name of the lang proj.
scr IScripture The Scripture object.
styleSheet FwStyleSheet The styleSheet
helpTopicProvider IHelpTopicProvider The help topic provider.
app IApp The app.
Результат System

IsDup() защищенный метод

Handles the CharacterMappingsettings.IsDuplicateMapping event. Checks for duplicate begin marker, unless we're just modifying other properties of an existing one. ///
protected IsDup ( string beginMarker ) : bool
beginMarker string
Результат bool

LoadMappingsFromSettings() защищенный метод

This method gets all the mappings from the ScrImportSet and loads them into a list view so the user can modify them if necessary.
protected LoadMappingsFromSettings ( ) : void
Результат void

LoadMappingsFromSettings() защищенный метод

This method gets all the mappings from the ScrImportSet and loads them into a list view so the user can modify them if necessary.
protected LoadMappingsFromSettings ( SIL.FieldWorks.Common.Controls.FwListView lv, MappingSet mappingSet ) : void
lv SIL.FieldWorks.Common.Controls.FwListView The list view to add mappings to
mappingSet MappingSet The set of mappings to add
Результат void

OnClosing() защищенный метод

Save in the registry the dialog's location and size along with the widths of the list view columns.
protected OnClosing ( CancelEventArgs e ) : void
e CancelEventArgs
Результат void

OnFilesChanged() защищенный метод

If there aren't any files for SFM import, this event handler prevents the user from continuing in the wizard.
protected OnFilesChanged ( ) : void
Результат void

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

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

OnPaint() защищенный метод

This will draw the the etched line that separates the dialog's buttons at the bottom from the rest of the dialog.
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
Результат void

btnAdd_Click() защищенный метод

Display the Add Character Mapping Settings dialog box
protected btnAdd_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void

btnDelete_Click() защищенный метод

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

lvMappings_SelectedIndexChanged() защищенный метод

Prevent user from changing mapping for chapter and verse markers. If there are no markers at all disable modify button as well.
protected lvMappings_SelectedIndexChanged ( object sender, EventArgs e ) : void
sender object Not used
e System.EventArgs Not used
Результат void

m_btnBack_Click() защищенный метод

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

m_btnModify_Click() защищенный метод

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

m_btnNext_Click() защищенный метод

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

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

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

Protected for Tests
protected FwOverrideComboBox,SIL.FieldWorks.Common.Controls cboPTBackTrans
Результат SIL.FieldWorks.Common.Controls.FwOverrideComboBox

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

Protected for Tests
protected FwOverrideComboBox,SIL.FieldWorks.Common.Controls cboPTLangProj
Результат SIL.FieldWorks.Common.Controls.FwOverrideComboBox

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

Protected for Tests
protected FwOverrideComboBox,SIL.FieldWorks.Common.Controls cboPTTransNotes
Результат SIL.FieldWorks.Common.Controls.FwOverrideComboBox

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

Protected for Tests
protected FwListView,SIL.FieldWorks.Common.Controls lvScrMappings
Результат SIL.FieldWorks.Common.Controls.FwListView

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

The modify mappings dialog used for non-inline mappings or mappings that are "in use." We need this variable for testing purposes so that we can create a mock dialog.
protected ModifyMapping,SIL.FieldWorks.TE m_MappingDialog
Результат SIL.FieldWorks.TE.ModifyMapping

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

protected List m_PTLangProjects
Результат List

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

protected ISCScriptureText m_ScriptureText
Результат ISCScriptureText

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

protected FwStyleSheet m_StyleSheet
Результат FwStyleSheet

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

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

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

Protected for Tests
protected Button,System.Windows.Forms m_btnAddScrMapping
Результат System.Windows.Forms.Button

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

Protected for Tests
protected Button,System.Windows.Forms m_btnBack
Результат System.Windows.Forms.Button

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

Either m_btnAddScrMapping or m_btnAddAnnotMapping
protected Button,System.Windows.Forms m_btnCurrentAddButton
Результат System.Windows.Forms.Button

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

Either m_btnDeleteScrMapping or m_btnDeleteAnnotMapping
protected Button,System.Windows.Forms m_btnCurrentDeleteButton
Результат System.Windows.Forms.Button

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

Either m_btnModifyScrMapping or m_btnModifyAnnotMapping
protected Button,System.Windows.Forms m_btnCurrentModifyButton
Результат System.Windows.Forms.Button

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

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

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

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

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

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

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

Protected for Tests
protected Button,System.Windows.Forms m_btnModifyScrMapping
Результат System.Windows.Forms.Button

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

Protected for Tests
protected Button,System.Windows.Forms m_btnNext
Результат System.Windows.Forms.Button

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

protected FdoCache,SIL.FieldWorks.FDO m_cache
Результат SIL.FieldWorks.FDO.FdoCache

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

Indicates whether to show all mappings or only those in use.
protected bool m_fShowAllMappings
Результат bool

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

The modify mappings dialog used for user-created in-line mappings. We need this variable for testing purposes so that we can create a mock dialog.
protected CharacterMappingSettings,SIL.FieldWorks.TE m_inlineMappingDialog
Результат SIL.FieldWorks.TE.CharacterMappingSettings

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

Either lvScrMappings or lvAnnotationMappings
protected FwListView,SIL.FieldWorks.Common.Controls m_lvCurrentMappingList
Результат SIL.FieldWorks.Common.Controls.FwListView

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

protected ProjectTypes m_projectType
Результат ProjectTypes

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

protected IScripture m_scr
Результат IScripture

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

current import settings retrieved from/stored in Scripture.
protected IScrImportSet m_settings
Результат IScrImportSet

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

Protected for Tests
protected RadioButton,System.Windows.Forms rbOther
Результат System.Windows.Forms.RadioButton

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

Protected for Tests
protected RadioButton,System.Windows.Forms rbParatext5
Результат System.Windows.Forms.RadioButton

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

Protected for Tests
protected RadioButton,System.Windows.Forms rbParatext6
Результат System.Windows.Forms.RadioButton

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

Protected for Tests
protected SFFileListBuilder,SIL.FieldWorks.Common.Controls sfFileListBuilder
Результат SIL.FieldWorks.Common.Controls.SFFileListBuilder