Exemplo n.º 1
0
        public void GenerateReports(Measurement m)
        {
            RawAnalysisReport rep = new AnalysisDefs.RawAnalysisReport(ctrllog);
            rep.GenerateReport(m);
            ResultsReport = rep.replines;
            MethodResultsReport mrep = new AnalysisDefs.MethodResultsReport(ctrllog);
            mrep.GenerateReport(m);
            foreach (List<string> r in mrep.INCCResultsReports)
            {
                INCCResultsReports.Add(r);
            }
            if (NC.App.AppContext.CreateINCC5TestDataFile)
            { 
                TestDataFile mdat = new AnalysisDefs.TestDataFile(ctrllog);
                mdat.GenerateReport(m);
                foreach (List<string> r in mdat.INCCTestDataFiles)
                {
                    TestDataFiles.Add(r);
                }
            }

            if (NC.App.AppContext.OpenResults)
            {
                string notepadPath = System.IO.Path.Combine(Environment.SystemDirectory, "notepad.exe");
                if (System.IO.File.Exists(notepadPath))
                {
                    foreach (string fname in m.INCCResultsFileNames)
                        System.Diagnostics.Process.Start(notepadPath, fname);
                }
                // todo:optional enablement
                // Microsoft.Office.Interop.Excel.Application excel = new Microsoft.Office.Interop.Excel.Application();
                //Microsoft.Office.Interop.Excel.Workbook wb = excel.Workbooks.Open(m.ResultsFileName);
                //excel.Visible = true;
            }
        }
Exemplo n.º 2
0
        public void GenerateReports(Measurement m)
        {
            RawAnalysisReport rep = new AnalysisDefs.RawAnalysisReport(ctrllog);

            rep.GenerateReport(m);
            ResultsReport = rep.replines;
            MethodResultsReport mrep = new AnalysisDefs.MethodResultsReport(ctrllog);

            mrep.GenerateReport(m);
            foreach (List <string> r in mrep.INCCResultsReports)
            {
                INCCResultsReports.Add(r);
            }
            if (NC.App.AppContext.CreateINCC5TestDataFile)
            {
                TestDataFile mdat = new AnalysisDefs.TestDataFile(ctrllog);
                mdat.GenerateReport(m);
                foreach (List <string> r in mdat.INCCTestDataFiles)
                {
                    TestDataFiles.Add(r);
                }
            }

            if (NC.App.AppContext.OpenResults)
            {
                string notepadPath = System.IO.Path.Combine(Environment.SystemDirectory, "notepad.exe");
                if (System.IO.File.Exists(notepadPath))
                {
                    foreach (string fname in m.INCCResultsFileNames)
                    {
                        System.Diagnostics.Process.Start(notepadPath, fname);
                    }
                }
                // todo:optional enablement
                // Microsoft.Office.Interop.Excel.Application excel = new Microsoft.Office.Interop.Excel.Application();
                //Microsoft.Office.Interop.Excel.Workbook wb = excel.Workbooks.Open(m.ResultsFileName);
                //excel.Visible = true;
            }
        }