Example #1
0
        public CurveViewModel Configure(Curve curve)
        {
            Curve = curve;
            InitCurve();

            return this;
        }
Example #2
0
 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();
 }
Example #3
0
        public IEnumerable<IResult> Ok()
        {
            if (pointCount < 2)
                pointCount = 2;

            NewCurve = Curve.Create(Name, Min, Max, PointCount);
            yield return Result.Close();
        }
Example #4
0
 public CurveGlobal(Curve curve)
 {
     this.curve = curve;
 }
Example #5
0
 public void RemoveCurve(Curve curve)
 {
     Curves.Remove(curve);
 }
Example #6
0
 public void AddNewCurve(Curve curve)
 {
     Curves.Add(curve);
     Curves = new List<Curve>(Curves.OrderBy(c => c.Name));
 }
Example #7
0
 public void Reset(Curve newCurve)
 {
     Points = newCurve.Points;
 }