示例#1
0
文件: Form1.cs 项目: 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);
        }
示例#2
0
文件: Form1.cs 项目: 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);
        }