예제 #1
0
        /// <summary>
        /// get an item from the test list by index
        /// </summary>
        /// <param name="index">the index</param>
        /// <returns>TestTypeForm</returns>
        public TestTypeForm GetItemFromTestListByIndex(int index)
        {
            TestTypeForm item = null;

            foreach (var testTypeForm in TestList)
            {
                QuestionAnswerData data = (QuestionAnswerData)testTypeForm.Data;
                if (data.TestTunnelIndex == index)
                {
                    item = testTypeForm;
                    break;
                }
            }
            return(item);
        }
예제 #2
0
        /// <summary>
        /// get an item from the test list by item ID
        /// </summary>
        /// <param name="itemID">the item ID</param>
        /// <returns>TestTypeForm</returns>
        public TestTypeForm GetItemFromTestListByItemID(int itemID)
        {
            TestTypeForm item = null;

            foreach (var testTypeForm in TestList)
            {
                QuestionAnswerData data = (QuestionAnswerData)testTypeForm.Data;
                if (data.ItemID == itemID)
                {
                    item = testTypeForm;
                    break;
                }
            }
            return(item);
        }