public Elevator(TextBox text, Label displayFloor, Label displayCabin, Dictionary <Direction, Button> dictionaryFloorButton, Dictionary <string, Button> dictionaryCabinButton) { _txtElevator = text; _floorDoor = new FloorDoor(_txtElevator); _cabinDoor = new CabinDoor(_txtElevator); _motor = new Motor(_txtElevator); _floorDisplay = new FloorDisplay(displayFloor); _cabinDisplay = new CabinDisplay(displayCabin); foreach (var item in dictionaryCabinButton) { _cabinPanel.CreateButton(item.Key, item.Value); } foreach (var item in dictionaryFloorButton) { _floorPanel.CreateButton(item.Key, item.Value); } _Director = new DirectorManouver(_txtElevator, _floorPanel, _cabinPanel, _floorDisplay, _cabinDisplay, _motor, _floorDoor, _cabinDoor); }
public void CreateButton(LevelType direction, Button button) { _floorPanel.CreateButton(direction, button); }