コード例 #1
0
 public TranslateData(FibbaggeQuestionJSON aOrgQuestion, FibbaggeQuestionJSON aTranslatedQuestion)
 {
     FOrgQuestion = aOrgQuestion;
     if (aTranslatedQuestion == null)
     {
         FTranslatedQuestion    = FOrgQuestion.CloneForTranslate();
         FTranslatedQuestion.id = FOrgQuestion.id;
     }
     else
     {
         FTranslatedQuestion = aTranslatedQuestion;
     }
 }
コード例 #2
0
        public FibbaggeQuestionJSON CloneForTranslate()
        {
            var res = new FibbaggeQuestionJSON();

            res.fields = new List <Field>();

            for (int i = 0; i < fields.Count; i++)
            {
                var newField = new Field();
                newField.n = fields[i].n;
                newField.t = fields[i].t;
                if (ShouldSkipEntry(i))
                {
                    newField.v = "";
                }
                else
                {
                    newField.v = fields[i].v;
                }
                res.fields.Add(newField);
            }
            return(res);
        }