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
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
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