/// <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); }
/// <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); }