예제 #1
0
 // Through this method, we create the buttons that will be on the panel, except the basement's floors
 public void createFloorRequestButtons(int _amountOfFloors)
 {
     for (int buttonFloor = 1; buttonFloor <= _amountOfFloors; buttonFloor++)
     {
         FloorRequestButton floorRequestButton = new FloorRequestButton(Buttons.floorRequestButtonID, "off", buttonFloor, "up");
         this.floorRequestButtonsList.Add(floorRequestButton);
         Buttons.floorRequestButtonID++;
     }
 }
예제 #2
0
        // Through this method, we create the buttons that will be on the panel, just the basement's floors
        public void createBasementFloorRequestButtons(int _amountOfBasements)
        {
            int buttonFloor = -1;

            for (int i = 1; i <= _amountOfBasements; i++)
            {
                FloorRequestButton floorRequestButton = new FloorRequestButton(Buttons.floorRequestButtonID, "off", buttonFloor, "down");
                this.floorRequestButtonsList.Add(floorRequestButton);
                buttonFloor--;
                Buttons.floorRequestButtonID++;
            }
        }
        //Method to create buttons to request a floor
        public void makeFloorRequestButtons(int amountOfFloors)
        {
            int buttonFloor = 1;

            for (int i = 0; i < amountOfFloors; i++)
            {
                var floorRequestButton = new FloorRequestButton(floorRequestButtonID, "off", buttonFloor);
                floorRequestButtonsList.Add(floorRequestButton);
                buttonFloor++;
                floorRequestButtonID++;
            }
        }
        //Method to create basement floor request buttons
        public void makeBasementFloorRequestButtons(int amountOfBasements)
        {
            int buttonFloor = -1;

            for (int i = 0; i < amountOfBasements; i++)
            {
                var floorRequestButton = new FloorRequestButton(floorRequestButtonID, "off", buttonFloor);
                floorRequestButtonsList.Add(floorRequestButton);
                buttonFloor--;
                floorRequestButtonID++;
            }
        }