void TestToolStripMenuItemClick(object sender, System.EventArgs e) { showAnswersToolStripMenuItem.Checked = false; showAnswersByGroupToolStripMenuItem.Checked = false; showExamAnswersToolStripMenuItem.Checked = false; quizToolStripMenuItem.Checked = false; quizByGroupToolStripMenuItem.Checked = false; quizExamToolStripMenuItem.Checked = false; testToolStripMenuItem.Checked = true; textBoxGo.Enabled=true; buttonGo.Enabled=true; checkBoxAM.Enabled=false; checkBoxAM.Checked=false; checkBoxVoice.Enabled=false; buttonPrevious.Enabled=true; buttonReplay.Enabled=true; buttonNext.Enabled=true; ButtonReplayClick(sender,e); if(techToolStripMenuItem.Checked==true)TechToolStripMenuItemClick(sender,e); if(generalToolStripMenuItem.Checked==true)GeneralToolStripMenuItemClick(sender,e); if(extraToolStripMenuItem.Checked==true)ExtraToolStripMenuItemClick(sender,e); MyList<QAobj>minilist= new MyList<QAobj>(); myQuiz = new List<QAobj>(); String group=myQAdb[0].QuestionGroup; myQAdb.ForEach(delegate(QAobj o){ if(o.QuestionGroup==group) minilist.Add(o); else{ group=o.QuestionGroup; myQuiz.Add(minilist.ReturnRandom()); minilist.Clear(); minilist.Add(o); } }); myQuiz.Add(minilist.ReturnRandom()); myQAdb = myQuiz; textBoxGo.Text="0"; ButtonReplayClick(sender,e); }