private void SetUp(string numberOfFloors) { if (!int.TryParse(numberOfFloors, out var n) || n < 2 || n > 20) { _view.ShowError("Введите число от 2 до 20"); return; } try { _elevatorService.NumberOfFloors = n; _elevatorService.InitializeFloors(n); } catch (Exception e) { _view.ShowError(e.Message); return; } _container.Get <BuildingPresenter>().Run(); _view.Close(); }