Esempio n. 1
0
        /// <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 == DataPeriod.M1)
            {
                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();
            }
        }
Esempio n. 2
0
        /// <summary>
        ///     Loads data and recalculates.
        /// </summary>
        protected override void OnShown(EventArgs e)
        {
            base.OnShown(e);

            if (CompactMode)
            {
                return;
            }

            if (!Data.IsIntrabarData)
            {
                StartLoading();
            }
            else
            {
                Backtester.Scan();
                ShowScanningResult();
                ProgressBar.Value = 100;
                BtnClose.Focus();
            }
        }