Beispiel #1
0
 public override DateTime GetFileDate(string file)
 {
     if (spectrumParser.ParseSpectrumFile(file) == ReturnCode.SUCCESS)
     {
         return(spectrumParser.GetSpectrum().GetStartTime());
     }
     return(DateTime.MinValue);
 }
Beispiel #2
0
        public override ReturnCode Compile(List <string> sourceFiles, DateTime start, DateTime end, string targetFileName)
        {
            if (sourceFiles.Count() == 0)
            {
                return(ReturnCode.FAIL);
            }

            spectrumParser.ParseSpectrumFile(sourceFiles[0]);
            Spectrum result = spectrumParser.GetSpectrum();

            for (int f = 1; f < sourceFiles.Count(); f++)
            {
                spectrumParser.ParseSpectrumFile(sourceFiles[f]);
                result.Add(spectrumParser.GetSpectrum());
            }
            ;
            result.SetStartTime(start);
            spectrumWriter.SetSpectrum(result);
            spectrumWriter.WriteSpectrumFile(targetFileName);
            return(ReturnCode.SUCCESS);
        }