Esempio n. 1
0
        private void timer_Tick(object sender, EventArgs e)
        {
            timer.Enabled = false;

            // show wait message box
            WaitForm wf = new WaitForm(this);

            wf.Show("Please wait while historical data is downloaded...");

            // download historical data
            hs.Load();
            hs.Update();

            // process data...
            UpdateHistoryGraphCurves();
            if (hs.HistoryTable.Rows.Count > 0)
            {
                vs.Update();
                UpdateVolatilityGraphCurves();
            }

            // close wait message box
            wf.Close();

            if (hs.HistoryTable.Rows.Count == 0)
            {
                MessageBox.Show("Failed to Download Stock Historical Data.    ", "Download Failed", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
Esempio n. 2
0
        private void PortfolioForm_Load(object sender, EventArgs e)
        {
            // show wait message box
            wf = new WaitForm(this);
            wf.Show("Please wait while portfolio data is loaded...");

            // load portfolios
            if (!backgroundWorker.IsBusy)
            {
                backgroundWorker.RunWorkerAsync("load-all");
            }
        }