private void AddDatasetOption(IDatasetOptions dsOption, bool assignValue)
        {
            tabCount++;

            var panel = dsOption.CreateControl() as DatasetPanelBase;

            panel.SetShowName(!_IsOneEngineMode);

            if (dsOption.Name == null || dsOption.Name.Length == 0)
            {
                dsOption.Name = dsOption.SearchEngine + tabCount.ToString();
            }

            if (assignValue)
            {
                panel.LoadFromDataset();
            }
            else
            {
                panel.DatasetName = dsOption.Name;
            }

            tcDatasetList.TabPages.Add(dsOption.Name);

            panel.AddNameChangedEvent(DatasetNameChanged);

            tcDatasetList.SelectedIndex = tcDatasetList.TabPages.Count - 1;

            var tb = tcDatasetList.TabPages[tcDatasetList.TabPages.Count - 1];

            tb.Controls.Add(panel);
            tb.Tag = panel;

            panel.Dock = DockStyle.Fill;
        }
Beispiel #2
0
 public Dataset(IDatasetOptions options)
 {
     this.Options                     = options;
     this.Experimentals               = new HashSet <string>();
     this.HasDuplicatedSpectrum       = false;
     this.PSMPassedFixedCriteriaCount = 0;
     this.SavedOptimalResults         = new List <Tuple <string, List <OptimalItem> > >();
 }
        protected void DoAddDatasetOption(IDatasetOptions dsOption)
        {
            Option.DatasetList.Add(dsOption);

            AddDatasetOption(dsOption, false);

            this.ResumeLayout();
        }
 public void SaveToDataset(IDatasetOptions options)
 {
     options.PathNames = new List <string>(datFiles.GetAllItems());
 }
 public void LoadFromDataset(IDatasetOptions options)
 {
     datFiles.ClearItems();
     datFiles.AddItems(options.PathNames.ToArray());
 }