private void RunAllSync() { SelectTestCaseHandler sc = new SelectTestCaseHandler(this.SelectTestCase); for (int i = 0; i < this.mTestCaseCount; i++) { //select the running case as the selected item in test case combo this.Invoke(sc, i); ITestCase tc = this.mTestCase[i]; tc.Label = this.tbLabel.Text.Trim(); tc.Reset(); this.RunCaseSync(tc); //wait until all thread done. while (this.mCurrentCaseExecuted != this.mCurrentCaseRepeat) { } //stop all working thread for (int n = 0; n < this.mWorkingThread.Count; n++) { mWorkingThread[n].Abort(); } this.mUIThread.Abort(); this.mWorkingThread.Clear(); } }