public QuestionnaireWizard(Questionnaire questionnaire, QuestionnaireAnswers answers)
 {
     this.Questionnaire = questionnaire;
     this.Answers = answers;
     this.Questions = new List<QuestionnaireQuestion>(questionnaire.Questions);
     this.ActiveQuestionIndex = 0;
 }
Пример #2
0
 public static Questionnaire Convert(aladdinService.Questionnaire qFS)
 {
     Questionnaire q = new Questionnaire();
     q.Version = qFS.versionSpecified ? qFS.version.ToString() : "";
     List<QuestionnaireQuestion> qs = GetQuestions(qFS.question);
     q.Questions = qs.ToArray();
     return q;
 }
Пример #3
0
        public static string ToFile(Questionnaire questionnaire)
        {
            Guid guid = Guid.NewGuid();
            string path = string.Format("{0}{1}{2}", System.IO.Path.GetTempPath(), guid.ToString(), ".xml");

            XmlSerializer serializer = new XmlSerializer(typeof(Questionnaire));
            TextWriter textWriter = new StreamWriter(path);
            serializer.Serialize(textWriter, questionnaire);
            textWriter.Close();
            return path;
        }