public CurveViewModel Configure(Curve curve) { Curve = curve; InitCurve(); return this; }
public void Init(Curve fromCurve) { Name = fromCurve.Name; Min = fromCurve.Points.First().X; Max = fromCurve.Points.Skip(fromCurve.Points.Count - 1).First().X; PointCount = fromCurve.Points.Count(); }
public IEnumerable<IResult> Ok() { if (pointCount < 2) pointCount = 2; NewCurve = Curve.Create(Name, Min, Max, PointCount); yield return Result.Close(); }
public CurveGlobal(Curve curve) { this.curve = curve; }
public void RemoveCurve(Curve curve) { Curves.Remove(curve); }
public void AddNewCurve(Curve curve) { Curves.Add(curve); Curves = new List<Curve>(Curves.OrderBy(c => c.Name)); }
public void Reset(Curve newCurve) { Points = newCurve.Points; }