示例#1
0
 public Report(ModuleBase parent, string filename) : base(parent)
 {
     if (Path.GetExtension(filename) == ".bsdr")
     {
         csvreader = new ORBBinaryReader(filename, true);
     }
     else
     {
         csvreader = new ORBCsvReader(filename, true);
     }
     Simulator.GetInstance().OnStopped += new EmptyHandler(DoReport);
 }
示例#2
0
        public void DoReport()
        {
            if (logger != null)
            {
                csvreader = logger.OutputWriter.GetReader();
            }

            Dictionary <string, List <double> > plots = csvreader.Read(signals);

            chartindex = 0;

            if (NewChartData != null)
            {
                foreach (IPlotMultiple ipm in multplots)
                {
                    NewChartData(ipm.Plot(plots));
                }
            }

            foreach (string key in plots.Keys)
            {
                if (NewChartData != null)
                {
                    foreach (IPlotSingle ips in singleplots)
                    {
                        ips.Title = key;
                        NewChartData(ips.Plot(plots[key]));
                    }
                }

                if (NewPrintReport != null)
                {
                    foreach (IPrintReport ipr in prints)
                    {
                        NewPrintReport(ipr.Print(key, plots[key]));
                    }
                }
            }
        }
示例#3
0
 public Report(ModuleBase parent, OutputReaderBase csv)
     : base(parent)
 {
     csvreader = csv;
     Simulator.GetInstance().OnStopped += new EmptyHandler(DoReport);
 }