Ejemplo n.º 1
0
        void OutputAge(SubQuestions subQuestion)
        {
            SelectedItemText = string.Format("{0} ", subQuestion.SubQuestionID);
            OnPropertyChanged("SelectedItemText");

            LstSubQuestion = lstSubQuestionStore.Where(a => a.QuestionID == subQuestion.QuestionID).ToList();
            foreach (var item in LstSubQuestion)
            {
                if (item.SubQuestionID == 2 && item.SubQuestionID == subQuestion.SubQuestionID)
                {
                    Total          = Total + 1;
                    item.CellColor = Color.Green;
                }
                else if (item.SubQuestionID == subQuestion.SubQuestionID)
                {
                    item.CellColor = Color.Blue;
                }
                else if (item.SubQuestionID == 2)
                {
                    item.CellColor = Color.Red;
                }
            }

            IsEnable = false;
        }
Ejemplo n.º 2
0
        private void BindList()
        {
            for (int i = 0; i < 20; i++)
            {
                question          = new Questions();
                question.ID       = i;
                question.Question = "Test" + i.ToString();
                lstQuestion.Add(question);

                for (int j = 0; j < 3; j++)
                {
                    subQuestions               = new SubQuestions();
                    subQuestions.QuestionID    = i;
                    subQuestions.SubQuestion   = "Sub Test" + j + "Of " + i;
                    subQuestions.SubQuestionID = j;
                    subQuestions.CellColor     = Color.White;
                    lstSubQuestionStore.Add(subQuestions);
                }
            }
        }