void AddSpecificationComponent(SpecificationComponent specificationComponent) { specificationComponent.SpecificationChanged += SpecificationChanged; specificationComponent.InsertLength += InsertLength; specificationComponent.SelectionChanged += SelectionChanged; specificationComponents.Add(specificationComponent); RebuildSegmentComponents(); Changed(); RebuildCurveSpecification(); curveOptimizer.Submit(nextSpecification); }
void RemoveSelectedSpecificationComponent(SpecificationComponent pointSpecificationComponent) { specificationComponents.Remove(pointSpecificationComponent); if (!specificationComponents.Any() && RemoveCurve != null) { RemoveCurve(); } else { RebuildSegmentComponents(); Changed(); RebuildCurveSpecification(); curveOptimizer.Submit(nextSpecification); } }
void AddSpecification(double position) { SpecificationComponent pointSpecificationComponent = new SpecificationComponent(this, this, position, Enumerables.Create <CurveSpecification>()); AddSpecificationComponent(pointSpecificationComponent); }