Exemplo n.º 1
0
        //Tra ve so cau danh dung' cua user
        public int TotalCorrectSelections()
        {
            if (qclItems == null || qclItems.Count == 0)
            {
                return(0);
            }

            int iCount = 0;

            for (int i = 0; i < iNumItem; ++i)
            {
                SentenceCorrectionControl item = qclItems[i];
                if (item == null)
                {
                    continue;
                }

                if (item.IsCorrectSelection())
                {
                    ++iCount;
                }
            }

            return(iCount);
        }
Exemplo n.º 2
0
        //Them QuestionControl vao qclItems
        public void AddOneItem(SentenceCorrectionControl item)
        {
            rowDefCollection.Insert(iNumItem + 1, new RowDefinition());

            Grid.SetRow(item, iNumItem + 1);

            item.Margin = new Thickness(10.00, 0.00, 0.00, 0.00);

            item.VerticalAlignment = VerticalAlignment.Center;

            ++iNumItem;

            qclItems.Add(item);

            gridChildLayout.Children.Add(item);
        }
Exemplo n.º 3
0
        public void AddOneItem(string question, List <string> selections, List <int> answers)
        {
            SentenceCorrectionControl item = new SentenceCorrectionControl();

            if (item == null)
            {
                return;
            }

            item.QuestionContent = question;

            foreach (int i in answers)
            {
                item.CorrectAnswer = i;
            }

            foreach (string str in selections)
            {
                item.AddOneSelection(str);
            }

            AddOneItem(item);
        }
        public void AddOneItem(string question, List<string> selections, List<int> answers)
        {
            SentenceCorrectionControl item = new SentenceCorrectionControl();

            if (item == null)
                return;

            item.QuestionContent = question;

            foreach (int i in answers)
            {
                item.CorrectAnswer = i;
            }

            foreach (string str in selections)
            {
                item.AddOneSelection(str);
            }

            AddOneItem(item);
        }
        //Them QuestionControl vao qclItems
        public void AddOneItem(SentenceCorrectionControl item)
        {
            rowDefCollection.Insert(iNumItem + 1, new RowDefinition());

            Grid.SetRow(item, iNumItem + 1);

            item.Margin = new Thickness(10.00, 0.00, 0.00, 0.00);

            item.VerticalAlignment = VerticalAlignment.Center;

            ++iNumItem;

            qclItems.Add(item);

            gridChildLayout.Children.Add(item);

        }