예제 #1
0
        public static void ExportSetupSyntax(StudyUnitVM studyUnit)
        {
            DataFileVM dataFile = null;

            if (studyUnit.DataFiles.Count > 1)
            {
                SelectObjectWindowVM <DataFileVM> vm = new SelectObjectWindowVM <DataFileVM>(studyUnit.DataFiles);
                SelectObjectWindow window            = new SelectObjectWindow(vm);
                dataFile = SelectObjectWindow.Select(Resources.SelectDataFile, vm) as DataFileVM; //Select Data File
            }
            else if (studyUnit.DataFiles.Count == 1)
            {
                dataFile = studyUnit.DataFiles[0];
            }
            if (dataFile == null)
            {
                return;
            }
            string path = IOUtils.QuerySavePathName(Resources.ExportSetupSyntax, null, SETUPSYNTAX_FILTER, true); //Export Setup Syntax

            if (string.IsNullOrEmpty(path))
            {
                return;
            }
            try
            {
                SetupSyntaxWriter writer = new SetupSyntaxWriter(studyUnit, dataFile);
                writer.Write(path);
            }
            catch (Exception ex)
            {
                EDOUtils.ShowUnexpectedError(ex);
            }
        }
예제 #2
0
 public SetupSyntaxWriter(StudyUnitVM studyUnit, DataFileVM dataFile)
 {
     this.studyUnit = studyUnit;
     this.dataFile = dataFile;
 }