private void menuItemZRollup_Click(object sender, EventArgs e) { var selectedNodeTag = (clsDatasetTreeNode)ctltreeView.SelectedNode.Tag; if (!ValidateTables(selectedNodeTag, "ZRollup")) { return; } var dataset = selectedNodeTag.mstrRdatasetName; #region Hook Threading events m_BackgroundWorker.DoWork += m_BackgroundWorker_ZRollup; m_BackgroundWorker.RunWorkerCompleted += m_BackgroundWorker_ZRollupCompleted; #endregion mclsZRollupPar = new Purgatorio.clsZRollupPar { Rdataset = selectedNodeTag.mstrRdatasetName, DataSetName = selectedNodeTag.mstrDataText, OutFolder_pub = Settings.Default.WorkingFolder }; var zRollupParams = new frmZRollupPar(mclsZRollupPar); if (mhtDatasets.ContainsKey("ZRollup")) { MessageBox.Show("ZRollup is already done.", "Nothing to do"); return; } if (zRollupParams.ShowDialog() == DialogResult.OK) { mclsZRollupPar = zRollupParams.clsZRollupPar; if (dataset != null) { Add2AnalysisHTable(mclsZRollupPar, "ZRollup"); var rcmd = mclsZRollupPar.Rcmd; m_BackgroundWorker.RunWorkerAsync(rcmd); mfrmShowProgress.Reset("ZRollup: Scaling Peptides and Rolling up to Proteins ..."); mfrmShowProgress.ShowDialog(); } } #region Unhook Threading events m_BackgroundWorker.DoWork -= m_BackgroundWorker_ZRollup; m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_ZRollupCompleted; #endregion }
public frmZRollupPar(Purgatorio.clsZRollupPar mclsZRoll) { InitializeComponent(); mclsZRollup = mclsZRoll; }