public static void RemoveComparer(ComparePeakPickingDlg dlg, string comparerName)
 {
     var editListDlgRemove = ShowDialog<EditListDlg<ComparePeakBoundariesList, ComparePeakBoundaries>>(dlg.EditList);
     RunUI(() =>
     {
         editListDlgRemove.SelectItem(comparerName);
         editListDlgRemove.RemoveItem();
     });
     OkDialog(editListDlgRemove, editListDlgRemove.OkDialog);
 }
Exemple #2
0
 private static void AddFile(ComparePeakPickingDlg dlg, string fileName, string filePath, int dialogSkip = 0)
 {
     var addPeakCompareDlg = ShowDialog<AddPeakCompareDlg>(dlg.Add);
     RunUI(() =>
     {
         addPeakCompareDlg.IsModel = false;
         addPeakCompareDlg.FileName = fileName;
         addPeakCompareDlg.FilePath = filePath;
     });
     if (dialogSkip == 0)
     {
         RunUI(addPeakCompareDlg.OkDialog);
     }
     else
     {
         var messageDlg = ShowDialog<MultiButtonMsgDlg>(addPeakCompareDlg.OkDialog);
         for (int i = 0; i < dialogSkip; ++i)
         {
             if (i > 0)
             {
                 messageDlg = WaitForOpenForm<MultiButtonMsgDlg>();
             }
             RunUI(messageDlg.Btn1Click);
             WaitForClosedForm<MultiButtonMsgDlg>();
         }
     }
     WaitForClosedForm<AddPeakCompareDlg>();
 }
Exemple #3
0
 public static void AddModel(ComparePeakPickingDlg dlg, string modelName)
 {
     var addPeakCompareDlg = ShowDialog<AddPeakCompareDlg>(dlg.Add);
     RunUI(() =>
     {
         addPeakCompareDlg.IsModel = true;
         addPeakCompareDlg.PeakScoringModelSelected = modelName;
     });
     OkDialog(addPeakCompareDlg, addPeakCompareDlg.OkDialog);
 }
 private static void CheckNumberResults(ComparePeakPickingDlg comparePeakPickingDlg, int numResults)
 {
     foreach (var comparer in comparePeakPickingDlg.ComparePeakBoundariesList)
     {
         Assert.AreEqual(comparer.Matches.Count, numResults);
     }
 }
 private static void CheckNumberComparisons(ComparePeakPickingDlg comparePeakPickingDlg, 
     int rocCurves,
     int qCurves,
     int detailsChoices,
     int compareChoices)
 {
     WaitForConditionUI(() => Equals(Math.Max(comparePeakPickingDlg.CountRocCurves - 1, 0), rocCurves), "unexpected rocCurves count");  // Use WaitForCondition instead of Assert.AreEqual to avoid race conditions
     Assert.AreEqual(Math.Max(comparePeakPickingDlg.CountQCurves - 2, 0), qCurves);
     Assert.AreEqual(comparePeakPickingDlg.CountDetailsItems, detailsChoices);
     Assert.AreEqual(comparePeakPickingDlg.CountCompare1Items, compareChoices);
     Assert.AreEqual(comparePeakPickingDlg.CountCompare2Items, compareChoices);
 }
 private static void AddFile(ComparePeakPickingDlg dlg, string fileName, string filePath)
 {
     var addPeakCompareDlg = ShowDialog<AddPeakCompareDlg>(dlg.Add);
     RunUI(() =>
     {
         addPeakCompareDlg.IsModel = false;
         addPeakCompareDlg.FileName = fileName;
         addPeakCompareDlg.FilePath = filePath;
     });
     OkDialog(addPeakCompareDlg, addPeakCompareDlg.OkDialog);
 }
Exemple #7
0
 public void ShowCompareModelsDlg()
 {
     var document = DocumentUI;
     if (!document.Settings.HasResults)
     {
         MessageDlg.Show(this, Resources.SkylineWindow_ShowReintegrateDialog_The_document_must_have_imported_results_);
         return;
     }
     if (document.MoleculeCount == 0)
     {
         MessageDlg.Show(this, Resources.SkylineWindow_ShowCompareModelsDlg_The_document_must_have_targets_in_order_to_compare_model_peak_picking_);
         return;
     }
     if (!document.IsLoaded)
     {
         MessageDlg.Show(this, Resources.SkylineWindow_ShowCompareModelsDlg_The_document_must_be_fully_loaded_in_order_to_compare_model_peak_picking_);
         return;
     }
     using (var dlg = new ComparePeakPickingDlg(document))
     {
         dlg.ShowDialog(this);
     }
 }