public SimulationTransfer Load(string pkmlFileFullPath) { var project = _projectRetriever.CurrentProject; //use new ObjectBaseRepository here as the resulting simulation will be registered later on when added to the project var simulationTransfer = _simulationPersister.Load(pkmlFileFullPath, _dimensionFactory, _objectBaseFactory, new WithIdRepository(), _cloneManagerForModel); project.Favorites.AddFavorites(simulationTransfer.Favorites); if (shouldLoadJournal(project, simulationTransfer)) { _journalTask.LoadJournal(simulationTransfer.JournalPath, showJournal: false); } return(simulationTransfer); }
private void newProjectWithWorkingJournal(string journalFileFullPath) { if (!FileHelper.FileExists(journalFileFullPath)) { return; } var extension = new FileInfo(journalFileFullPath).Extension; if (!string.Equals(extension, Constants.Filter.JOURNAL_EXTENSION)) { return; } NewProject(); _journalTask.LoadJournal(journalFileFullPath, showJournal: true); }