public Control WriteEditor(ref IFitEditor edit) { if (edit == null || !(edit is FixedPointEditor)) edit = new FixedPointEditor(); FixedPointEditor cdit = edit as FixedPointEditor; cdit.Tag = GetType(); cdit.U = U; cdit.V = V; return cdit; }
//#region PointTypeSwitcher //public PointTypeSwitcher WriteEditor(PointTypeSwitcher edit) //{ // if (edit == null) // edit = new PointTypeSwitcher(); // CurvePointEditor ce = edit.Edit as CurvePointEditor; // if (ce == null) // ce = new CurvePointEditor(); // ce.Tag = GetType(); // //ce.Label = GetType().Name; // ce.Curves = PointTypeSwitcher.GetCurves(); // ce.Curve = m_curve; // ce.CS = S_Equ; // edit.SetEdit(ce); // return edit; //} //public void ReadEditor(PointTypeSwitcher edit) //{ // CurvePointEditor ce = edit.Edit as CurvePointEditor; // if (ce == null) // throw new ArgumentException("Invalid Editor in CurvePoint"); // S_Equ = ce.CS; // m_curve = ce.Curve == null ? m_curve : ce.Curve; //} //#endregion public Control WriteEditor(ref IFitEditor edit) { if (edit == null || !(edit is CurvePointEditor)) edit = new CurvePointEditor(); CurvePointEditor cdit = edit as CurvePointEditor; cdit.Tag = GetType(); cdit.Curve = m_curve; cdit.CS = S_Equ; return cdit; }
public void ReadEditor(IFitEditor edit) { if (edit == null) throw new ArgumentNullException(); if (!(edit is FixedPointEditor)) throw new ArgumentException("Type must be FixedPointEditor"); FixedPointEditor pdit = edit as FixedPointEditor; U = pdit.U; V = pdit.V; }
public void ReadEditor(IFitEditor edit) { if (edit == null ) throw new ArgumentNullException(); if( !(edit is CurvePointEditor) ) throw new ArgumentException("Type must be CurvePointEditor"); CurvePointEditor cdit = edit as CurvePointEditor; m_curve = cdit.Curve; S_Equ = cdit.CS; }