Ejemplo n.º 1
0
 /// <summary>
 /// Creates subcategories.
 /// </summary>
 /// <param name="from">Start index.</param>
 /// <param name="to">End index.</param>
 public void MakeSubCategories(int from, int to)
 {
     for (int i = from; i < to; ++i)
     {
         NormalCategory newCategory = new NormalCategory(Parent)
         {
             Id = string.Format("{0}_{1}", this.Id, i + 1), Name = string.Format("No. {0}", i + 1)
         };
         List <Question> copyOfQuestions = PrepareQuestionsCopy(newCategory);
         newCategory.Questions = copyOfQuestions;
         SubCategories.Add(newCategory);
         newCategory.RefreshQuestionsVisibility();
     }
     Parent.IsResultChanged = true;
 }
 /// <summary>
 /// Creates subcategories.
 /// </summary>
 /// <param name="from">Start index.</param>
 /// <param name="to">End index.</param>
 public void MakeSubCategories(int from, int to)
 {
     for (int i = from; i < to; ++i)
     {
         NormalCategory newCategory = new NormalCategory(Parent) { Id = string.Format("{0}_{1}", this.Id, i + 1), Name = string.Format("No. {0}", i + 1) };
         List<Question> copyOfQuestions = PrepareQuestionsCopy(newCategory);
         newCategory.Questions = copyOfQuestions;
         SubCategories.Add(newCategory);
         newCategory.RefreshQuestionsVisibility();
     }
     Parent.IsResultChanged = true;
 }