using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace RecipeEditorLib.RecipeModel.Params { public class StringParam : Param { public override bool UndoChanges() { Value = OldValue; IsSaved = true; return true; } private string _oldValue; public string OldValue { get { return _oldValue; } set { _oldValue = value; this.NotifyOfPropertyChange("OldValue"); } } private string _value; public string Value { get { return this._value; } set { this._value = value; if (IsSaved) { OldValue = value; } if (this.Feedback != null) this.Feedback(this); this.NotifyOfPropertyChange("Value"); } } public override void SetValue(string value) { IsSaved = false; this.Value = value; } } }