Esempio n. 1
0
        static void Main(string[] args)
        {
            Report.Report  report;
            ReportDirector director = new ReportDirector();

            ReportPdf pdf = new ReportPdf();

            report = director.MakeReport(pdf);
            report.DisplayReport();

            ReportExcel excel = new ReportExcel();

            report = director.MakeReport(excel);
            report.DisplayReport();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            // Client Code
            Report         report;
            ReportDirector reportDirector = new ReportDirector();
            // Construct and display Reports
            PDFReport pdfReport = new PDFReport();

            report = reportDirector.MakeReport(pdfReport);
            report.DisplayReport();
            Console.WriteLine("-------------------");
            ExcelReport excelReport = new ExcelReport();

            report = reportDirector.MakeReport(excelReport);
            report.DisplayReport();

            Console.ReadKey();
        }
Esempio n. 3
0
        public static void Run()
        {
            Report         report;
            ReportDirector reportDirector = new ReportDirector();

            // Construct and display Reports
            PDFReport pdfReport = new PDFReport();

            report = reportDirector.MakeReport(pdfReport);
            report.DisplayReport();
            Console.WriteLine("-------------------");

            ExcelReport excelReport = new ExcelReport();

            report = reportDirector.MakeReport(excelReport);
            report.DisplayReport();

            Console.ReadKey();
        }