Exemple #1
0
        public void EditIrtCalcDlgPepCountTest(EditIrtCalcDlg dlg, int numStandardPeps, int numLibraryPeps, string path, bool add)
        {
            RunUI(() =>
                      {
                          Assert.AreEqual(0, dlg.StandardPeptideCount);
                          Assert.AreEqual(0, dlg.LibraryPeptideCount);

                          dlg.CalcName = "Testing";
                          dlg.OpenDatabase(path);

                          Assert.AreEqual(numStandardPeps, dlg.StandardPeptideCount);
                          Assert.AreEqual(numLibraryPeps, dlg.LibraryPeptideCount);
                      });

            if(add)
            {
                RunDlg<AddIrtPeptidesDlg>(dlg.AddResults, addDlg =>
                                                              {
                                                                  addDlg.Action = AddIrtPeptidesAction.skip;
                                                                  addDlg.OkDialog();
                                                              });
            }

            RunUI(dlg.OkDialog);
            WaitForClosedForm(dlg);
        }
 public void EditCalculator()
 {
     using (var calcDlg = new EditIrtCalcDlg(Calculator, Settings.Default.RTScoreCalculatorList))
     {
         if (calcDlg.ShowDialog(this) == DialogResult.OK)
         {
             Calculator = ((RCalcIrt) Calculator.ChangeName(calcDlg.CalcName))
                 .ChangeDatabasePath(calcDlg.Calculator.PersistencePath);
             txtName.Text = Calculator.Name;
         }
     }
 }