コード例 #1
0
        // MAD Adjustment
        private void menuItemMAD_Click(object sender, EventArgs e)
        {
            var mclsSelected = (clsDatasetTreeNode)ctltreeView.SelectedNode.Tag;

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

            if (!ValidateExpressionsLoaded("apply MAD"))
            {
                return;
            }

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

            #region Hook Threading events
            m_BackgroundWorker.DoWork += m_BackgroundWorker_MAD;
            m_BackgroundWorker.RunWorkerCompleted += m_BackgroundWorker_MADCompleted;
            #endregion

            mclsMADPar = new Purgatorio.clsMADPar
            {
                Rdataset = mclsSelected.mstrRdatasetName,
                DataSetName = mclsSelected.mstrDataText
            };

            var mfrmMad = new frmMADPar(mclsMADPar)
            {
                DataSetName = mclsSelected.mstrDataText
            };
            if (mhtDatasets.ContainsKey("Factors"))
            {
                var mclsFactors = mhtDatasets["Factors"];
                mfrmMad.PopulateFactorComboBox = clsDataTable.DataTableRows(mclsFactors.mDTable);
                mclsMADPar.marrFactors = clsDataTable.DataTableRows(mclsFactors.mDTable);
            }
            else
                mfrmMad.PopulateFactorComboBox = null;

            if (mfrmMad.ShowDialog() == DialogResult.OK)
            {
                mclsMADPar = mfrmMad.clsMADPar;

                Add2AnalysisHTable(mclsMADPar, "MedianAbsoluteDeviation_Adjustment");

                var rcmd = mclsMADPar.Rcmd;

                m_BackgroundWorker.RunWorkerAsync(rcmd);
                mfrmShowProgress.Message = "MAD Adjusting Data ...";
                mfrmShowProgress.ShowDialog();
            }

            #region Unhook Threading events
            m_BackgroundWorker.DoWork -= m_BackgroundWorker_MAD;
            m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_MADCompleted;
            #endregion
        }
コード例 #2
0
        private void menuItemMAD_Click(object sender, EventArgs e) // MAD Adjustment
        {
            var selectedNodeTag = (clsDatasetTreeNode)ctlTreeView.SelectedNode.Tag;

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

            if (!ValidateExpressionsLoaded("apply MAD"))
            {
                return;
            }

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

            #region Hook Threading events

            m_BackgroundWorker.DoWork             += m_BackgroundWorker_MAD;
            m_BackgroundWorker.RunWorkerCompleted += m_BackgroundWorker_MADCompleted;

            #endregion

            mMADParams = new Purgatorio.clsMADPar
            {
                RDataset    = selectedNodeTag.RDatasetName,
                DataSetName = selectedNodeTag.DataText
            };

            var madParams = new frmMADPar(mMADParams)
            {
                DataSetName = selectedNodeTag.DataText
            };
            if (mhtDatasets.ContainsKey("Factors"))
            {
                var factorTable = mhtDatasets["Factors"];
                madParams.PopulateFactorComboBox = clsDataTable.DataTableRows(factorTable.mDTable);
                clsDataTable.DataTableRows(factorTable.mDTable);
            }
            else
            {
                madParams.PopulateFactorComboBox = null;
            }

            if (madParams.ShowDialog() == DialogResult.OK)
            {
                mMADParams = madParams.clsMADPar;

                Add2AnalysisHTable(mMADParams, "MedianAbsoluteDeviation_Adjustment");

                var rCmd = mMADParams.RCommand;

                m_BackgroundWorker.RunWorkerAsync(rCmd);
                mProgressForm.Reset("MAD Adjusting Data ...");
                mProgressForm.ShowDialog();
            }

            #region Unhook Threading events

            m_BackgroundWorker.DoWork             -= m_BackgroundWorker_MAD;
            m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_MADCompleted;

            #endregion
        }
コード例 #3
0
        private void menuItemMAD_Click(object sender, EventArgs e) // MAD Adjustment
        {
            var mclsSelected = (clsDatasetTreeNode)ctltreeView.SelectedNode.Tag;

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

            if (!ValidateExpressionsLoaded("apply MAD"))
            {
                return;
            }

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

            #region Hook Threading events
            m_BackgroundWorker.DoWork             += m_BackgroundWorker_MAD;
            m_BackgroundWorker.RunWorkerCompleted += m_BackgroundWorker_MADCompleted;
            #endregion

            mclsMADPar = new Purgatorio.clsMADPar
            {
                Rdataset    = mclsSelected.mstrRdatasetName,
                DataSetName = mclsSelected.mstrDataText
            };

            var mfrmMad = new frmMADPar(mclsMADPar)
            {
                DataSetName = mclsSelected.mstrDataText
            };
            if (mhtDatasets.ContainsKey("Factors"))
            {
                var mclsFactors = mhtDatasets["Factors"];
                mfrmMad.PopulateFactorComboBox = clsDataTable.DataTableRows(mclsFactors.mDTable);
                mclsMADPar.marrFactors         = clsDataTable.DataTableRows(mclsFactors.mDTable);
            }
            else
            {
                mfrmMad.PopulateFactorComboBox = null;
            }

            if (mfrmMad.ShowDialog() == DialogResult.OK)
            {
                mclsMADPar = mfrmMad.clsMADPar;

                Add2AnalysisHTable(mclsMADPar, "MedianAbsoluteDeviation_Adjustment");

                var rcmd = mclsMADPar.Rcmd;

                m_BackgroundWorker.RunWorkerAsync(rcmd);
                mfrmShowProgress.Message = "MAD Adjusting Data ...";
                mfrmShowProgress.ShowDialog();
            }

            #region Unhook Threading events
            m_BackgroundWorker.DoWork             -= m_BackgroundWorker_MAD;
            m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_MADCompleted;
            #endregion
        }