/// <summary> /// Adds a new <see cref="Unit" /> to the root unit's list of subordinates. /// </summary> public void AddNewUnit() { UnitDecorator unit = this._decoratorService.Decorate(new Unit()); unit.PropertyChanged += OnUnitDecoratorPropertyChanged; RootUnit.AddSubordinate(unit); SelectedUnit = unit; }
/// <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; }