Esempio n. 1
0
File: Form1.cs Progetto: rNdm74/C-
        private void Form1_Load(object sender, EventArgs e)
        {
            // Set canvas for regent seating display
            canvasGallery      = pSeatingDisplayGallery.CreateGraphics();
            canvasGalleryRows  = pGalleryRows.CreateGraphics();
            canvasGallerySeats = pGallerySeats.CreateGraphics();
            canvasGods         = pSeatingDisplayGods.CreateGraphics();
            canvasGodsRows     = pGodsRows.CreateGraphics();
            canvasGodsSeats    = pGodsSeats.CreateGraphics();

            // Create subject
            allocateSeatSubject = new Subject();
            allocateSeatSubject.AddObserver(new Gallery(canvasGallery, canvasGalleryRows, canvasGallerySeats, gallerySeating));
            allocateSeatSubject.AddObserver(new Gods(canvasGods, canvasGodsRows, canvasGodsSeats, godsSeating));

            // Create intefaces
            season = new Season(lAllocatedSeating, gallerySeating);
            door   = new Door(lAllocatedSeating, godsSeating);
        }
Esempio n. 2
0
File: Form1.cs Progetto: rNdm74/C-
        private void Form1_Load(object sender, EventArgs e)
        {
            // Set canvas for regent seating display
            canvasGallery = pSeatingDisplayGallery.CreateGraphics();
            canvasGalleryRows = pGalleryRows.CreateGraphics();
            canvasGallerySeats = pGallerySeats.CreateGraphics();
            canvasGods = pSeatingDisplayGods.CreateGraphics();
            canvasGodsRows = pGodsRows.CreateGraphics();
            canvasGodsSeats = pGodsSeats.CreateGraphics();

            // Create subject
            allocateSeatSubject = new Subject();
            allocateSeatSubject.AddObserver(new Gallery(canvasGallery, canvasGalleryRows, canvasGallerySeats, gallerySeating));
            allocateSeatSubject.AddObserver(new Gods(canvasGods, canvasGodsRows, canvasGodsSeats, godsSeating));

            // Create intefaces
            season = new Season(lAllocatedSeating, gallerySeating);
            door = new Door(lAllocatedSeating, godsSeating);
        }