Ejemplo n.º 1
0
        public void PlotMA(clsMAplotsPar plotOptions)
        // this will be called from the plot forms.
        // thus the reason to be public
        {
            if (mDataTab.Controls.Count != 0)
            {
                #region Hook Threading Events

                m_BackgroundWorker.DoWork             += m_BackgroundWorker_GeneratePlots;
                m_BackgroundWorker.RunWorkerCompleted += m_BackgroundWorker_MAplotCompleted;

                #endregion

                var maPlotParams = new frmMAplotsPar(plotOptions);

                var res = maPlotParams.ShowDialog();
                if (res == DialogResult.OK)
                {
                    mclsMApar = maPlotParams.clsMAplotPar;
                    var maPlot = new clsRplotData(mclsMApar.RCommand, "MA");

                    m_BackgroundWorker.RunWorkerAsync(maPlot);
                    mProgressForm.Reset("Generating MA Plots ...");
                    mProgressForm.ShowDialog();
                }

                #region Unhook Threading Events

                m_BackgroundWorker.DoWork             -= m_BackgroundWorker_GeneratePlots;
                m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_MAplotCompleted;

                #endregion
            }
        }
Ejemplo n.º 2
0
        public void PlotMA(clsMAplotsPar clsMApar)
        // this will be called from the plot forms.
        // thus the reason to be public
        {
            if (mtabControlData.Controls.Count != 0)
            {
                #region Hook Threading Events
                m_BackgroundWorker.DoWork             += m_BackgroundWorker_GeneratePlots;
                m_BackgroundWorker.RunWorkerCompleted += m_BackgroundWorker_MAplotCompleted;
                #endregion

                var mfrmMAPar = new frmMAplotsPar(clsMApar);

                var res = mfrmMAPar.ShowDialog();
                if (res == DialogResult.OK)
                {
                    mclsMApar = mfrmMAPar.clsMAplotPar;
                    var mclsRplots = new clsRplotData(mclsMApar.Rcmd, "MA");

                    m_BackgroundWorker.RunWorkerAsync(mclsRplots);
                    mfrmShowProgress.Message = "Generating MA Plots ...";
                    mfrmShowProgress.ShowDialog();
                }
                #region Unhook Threading Events
                m_BackgroundWorker.DoWork             -= m_BackgroundWorker_GeneratePlots;
                m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_MAplotCompleted;
                #endregion
            }
        }
Ejemplo n.º 3
0
        // this will be called from the plot forms.
        // thus the reason to be public
        public void PlotMA(clsMAplotsPar clsMApar)
        {
            if (mtabControlData.Controls.Count != 0)
            {
                #region Hook Threading Events
                m_BackgroundWorker.DoWork += m_BackgroundWorker_GeneratePlots;
                m_BackgroundWorker.RunWorkerCompleted += m_BackgroundWorker_MAplotCompleted;
                #endregion

                var mfrmMAPar = new frmMAplotsPar(clsMApar);

                var res = mfrmMAPar.ShowDialog();
                if (res == DialogResult.OK)
                {
                    mclsMApar = mfrmMAPar.clsMAplotPar;
                    var mclsRplots = new clsRplotData(mclsMApar.Rcmd, "MA");

                    m_BackgroundWorker.RunWorkerAsync(mclsRplots);
                    mfrmShowProgress.Message = "Generating MA Plots ...";
                    mfrmShowProgress.ShowDialog();
                }
                #region Unhook Threading Events
                m_BackgroundWorker.DoWork -= m_BackgroundWorker_GeneratePlots;
                m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_MAplotCompleted;
                #endregion
            }
        }