/// <summary>
/// This event handler deals with the results of the background operation.
/// </summary>
private void BgWorkerRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
if (Data.IsIntrabarData || Configs.UseTickData && Data.IsTickData || Data.Period == DataPeriods.min1)
{
Backtester.Scan();
}
if (!CompactMode)
{
ShowScanningResult();
}
CompleteScanning();
if (_warningMessage != string.Empty && Configs.CheckData)
{
MessageBox.Show(_warningMessage + Environment.NewLine + Environment.NewLine +
Language.T("The data is probably incomplete and the scanning may not be reliable!") +
Environment.NewLine +
Language.T("You can try also \"Cut Off Bad Data\"."),
Language.T("Scanner"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
if (CompactMode)
{
Close();
}
}