コード例 #1
0
        public void PlotHistograms(clsHistogramPar clsHistPar)
        // 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_HistPlotCompleted;

                #endregion

                var histogramParams = new frmHistogramPar(clsHistPar);

                var res = histogramParams.ShowDialog();
                if (res == DialogResult.OK)
                {
                    mclsHistPar = histogramParams.clsHistPar;
                    var histogramPlot = new clsRplotData(clsHistPar.RCommand, "Hist");

                    m_BackgroundWorker.RunWorkerAsync(histogramPlot);
                    mProgressForm.Reset("Generating Histograms ...");
                    mProgressForm.ShowDialog();
                }

                #region Unhook Threading Events

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

                #endregion
            }
        }
コード例 #2
0
        public void PlotHistograms(clsHistogramPar clsHistPar)
        // 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_HistPlotCompleted;
                #endregion

                var mfrmHistPar = new frmHistogramPar(clsHistPar);

                var res = mfrmHistPar.ShowDialog();
                if (res == DialogResult.OK)
                {
                    mclsHistPar = mfrmHistPar.clsHistPar;

                    var mclsRplots = new clsRplotData(clsHistPar.Rcmd, "Hist");

                    m_BackgroundWorker.RunWorkerAsync(mclsRplots);
                    mfrmShowProgress.Message = "Generating Histograms ...";
                    mfrmShowProgress.ShowDialog();
                }
                #region Unhook Threading Events
                m_BackgroundWorker.DoWork             -= m_BackgroundWorker_GeneratePlots;
                m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_HistPlotCompleted;
                #endregion
            }
        }
コード例 #3
0
        // this will be called from the plot forms.
        // thus the reason to be public
        public void PlotHistograms(clsHistogramPar clsHistPar)
        {
            if (mtabControlData.Controls.Count != 0)
            {
                #region Hook Threading Events
                m_BackgroundWorker.DoWork += m_BackgroundWorker_GeneratePlots;
                m_BackgroundWorker.RunWorkerCompleted += m_BackgroundWorker_HistPlotCompleted;
                #endregion

                var mfrmHistPar = new frmHistogramPar(clsHistPar);

                var res = mfrmHistPar.ShowDialog();
                if (res == DialogResult.OK)
                {
                    mclsHistPar = mfrmHistPar.clsHistPar;

                    var mclsRplots = new clsRplotData(clsHistPar.Rcmd, "Hist");

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