예제 #1
0
        static void Main(string[] args)
        {
            // Construct a presentation for the test output
            Presentation presentation = new Presentation("Presentation");
            presentation.AddContent(new Page("1. Page"));

            Page secondPage = new Page("2. Page");
            secondPage.AddContent(new ImageContent("2.1 Image Content"));
            secondPage.AddContent(new Page("2.2 Page"));

            Gallery gallery = new Gallery("2.3 Gallery");
            gallery.AddContent(new ImageContent("2.3.1 Galleryimage 1"));
            gallery.AddContent(new ImageContent("2.3.2 Galleryimage 2"));

            secondPage.AddContent(gallery);
            presentation.AddContent(secondPage);

            // Print information about its contents
            foreach (Page p in presentation.Contents) {
                Console.WriteLine((p.Parent as IPresentationModule).Title+" contains "+p.Title);
                PrintSubContents(p.Contents);
            }

            Console.Read();
        }