Пример #1
0
        public void PlotBoxPlots(clsBoxPlotPar clsBoxPlotPar)
        // 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_BoxPlotCompleted;

                #endregion

                var boxPlotParams = new frmBoxPlotPar(clsBoxPlotPar);

                var res = boxPlotParams.ShowDialog();
                if (res == DialogResult.OK)
                {
                    mclsBoxPlotPar = boxPlotParams.clsBoxPlotPar;
                    var boxPlot = new clsRplotData(mclsBoxPlotPar.RCommand, "Box");

                    m_BackgroundWorker.RunWorkerAsync(boxPlot);
                    mProgressForm.Reset("Generating the Box Plot ...");
                    mProgressForm.ShowDialog();
                }

                #region Unhook Threading events

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

                #endregion
            }
        }
Пример #2
0
        public void PlotBoxPlots(clsBoxPlotPar clsBoxPlotPar)
        // 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_BoxPlotCompleted;
                #endregion

                var mfrmBoxplotPar = new frmBoxPlotPar(clsBoxPlotPar);

                var res = mfrmBoxplotPar.ShowDialog();
                if (res == DialogResult.OK)
                {
                    mclsBoxPlotPar = mfrmBoxplotPar.clsBoxPlotPar;
                    var mclsRplots = new clsRplotData(mclsBoxPlotPar.Rcmd, "Box");

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

                #region Unhook Threading events
                m_BackgroundWorker.DoWork             -= m_BackgroundWorker_GeneratePlots;
                m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_BoxPlotCompleted;
                #endregion
            }
        }
Пример #3
0
        // this will be called from the plot forms.
        // thus the reason to be public
        public void PlotBoxPlots(clsBoxPlotPar clsBoxPlotPar)
        {
            if (mtabControlData.Controls.Count != 0)
            {
                #region Hook Threading events
                m_BackgroundWorker.DoWork += m_BackgroundWorker_GeneratePlots;
                m_BackgroundWorker.RunWorkerCompleted += m_BackgroundWorker_BoxPlotCompleted;
                #endregion

                var mfrmBoxplotPar = new frmBoxPlotPar(clsBoxPlotPar);

                var res = mfrmBoxplotPar.ShowDialog();
                if (res == DialogResult.OK)
                {
                    mclsBoxPlotPar = mfrmBoxplotPar.clsBoxPlotPar;
                    var mclsRplots = new clsRplotData(mclsBoxPlotPar.Rcmd, "Box");

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

                #region Unhook Threading events
                m_BackgroundWorker.DoWork -= m_BackgroundWorker_GeneratePlots;
                m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_BoxPlotCompleted;
                #endregion
            }
        }