public ResultStatsViewModel( CalculationNodeViewModelFactory nodeFactory, ModifierNodeViewModelFactory modifierNodeFactory) { _nodeFactory = nodeFactory; _modifierNodeFactory = modifierNodeFactory; NewStat = new AddableResultStatViewModel(); AddStatCommand = new RelayCommand(AddStat); }
private ComputationViewModel(ObservableCalculator observableCalculator, ComputationSchedulerProvider schedulers) { _observableCalculator = observableCalculator; _nodeFactory = new CalculationNodeViewModelFactory(observableCalculator, schedulers.Dispatcher); var modifierNodeFactory = new ModifierNodeViewModelFactory(observableCalculator, _nodeFactory); OffensiveStats = new ResultStatsViewModel(_nodeFactory, modifierNodeFactory); DefensiveStats = new ResultStatsViewModel(_nodeFactory, modifierNodeFactory); }
public ResultStatViewModel( ResultNodeViewModel node, ModifierNodeViewModelFactory modifierNodeFactory, Action <ResultStatViewModel> removeAction) { _modifierNodeFactory = modifierNodeFactory; Node = node; Node.PropertyChanged += NodeOnPropertyChanged; RemoveCommand = new RelayCommand(() => removeAction(this)); ResetModifierNodes(); }