Пример #1
0
 public DefineAnnotationDlg(IEnumerable <AnnotationDef> existing)
 {
     InitializeComponent();
     Icon = Resources.Skyline;
     checkedListBoxAppliesTo.Items.Clear();
     comboAppliesTo.Items.Clear();
     foreach (var annotationTarget in new[]
     {
         AnnotationDef.AnnotationTarget.protein,
         AnnotationDef.AnnotationTarget.peptide,
         AnnotationDef.AnnotationTarget.precursor,
         AnnotationDef.AnnotationTarget.transition,
         AnnotationDef.AnnotationTarget.replicate,
         AnnotationDef.AnnotationTarget.precursor_result,
         AnnotationDef.AnnotationTarget.transition_result,
     })
     {
         var item = new AnnotationTargetItem(annotationTarget, ModeUI);
         checkedListBoxAppliesTo.Items.Add(item);
         comboAppliesTo.Items.Add(item);
     }
     comboType.Items.AddRange(ListPropertyType.ListPropertyTypes().ToArray());
     comboType.SelectedIndex = 0;
     ComboHelper.AutoSizeDropDown(comboType);
     _existing   = existing;
     _dataSchema = BrowsingDataSchema.GetBrowsingDataSchema();
     availableFieldsTree1.RootColumn = NullRootColumn;
 }
Пример #2
0
 private void SetListDef(ListDef listDef)
 {
     tbxListName.Text = listDef.Name;
     if (!string.IsNullOrEmpty(listDef.Name))
     {
         tbxListName.ReadOnly = true;
     }
     foreach (var property in listDef.Properties)
     {
         _listProperties.Add(new ListProperty(property));
     }
     colPropertyType.Items.Clear();
     foreach (var propertyType in ListPropertyType.ListPropertyTypes(_existing))
     {
         colPropertyType.Items.Add(propertyType);
     }
     PopulatePropertyDropdown(comboIdProperty, listDef.IdProperty);
     PopulatePropertyDropdown(comboDisplayProperty, listDef.DisplayProperty);
 }
Пример #3
0
 public DefineAnnotationDlg(IEnumerable <AnnotationDef> existing)
 {
     InitializeComponent();
     Icon = Resources.Skyline;
     checkedListBoxAppliesTo.Items.Clear();
     foreach (var annotationTarget in new[]
     {
         AnnotationDef.AnnotationTarget.protein,
         AnnotationDef.AnnotationTarget.peptide,
         AnnotationDef.AnnotationTarget.precursor,
         AnnotationDef.AnnotationTarget.transition,
         AnnotationDef.AnnotationTarget.replicate,
         AnnotationDef.AnnotationTarget.precursor_result,
         AnnotationDef.AnnotationTarget.transition_result,
     })
     {
         checkedListBoxAppliesTo.Items.Add(new AnnotationTargetItem(annotationTarget, GetModeUIHelper().ModeUI));
     }
     comboType.Items.AddRange(ListPropertyType.ListPropertyTypes().ToArray());
     comboType.SelectedIndex = 0;
     ComboHelper.AutoSizeDropDown(comboType);
     _existing = existing;
 }