Exemplo n.º 1
0
 public Drawer(Elevator e, Buttons[] eButton, Display eDisplay, Doors eDoors, Doors[] sDoors, Shaft s, Buttons[] sButton, Display[] sDisplay)
 {
     this.e = e;
     this.eButton = eButton;
     this.eDisplay = eDisplay;
     this.eDoors = eDoors;
     this.sDoors = sDoors;
     this.sButton = sButton;
     this.sDisplay = sDisplay;
     this.s = s;
 }
Exemplo n.º 2
0
        private void StartBuild()
        {
            //ConstructElevator
            e = new Elevator(height, width);
            eDoors = new Doors(height, width);
            eDisplay = new Display(20, (width - 20) / 2);
            eButton = new Buttons[nFloor];

            //ConstructShaft
            s = new Shaft(height, width, nFloor, floorDist);
            sButton = new Buttons[nFloor];
            sDisplay = new Display[nFloor];
            sDoors = new Doors[nFloor];

            //Arrays
            for (int x = 0; x < nFloor; x++)
            {
                sButton[x] = new Buttons(35, 35);
                sDisplay[x] = new Display(40, 65);
                sDoors[x] = new Doors(height, width);
                eButton[x] = new Buttons(15, 20);
            }
        }
Exemplo n.º 3
0
        private void FlipButton(Buttons buttons)
        {
            if (buttons.Pressed)
                buttons.Pressed = false;
            else
                buttons.Pressed = true;

            elevatorDisplay.RefreshDrawing();
        }