Ejemplo n.º 1
0
 //Through this method we create the buttons floors
 public void createCallButtons(int _amountOfFloors, Boolean _isBasement)
 {
     if (_isBasement)
     {
         int buttonBasement = -1;
         for (int i = 1; i <= _amountOfFloors; i++)
         {
             CallButton callButton = new CallButton(Buttons.callButtonID, "off", buttonBasement, "up");
             this.callButtonList.Add(callButton);
             buttonBasement--;
             Buttons.callButtonID++;
         }
     }
     else
     {
         for (int i = 1; i <= _amountOfFloors; i++)
         {
             CallButton callButton = new CallButton(Buttons.callButtonID, "off", Buttons.buttonFloor, "down");
             this.callButtonList.Add(callButton);
             Buttons.buttonFloor++;
             Buttons.callButtonID++;
         }
     }
 }