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