Пример #1
0
 public MassSpectrum(ManagedDataSource source, int index, SpectrumList spectrumList)
 {
     this.source       = source;
     this.spectrumList = spectrumList;
     this.index        = index;
     //element = spectrum;
     //using( Spectrum element = Element )
     {
         id = Element.id;
     }
 }
Пример #2
0
 /// <summary>
 /// This function checks the exisiting cache for the data source.
 /// It will create a new one, inserts it into the cache before
 /// returning it.
 /// </summary>
 /// <param name="name">Name of the datasource</param>
 /// <returns>SeeMS ManagedDataSource</returns>
 public static ManagedDataSource getDataSource(string name)
 {
     try {
         ManagedDataSource src = (ManagedDataSource)cache[name];
         if (src == null)
         {
             src         = new ManagedDataSource(new SpectrumSource(name));
             cache[name] = src;
         }
         return(src);
     } catch (Exception e)
     {
         MessageBox.Show(e.ToString() + "\n" + e.StackTrace);
     }
     return(null);
 }