/// <summary> /// Adds a new higher unit. /// </summary> /// <returns>The new <see cref="HigherUnitDecorator" />.</returns> public IUnitDecorator AddNewHigherUnit() { HigherUnitDecorator higherUnit = this._decoratorService.Decorate(new HigherUnit()); AddSubordinate(higherUnit); return(higherUnit); }
/// <summary> /// Adds a new <see cref="HigherUnit" /> to the root unit's list of subordinates. /// </summary> public void AddNewHigherUnit() { HigherUnitDecorator higherUnit = this._decoratorService.Decorate(new HigherUnit()); higherUnit.PropertyChanged += OnHigherUnitDecoratorPropertyChanged; RootUnit.AddSubordinate(higherUnit); SelectedUnit = higherUnit; }