public void OpenSBMLModel()
        {
            bool readyForOpen = CloseProject();

            if (!readyForOpen)
            {
                return;
            }

            string fileName = _dialogCreator.AskForFileToOpen(AppConstants.Dialog.LoadSBMLProject, AppConstants.Filter.SBML_MODEL_FILE_FILTER, Constants.DirectoryKey.MODEL_PART);

            if (fileName.IsNullOrEmpty())
            {
                return;
            }

            _context.NewProject();
            _context.AddToHistory(_sbmlTask.ImportModelFromSbml(fileName, _context.CurrentProject));
            notifyProjectLoaded();
        }
Esempio n. 2
0
 private MoBiSimulation loadSimulationFromFile(string pkmlFile)
 {
     _context.NewProject();
     return(_projectTask.LoadSimulationTransferDataFromFile(pkmlFile).Simulation.DowncastTo <MoBiSimulation>());
 }
 public void NewProject(IMoBiContext context)
 {
     _sessionManager.CloseFactory();
     context.NewProject();
 }