Beispiel #1
0
        public void PlotCorrelation(clsCorrelationPar clsCorrPar)
        // 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_CorrPlotCompleted;

                #endregion

                var correlationParams = new frmCorrelationPar(clsCorrPar);

                var res = correlationParams.ShowDialog();
                if (res == DialogResult.OK)
                {
                    mclsCorrPar = correlationParams.clsCorrPar;
                    var correlationPlot = new clsRplotData(mclsCorrPar.RCommand, "Corr");

                    m_BackgroundWorker.RunWorkerAsync(correlationPlot);
                    mProgressForm.Reset("Generating Correlation Plot ...");
                    mProgressForm.ShowDialog();
                }

                #region Unhook Threading Events

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

                #endregion
            }
        }
Beispiel #2
0
        public void PlotCorrelation(clsCorrelationPar clsCorrPar)
        // 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_CorrPlotCompleted;
                #endregion

                frmCorrelationPar mfrmCorrPar;
                mfrmCorrPar = new frmCorrelationPar(clsCorrPar);

                DialogResult res = mfrmCorrPar.ShowDialog();
                if (res == DialogResult.OK)
                {
                    mclsCorrPar = mfrmCorrPar.clsCorrPar;
                    var mclsRplots = new clsRplotData(mclsCorrPar.Rcmd, "Corr");

                    m_BackgroundWorker.RunWorkerAsync(mclsRplots);
                    mfrmShowProgress.Message = "Generating Correlation Plot ...";
                    mfrmShowProgress.ShowDialog();
                }

                #region Unhook Threading Events
                m_BackgroundWorker.DoWork             -= m_BackgroundWorker_GeneratePlots;
                m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_CorrPlotCompleted;
                #endregion
            }
        }
        // this will be called from the plot forms.
        // thus the reason to be public
        public void PlotCorrelation(clsCorrelationPar clsCorrPar)
        {
            if (mtabControlData.Controls.Count != 0)
            {
                #region Hook Threading Events
                m_BackgroundWorker.DoWork += m_BackgroundWorker_GeneratePlots;
                m_BackgroundWorker.RunWorkerCompleted += m_BackgroundWorker_CorrPlotCompleted;
                #endregion

                frmCorrelationPar mfrmCorrPar;
                mfrmCorrPar = new frmCorrelationPar(clsCorrPar);

                DialogResult res = mfrmCorrPar.ShowDialog();
                if (res == DialogResult.OK)
                {
                    mclsCorrPar = mfrmCorrPar.clsCorrPar;
                    var mclsRplots = new clsRplotData(mclsCorrPar.Rcmd, "Corr");

                    m_BackgroundWorker.RunWorkerAsync(mclsRplots);
                    mfrmShowProgress.Message = "Generating Correlation Plot ...";
                    mfrmShowProgress.ShowDialog();
                }

                #region Unhook Threading Events
                m_BackgroundWorker.DoWork -= m_BackgroundWorker_GeneratePlots;
                m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_CorrPlotCompleted;
                #endregion
            }
        }