Beispiel #1
0
        private void menuItemOneSampleTtest_Click(object sender, EventArgs e)
        {
            var selectedNodeTag = (clsDatasetTreeNode)ctltreeView.SelectedNode.Tag;

            if (!ValidateDataMatrixTableSelected(selectedNodeTag))
            {
                return;
            }

            #region Hook Threading Events

            m_BackgroundWorker.DoWork             += m_BackgroundWorker_Ttest;
            m_BackgroundWorker.RunWorkerCompleted += m_BackgroundWorker_ANOVACompleted;

            #endregion

            mclsOneSampleTtestPar = new clsOneSampleTtestPar();
            Rdataset = selectedNodeTag.mstrRdatasetName;

            mclsOneSampleTtestPar.Rdataset        = Rdataset;
            mclsOneSampleTtestPar.mstrDatasetName = selectedNodeTag.mstrDataText;

            if (!ValidateDataMatrixTableSelected(selectedNodeTag, true))
            {
                return;
            }

            var tTestParams = new frmOneSampleTtestPar(mclsOneSampleTtestPar);
            if (tTestParams.ShowDialog() == DialogResult.OK)
            {
                mclsOneSampleTtestPar = tTestParams.clsTtestPar;

                Add2AnalysisHTable(mclsOneSampleTtestPar, "T_Test");

                m_BackgroundWorker.RunWorkerAsync(mclsOneSampleTtestPar.Rcmd);
                mfrmShowProgress.Reset("Performing One Sample T-test ...");
                mfrmShowProgress.ShowDialog();
            }

            #region Unhook Threading Events

            m_BackgroundWorker.DoWork             -= m_BackgroundWorker_Ttest;
            m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_ANOVACompleted;

            #endregion
        }
        private void menuItemOneSampleTtest_Click(object sender, EventArgs e)
        {
            var mclsSelected = (clsDatasetTreeNode)ctltreeView.SelectedNode.Tag;

            if (!ValidateDataMatrixTableSelected(mclsSelected))
            {
                return;
            }

            #region Hook Threading Events
            m_BackgroundWorker.DoWork += m_BackgroundWorker_Ttest;
            m_BackgroundWorker.RunWorkerCompleted += m_BackgroundWorker_ANOVACompleted;
            #endregion

            mclsOneSampleTtestPar = new clsOneSampleTtestPar();
            Rdataset = mclsSelected.mstrRdatasetName;

            mclsOneSampleTtestPar.Rdataset = Rdataset;
            mclsOneSampleTtestPar.mstrDatasetName = mclsSelected.mstrDataText;

            if (!ValidateDataMatrixTableSelected(mclsSelected, true))
            {
                return;
            }

            var mfrmTtestPar = new frmOneSampleTtestPar(mclsOneSampleTtestPar);
            if (mfrmTtestPar.ShowDialog() == DialogResult.OK)
            {
                mclsOneSampleTtestPar = mfrmTtestPar.clsTtestPar;

                Add2AnalysisHTable(mclsOneSampleTtestPar, "T_Test");

                m_BackgroundWorker.RunWorkerAsync(mclsOneSampleTtestPar.Rcmd);
                mfrmShowProgress.Message = "Performing One Sample T-test ...";
                mfrmShowProgress.ShowDialog();
            }

            #region Unhook Threading Events
            m_BackgroundWorker.DoWork -= m_BackgroundWorker_Ttest;
            m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_ANOVACompleted;
            #endregion
        }