Пример #1
0
 protected virtual void WriteProcessingInfoToLog()
 {
     Logger.Instance.AddEntry("DeconTools.Backend.dll version = " + AssemblyInfoRetriever.GetVersion(typeof(ScanBasedWorkflow)));
     Logger.Instance.AddEntry("ParameterFile = " + (NewDeconToolsParameters.ParameterFilename == null ? "[NONE]" :
                                                    Path.GetFileName(NewDeconToolsParameters.ParameterFilename)));
     Logger.Instance.AddEntry("UIMFLibrary version = " + AssemblyInfoRetriever.GetVersion(typeof(UIMFLibrary.DataReader)), Logger.Instance.OutputFilename);   //forces it to write out immediately and clear buffer
 }
Пример #2
0
        public void getAssemblyVersionInfoTest1()
        {
            string versionString = AssemblyInfoRetriever.GetVersion(typeof(Task));

            Console.WriteLine("Version = " + versionString);
            Assert.Greater(versionString.Length, 10);
        }
Пример #3
0
        public Form1()
        {
            InitializeComponent();

            GetSettings();
            progressBar2.Maximum = 10;

            this.Text = "DeconTools AutoProcessor_" + AssemblyInfoRetriever.GetVersion(typeof(Task), false);
        }
Пример #4
0
        public static ScanBasedWorkflow CreateWorkflow(string datasetFileName, string parameterFile, string outputFolderPath = null, BackgroundWorker backgroundWorker = null, bool useNewDeconToolsParameterObjects = true)
        {
            var datasetFile = new FileInfo(datasetFileName);

            if (!datasetFile.Exists)
            {
                var datasetFolder = new DirectoryInfo(datasetFileName);
                if (!datasetFolder.Exists)
                {
                    throw new FileNotFoundException("Dataset file (or folder) not found: " + datasetFile);
                }
            }

            var paramFile = new FileInfo(parameterFile);

            if (!paramFile.Exists)
            {
                throw new FileNotFoundException("Parameter file not found: " + parameterFile);
            }

            // Initialize a new Run
            Run run;

            try
            {
                run = new RunFactory().CreateRun(datasetFileName);
            }
            catch (Exception ex)
            {
                Logger.Instance.OutputFilename = datasetFileName + "_BAD_ERROR_log.txt";
                Logger.Instance.AddEntry("DeconTools.Backend.dll version = " + AssemblyInfoRetriever.GetVersion(typeof(ScanBasedWorkflow)));
                Logger.Instance.AddEntry("UIMFLibrary version = " + AssemblyInfoRetriever.GetVersion(typeof(UIMFLibrary.DataReader)), Logger.Instance.OutputFilename);   //forces it to write out immediately and clear buffer
                Logger.Instance.AddEntry("ERROR message= " + ex.Message, Logger.Instance.OutputFilename);
                Logger.Instance.AddEntry("ERROR type= " + ex, Logger.Instance.OutputFilename);
                Logger.Instance.AddEntry("STACKTRACE = " + PRISM.clsStackTraceFormatter.GetExceptionStackTraceMultiLine(ex), Logger.Instance.OutputFilename);

                throw new ApplicationException(
                          "A fatal error occured when connecting to the instrument data file. Could not create the Run object. Internal error message: " +
                          ex.Message + Environment.NewLine + Environment.NewLine + PRISM.clsStackTraceFormatter.GetExceptionStackTraceMultiLine(ex));
            }

            DeconToolsParameters newParameters;

            try
            {
                newParameters = new DeconToolsParameters();
                newParameters.LoadFromOldDeconToolsParameterFile(parameterFile);
            }
            catch (Exception ex)
            {
                throw new ApplicationException(
                          "Error loading the parameter file: " +
                          ex.Message + Environment.NewLine + Environment.NewLine + PRISM.clsStackTraceFormatter.GetExceptionStackTraceMultiLine(ex));
            }

            try
            {
                return(CreateWorkflow(run, newParameters, outputFolderPath, backgroundWorker));
            }
            catch (Exception ex)
            {
                throw new ApplicationException(
                          "Error creating the workflow: " +
                          ex.Message + Environment.NewLine + Environment.NewLine + PRISM.clsStackTraceFormatter.GetExceptionStackTraceMultiLine(ex));
            }
        }
Пример #5
0
 protected override void WriteProcessingInfoToLog()
 {
     Logger.Instance.AddEntry("DeconTools.Backend.dll version = " + AssemblyInfoRetriever.GetVersion(typeof(ScanBasedWorkflow)));
     Logger.Instance.AddEntry("ParameterFile = " + (NewDeconToolsParameters.ParameterFilename == null ? "[NONE]" :
                                                    Path.GetFileName(NewDeconToolsParameters.ParameterFilename)), true);
 }
Пример #6
0
 public static string getRapidVersion()
 {
     return(AssemblyInfoRetriever.GetVersion(typeof(RapidEngine.Decon2LS.HornTransform.clsHornTransform)));
 }