public frmShapiroWilksPar(clsShapiroWilksPar clsKW)
 {
     InitializeComponent();
     mclsShapiroWilksPar = clsKW;
 }
        private void menuItemShapiroWilks_Click(object sender, EventArgs e)
        {
            var mclsSelected = (clsDatasetTreeNode)ctltreeView.SelectedNode.Tag;

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

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

            mclsShapiroWilksPar = new clsShapiroWilksPar();
            Rdataset = mclsSelected.mstrRdatasetName;

            mclsShapiroWilksPar.Rdataset = Rdataset;
            mclsShapiroWilksPar.mstrDatasetName = mclsSelected.mstrDataText;

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

            var mfrmShapiroWilksPar = new frmShapiroWilksPar(mclsShapiroWilksPar);
            if (mfrmShapiroWilksPar.ShowDialog() == DialogResult.OK)
            {
                mclsShapiroWilksPar = mfrmShapiroWilksPar.clsShapiroWilksPar;

                Add2AnalysisHTable(mclsShapiroWilksPar, "Shapiro-Wilks_Test");

                m_BackgroundWorker.RunWorkerAsync(mclsShapiroWilksPar.Rcmd);
                mfrmShowProgress.Message = "Performing Shapiro-Wilks test ...";
                mfrmShowProgress.ShowDialog();
            }

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