Exemplo n.º 1
0
 public static void ExportQuestionnaire(EDOConfig config, StudyUnitVM studyUnit)
 {
     ControlConstructSchemeVM controlConstructScheme = null;
     if (studyUnit.ControlConstructSchemes.Count > 1)
     {
         SelectObjectWindowVM<ControlConstructSchemeVM> vm = new SelectObjectWindowVM<ControlConstructSchemeVM>(studyUnit.ControlConstructSchemes);
         SelectObjectWindow window = new SelectObjectWindow(vm);
         controlConstructScheme = SelectObjectWindow.Select(Resources.SelectOrder, vm) as ControlConstructSchemeVM; //順序の選択
     }
     else if (studyUnit.ControlConstructSchemes.Count == 1)
     {
         controlConstructScheme = studyUnit.ControlConstructSchemes[0];
     }
     if (controlConstructScheme == null)
     {
         return;
     }
     string path = IOUtils.QuerySavePathName(Resources.ExportQuestionnair + ": " + controlConstructScheme.Title , null, QUESTIONNAIRE_FILTER, true);
     if (string.IsNullOrEmpty(path))
     {
         return;
     }
     try
     {
         QuestionnaireWriter writer = new QuestionnaireWriter(config, controlConstructScheme);
         writer.Write(path);
     }
     catch (Exception ex)
     {
         EDOUtils.ShowUnexpectedError(ex);
     }
 }
Exemplo n.º 2
0
        public static void ExportQuestionnaire(EDOConfig config, StudyUnitVM studyUnit)
        {
            ControlConstructSchemeVM controlConstructScheme = null;

            if (studyUnit.ControlConstructSchemes.Count > 1)
            {
                SelectObjectWindowVM <ControlConstructSchemeVM> vm = new SelectObjectWindowVM <ControlConstructSchemeVM>(studyUnit.ControlConstructSchemes);
                SelectObjectWindow window = new SelectObjectWindow(vm);
                controlConstructScheme = SelectObjectWindow.Select(Resources.SelectOrder, vm) as ControlConstructSchemeVM; //Select Sequence
            }
            else if (studyUnit.ControlConstructSchemes.Count == 1)
            {
                controlConstructScheme = studyUnit.ControlConstructSchemes[0];
            }
            if (controlConstructScheme == null)
            {
                return;
            }
            string path = IOUtils.QuerySavePathName(Resources.ExportQuestionnair + ": " + controlConstructScheme.Title, null, QUESTIONNAIRE_FILTER, true);

            if (string.IsNullOrEmpty(path))
            {
                return;
            }
            try
            {
                QuestionnaireWriter writer = new QuestionnaireWriter(config, controlConstructScheme);
                writer.Write(path);
            }
            catch (Exception ex)
            {
                EDOUtils.ShowUnexpectedError(ex);
            }
        }