public MainMenuController(IMainMenu view, Unit unit) { _view = view; _unit = unit; _company = unit; _view.SetController(this); _view.ShowTitle("company" + " " + _unit.ToString()); }
public void ChooseUnit() { if (_view.type != "company") { if (_view.currentUnit == null) { _view.ShowErrorMessage("Choose unit from the list!"); return; } _unit = _view.currentUnit; } else { _unit = _company; } if (_unit.Type == 3) { _view.ForbidCreate(); } string title = _view.type + " " + _unit.ToString(); _view.ShowTitle(title); }