Beispiel #1
0
 public ExperimentBase(string name, ProjectBase project, IExperimentType experimentTypeObject)
 {
     Name = name;
     ExperimentTypeObject = experimentTypeObject;
     ExperimentType = experimentTypeObject.ExperimentType;
     this.project = project;
 }
        public NewProjectViewModel(IEventAggregator eventAggregator, IServiceLocator serviceLocator)
        {
            _eventAggregator = eventAggregator;
            _experimentTypes = serviceLocator.GetAllInstances<IExperimentType>();
            _documentManager = serviceLocator.GetInstance<IDocumentManager>();

            _recentLocations = Properties.Settings.Default.RecentLocations.Split(new char[] { ';' }, System.StringSplitOptions.RemoveEmptyEntries);

            _selectedExperimentType = _experimentTypes.Where(type => type.Name == Properties.Settings.Default.LastSelectedExperimentType).FirstOrDefault();
            _selectedExperimentType = _selectedExperimentType ?? _experimentTypes.First();

            if (string.IsNullOrEmpty(Properties.Settings.Default.LastBrowseLocation))
            {
                string documents = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
                Properties.Settings.Default.LastBrowseLocation = Path.Combine(documents, "Mass Spec Studio Projects");
            }
            _location = Properties.Settings.Default.LastBrowseLocation;
            _projectName = GetNextDirectoryName(_location, _selectedExperimentType.Name + "Project");
            _experimentName = _selectedExperimentType.Name + "Experiment";
        }
Beispiel #3
0
 public Experiment(string name, ProjectBase project, IExperimentType experimentType)
     : base(name, project, experimentType)
 {
     _peptideFileLocation = @"Data\Peptides.xml";
     _peptides = new Peptides(Path.Combine(Path.GetDirectoryName(Location), PeptidesFileLocation));
 }