private void menuItemImpute_Click(object sender, EventArgs e) { var mclsSelected = (clsDatasetTreeNode)ctltreeView.SelectedNode.Tag; if (!ValidateNodeIsSelected(mclsSelected)) { return; } if (!ValidateExpressionsLoaded("impute")) { return; } if (!ValidateDataMatrixTableSelected(mclsSelected)) { return; } #region Hook Threading events m_BackgroundWorker.DoWork += m_BackgroundWorker_Impute; m_BackgroundWorker.RunWorkerCompleted += m_BackgroundWorker_ImputeCompleted; #endregion mclsImputePar = new Purgatorio.clsImputePar { Rdataset = mclsSelected.mstrRdatasetName, DataSetName = mclsSelected.mstrDataText }; var mfrmImpute = new frmImputePar(mclsImputePar) { DataSetName = mclsSelected.mstrDataText }; if (mhtDatasets.ContainsKey("Factors")) { var mclsFactors = mhtDatasets["Factors"]; mfrmImpute.PopulateFactorComboBox = clsDataTable.DataTableRows(mclsFactors.mDTable); mclsImputePar.marrFactors = clsDataTable.DataTableRows(mclsFactors.mDTable); } else mfrmImpute.PopulateFactorComboBox = null; if (mfrmImpute.ShowDialog() == DialogResult.OK) { mclsImputePar = mfrmImpute.clsImputePar; Add2AnalysisHTable(mclsImputePar, "Imputation"); var rcmd = mclsImputePar.Rcmd; m_BackgroundWorker.RunWorkerAsync(rcmd); mfrmShowProgress.Message = "Imputing Data ..."; mfrmShowProgress.ShowDialog(); } #region Unhook Threading events m_BackgroundWorker.DoWork -= m_BackgroundWorker_Impute; m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_ImputeCompleted; #endregion }
private void menuItemImpute_Click(object sender, EventArgs e) { var selectedNodeTag = (clsDatasetTreeNode)ctlTreeView.SelectedNode.Tag; if (!ValidateNodeIsSelected(selectedNodeTag)) { return; } if (!ValidateExpressionsLoaded("impute")) { return; } if (!ValidateDataMatrixTableSelected(selectedNodeTag)) { return; } #region Hook Threading events m_BackgroundWorker.DoWork += m_BackgroundWorker_Impute; m_BackgroundWorker.RunWorkerCompleted += m_BackgroundWorker_ImputeCompleted; #endregion mImputationParams = new Purgatorio.clsImputePar { mRDataset = selectedNodeTag.RDatasetName, DataSetName = selectedNodeTag.DataText }; var imputeParams = new frmImputePar(mImputationParams) { DataSetName = selectedNodeTag.DataText }; if (mhtDatasets.ContainsKey("Factors")) { var factorTable = mhtDatasets["Factors"]; imputeParams.PopulateFactorComboBox = clsDataTable.DataTableRows(factorTable.mDTable); clsDataTable.DataTableRows(factorTable.mDTable); } else { imputeParams.PopulateFactorComboBox = null; } if (imputeParams.ShowDialog() == DialogResult.OK) { mImputationParams = imputeParams.clsImputePar; Add2AnalysisHTable(mImputationParams, "Imputation"); var rCmd = mImputationParams.RCommand; m_BackgroundWorker.RunWorkerAsync(rCmd); mProgressForm.Reset("Imputing Data ..."); mProgressForm.ShowDialog(); } #region Unhook Threading events m_BackgroundWorker.DoWork -= m_BackgroundWorker_Impute; m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_ImputeCompleted; #endregion }
private void menuItemImpute_Click(object sender, EventArgs e) { var mclsSelected = (clsDatasetTreeNode)ctltreeView.SelectedNode.Tag; if (!ValidateNodeIsSelected(mclsSelected)) { return; } if (!ValidateExpressionsLoaded("impute")) { return; } if (!ValidateDataMatrixTableSelected(mclsSelected)) { return; } #region Hook Threading events m_BackgroundWorker.DoWork += m_BackgroundWorker_Impute; m_BackgroundWorker.RunWorkerCompleted += m_BackgroundWorker_ImputeCompleted; #endregion mclsImputePar = new Purgatorio.clsImputePar { Rdataset = mclsSelected.mstrRdatasetName, DataSetName = mclsSelected.mstrDataText }; var mfrmImpute = new frmImputePar(mclsImputePar) { DataSetName = mclsSelected.mstrDataText }; if (mhtDatasets.ContainsKey("Factors")) { var mclsFactors = mhtDatasets["Factors"]; mfrmImpute.PopulateFactorComboBox = clsDataTable.DataTableRows(mclsFactors.mDTable); mclsImputePar.marrFactors = clsDataTable.DataTableRows(mclsFactors.mDTable); } else { mfrmImpute.PopulateFactorComboBox = null; } if (mfrmImpute.ShowDialog() == DialogResult.OK) { mclsImputePar = mfrmImpute.clsImputePar; Add2AnalysisHTable(mclsImputePar, "Imputation"); var rcmd = mclsImputePar.Rcmd; m_BackgroundWorker.RunWorkerAsync(rcmd); mfrmShowProgress.Message = "Imputing Data ..."; mfrmShowProgress.ShowDialog(); } #region Unhook Threading events m_BackgroundWorker.DoWork -= m_BackgroundWorker_Impute; m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_ImputeCompleted; #endregion }