示例#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();
         }
     }
 }
示例#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();
     });
 }
示例#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);
        }
示例#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);
 }
 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();
     });
 }