예제 #1
0
        public void GenerateReportCLI(String savePath, Boolean quick = false)
        {
            if (ScanResult.ScanException != null)
            {
                System.Console.WriteLine(string.Format("{0}", ScanResult.ScanException.Message));
            }
            else
            {
                if (ScanResult.FileExceptions.Count > 0)
                {
                    System.Console.Error.WriteLine("Scan completed with errors (see report).");
                }
                else
                {
                    System.Console.Error.WriteLine("Scan completed successfully.");
                }

                try {
                    if (quick)
                    {
                        var report = new QuickReport();
                        report.Generate(BDROM, selectedPlaylists, ScanResult, savePath);
                    }
                    else
                    {
                        var report = new FormReport();
                        report.Generate(BDROM, selectedPlaylists, ScanResult, savePath);
                    }
                }
                catch (Exception ex) {
                    System.Console.WriteLine(string.Format("{0}", (ex.Message)));
                }
            }
        }
예제 #2
0
        public QuickReportData GenerateReport()
        {
            if (ScanResult.ScanException != null)
            {
                throw new Exception(ScanResult.ScanException.Message);
            }

            if (ScanResult.FileExceptions.Count > 0)
            {
                System.Console.Error.WriteLine("Scan completed with errors (see report).");
            }
            else
            {
                System.Console.Error.WriteLine("Scan completed successfully.");
            }

            var report = new QuickReport();

            return(report.Generate(BDROM, selectedPlaylists, ScanResult));
        }