Example #1
0
        /// <summary>
        /// Event handler. Called when thread is completed.
        /// </summary>
        private void workerComplete(object sender, TestCompletedArgs e)
        {
            e.Config.SetEndTime(DateTime.Now);

            this.Refresh();

            if (e.Results.Count == e.Config.NumberOfTestRuns)
            {
                MessageBox.Show("Test completed!", "Completed", MessageBoxButtons.OK, MessageBoxIcon.Information);
                OutputResults(e.Results, e.Config);
            }
            else if(e.Results.Cancelled)
                MessageBox.Show("Tests cancelled.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            else
                MessageBox.Show("Test worker exited unexpectedly!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

            // Turn test flag off in profiler menu
            ProfilerMenu.testActive = false;

            this.Close();
        }
Example #2
0
        /// <summary>
        /// Event handler. Called when thread is completed.
        /// </summary>
        private void workerComplete(object sender, TestCompletedArgs e)
        {
            e.Config.SetEndTime(DateTime.Now);

            progressBarTests.Value = progressBarTests.Maximum;
            percLabel.Text = "100";
            this.Refresh();

            MessageBox.Show("Test completed!", "Completed", MessageBoxButtons.OK, MessageBoxIcon.Information);

            OutputResults(e.Results, e.Config);

            this.Close();
        }