Esempio n. 1
0
 public void EditList()
 {
     using (var dlg = new EditListDlg <ComparePeakBoundariesList, ComparePeakBoundaries>(_peakBoundaryList, Document))
     {
         if (dlg.ShowDialog(this) == DialogResult.OK)
         {
             _peakBoundaryList = new ComparePeakBoundariesList(dlg.GetAllEdited().ToList());
             UpdateCheckedList();
             UpdateAll();
         }
     }
 }
Esempio n. 2
0
 private void AddLibrary(EditListDlg <SettingsListBase <LibrarySpec>, LibrarySpec> editListUI, TestLibInfo info)
 {
     RunDlg <EditLibraryDlg>(editListUI.AddItem, addLibUI =>
     {
         var nameTextBox = (TextBox)addLibUI.Controls.Find("textName", true)[0];
         Assert.IsNotNull(nameTextBox);
         var pathTextBox = (TextBox)addLibUI.Controls.Find("textPath", true)[0];
         Assert.IsNotNull(pathTextBox);
         nameTextBox.Text = info.Name;
         pathTextBox.Text = TestFilesDir.GetTestPath(info.Filename);
         addLibUI.OkDialog();
     });
 }
Esempio n. 3
0
        private static void DefineAnnotation(EditListDlg <SettingsListBase <AnnotationDef>, AnnotationDef> dialog,
                                             String name, AnnotationDef.AnnotationTargetSet targets, AnnotationDef.AnnotationType type, IList <string> items)
        {
            var defineAnnotationDlg = ShowDialog <DefineAnnotationDlg>(dialog.AddItem);

            RunUI(() =>
            {
                defineAnnotationDlg.AnnotationName    = name;
                defineAnnotationDlg.AnnotationType    = type;
                defineAnnotationDlg.AnnotationTargets = targets;
                defineAnnotationDlg.Items             = items ?? new string[0];
            });
            OkDialog(defineAnnotationDlg, defineAnnotationDlg.OkDialog);
        }
Esempio n. 4
0
 private static void DefineAnnotation(EditListDlg<SettingsListBase<AnnotationDef>, AnnotationDef> dialog,
     String name, AnnotationDef.AnnotationTargetSet targets, AnnotationDef.AnnotationType type, IList<string> items)
 {
     var defineAnnotationDlg = ShowDialog<DefineAnnotationDlg>(dialog.AddItem);
     RunUI(()=>
               {
                   defineAnnotationDlg.AnnotationName = name;
                   defineAnnotationDlg.AnnotationType = type;
                   defineAnnotationDlg.AnnotationTargets = targets;
                   defineAnnotationDlg.Items = items ?? new string[0];
               });
     OkDialog(defineAnnotationDlg, defineAnnotationDlg.OkDialog);
 }
Esempio n. 5
0
 private void AddLibrary(EditListDlg<SettingsListBase<LibrarySpec>, LibrarySpec> editListUI, TestLibInfo info)
 {
     RunDlg<EditLibraryDlg>(editListUI.AddItem, addLibUI =>
     {
         var nameTextBox = (TextBox)addLibUI.Controls.Find("textName", true)[0];
         Assert.IsNotNull(nameTextBox);
         var pathTextBox = (TextBox)addLibUI.Controls.Find("textPath", true)[0];
         Assert.IsNotNull(pathTextBox);
         nameTextBox.Text = info.Name;
         pathTextBox.Text = TestFilesDir.GetTestPath(info.Filename);
         addLibUI.OkDialog();
     });
 }