コード例 #1
0
        public override ProcessInfo RunAfter(ImportContext importContext)
        {
            string archiveArgs = null;
            var    currentDate = DateTime.Today;

            if (importContext.ImportExisting && importContext.ImportingLast())
            {
                // If we are importing existing files in the folder, create an archive (if required) of the
                // Skyline document AFTER importing the last results file.
                var oldestFileDate = importContext.GetOldestImportedFileDate(Settings.LastAcquiredFileDate);
                var today          = DateTime.Today;
                if (oldestFileDate.Year < today.Year || oldestFileDate.Month < today.Month)
                {
                    archiveArgs = GetArchiveArgs(currentDate.AddMonths(-1), currentDate);
                }
            }
            if (String.IsNullOrEmpty(archiveArgs))
            {
                return(null);
            }
            var args = string.Format("--in=\"{0}\" {1}", Settings.SkylineFilePath, archiveArgs);

            return(new ProcessInfo(AutoQCForm.SkylineRunnerPath, AutoQCForm.SKYLINE_RUNNER, args, args));
        }
コード例 #2
0
ファイル: MainSettings.cs プロジェクト: lgatto/proteowizard
 public override ProcessInfo RunAfter(ImportContext importContext)
 {
     string archiveArgs = null;
     var currentDate = DateTime.Today;
     if (importContext.ImportExisting && importContext.ImportingLast())
     {
         // If we are importing existing files in the folder, create an archive (if required) of the
         // Skyline document AFTER importing the last results file.
         var oldestFileDate = importContext.GetOldestImportedFileDate(Settings.LastAcquiredFileDate);
         var today = DateTime.Today;
         if(oldestFileDate.Year < today.Year || oldestFileDate.Month < today.Month)
         {
             archiveArgs = GetArchiveArgs(currentDate.AddMonths(-1), currentDate);
         }
     }
     if (String.IsNullOrEmpty(archiveArgs))
     {
         return null;
     }
     var args = string.Format("--in=\"{0}\" {1}", Settings.SkylineFilePath, archiveArgs);
     return new ProcessInfo(AutoQCForm.SkylineRunnerPath, AutoQCForm.SKYLINE_RUNNER, args, args);
 }