private static string CreateProjectFromLift(Form parent, IHelpTopicProvider helpTopicProvider, string liftPath)
{
string projectPath;
FdoCache cache;
var anthroListFile = CallPickAnthroList(helpTopicProvider);
using (var progressDlg = new ProgressDialogWithTask(parent))
{
progressDlg.Title = FwControls.ksCreatingLiftProject;
var cacheReceiver = new FdoCache[1]; // a clumsy way of handling an out parameter, consistent with RunTask
projectPath = (string)progressDlg.RunTask(true, CreateProjectTask,
new object[] { liftPath, parent, anthroListFile, cacheReceiver });
cache = cacheReceiver[0];
}
CallImportObtainedLexicon(cache, liftPath, parent);
ProjectLockingService.UnlockCurrentProject(cache); // finish all saves and completely write the file so we can proceed to open it
cache.Dispose();
return projectPath;
}