C# Class SIL.FieldWorks.Common.Controls.ObtainProjectMethod

Method class that handles the 'obtain' FLEx Bridge option, which gets some repository (currently Lift or FW). The class will create a FLEx project from a lift repo if that repo is selected.
Show file Open project: sillsdev/FieldWorks Class Usage Examples

Public Methods

Method Description
ObtainProjectFromAnySource ( Form parent, IHelpTopicProvider helpTopicProvider, ObtainedProjectType &obtainedProjectType ) : string

Get a new FW project from some Mercurial repository. The repo may be a lift or full FW repo, but it can be from any source source, as long as the code can create an FW project from it.

ReportDuplicateBridge ( ) : void

Reports to the user that a copy of FLExBridge is already running. NB. Also used by LexTextDll.FLExBridgeListener.

Private Methods

Method Description
CallImportObtainedLexicon ( SIL.FieldWorks.FDO.FdoCache cache, string liftPath, Form parent ) : void
CallPickAnthroList ( IHelpTopicProvider helpTopicProvider ) : string
CreateProjectFromLift ( Form parent, IHelpTopicProvider helpTopicProvider, string liftPath ) : string

Create a new Fieldworks project and import a lift file into it. Return the .fwdata path.

CreateProjectTask ( IThreadedProgress progress, object parameters ) : object

Method with signature required by ProgressDialogWithTask.RunTask to create the project (and a cache for it) as a background task while showing the dialog.

EnsureLinkedFoldersExist ( string fwdataFileFullPathname ) : void
RetrieveDefaultWritingSystemIdsFromLift ( XmlReader reader, string &vernWs, string &analysisWs ) : void

Figure out the best default vernacular and analysis writing systems to use for the input, presumed to represent a LIFT file. We get the vernacular WS from the first form element nested in a lexical-unit with a lang attribute, and the analysis WS form the first form element nested in a definition or gloss with a lang attribute.

RetrieveDefaultWritingSystemsFromLift ( string liftPath, IWritingSystem &wsVern, IWritingSystem &wsAnalysis ) : void

Method Details

ObtainProjectFromAnySource() public static method

Get a new FW project from some Mercurial repository. The repo may be a lift or full FW repo, but it can be from any source source, as long as the code can create an FW project from it.
public static ObtainProjectFromAnySource ( Form parent, IHelpTopicProvider helpTopicProvider, ObtainedProjectType &obtainedProjectType ) : string
parent System.Windows.Forms.Form
helpTopicProvider IHelpTopicProvider
obtainedProjectType ObtainedProjectType
return string

ReportDuplicateBridge() public static method

Reports to the user that a copy of FLExBridge is already running. NB. Also used by LexTextDll.FLExBridgeListener.
public static ReportDuplicateBridge ( ) : void
return void