public FormulaViewModel(FormulaModel model, ImagesModel images, EquationViewModel parent) { this.model = model; this.formula = model.Formula; this.parent = parent; model.PropertyChanged += ModelOnPropertyChanged; images.PropertyChanged += ImagesOnPropertyChanged; parent.PropertyChanged += ParentOnPropertyChanged; }
public EquationsViewModel(Models.Models models) { this.models = models; this.Apply = new ApplyImageFormulasCommand(this); viewModels = new EquationViewModel[models.Equations.NumEquations]; for (var i = 0; i < viewModels.Length; ++i) { viewModels[i] = new EquationViewModel(models.Equations.Get(i), models, i); viewModels[i].PropertyChanged += OnPropertyChanged; } }