コード例 #1
0
        /// <summary>
        /// Runs the test and shows the progress window.
        /// </summary>
        /// <param name="config">The testing configuration to use.</param>
        public void Run()
        {
            // Ensure the menu operations cease when tests are running
            ProfilerMenu.testActive = true;

            // Initialize progress bar
            progressBarTests.Maximum = 100;
            progressBarTests.Minimum = 0;
            progressBarTests.Value   = 0;

            // Initialize percentage label
            percLabel.Text = "0";

            // Initialize background worker
            worker = new TestWorker(config);
            worker.ProgressChanged += new ProgressChangedEventHandler(workerReport);
            worker.OnComplete      += new TestCompletedEventHandler(workerComplete);

            // Initialize percentage on last update
            percOnlastUpdate = 0;

            // Initialize config display
            configTextBox.Text += "Algorithm: " + config.Algorithm.ToString() + "\n";
            configTextBox.Text += "Map: " + config.MapName + "\n";
            configTextBox.Text += "Path Distance: " + config.PathDistance + "\n";
            configTextBox.Text += "Running " + config.NumberOfTestRuns + " tests.\n";
            configTextBox.Text += "Outputting results to " + config.OutputFile + ".txt\n";

            // Initialize timing calculations
            currentTimeEstimate = TimeSpan.Zero;
            currentIterations   = 0;

            // Run background worker thread
            worker.RunWorkerAsync();
        }
コード例 #2
0
        /// <summary>
        /// Runs the test and shows the progress window.
        /// </summary>
        /// <param name="config">The testing configuration to use.</param>
        public void Run(TestConfig config)
        {
            // Show as a dialog
            this.Show();

            // Initialize progress bar
            progressBarTests.Maximum = 100;
            progressBarTests.Minimum = 0;
            progressBarTests.Value   = 0;

            // Initialize percentage label
            percLabel.Text = "0";

            // Initialize background worker
            worker = new TestWorker(config);
            worker.ProgressChanged += new ProgressChangedEventHandler(workerReport);
            worker.OnComplete      += new TestCompletedEventHandler(workerComplete);

            // Run background worker thread
            worker.RunWorkerAsync();
        }
コード例 #3
0
        /// <summary>
        /// Runs the test and shows the progress window.
        /// </summary>
        /// <param name="config">The testing configuration to use.</param>
        public void Run(TestConfig config)
        {
            // Show as a dialog
            this.Show();

            // Initialize progress bar
            progressBarTests.Maximum = 100;
            progressBarTests.Minimum = 0;
            progressBarTests.Value = 0;

            // Initialize percentage label
            percLabel.Text = "0";

            // Initialize background worker
            worker = new TestWorker(config);
            worker.ProgressChanged += new ProgressChangedEventHandler(workerReport);
            worker.OnComplete += new TestCompletedEventHandler(workerComplete);

            // Run background worker thread
            worker.RunWorkerAsync();
        }
コード例 #4
0
        /// <summary>
        /// Runs the test and shows the progress window.
        /// </summary>
        /// <param name="config">The testing configuration to use.</param>
        public void Run()
        {
            // Ensure the menu operations cease when tests are running
            ProfilerMenu.testActive = true;

            // Initialize progress bar
            progressBarTests.Maximum = 100;
            progressBarTests.Minimum = 0;
            progressBarTests.Value = 0;

            // Initialize percentage label
            percLabel.Text = "0";

            // Initialize background worker
            worker = new TestWorker(config);
            worker.ProgressChanged += new ProgressChangedEventHandler(workerReport);
            worker.OnComplete += new TestCompletedEventHandler(workerComplete);

            // Initialize percentage on last update
            percOnlastUpdate = 0;

            // Initialize config display
            configTextBox.Text += "Algorithm: " + config.Algorithm.ToString() + "\n";
            configTextBox.Text += "Map: " + config.MapName + "\n";
            configTextBox.Text += "Path Distance: " + config.PathDistance + "\n";
            configTextBox.Text += "Running " + config.NumberOfTestRuns + " tests.\n";
            configTextBox.Text += "Outputting results to " + config.OutputFile + ".txt\n";

            // Initialize timing calculations
            currentTimeEstimate = TimeSpan.Zero;
            currentIterations = 0;

            // Run background worker thread
            worker.RunWorkerAsync();
        }