public void EndBenchmark(object sender, BenchEndEventArgs e)
        {
            if (ApplicationStateManager.BurnCalled)
            {
                return;
            }
            FormHelpers.SafeInvoke(this, () => {
                _benchmarkingTimer.Stop();
                Logger.Debug("FormBenchmark", "EndBenchmark() benchmark routine finished");

                //CopyBenchmarks();

                BenchmarkStoppedGuiSettings();
                // check if all ok
                if (!e.DidAlgosFail && StartMiningOnFinish == false)
                {
                    MessageBox.Show(
                        Translations.Tr("All benchmarks have been successful"),
                        Translations.Tr("Benchmark finished report"),
                        MessageBoxButtons.OK);
                }
                else if (StartMiningOnFinish == false)
                {
                    var result = MessageBox.Show(
                        //Translations.Tr("Not all benchmarks finished successfully. Retry to re-run the benchmark process against unbenchmarked algos or Cancel to disable unbenchmarked algorithms."),
                        Translations.Tr("Not all benchmarks finished successfully."),
                        Translations.Tr("Benchmark finished report"),
                        MessageBoxButtons.OK);

                    //if (result == DialogResult.Retry)
                    //{
                    //    StartButonClick();
                    //    return;
                    //}

                    // update algos status
                    BenchmarkManager.CalcBenchDevAlgoQueue();
                }

                if (_exitWhenFinished || StartMiningOnFinish)
                {
                    Close();
                }
            });
        }
 private void OnBenchEnd(object sender, BenchEndEventArgs e)
 {
     Dispatcher?.Invoke(() =>
     {
         if (!e.StartMining)
         {
             MessageBox.Show(
                 !e.DidAlgosFail
                     ? Translations.Tr("All benchmarks have been successful")
                     : Translations.Tr("Not all benchmarks finished successfully."),
                 Translations.Tr("Benchmark finished report"),
                 MessageBoxButton.OK);
         }
         else
         {
             // MainWindow will look for this result and start mining if it's true
             DialogResult = true;
             Close();
         }
     });
 }