void BgWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
if (!e.Cancelled && Configs.PlaySounds)
System.Media.SystemSounds.Exclamation.Play();
RestoreFromBest();
Backtester.Calculate();
Backtester.CalculateAccountStats();
smallBalanceChart.SetChartData();
smallBalanceChart.InitChart();
smallBalanceChart.Invalidate();
strategyLayout.Enabled = true;
RebuildStrategyLayout(strategyBest);
isGenerating = false;
btnAccept.Enabled = true;
btnCancel.Enabled = true;
foreach (Control control in pnlCommon.Controls)
control.Enabled = true;
foreach (Control control in pnlLimitations.Controls)
control.Enabled = true;
foreach (Control control in pnlSettings.Controls)
control.Enabled = true;
indicatorsLayout.UnblockIndikatorChange();
tsbtLockAll.Enabled = true;
tsbtUnlockAll.Enabled = true;
tsbtLinkAll.Enabled = true;
tsbtOverview.Enabled = true;
tsbtStrategyInfo.Enabled = true;
btnGenerate.Text = Language.T("Generate");
progressBar.Style = ProgressBarStyle.Blocks;
Cursor = Cursors.Default;
return;
}