public Object clone()
        {
            BezierCurves ret = new BezierCurves();

            for (int j = 0; j < Utility.CURVE_USAGE.Length; j++)
            {
                CurveType          ct  = Utility.CURVE_USAGE[j];
                List <BezierChain> src = this.get(ct);
                ret.set(ct, new List <BezierChain>());
                int count = src.Count;
                for (int i = 0; i < count; i++)
                {
                    ret.get(ct).Add((BezierChain)src[i].clone());
                }
            }
            return(ret);
        }
        public FormBezierPointEditController(
            TrackSelector parent,
            CurveType curve_type,
            int selected_chain_id,
            int selected_point_id)
        {
            ui = (FormBezierPointEditUi) new FormBezierPointEditUiImpl(this);

            applyLanguage();
            m_parent     = parent;
            m_curve_type = curve_type;
            m_track      = AppManager.getSelected();
            m_chain_id   = selected_chain_id;
            m_point_id   = selected_point_id;
            bool               found    = false;
            VsqFileEx          vsq      = AppManager.getVsqFile();
            BezierCurves       attached = vsq.AttachedCurves.get(m_track - 1);
            List <BezierChain> chains   = attached.get(m_curve_type);

            for (int i = 0; i < chains.Count; i++)
            {
                if (chains[i].id == m_chain_id)
                {
                    found = true;
                    break;
                }
            }
            if (!found)
            {
                return;
            }
            bool smooth = false;

            foreach (var bp in attached.getBezierChain(m_curve_type, m_chain_id).points)
            {
                if (bp.getID() == m_point_id)
                {
                    m_point = bp;
                    smooth  =
                        (bp.getControlLeftType() != BezierControlType.None) ||
                        (bp.getControlRightType() != BezierControlType.None);
                    break;
                }
            }
            updateStatus();
        }
 public void insertElementAt(int position, BezierCurves attached_curve)
 {
     mCurves.Insert(position, attached_curve);
 }
 public void add(BezierCurves item)
 {
     mCurves.Add(item);
 }
 public void set(int index, BezierCurves value)
 {
     mCurves[index] = value;
 }