Example #1
0
        private DataFileVM createDataFile(DataFile dataFileModel, DataSetVM dataSet)
        {
            DataFileVM dataFile = new DataFileVM(dataFileModel, dataSet);

            dataFile.Parent     = this;
            dataFile.Delimiters = Options.Delimiters;
            return(dataFile);
        }
Example #2
0
        public void RemoveByDataSetId(string dataSetId)
        {
            DataFileVM dataFile = FindByDataSetId(dataSetId);

            if (dataFile == null)
            {
                return;
            }
            dataFiles.Remove(dataFile);
        }
Example #3
0
 public DataFileFormVM(StudyUnitVM studyUnit) : base(studyUnit)
 {
     dataFiles = new ObservableCollection <DataFileVM>();
     foreach (DataFile dataFileModel in studyUnit.DataFileModels)
     {
         DataSetVM dataSet = studyUnit.FindDataSet(dataFileModel.DataSetId);
         if (dataSet != null)
         {
             DataFileVM dataFile = createDataFile(dataFileModel, dataSet);
             dataFiles.Add(dataFile);
         }
     }
     modelSyncher = new ModelSyncher <DataFileVM, DataFile>(this, dataFiles, studyUnit.DataFileModels);
 }
Example #4
0
 public void CreateDetaFiles(ObservableCollection <DataSetVM> dataSets)
 {
     foreach (DataSetVM dataSet in dataSets)
     {
         if (dataSet.IsCreatedDataFile)
         {
             continue;
         }
         if (IsExistByDataSetId(dataSet.Id))
         {
             continue;
         }
         dataSet.IsCreatedDataFile = true;
         DataFile dataFileModel = DataFile.createDataFile();
         dataFileModel.DataSetId = dataSet.Id;
         DataFileVM dataFile = createDataFile(dataFileModel, dataSet);
         dataFiles.Add(dataFile);
     }
 }
 public SetupSyntaxWriter(StudyUnitVM studyUnit, DataFileVM dataFile)
 {
     this.studyUnit = studyUnit;
     this.dataFile = dataFile;
 }
Example #6
0
 private DataFileVM FindByDataSetId(string dataSetId)
 {
     return(DataFileVM.FindByDataSetId(this.DataFiles, dataSetId));
 }
Example #7
0
 private DataFileVM createDataFile(DataFile dataFileModel, DataSetVM dataSet)
 {
     DataFileVM dataFile = new DataFileVM(dataFileModel, dataSet);
     dataFile.Parent = this;
     dataFile.Delimiters = Options.Delimiters;
     return dataFile;
 }
Example #8
0
 protected override void Reload(VMState state)
 {
     if (state != null)
     {
         SelectedDataFile = EDOUtils.Find(dataFiles, state.State1);
     }
     if (SelectedDataFile == null)
     {
         SelectedDataFile = EDOUtils.GetFirst(dataFiles);
     }
 }