Ejemplo 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();
         }
     }
 }
Ejemplo 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();
     });
 }
Ejemplo 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);
        }
Ejemplo 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);
 }
Ejemplo 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();
     });
 }